Shared shapes
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.
Text
Tenant text: one string per locale; the org default locale is required at compile.
In a bundle file, a Text that holds only the org default locale may be written as a plain string.
| Field | Type | Required | Default | Example | Description |
|---|---|---|---|---|---|
en |
string | no | — | "Customer" |
The English text. |
da |
string | no | — | "Besøg" |
The Danish text. |
Any label (here a type’s): one string per locale. A bundle file may write a Text in the org default locale as a plain string.
{ "en": "Customer", "da": "Kunde" }
Expr
A CX expression: its source and, once the service bound it, its bound tree.
In a bundle file, an expression may be written as its src string.
| Field | Type | Required | Default | Example | Description |
|---|---|---|---|---|---|
src |
string | yes | — | "name" |
The CX source text, as authored (cx.md §2.1). |
bound |
BoundAst | no (the catalog service records it) | — | — | The bound tree of src (cx.md §2.2), filled by the catalog service at propose: every catalog element by id. |
Any CX expression field (here a derived property’s expr). A bundle file may write it as its src string.
{ "src": "quantity * unit_price" }
BoundAst
The bound tree of src (cx.md §2.2), filled by the catalog service at propose: every catalog element by id.
Type: JSON.
MsgRef
A message: text with placeholders, each a CX expression.
| Field | Type | Required | Default | Example | Description |
|---|---|---|---|---|---|
text |
Text | yes | — | "A booking cannot end before it starts." |
The message template per locale (messages ICU subset), with {name} placeholders. |
params |
Record<Ident, Expr> | no | — | {"room":"room","starts":"starts"} |
The CX expression of each placeholder, by name; present writes its value in the reader’s convention. |
Any message (here a check invariant’s message). Its text is a Text, so a plain string in the default locale.
{
"text": "The total must be at least {min}.",
"params": { "min": "minimum_total" }
}
PropRef
A property of a type.
| Field | Type | Required | Default | Example | Description |
|---|---|---|---|---|---|
type |
TypeId | yes | — | "ty_3f8v6h2n0c" |
The type the property is on. |
prop |
PropId | yes | — | "pr_4p6r8t0v2x" |
The property. |
Any property reference (here an input’s writes).
{ "type": "ty_3f8v6h2n0c", "prop": "pr_4p6r8t0v2x" }
StateRef
A state of a lifecycle.
| Field | Type | Required | Default | Example | Description |
|---|---|---|---|---|---|
lifecycle |
FsmId | yes | — | "lc_2k4m6p8r0t" |
The lifecycle. |
state |
StateId | yes | — | "st_5m7p9r1t3v" |
The state of that lifecycle. |
Any lifecycle state reference (here a trigger’s on.enter).
{ "lifecycle": "lc_2k4m6p8r0t", "state": "st_5m7p9r1t3v" }
PropPath
A path of property ids along required to-one refs, ending at the property it reads (C23).
Type: PropId[] (at least one).
Ident
A name: lower case, starting with a letter, then letters, digits or single underscores; at most 48 characters.
Type: string (matching ^(?!.*__)[a-z][a-z0-9_]{0,47}$).
TypeId
A type id (ty_…); renames keep it.
Type: string (matching ^[a-z0-9][a-z0-9_]{0,63}$).
PropId
A property id (pr_…); renames keep it.
Type: string (matching ^[a-z0-9][a-z0-9_]{0,63}$).
EnumValueId
An enum value id (ev_…); renames keep it.
Type: string (matching ^[a-z0-9][a-z0-9_]{0,63}$).
ActionId
An action id (ac_…); renames keep it.
Type: string (matching ^[a-z0-9][a-z0-9_]{0,63}$).
FsmId
A lifecycle id (lc_…); renames keep it.
Type: string (matching ^[a-z0-9][a-z0-9_]{0,63}$).
StateId
A lifecycle state id (st_…); renames keep it.
Type: string (matching ^[a-z0-9][a-z0-9_]{0,63}$).
TransitionId
A lifecycle transition id (tn_…); renames keep it.
Type: string (matching ^[a-z0-9][a-z0-9_]{0,63}$).
TriggerId
A trigger id (tr_…); renames keep it.
Type: string (matching ^[a-z0-9][a-z0-9_]{0,63}$).
PolicyId
A policy id (po_…); renames keep it.
Type: string (matching ^[a-z0-9][a-z0-9_]{0,63}$).
GroupId
A group id (gr_…); renames keep it.
Type: string (matching ^[a-z0-9][a-z0-9_]{0,63}$).
ViewId
A view id (vw_…); renames keep it.
Type: string (matching ^[a-z0-9][a-z0-9_]{0,63}$).
AppId
An app id (ap_…); renames keep it.
Type: string (matching ^[a-z0-9][a-z0-9_]{0,63}$).
FormId
A public form id (fm_…); renames keep it.
Type: string (matching ^[a-z0-9][a-z0-9_]{0,63}$).
FnId
A shared function id (fn_…); renames keep it.
Type: string (matching ^[a-z0-9][a-z0-9_]{0,63}$).
InvariantId
An invariant id (iv_…); renames keep it.
Type: string (matching ^[a-z0-9][a-z0-9_]{0,63}$).
PersonaId
A persona id (pe_…); renames keep it.
Type: string (matching ^[a-z0-9][a-z0-9_]{0,63}$).
MeasureId
A measure id (ms_…); renames keep it.
Type: string (matching ^[a-z0-9][a-z0-9_]{0,63}$).
EnumId
A shared enum id (en_…); renames keep it.
Type: string (matching ^[a-z0-9][a-z0-9_]{0,63}$).