minca
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

PropertyModifierTypeDescriptionDefined in
computed?readonlyReadonly<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?readonlyCollectionContractWhat 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?readonlystring-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?readonlyReadonly<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
namereadonlystringReverse-DNS, like app.todo.item. sys.* is the protocol's own.packages/core/src/schema/collection-def.ts:151
rules?readonlyCollectionRulesWhat 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
schemareadonlyJsonSchemaJSON Schema for a record's bodypackages/core/src/schema/collection-def.ts:155
title?readonlystring-packages/core/src/schema/collection-def.ts:152
topics?readonlyreadonly 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
versionreadonlynumberBumped 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

On this page