# Interface: StoredCollection

Defined in: [packages/core/src/schema/collection-def.ts:149](https://github.com/leifriksheim/minca/blob/main/core/src/schema/collection-def.ts#L149)

A collection, as a space describes it to whoever opens it.

## Properties

| Property | Modifier | Type | Description | Defined in |
| ------ | ------ | ------ | ------ | ------ |
| <a id="property-computed"></a> `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](https://github.com/leifriksheim/minca/blob/main/core/src/schema/collection-def.ts#L194) |
| <a id="property-contract"></a> `contract?` | `readonly` | [`CollectionContract`](https://minca.dev/api/core/interfaces/CollectionContract.md) | 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](https://github.com/leifriksheim/minca/blob/main/core/src/schema/collection-def.ts#L188) |
| <a id="property-description"></a> `description?` | `readonly` | `string` | - | [packages/core/src/schema/collection-def.ts:153](https://github.com/leifriksheim/minca/blob/main/core/src/schema/collection-def.ts#L153) |
| <a id="property-history"></a> `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](https://github.com/leifriksheim/minca/blob/main/core/src/schema/collection-def.ts#L163) |
| <a id="property-links"></a> `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](https://github.com/leifriksheim/minca/blob/main/core/src/schema/collection-def.ts#L168) |
| <a id="property-name"></a> `name` | `readonly` | `string` | Reverse-DNS, like `app.todo.item`. `sys.*` is the protocol's own. | [packages/core/src/schema/collection-def.ts:151](https://github.com/leifriksheim/minca/blob/main/core/src/schema/collection-def.ts#L151) |
| <a id="property-rules"></a> `rules?` | `readonly` | [`CollectionRules`](https://minca.dev/api/core/interfaces/CollectionRules.md) | 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](https://github.com/leifriksheim/minca/blob/main/core/src/schema/collection-def.ts#L175) |
| <a id="property-schema"></a> `schema` | `readonly` | [`JsonSchema`](https://minca.dev/api/core/type-aliases/JsonSchema.md) | JSON Schema for a record's body | [packages/core/src/schema/collection-def.ts:155](https://github.com/leifriksheim/minca/blob/main/core/src/schema/collection-def.ts#L155) |
| <a id="property-title"></a> `title?` | `readonly` | `string` | - | [packages/core/src/schema/collection-def.ts:152](https://github.com/leifriksheim/minca/blob/main/core/src/schema/collection-def.ts#L152) |
| <a id="property-topics"></a> `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](https://github.com/leifriksheim/minca/blob/main/core/src/schema/collection-def.ts#L182) |
| <a id="property-version"></a> `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](https://github.com/leifriksheim/minca/blob/main/core/src/schema/collection-def.ts#L157) |
