js-bao-wss-client / CreateCollectionParams
Interface: CreateCollectionParams
Parameters for collections.create().
Properties
collectionType?
optionalcollectionType?:string
Optional. Controls which CollectionTypeConfig / rule set applies to the new collection. Defaults to "default" when omitted. Must not contain "#". Immutable after create.
contextId?
optionalcontextId?:string
Optional. Per-instance identifier that ties the collection to an external entity (e.g. a class ID). Exposed to CEL rules as collection.contextId. Must not contain "#". Immutable after create.
Deprecated
Prefer resource metadata categories. Stamp the binding via initialMetadata and read it from CEL as md.self.<category>.<key>. The migration is not 1:1: a rule set can read md.self.<category>.<key> only when the collection type config declares a metadataManifest for that category. See collections.md. The field keeps working.
description?
optionaldescription?:string
Optional text describing the collection's purpose
initialMetadata?
optionalinitialMetadata?:Record<string,Record<string,unknown>>
Optional. Create-time resource metadata to stamp on the new collection, keyed by category name → the category's values. Each entry is schema-validated but the category writeRule is waived — creation authority covers the initial stamp. At most 10 categories; any invalid entry fails the whole create.
name
name:
string
Display name for the collection