js-bao-wss-client / GetOrCreateWithAliasOptions
Interface: GetOrCreateWithAliasOptions
Options for getting an existing document by alias, or creating a new one if the alias does not exist.
Properties
alias
alias:
ResolveAliasParams
The alias to look up or assign to the new document.
documentFormat?
optionaldocumentFormat?:1|2
Create a LARGE document (2) instead of an ordinary one, with the same meaning it has on CreateDocumentOptions.documentFormat.
On this idempotent route it is read twice over: applied when the call creates the document, and otherwise taken as a statement about the document the alias already names. If the stored format differs the call is REFUSED (DOCUMENT_FORMAT_MISMATCH), because an app that asks for a large document and is handed an ordinary one has already made the mistake this route exists to prevent; if it agrees, the format is echoed back.
Omitted — the default — states nothing, so an existing binding is answered exactly as it was before this option existed. Any value other than 1 or 2, including the string "2", is refused with INVALID_ARGUMENT before any request is made.
metadata?
optionalmetadata?:unknown
Opaque JSON-serializable metadata blob to attach if a new document is created (≤ 4 KB serialized UTF-8). Like tags, it applies only when this call creates the document; an existing binding is left untouched.
tags?
optionaltags?:string[]
Tags to attach if a new document is created.
title?
optionaltitle?:string
The title to use if a new document is created.