Operazioni sul catalogo
3 operazioni di nome catalog.*. Ognuna si esegue in un batch con apply_ops, dry_run_ops, la CLI o l’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.
Esempio di input
{}Input
L’input è un record: vedi lo schema qui sotto.
{
"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. |
I campi più annidati sono nello schema di output che risponde discover_operations con outputSchemas: true.
Provala
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.
Esempio di input
{}Input
L’input è un record: vedi lo schema qui sotto.
{
"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 |
Provala
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. Read embed before placing a map or a third-party video: its loading prop (immediate, onClick, afterConsent) keeps the iframe out of the page, behind a placeholder with a notice, a load button and an optional link (notice, loadLabel, allowLabel, linkUrl, linkLabel), until the visitor clicks or grants the external media consent.
Esempio di 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[].min | number | no | |
| propsSchema[].max | number | no | |
| 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 |
I campi più annidati sono nello schema di output che risponde discover_operations con outputSchemas: true.
Provala
yarn splash catalog.entry '{"type":"ds.button"}' --dry-runGenerato dal registro delle operazioni e dal catalogo degli strumenti MCP (sorgente 205667fbd6195669).
Qualcosa non va in questa pagina? Scrivi a docs@librettocms.com.