AppSpring Docs

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

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, TypeDecl> no {} (see the example) The types.
enums Record<EnumId, EnumDecl> no {} (see the example) The shared enum domains (tick lj5).
lifecycles Record<FsmId, LifecycleDecl> no {} (see the example) The lifecycles (runtime).
actions Record<ActionId, ActionDecl> no {} (see the example) The actions (runtime).
triggers Record<TriggerId, TriggerDecl> no {} (see the example) The triggers (runtime).
forms Record<FormId, PublicFormDecl> no {} (see the example) The public forms (runtime, C34).
policies Record<PolicyId, PolicyDecl> no {} (see the example) The policies (authz).
groups Record<GroupId, GroupDecl> no {} {"drivers":{"name":"drivers","label":"Drivers"}} The groups (authz).
views Record<ViewId, ViewDecl> no {} {} The views (pages).
apps Record<AppId, AppDecl> no {} {} The apps (platform).
functions Record<FnId, FunctionDecl> no {} (see the example) The shared functions.
settings OrgSettingsDecl yes — (see the example) The org settings (one artifact).
provenance Record<string (matching ^[a-z0-9][a-z0-9_]{0,63}$), 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.

{
  "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

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.

This page as Markdown