js-bao-wss-client / CreateDatabaseParams
Interface: CreateDatabaseParams
Parameters for databases.create().
Properties
celContext?
optionalcelContext?: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?
optionalinitialMetadata?: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?
optionalmetadata?: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