Skip to content

js-bao-wss-client


js-bao-wss-client / CollectionTypeConfigsAPI

Interface: CollectionTypeConfigsAPI ​

Sub-API for collection type configurations (client.collectionTypeConfigs.*). A configuration attaches a CEL rule set (and optionally a declared-access manifest) to every collection of a given type, controlling who can read and modify those collections.

Methods ​

create() ​

create(params): Promise<CollectionTypeConfigInfo>

Creates a new collection type configuration.

Parameters ​

params ​

CreateCollectionTypeConfigParams

Configuration for the new collection type

Returns ​

Promise<CollectionTypeConfigInfo>


delete() ​

delete(collectionType): Promise<{ success: boolean; }>

Deletes a collection type configuration.

Parameters ​

collectionType ​

string

The collection type identifier to delete

Returns ​

Promise<{ success: boolean; }>


get() ​

get(collectionType): Promise<CollectionTypeConfigInfo>

Retrieves the configuration for a specific collection type.

Parameters ​

collectionType ​

string

The collection type identifier to look up

Returns ​

Promise<CollectionTypeConfigInfo>


list() ​

list(): Promise<CollectionTypeConfigInfo[]>

Lists all collection type configurations for the current app.

Returns ​

Promise<CollectionTypeConfigInfo[]>


update() ​

update(collectionType, params): Promise<CollectionTypeConfigInfo>

Updates an existing collection type configuration's rule set.

Parameters ​

collectionType ​

string

The collection type identifier to update

params ​

UpdateCollectionTypeConfigParams

Fields to update on the collection type configuration

Returns ​

Promise<CollectionTypeConfigInfo>

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