Skip to content

Catalog JSON specification

This page is generated from code by npm run docs:reference. Do not edit it by hand.

The database JSON columns are form_schema, route, action and cost_model. The tables below describe JSON shapes and code types. CatalogFormField is the form adapter output, not the stored JSON itself.

Key Type Requirement Example
form_schema.type "object" Required "object"
form_schema.properties object Required {"name":{"type":"string"}}
form_schema.required string[] Optional ["name"]
route object[] Required [{"step":1,"approver_kind":"manager"}]
action.executor string Required "manual"
action.template object Optional {"summary":"Example","op":"manual"}
action.template.changes PlanChange[] Optional [{"op":"create_user","resource":"example","params":{}}]
cost_model object | null Optional {"monthly":100,"currency":"JPY","note":"seat"}
Type and key Type Requirement Example shape
CatalogVisibleWhen.field string Required "example"
CatalogVisibleWhen.op VisibleWhenOperator Required "=="
CatalogVisibleWhen.value number | string | boolean | string[] Required "example"
CatalogFieldValidation.pattern string Optional "example"
CatalogFieldValidation.minLength number Optional 1
CatalogFieldValidation.maxLength number Optional 1
CatalogFieldValidation.minimum number Optional 1
CatalogFieldValidation.maximum number Optional 1
CatalogFormField.key string Required "example"
CatalogFormField.title string Required "example"
CatalogFormField.titleI18n unknown Optional {}
CatalogFormField.kind CatalogFieldKind Required "text"
CatalogFormField.required boolean Required true
CatalogFormField.options string[] Optional []
CatalogFormField.currency string Optional "example"
CatalogFormField.text string Optional "example"
CatalogFormField.textI18n unknown Optional {}
CatalogFormField.visibleWhen CatalogVisibleWhen Optional {}
CatalogFormField.validation CatalogFieldValidation Optional {}
JsonSchemaProperty.type unknown Optional {}
JsonSchemaProperty.title unknown Optional {}
JsonSchemaProperty.format unknown Optional {}
JsonSchemaProperty.enum unknown Optional {}
JsonSchemaProperty.items unknown Optional {}
JsonSchemaProperty.pattern unknown Optional {}
JsonSchemaProperty.minLength unknown Optional {}
JsonSchemaProperty.maxLength unknown Optional {}
JsonSchemaProperty.minimum unknown Optional {}
JsonSchemaProperty.maximum unknown Optional {}
JsonSchemaProperty.x-actagate unknown Optional {}
Type and key Type Requirement Example shape
RouteCondition.field string Required "example"
RouteCondition.op RouteConditionOperator Required "=="
RouteCondition.value number | string | string[] Required "example"
RouteEntry.step number Required 1
RouteEntry.approverKind "manager" | "usergroup" | "user" Required "manager"
RouteEntry.ref string Optional "example"
RouteEntry.when RouteCondition Optional {}
RouteEntry.escalateAfterHours number Optional 1
RouteEntry.escalateTo string Optional "example"
Type and key Type Requirement Example shape
PlanChange.runbook PlanRunbookStep[] Optional []
PlanChange.op string Required "example"
PlanChange.resource string Required "example"
PlanChange.params Record<string, JsonValue> Required {}
PlanChange.summary string Optional "example"
PlanChange.executor string Optional "example"
PlanChange.fallback string | null Optional "example"
PlanChange.manual_group string Optional "example"
PlanChange.manual_instructions string | null Optional "example"
PlanChange.catalog_key string Optional "example"
PlanChange.cost PlanCost | null Optional {}
PlanChange.expires_at string | null Optional "example"
PlanCost.monthly number Required 1
PlanCost.currency string Required "example"
PlanCost.note string Required "example"

Route JSON uses approver_kind, escalate_after_hours and escalate_to. At least one unconditional approval step is required. Numeric when comparisons use number fields; == and in use fields with choices. Form visibleWhen can also reference boolean fields.

CatalogFieldKind: \| "text" \| "select" \| "number" \| "date" \| "multiselect" \| "boolean" \| "money" \| "user" \| "description" \| "section"

VisibleWhenOperator: ">" \| ">=" \| "<" \| "<=" \| "==" \| "in"

RouteConditionOperator: ">" \| ">=" \| "<" \| "<=" \| "==" \| "in"

Stored form JSON uses string for text, string plus enum for select, string plus format: date for date, array plus items.enum for multiselect, boolean for boolean, and number for number. money and user use x-actagate.widget. description and section use type: null and carry no value. Currency defaults to JPY for money. title_i18n and text_i18n are stored inside x-actagate.

action.template can be omitted. If changes is supplied, it must contain at least one entry. Otherwise one change is built from op, resource and params. Omitted params use form values. action.fallback, action.manual_group and action.runbook are optional. cost_model requires monthly and currency, with note or per for the description. Form references in templates use {{field}}.