ApiCoreInterfaces
Interface: StoredCollection
Defined in: packages/core/src/schema/collection-def.ts:149
A collection, as a space describes it to whoever opens it.
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
computed? | readonly | Readonly<Record<string, string>> | Values derived from the records a node holds, the same way in every app: counts of linked records, and filters over them. Not protocol: peers keep it and never read it (packages/core/docs/computed.md). | packages/core/src/schema/collection-def.ts:194 |
contract? | readonly | CollectionContract | What a version must be to count: conditions (check) and whether the collection is a line, one sequence per account at lineKey(root, collection). Judged by readers (spec 09); peers keep it and don't read it. | packages/core/src/schema/collection-def.ts:188 |
description? | readonly | string | - | packages/core/src/schema/collection-def.ts:153 |
history? | readonly | "all" | "latest" | Whether edits to its records keep old versions. latest (the default) keeps current state only; all keeps every version, hash-linked, as a verifiable history. Read by writers, who mark each version accordingly. | packages/core/src/schema/collection-def.ts:163 |
links? | readonly | Readonly<Record<string, LinkDeclaration>> | The link roles its records may carry, and what each may point at. An agent reading the catalogue learns from these how the space's things connect. | packages/core/src/schema/collection-def.ts:168 |
name | readonly | string | Reverse-DNS, like app.todo.item. sys.* is the protocol's own. | packages/core/src/schema/collection-def.ts:151 |
rules? | readonly | CollectionRules | What must be unique, which fields are fixed, whether records are written once. Who may write is the space's grants, not the definition's (spec 02 §7). A version is judged by the definition in force as of the access changes it saw, on every peer. | packages/core/src/schema/collection-def.ts:175 |
schema | readonly | JsonSchema | JSON Schema for a record's body | packages/core/src/schema/collection-def.ts:155 |
title? | readonly | string | - | packages/core/src/schema/collection-def.ts:152 |
topics? | readonly | readonly string[] | Fields whose values are topics: each record carries a keyed hash of each value on its outside (tags), so a keeper that can't read the record can still match "in #design" or "mentions me". It learns which records share a topic, never which topic. At most 8; exact values only. | packages/core/src/schema/collection-def.ts:182 |
version | readonly | number | Bumped when the shape changes. Records don't name it: each is judged by the definition in force as of what it saw (spec 02 §6.3) | packages/core/src/schema/collection-def.ts:157 |