Skip to content

js-bao-wss-client


js-bao-wss-client / CreateDatabaseParams

Interface: CreateDatabaseParams ​

Parameters for databases.create().

Properties ​

celContext? ​

optional celContext?: Record<string, string | number | boolean | null>

Optional key-value pairs to attach as the database's CEL context. Values set here can be referenced from CEL access rules as database.celContext.<key> (or the legacy database.metadata.<key>) and from filter JSON as $database.celContext.<key>.

Deprecated ​

Prefer resource metadata categories — a category has separate readRule/writeRule (read no longer implies update, unlike the metadataAccess gate) and is read from CEL as md.self.<category>.<key>. Stamp create-time category values via initialMetadata instead. The field keeps working.


databaseType ​

databaseType: string

The type identifier for the database schema


initialMetadata? ​

optional initialMetadata?: Record<string, Record<string, unknown>>

Optional. Create-time resource metadata to stamp on the new database, keyed by category name → the category's values. Distinct from celContext: these are per-category ResourceMetadata rows, schema-validated with the category writeRule waived (creation authority covers the initial stamp). At most 10 categories; any invalid entry fails the whole create.


metadata? ​

optional metadata?: Record<string, string | number | boolean | null>

Optional key-value pairs to attach as the database's CEL context.

Deprecated ​

Prefer resource metadata categories — a category has separate readRule/writeRule and is read from CEL as md.self.<category>.<key>. The legacy name ("metadata") is the same field as the (also-deprecated) celContext and still works.


title ​

title: string

Display name for the database

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