Catalogue operations
3 operations named catalog.*. Every one runs in a batch through apply_ops, dry_run_ops, the CLI or the admin.
| Operation | What it does | Permission | Confirmation |
|---|---|---|---|
| catalog.read | Read the site registry: primitives, sections, design-system and behaviour components with their props, parts, states, slots and content models, and a summary of every insertable preset. | site.read | none |
| catalog.index | List every node type this site can place, one entry each: its id (the node type of tree.commit inserts), kind, label, category, parts, states, slot names, what its children may be (accepts) and where it may sit (parentOneOf). | site.read | none |
| catalog.entry | Read one node type's whole registry entry by its id (box, ds.button, sticky-bar): its props schema with each field's help, parts, states, slots and content model. | site.read | none |
catalog.read
Read the site registry: primitives, sections, design-system and behaviour components with their props, parts, states, slots and content models, and a summary of every insertable preset.
Example input
{}Input
The input is a record; see the schema below.
{
"type": "object",
"properties": {},
"additionalProperties": false
}Output
| Field | Type | Required | Notes |
|---|---|---|---|
| theme | string | yes | |
| entries | array of object | yes | |
| entries[].id | string | yes | |
| entries[].kind | string | yes | One of "primitive", "ds", "behaviour", "section". |
| entries[].label | string | yes | At least 1 character. At most 80 characters. |
| entries[].keywords | array of string | no | At least 1 item. At most 16 items. |
| entries[].category | string | no | |
| entries[].tags | array of string | no | |
| entries[].propsSchema | array of object | yes | |
| entries[].parts | array of string | yes | |
| entries[].states | array of string | yes | |
| entries[].sceneStates | array of string | no | |
| entries[].childrenOnOpen | true | no | |
| entries[].slots | record of object | no | |
| entries[].contentModel | object | yes | |
| entries[].defaultMixin | string | no | |
| entries[].uses | record of string | no | |
| entries[].variantOf | string | no | |
| presets | array of object | yes | |
| presets[].source | string | yes | One of "theme", "site". |
| presets[].id | string | yes | |
| presets[].kind | string | yes | One of "section", "box", "element". |
| presets[].label | string | yes | At least 1 character. At most 80 characters. |
| presets[].keywords | array of string | no | At least 1 item. At most 16 items. |
| presets[].category | string | yes | |
| presets[].description | string | no | At most 280 characters. |
Fields nested deeper are in the output schema that discover_operations answers with outputSchemas: true.
Try it
yarn splash catalog.read '{}' --dry-runcatalog.index
List every node type this site can place, one entry each: its id (the node type of tree.commit inserts), kind, label, category, parts, states, slot names, what its children may be (accepts) and where it may sit (parentOneOf). Read one type's props schema with catalog.entry; list the presets with preset.index.
Example input
{}Input
The input is a record; see the schema below.
{
"type": "object",
"properties": {},
"additionalProperties": false
}Output
| Field | Type | Required | Notes |
|---|---|---|---|
| theme | string | yes | |
| entries | array of object | yes | |
| entries[].id | string | yes | |
| entries[].kind | string | yes | |
| entries[].label | string | yes | |
| entries[].category | string | no | |
| entries[].parts | array of string | yes | |
| entries[].states | array of string | yes | |
| entries[].slots | array of string | yes | |
| entries[].accepts | array of string | no | |
| entries[].parentOneOf | array of string | no |
Try it
yarn splash catalog.index '{}' --dry-runcatalog.entry
Read one node type's whole registry entry by its id (box, ds.button, sticky-bar): its props schema with each field's help, parts, states, slots and content model. Refused with 404 type_not_found for an id catalog.index does not list.
Example input
{
"type": "ds.button"
}Input
| Field | Type | Required | Notes |
|---|---|---|---|
| type | string | yes | At least 1 character. |
Output
| Field | Type | Required | Notes |
|---|---|---|---|
| id | string | yes | |
| kind | string | yes | One of "primitive", "ds", "behaviour", "section". |
| label | string | yes | At least 1 character. At most 80 characters. |
| keywords | array of string | no | At least 1 item. At most 16 items. |
| category | string | no | |
| tags | array of string | no | |
| propsSchema | array of object | yes | |
| propsSchema[].id | string | yes | |
| propsSchema[].type | string | yes | One of "text", "richtext-single", "richtext-inline", "richtext-block", "select", "toggle", "number", "range", "url", "media", "date", "icon", "breakpoint", "menu", "form", "repeater", "object", "table". |
| propsSchema[].group | string | yes | One of "content", "behaviour". |
| propsSchema[].label | string | yes | At least 1 character. At most 80 characters. |
| propsSchema[].default | any JSON | no | |
| propsSchema[].values | array of any JSON | no | At least 1 item. |
| propsSchema[].required | boolean | no | |
| propsSchema[].starter | string | no | At least 1 character. At most 80 characters. |
| propsSchema[].help | string | no | At least 1 character. At most 240 characters. |
| propsSchema[].advanced | boolean | no | |
| propsSchema[].translatable | false | no | |
| propsSchema[].picture | false | no | |
| propsSchema[].format | string | no | One of "css-name", "css-easing". |
| propsSchema[].fields | array of object | no | |
| propsSchema[].max | integer | no | At least 1. |
| parts | array of string | yes | |
| states | array of string | yes | |
| sceneStates | array of string | no | |
| childrenOnOpen | true | no | |
| slots | record of object | no | |
| contentModel | object | yes | |
| contentModel.children | object | no | |
| contentModel.parent | object | no | |
| defaultMixin | string | no | |
| uses | record of string | no | |
| variantOf | string | no |
Fields nested deeper are in the output schema that discover_operations answers with outputSchemas: true.
Try it
yarn splash catalog.entry '{"type":"ds.button"}' --dry-runGenerated from the operation registry and the MCP tool catalogue (source aab8b393002d6f5b).
Something wrong on this page? Write to docs@librettocms.com.