---
title: "CatalogDoc"
description: "Generated from the doc schema (CatalogDocSchema, @canonify/kernel-catalog/doc): each field’s type, default and description are the schema’s own, and each example is a bundle file that readBundle…"
order: 3
id: "model/doc"
---

# CatalogDoc

Generated from the doc schema (`CatalogDocSchema`, @canonify/kernel-catalog/doc): each field’s type, default and description are the schema’s own, and each example is a bundle file that readBundle decodes. A field’s Example is its value in one of those examples.

## CatalogDoc {#catalogdoc}

A catalog doc: every declaration of one org’s catalog (canon-doc/1).

| Field | Type | Required | Default | Example | Description |
|---|---|---|---|---|---|
| `format` | `"canon-doc/1"` | yes | — | `"canon-doc/1"` | The doc format: canon-doc/1. |
| `types` | Record<[TypeId](shapes.md#typeid), [TypeDecl](type.md#typedecl)> | no | `{}` | (see the example) | The types. |
| `enums` | Record<[EnumId](shapes.md#enumid), [EnumDecl](enum.md#enumdecl)> | no | `{}` | (see the example) | The shared enum domains (tick lj5). |
| `lifecycles` | Record<[FsmId](shapes.md#fsmid), [LifecycleDecl](lifecycle.md#lifecycledecl)> | no | `{}` | (see the example) | The lifecycles (runtime). |
| `actions` | Record<[ActionId](shapes.md#actionid), [ActionDecl](action.md#actiondecl)> | no | `{}` | (see the example) | The actions (runtime). |
| `triggers` | Record<[TriggerId](shapes.md#triggerid), [TriggerDecl](trigger.md#triggerdecl)> | no | `{}` | (see the example) | The triggers (runtime). |
| `forms` | Record<[FormId](shapes.md#formid), [PublicFormDecl](form.md#publicformdecl)> | no | `{}` | (see the example) | The public forms (runtime, C34). |
| `policies` | Record<[PolicyId](shapes.md#policyid), [PolicyDecl](policy.md#policydecl)> | no | `{}` | (see the example) | The policies (authz). |
| `groups` | Record<[GroupId](shapes.md#groupid), [GroupDecl](group.md#groupdecl)> | no | `{}` | `{"drivers":{"name":"drivers","label":"Drivers"}}` | The groups (authz). |
| `views` | Record<[ViewId](shapes.md#viewid), [ViewDecl](view.md#viewdecl)> | no | `{}` | `{}` | The views (pages). |
| `apps` | Record<[AppId](shapes.md#appid), [AppDecl](app.md#appdecl)> | no | `{}` | `{}` | The apps (platform). |
| `functions` | Record<[FnId](shapes.md#fnid), [FunctionDecl](function.md#functiondecl)> | no | `{}` | (see the example) | The shared functions. |
| `settings` | [OrgSettingsDecl](settings.md#orgsettingsdecl) | yes | — | (see the example) | The org settings (one artifact). |
| `provenance` | Record<string (matching `^[a-z0-9][a-z0-9_]{0,63}$`), [CatalogDoc.provenance](doc.md#catalogdoc.provenance)> | no | `{}` | (see the example) | Who maintains each artifact; an artifact with no entry is the tenant’s. |

A stored doc (canon-doc/1), as the service keeps it.

```json
{
  "format": "canon-doc/1",
  "types": {
    "ty_7k2m9q4z1a": {
      "id": "ty_7k2m9q4z1a",
      "name": "customer",
      "label": { "en": "Customer" },
      "properties": [
        {
          "kind": "stored",
          "id": "pr_2h6k8m4q0z",
          "name": "name",
          "label": { "en": "Name" },
          "type": { "t": "text" },
          "required": true
        }
      ],
      "title": { "src": "name" }
    }
  },
  "settings": { "locale": "en", "zone": "Europe/Copenhagen" },
  "provenance": {
    "ty_7k2m9q4z1a": { "managedBy": "managed", "source": "canonify/crm" }
  }
}
```

## CatalogDoc.provenance {#catalogdoc.provenance}

Who maintains one artifact.

| Field | Type | Required | Default | Example | Description |
|---|---|---|---|---|---|
| `managedBy` | `"managed"` \| `"tenant"` | yes | — | `"managed"` | Who maintains the artifact: a managed source (a platform or partner package) or the tenant. It grants nothing: the author writes it. |
| `source` | string | no | — | `"canonify/crm"` | The managed source it comes from. |
