std/build/collection
std/build/collection
Interfaces
CollectionApprovalOperations
Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:414
Properties
findMany
readonly findMany: (approvalRequestId) => RemoteQuery<readonly CollectionApprovalRequest[]>;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:415
Parameters
| Parameter | Type |
|---|---|
approvalRequestId |
string |
Returns
RemoteQuery<readonly CollectionApprovalRequest[]>
process
readonly process: (input) => Promise<void>;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:416
Parameters
| Parameter | Type |
|---|---|
input |
{ action: "APPROVED" | "REJECTED" | "REQUEST_FOR_CHANGE" | "SUPERSEDED"; approvalRequestId: string; comments?: string; } |
input.action |
"APPROVED" | "REJECTED" | "REQUEST_FOR_CHANGE" | "SUPERSEDED" |
input.approvalRequestId |
string |
input.comments? |
string |
Returns
Promise<void>
withdraw
readonly withdraw: (approvalRequestId) => Promise<void>;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:421
Parameters
| Parameter | Type |
|---|---|
approvalRequestId |
string |
Returns
Promise<void>
CollectionApprovalRequest
Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:404
Properties
canDecide
readonly canDecide: boolean;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:408
Whether this principal may decide the request's current step.
canSupersede
readonly canSupersede: boolean;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:410
Whether this principal may explicitly finish every remaining step.
canWithdraw
readonly canWithdraw: boolean;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:412
Whether this principal is the requestor and may withdraw the open request.
id
readonly id: string;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:405
status
readonly status: string;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:406
CollectionBaseQuery
Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:217
Extended by
Type Parameters
| Type Parameter |
|---|
TRow extends object |
Properties
bypass_secret?
readonly optional bypass_secret?: string;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:224
columns?
readonly optional columns?: Record<string, boolean>;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:222
orderBy?
readonly optional orderBy?: Partial<Record<Extract<keyof TRow, string>, "asc" | "desc">>;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:223
search?
readonly optional search?: string;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:221
Plain text, /semantic <text> or /<index> <json>. See CollectionSearch.
where?
readonly optional where?: CollectionWhere<TRow>;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:219
with?
readonly optional with?: Record<string, unknown>;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:218
CollectionClient
Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:449
Type Parameters
| Type Parameter |
|---|
TCollections extends CollectionRegistry |
Properties
[collectionRegistryType]?
readonly optional [collectionRegistryType]?: TCollections;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:450
approvals?
readonly optional approvals?: CollectionApprovalOperations;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:464
collection
readonly collection: { readonly [TName in string | number | symbol]: Readonly<{ pending: number; create: any; createMany: any; delete: any; deleteMany: any; update: any; updateMany: any }> };Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:454
collection_history
readonly collection_history: { readonly [TName in string | number | symbol]: CollectionHistoryOperations<CollectionRow<TCollections[TName]>> };Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:457
collections
readonly collections: { readonly [TName in string | number | symbol]: CollectionDefinition<TCollections[TName]> };Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:460
db
readonly db: { readonly [TName in string | number | symbol]: Readonly<{ count: any; findFirst: any; findGrouped: any; findMany: any }> };Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:451
records
readonly records: CollectionRecordOperations;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:463
CollectionDbClient
Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:474
Tenant-authored collection surfaces receive only the typed database vocabulary they consume.
A surface for one authored collection must not require unrelated collections to expose the same
capabilities. In particular, the generic approval_request projection is deliberately
read-only in generated browser clients and therefore cannot satisfy a whole-registry writable
client contract.
Type Parameters
| Type Parameter | Default type |
|---|---|
TCollections extends CollectionRegistry |
- |
TName extends keyof TCollections |
keyof TCollections |
Properties
[collectionRegistryType]?
readonly optional [collectionRegistryType]?: TCollections;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:475
collection
readonly collection:
| Partial<{ readonly [TName in string | number | symbol]: Readonly<{ pending: number; create: any; createMany: any; delete: any; deleteMany: any; update: any; updateMany: any }> }>
| Partial<Pick<{ readonly [TName in string | number | symbol]: Readonly<{ pending: number; create: any; createMany: any; delete: any; deleteMany: any; update: any; updateMany: any }> }, TName>>;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:478
Absent for a collection with no declared write contract: the surface renders read-only.
db
readonly db:
| { readonly [TName in string | number | symbol]: Readonly<{ count: any; findFirst: any; findGrouped: any; findMany: any }> }
| Pick<{ readonly [TName in string | number | symbol]: Readonly<{ count: any; findFirst: any; findGrouped: any; findMany: any }> }, TName>;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:476
CollectionDefinition
Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:178
Type Parameters
| Type Parameter | Default type |
|---|---|
TCollection extends CollectionType<object, object, object> |
CollectionType |
Properties
fields
readonly fields: readonly CollectionField<Extract<keyof CollectionRow<TCollection>, string>>[];Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:182
name
readonly name: string;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:179
recordLabel?
readonly optional recordLabel?: string | null;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:180
relationships?
readonly optional relationships?: readonly CollectionRelationship[];Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:183
semantic?
readonly optional semantic?: boolean;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:191
The collection declares a platform embedding, so /semantic search is offered.
similarity?
readonly optional similarity?: readonly CollectionSimilarityIndex[];Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:193
The similarity indexes +collection.ts declared, each a /<name> search command.
system?
readonly optional system?: boolean;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:181
write?
readonly optional write?: CollectionWriteContract;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:189
The collection's declared write contract, the browser's copy of its +collection.ts. A form
registers exactly the columns of the operation it performs; absent, the collection is
read-only and no write surface exists for it.
CollectionField
Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:69
Type Parameters
| Type Parameter | Default type |
|---|---|
TName extends string |
string |
Properties
array?
readonly optional array?: boolean;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:79
currencies?
readonly optional currencies?: readonly string[];Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:85
defaulted?
readonly optional defaulted?: boolean;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:77
The column carries a DEFAULT: a create may leave it unset and the database fills it. A form
therefore does not demand it — a notNull().default(false) flag is not a required question.
kind
readonly kind: string;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:71
label?
readonly optional label?: string;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:78
mimeTypes?
readonly optional mimeTypes?: readonly string[];Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:86
name
readonly name: TName;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:70
nullable
readonly nullable: boolean;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:72
options?
readonly optional options?: Readonly<Record<string, unknown>>;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:84
precision?
readonly optional precision?: "day" | "minute";Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:83
How precisely an instant range is picked: calendar days, or date-times.
readOnly?
readonly optional readOnly?: boolean;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:80
relation?
readonly optional relation?: object;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:101
Carries no label: how a related record reads is a view decision, declared where the relation
is rendered (a table column's relation.label), not inherited from the target collection.
name
readonly name: string;target
readonly target: string;
search?
readonly optional search?: boolean;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:96
Explicit search opt-in, authored as text({ search: true }).
Search is opt-in: only a non-array text/phone/enum field carrying search: true gets a
generated lexical document and participates in any search path — the collection search box, the
omni finder and @ mentions, relation pickers. Absent means the field is never searched and
never indexed, however text-like its kind.
values?
readonly optional values?: readonly string[];Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:81
variant?
readonly optional variant?: NumericRendererVariant;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:87
CollectionFilter
Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:292
One filter condition as the wire carries it.
Stated structurally, because the schema needs a transport and the vocabulary does not — a table rendering filter chips has no business importing a wire validator to learn what a filter is.
operator stays an inline union rather than an exported alias: the filter builder already
extends it as CollectionFilter['operator'] | 'contains', and a second exported name for the
same set is how the two drift.
Properties
operand?
readonly optional operand?: unknown;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:297
Omitted for the operators that take none (isNull, isNotNull, related).
operator
readonly operator:
| "eq"
| "ne"
| "gt"
| "gte"
| "lt"
| "lte"
| "ilike"
| "isNull"
| "isNotNull"
| "arrayContains"
| "arrayOverlaps"
| "contains_date"
| "overlaps"
| "related";Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:295
path
readonly path: readonly string[];Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:294
Root field path or a path reached through at most two relationship edges.
related?
readonly optional related?: CollectionRelatedMatch;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:302
With related, the path ends on a relationship and this says how many of its rows must match
where: any, none, all, or a count ("customers with at least 1 open invoice message").
where?
readonly optional where?: readonly CollectionFilter[];Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:304
With related: conditions on the related rows, all on the same row, relative to its collection.
CollectionFilterOptions
Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:318
Properties
filters?
readonly optional filters?: readonly CollectionFilter[];Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:319
CollectionGroupedQuery
Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:248
Extends
CollectionBaseQuery<TRow>
Type Parameters
| Type Parameter |
|---|
TRow extends object |
Properties
bypass_secret?
readonly optional bypass_secret?: string;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:224
Inherited from
CollectionBaseQuery.bypass_secret
columns?
readonly optional columns?: Record<string, boolean>;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:222
Inherited from
group
readonly group: object;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:250
by
readonly by: Extract<keyof TRow, string>;lanes?
readonly optional lanes?: unknown[];
limit?
readonly optional limit?: number;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:249
orderBy?
readonly optional orderBy?: Partial<Record<Extract<keyof TRow, string>, "asc" | "desc">>;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:223
Inherited from
search?
readonly optional search?: string;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:221
Plain text, /semantic <text> or /<index> <json>. See CollectionSearch.
Inherited from
where?
readonly optional where?: CollectionWhere<TRow>;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:219
Inherited from
with?
readonly optional with?: Record<string, unknown>;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:218
Inherited from
CollectionHistoryOperations
Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:441
client.collection_history.<name>: the same rows as the live read, at a point in the log.
Type Parameters
| Type Parameter | Default type |
|---|---|
TRow extends object |
CollectionRecord |
Methods
at()
at(recordId, anchor): RemoteQuery<TRow | undefined>;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:445
The record as it stood at the anchor, or undefined when it did not exist yet.
Parameters
| Parameter | Type |
|---|---|
recordId |
string |
anchor |
CollectionHistoryAnchor |
Returns
RemoteQuery<TRow | undefined>
revisions()
revisions(recordId): RemoteQuery<readonly CollectionRecordHistoryEntry[]>;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:443
Every revision of one record, oldest first.
Parameters
| Parameter | Type |
|---|---|
recordId |
string |
Returns
RemoteQuery<readonly CollectionRecordHistoryEntry[]>
CollectionMutationPendingApproval
Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:326
Properties
action
readonly action: "create" | "update" | "delete";Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:330
collection
readonly collection: string;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:328
id
readonly id: string;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:329
requestId
readonly requestId: string;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:327
CollectionMutationQuarantine
Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:321
Properties
atEpochMs
readonly atEpochMs: number;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:324
code
readonly code: string;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:322
message
readonly message: string;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:323
CollectionMutationSettlementHandle
Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:358
Properties
idempotencyKey
readonly idempotencyKey: string;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:359
settled
readonly settled: Promise<CollectionMutationSettlement>;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:360
status
readonly status: () => Promise<CollectionMutationSettlementStatus>;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:361
Returns
Promise<CollectionMutationSettlementStatus>
wait
readonly wait: (signal?) => Promise<CollectionMutationSettlement>;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:362
Parameters
| Parameter | Type |
|---|---|
signal? |
AbortSignal |
Returns
Promise<CollectionMutationSettlement>
CollectionPage
Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:30
Type Parameters
| Type Parameter | Default type |
|---|---|
TRow extends object |
CollectionRecord |
Properties
nextCursor
readonly nextCursor: string | null;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:32
rows
readonly rows: TRow[];Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:31
CollectionPageQuery
Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:35
A collection page keeps the familiar row result while exposing its opaque continuation.
Extends
RemoteQuery<TRow[]>
Type Parameters
| Type Parameter |
|---|
TRow extends object |
Properties
current
readonly current: TRow[] | undefined;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:26
Inherited from
error
readonly error: Error | undefined;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:28
Inherited from
loading
readonly loading: boolean;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:27
Inherited from
nextCursor
readonly nextCursor: string | null | undefined;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:36
CollectionQuery
Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:226
Extends
CollectionBaseQuery<TRow>
Type Parameters
| Type Parameter |
|---|
TRow extends object |
Properties
after?
readonly optional after?: string;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:229
Opaque continuation returned by the previous page.
bypass_secret?
readonly optional bypass_secret?: string;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:224
Inherited from
CollectionBaseQuery.bypass_secret
columns?
readonly optional columns?: Record<string, boolean>;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:222
Inherited from
limit?
readonly optional limit?: number;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:227
orderBy?
readonly optional orderBy?: Partial<Record<Extract<keyof TRow, string>, "asc" | "desc">>;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:223
Inherited from
search?
readonly optional search?: string;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:221
Plain text, /semantic <text> or /<index> <json>. See CollectionSearch.
Inherited from
where?
readonly optional where?: CollectionWhere<TRow>;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:219
Inherited from
with?
readonly optional with?: Record<string, unknown>;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:218
Inherited from
CollectionRecord
Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:22
Indexable
[field: string]: unknownCollectionRecordHistoryEntry
Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:426
Properties
validFrom
readonly validFrom: string;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:428
validTo
readonly validTo: string | null;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:429
values
readonly values: CollectionRecord;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:427
version
readonly version: number;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:430
CollectionRecordOperations
Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:423
Methods
findMany()
findMany(collectionName, query?): CollectionPageQuery<CollectionRecord>;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:424
Parameters
| Parameter | Type |
|---|---|
collectionName |
string |
query? |
CollectionQuery<CollectionRecord> |
Returns
CollectionPageQuery<CollectionRecord>
CollectionRelationOptions
Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:268
How a relationship presents its option set, declared inline wherever the relationship is rendered — a table column, a form field, a matrix cell.
A relationship is a picker: the stored value is only the key that selects one option, so what a surface needs is the option set, not a property of the target collection. The same target reads differently in different places (an employment might be an employee number here and a name plus department there), which is why this is declared per use and not inherited from the model.
TRow is the target collection's row, so label and the field lists are checked against the
records actually being picked from.
Type Parameters
| Type Parameter | Default type |
|---|---|
TRow extends object |
CollectionRecord |
Properties
filters?
readonly optional filters?: readonly Extract<keyof TRow, string>[];Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:280
Fields the picker offers as filter controls, so a long option list stays navigable.
label
readonly label: (record) => string;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:270
How one option reads. Required — nothing is inferred, and without it a value shows as its id.
Parameters
| Parameter | Type |
|---|---|
record |
TRow |
Returns
string
limit?
readonly optional limit?: number;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:276
orderBy?
readonly optional orderBy?: Partial<Record<Extract<keyof TRow, string>, "asc" | "desc">>;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:275
searchFields?
readonly optional searchFields?: readonly Extract<keyof TRow, string>[];Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:278
Fields the picker's search box matches. Defaults to the server's search behaviour.
where?
readonly optional where?: CollectionWhere<TRow>;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:274
Narrows which records are offered.
with?
readonly optional with?: Record<string, unknown>;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:272
Relations to carry on each option, so a label can read past the row's own columns.
CollectionRelationSelection
Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:200
Properties
create?
readonly optional create?: CollectionWriteSelection;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:201
delete?
readonly optional delete?: true;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:206
link?
readonly optional link?: CollectionWriteSelection;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:204
unlink?
readonly optional unlink?: CollectionWriteSelection;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:205
update?
readonly optional update?: CollectionWriteSelection;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:202
upsert?
readonly optional upsert?: CollectionWriteSelection;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:203
CollectionRelationship
Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:173
Properties
cardinality
readonly cardinality: "one" | "many";Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:176
name
readonly name: string;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:174
target
readonly target: string;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:175
CollectionSimilarityIndex
Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:155
A declared similarity index, as the catalog carries it: what the search command is called, which vector column it ranks by, and the form that captures a target. The embedder stays in the workspace; the browser only knows how to ask.
Properties
column
readonly column: string;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:158
input
readonly input: readonly CollectionSimilarityInputField[];Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:160
label?
readonly optional label?: string;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:157
metric
readonly metric: "l2" | "cosine" | "ip";Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:159
name
readonly name: string;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:156
CollectionSimilarityInputField
Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:135
One control of a similarity index's capture form, as the browser renders it.
Properties
collection?
readonly optional collection?: string;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:141
kind
readonly kind: "number" | "text" | "enum" | "reference";Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:139
reference picks one record of collection; the target may then narrow by it.
label?
readonly optional label?: string;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:137
max?
readonly optional max?: number;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:145
min?
readonly optional min?: number;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:144
name
readonly name: string;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:136
optional?
readonly optional optional?: boolean;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:148
A control that may be left empty; absent means the search needs it.
step?
readonly optional step?: number;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:146
values?
readonly optional values?: readonly string[];Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:140
where?
readonly optional where?: Readonly<Record<string, string | number | boolean>>;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:143
Equalities that narrow which records a reference control offers.
CollectionType
Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:38
Type Parameters
| Type Parameter | Default type |
|---|---|
TRow extends object |
CollectionRecord |
TCreate extends object |
CollectionRecord |
TUpdate extends object |
CollectionRecord |
Properties
create
readonly create: TCreate;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:41
The declared create input: what client.collection.<name>.create accepts.
row
readonly row: TRow;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:39
scalarColumns?
readonly optional scalarColumns?: string;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:50
The columns a live prefix may be ordered by: every column but json, custom-typed and vector
ones. Type-only, generated per collection by the compiler from the same classification the
runtime plans with; absent on an erased registry, where every column qualifies. A plain
string rather than keyof TRow so every registry stays assignable to the object bound.
update
readonly update: TUpdate;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:43
The declared update input: what client.collection.<name>.update accepts.
CollectionWriteContract
Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:209
Which operations a collection exposes and what each accepts.
Properties
create?
readonly optional create?: CollectionWriteSelection;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:210
delete?
readonly optional delete?: true;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:212
update?
readonly optional update?: CollectionWriteSelection;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:211
CollectionWriteSelection
Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:196
One selection: columns names fields, with names relation actions.
Properties
columns?
readonly optional columns?: Readonly<Record<string, true>>;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:197
with?
readonly optional with?: Readonly<Record<string, CollectionRelationSelection>>;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:198
MemoryCollectionMutationResult
Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:369
What browser await mutate() means: the graph is held in tab memory and overlaid for this tab,
while settlement remains explicitly asynchronous and may still be rejected or quarantined by the
authority. A write in a crashed or closed tab is lost before its outcome.
Type Parameters
| Type Parameter |
|---|
TRow extends object |
Properties
durability
readonly durability: "memory";Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:370
idempotencyKey
readonly idempotencyKey: string;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:373
pending
readonly pending: true;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:371
row
readonly row: TRow | null;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:372
settlement
readonly settlement: CollectionMutationSettlementHandle;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:374
RemoteQuery
Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:25
Extends
PromiseLike<T>
Extended by
Type Parameters
| Type Parameter |
|---|
T |
Properties
current
readonly current: T | undefined;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:26
error
readonly error: Error | undefined;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:28
loading
readonly loading: boolean;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:27
Type Aliases
CollectionAnchoredQuery
type CollectionAnchoredQuery<TCollection> = CollectionQuery<CollectionRow<TCollection>> & object;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:245
Type Declaration
after
readonly after: string;Type Parameters
| Type Parameter |
|---|
TCollection extends CollectionType<object, object, object> |
CollectionFieldName
type CollectionFieldName<TCollection> = Extract<keyof CollectionRow<TCollection>, string>;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:55
Type Parameters
| Type Parameter |
|---|
TCollection extends CollectionType<object, object, object> |
CollectionGroupedResult
type CollectionGroupedResult<TRow> = Readonly<Record<string, TRow[]>>;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:255
Type Parameters
| Type Parameter |
|---|
TRow extends object |
CollectionHistoryAnchor
type CollectionHistoryAnchor =
| {
instant: string;
}
| {
revision: number;
}
| {
before: string;
};Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:433
Where a history read stands: an instant, a revision ordinal, or an approval's restore point.
CollectionLiveOrderBy
type CollectionLiveOrderBy<TCollection> = Partial<Readonly<Record<CollectionScalarFieldName<TCollection>, "asc" | "desc">>>;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:240
A read that registers a live prefix, which is keyed by its ordering values.
A key is a scalar: the cursor that continues the prefix binds each value back into SQL, and a
JSON object has no total order the engine can bind. The runtime refuses a live query ordered by
a json, custom-typed or vector column with "Live ordering requires a scalar field"; this is the
same rule stated as a type, so orderBy: { effective_range: 'desc' } on a range column fails
where it is written. A page continued with after is one-shot and keeps the wider vocabulary.
Type Parameters
| Type Parameter |
|---|
TCollection extends CollectionType<object, object, object> |
CollectionLiveQuery
type CollectionLiveQuery<TCollection> = Omit<CollectionQuery<CollectionRow<TCollection>>, "orderBy" | "after"> & object;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:241
Type Declaration
after?
readonly optional after?: undefined;orderBy?
readonly optional orderBy?: CollectionLiveOrderBy<TCollection>;Type Parameters
| Type Parameter |
|---|
TCollection extends CollectionType<object, object, object> |
CollectionMutationSettlement
type CollectionMutationSettlement = Readonly<
| {
idempotencyKey: string;
kind: "accepted";
pendingApproval?: CollectionMutationPendingApproval;
settledAtEpochMs: number;
}
| {
fromSchemaFingerprint: string;
idempotencyKey: string;
kind: "rebased";
settledAtEpochMs: number;
toSchemaFingerprint: string;
}
| {
code: string;
idempotencyKey: string;
kind: "rejected";
message: string;
settledAtEpochMs: number;
}
| {
idempotencyKey: string;
kind: "quarantined";
quarantine: CollectionMutationQuarantine;
settledAtEpochMs: number;
}>;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:333
Server-authoritative M4 outcome, deliberately independent of Bolt's runtime implementation.
CollectionMutationSettlementStatus
type CollectionMutationSettlementStatus =
| CollectionMutationSettlement["kind"]
| "unknown";Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:357
The authority for settlement status; Bolt's public union derives from this plus its queue phases.
CollectionOperations
type CollectionOperations<TCollection> = Readonly<{
count: RemoteQuery<number>;
findFirst: RemoteQuery<
| CollectionRow<TCollection>
| undefined>;
findGrouped: RemoteQuery<Readonly<Record<string, CollectionRow<TCollection>[]>>>;
findMany: CollectionPageQuery<CollectionRow<TCollection>>;
}>;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:376
Type Parameters
| Type Parameter |
|---|
TCollection extends CollectionType<object, object, object> |
CollectionRegistry
type CollectionRegistry = Readonly<Record<string, CollectionType<CollectionRecord, object, object>>>;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:52
CollectionRelatedMatch
type CollectionRelatedMatch =
| Readonly<{
quantifier: "some" | "none" | "every";
}>
| Readonly<{
count: "eq" | "gt" | "gte" | "lt" | "lte";
value: number;
}>
| Readonly<{
aggregate: "sum" | "min" | "max" | "avg";
comparison: "eq" | "gt" | "gte" | "lt" | "lte";
of: string;
value: number;
}>;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:306
CollectionRow
type CollectionRow<TCollection> = TCollection["row"];Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:54
Type Parameters
| Type Parameter |
|---|
TCollection extends CollectionType<object, object, object> |
CollectionScalarFieldName
type CollectionScalarFieldName<TCollection> = TCollection extends object ? Scalar : CollectionFieldName<TCollection>;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:57
The fields a live read may order by; every field when the registry declares no scalar set.
Type Parameters
| Type Parameter |
|---|
TCollection extends CollectionType<object, object, object> |
CollectionSearch
type CollectionSearch = string;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:115
One collection search, as a person or an agent types it.
Plain text is deterministic search: native words, typo skeletons, CJK phrases and the Latin
reading of every script, ranked closest first. /semantic <text> fuses that ranking with the
record embedding's (reciprocal-rank fusion), so an exact hit is never lost to a vector. /<index> <json> asks a declared similarity index, the JSON object being its capture form's values.
CollectionWhere
type CollectionWhere<_TRow> = object;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:214
Type Parameters
| Type Parameter |
|---|
_TRow extends object |
Index Signature
[field: string]: unknownCollectionWriteOperations
type CollectionWriteOperations<TCollection> = Readonly<{
pending: number;
create: Promise<MemoryCollectionMutationResult<CollectionRow<TCollection>>>;
createMany: Promise<MemoryCollectionMutationResult<CollectionRow<TCollection>>>;
delete: Promise<MemoryCollectionMutationResult<CollectionRow<TCollection>>>;
deleteMany: Promise<MemoryCollectionMutationResult<CollectionRow<TCollection>>>;
update: Promise<MemoryCollectionMutationResult<CollectionRow<TCollection>>>;
updateMany: Promise<MemoryCollectionMutationResult<CollectionRow<TCollection>>>;
}>;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:392
The declared write surface of one collection: client.collection.<name>.
Every call is one graph held in tab memory and painted over this tab's live reads until the authority settles it; the returned handle carries that settlement. Inputs are the collection's declared selections; a relation given as a plain array of rows is diffed against the children this tab has loaded and sent as explicit actions.
Type Parameters
| Type Parameter |
|---|
TCollection extends CollectionType<object, object, object> |
ErasedCollectionRegistry
type ErasedCollectionRegistry = Readonly<Record<string, CollectionType>>;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:53
NumericRendererVariant
type NumericRendererVariant =
| {
type: "number";
}
| {
max: number;
type: "star-rating";
}
| {
denominator: number;
type: "progress";
};Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:60
Variables
COLLECTION_SEARCH_MAX_LENGTH
const COLLECTION_SEARCH_MAX_LENGTH: 200 = 200;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:106
isOneShotSearch
const isOneShotSearch: (search) => boolean;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:128
Whether a search is read once rather than mounted live: every /command is. /semantic and
/<index> both rank by a vector measured once against the probe, and re-measuring it on every
change would be a model call per delta. The planner refuses such a query as a live prefix and the
browser routes it as a one-shot read — both through this one rule, because the two drifting
apart is exactly how /semantic came back from sync.connect as a 400.
Parameters
| Parameter | Type |
|---|---|
search |
CollectionSearch |
Returns
boolean
parseCollectionSearch
const parseCollectionSearch: (search) => Readonly<{
command?: string;
term: string;
}>;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:117
A leading /<name> is a command and the rest its argument; anything else is plain text.
Parameters
| Parameter | Type |
|---|---|
search |
CollectionSearch |
Returns
Readonly<{
command?: string;
term: string;
}>
SEARCH_DISTANCE_COLUMN
const SEARCH_DISTANCE_COLUMN: "search_distance" = "search_distance";Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:133
The column a nearest search attaches beside each row: the distance the row was ranked by. Named so that no authored column can collide with it, and read by the table's distance column.
Functions
isSearchableCollectionField()
function isSearchableCollectionField(field): boolean;Defined in: apps/website/.api-docs-entry/std/build/collection/index.d.ts:172
Whether a field is searchable — the predicate every search path and lexical document generation
agree on. Search runs over exactly the fields that feed the shared indexes, and both are explicit
opt-ins: a non-array text/phone/enum field is only searchable when the author wrote
text({ search: true }) (or the equivalent on phone()/enums()).
The trigram index itself is language-agnostic: gin_trgm_ops indexes character trigrams, not
words, so the same index serves substring search in any script — CJK, accented Latin, RTL —
without dictionaries or tokenizers. The index and the search must never assume a language.
Parameters
| Parameter | Type |
|---|---|
field |
CollectionField |
Returns
boolean
References
isSystemCollectionField
Re-exports isSystemCollectionField
labelTermText
Re-exports labelTermText
resolveRecordLabel
Re-exports resolveRecordLabel
SYSTEM_COLLECTION_FIELD_NAMES
Re-exports SYSTEM_COLLECTION_FIELD_NAMES
SystemCollectionFieldName
Re-exports SystemCollectionFieldName