ApiCoreInterfaces
Interface: DefineCollection
Defined in: packages/core/src/node/types.ts:323
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
computed? | readonly | | Readonly<Record<string, string>> | ((scope) => ComputedResult) | Values derived from what links to its records (packages/core/docs/computed.md) | packages/core/src/node/types.ts:359 |
contract? | readonly | | CollectionContract | { check?: | readonly Contract[] | ((scope) => Readonly<Record<string, unknown>>); line?: Line; } | What a version must be to count, judged by readers: check conditions and a line (packages/core/docs/contracts.md) | packages/core/src/node/types.ts:352 |
description? | readonly | string | - | packages/core/src/node/types.ts:326 |
history? | readonly | "all" | "latest" | all keeps every version of every record whole, hash-linked, for records.history. latest, the default, keeps the current version whole and forgets what earlier ones and deleted records said | packages/core/src/node/types.ts:340 |
links? | readonly | Readonly<Record<string, LinkDeclaration>> | The link roles its records may carry, and what each may point at | packages/core/src/node/types.ts:342 |
name | readonly | string | - | packages/core/src/node/types.ts:324 |
rules? | readonly | CollectionRules | What must be unique, which fields are fixed, whether records are written once: every peer checks. None by default | packages/core/src/node/types.ts:344 |
schema | readonly | | JsonSchema | StandardJSONSchemaV1<unknown, unknown> | JSON Schema in the supported subset, or a Standard JSON Schema validator | packages/core/src/node/types.ts:328 |
title? | readonly | string | - | packages/core/src/node/types.ts:325 |
topics? | readonly | readonly string[] | Fields whose values are topics, like mentions, or link roles as link:<rel>, so a node that can't read the space still matches records by them. At most 8 | packages/core/src/node/types.ts:350 |
version? | readonly | number | The definition's version number. Default: one past the current version, or 1. This library refuses one that isn't higher than the one in force, or not below 2^53; peers don't check it (spec 02 §6.3) | packages/core/src/node/types.ts:334 |