Skip to content

js-bao-wss-client


js-bao-wss-client / CollectionInfo

Interface: CollectionInfo ​

A collection's metadata. Returned by collections.create(), get(), update(), and the list() / listAll() methods.

Properties ​

appId ​

appId: string


collectionId ​

collectionId: string


collectionType ​

collectionType: string

Controls which CollectionTypeConfig (and therefore which rule set) applies to this collection. Defaults to "default" when not supplied at create time. Immutable after create.


contextId ​

contextId: string | null

Per-instance context identifier. Parallels a group's groupId. Used by CEL rules (collection.contextId) to identify the external entity the collection is bound to (e.g. a class ID, project ID). null for collections not bound to any context. Immutable after create.

Deprecated ​

Prefer resource metadata categories. Stamp a category at create time via CreateCollectionParams.initialMetadata and read it from CEL as md.self.<category>.<key>. Note the migration is not 1:1: because collection.contextId is consumed inside rule sets, 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.


createdAt ​

createdAt: string


createdBy ​

createdBy: string


description? ​

optional description?: string


documentCount ​

documentCount: number


modifiedAt ​

modifiedAt: string


name ​

name: string


permission? ​

optional permission?: "read-write" | "reader"

Caller's direct permission on the collection. Populated by list() only (not listAll() or get()). "reader" = caller is in the _col-reader system group "read-write" = caller is in the _col-writer system group

Documentation validated against js-bao-wss-client 3.4.0 · js-bao 0.11.0 · primitive-admin 1.0.62 · primitive-app 3.1.0 — 2026-09-30