Member role operations
3 operations named memberRole.*. Every one runs in a batch through apply_ops, dry_run_ops, the CLI or the admin.
| Operation | What it does | Permission | Confirmation |
|---|---|---|---|
| memberRole.list | List the site's member roles with their labels and how many members hold each. | members.manage | none |
| memberRole.create | Add a role to the site's catalogue. | members.manage | none |
| memberRole.delete | Delete a role: every member who held it loses it, and it is taken off the requiredRoles of every draft page and article that named it (the answer counts them in stripped; memberRole.list counts them beforehand in requiredBy). | members.manage | destructive |
memberRole.list
List the site's member roles with their labels and how many members hold each. A node gated to members names roles by key. Members are not versioned: a change takes effect at once.
Example input
{}Input
The input is a record; see the schema below.
{
"type": "object",
"properties": {},
"additionalProperties": false
}Output
| Field | Type | Required | Notes |
|---|---|---|---|
| roles | array of object | yes | |
| roles[].key | string | yes | At most 40 characters. |
| roles[].label | string | record of string | yes | |
| roles[].memberCount | integer | yes | At least 0. |
| roles[].requiredBy | object | yes |
Fields nested deeper are in the output schema that discover_operations answers with outputSchemas: true.
Try it
yarn splash memberRole.list '{}' --dry-runmemberRole.create
Add a role to the site's catalogue. The key is unique on the site and never changes. Members are not versioned: a change takes effect at once.
Example input
{
"key": "press",
"label": {
"it": "Stampa",
"en": "Press"
}
}Input
| Field | Type | Required | Notes |
|---|---|---|---|
| key | string | yes | At most 40 characters. |
| label | string | record of string | yes |
Output
| Field | Type | Required | Notes |
|---|---|---|---|
| role | object | yes | |
| role.key | string | yes | At most 40 characters. |
| role.label | string | record of string | yes | |
| role.memberCount | integer | yes | At least 0. |
| role.requiredBy | object | yes |
Fields nested deeper are in the output schema that discover_operations answers with outputSchemas: true.
Try it
yarn splash memberRole.create '{"key":"press","label":{"it":"Stampa","en":"Press"}}' --dry-runmemberRole.delete
Delete a role: every member who held it loses it, and it is taken off the requiredRoles of every draft page and article that named it (the answer counts them in stripped; memberRole.list counts them beforehand in requiredBy). A node gated to that role alone shows to no member. Undoable: the undo brings back the role, its assignments and the requiredRoles. Run it with confirmed: ["destructive"]. Members are not versioned: a change takes effect at once.
Example input
{
"key": "press"
}Input
| Field | Type | Required | Notes |
|---|---|---|---|
| key | string | yes | At most 40 characters. |
Output
| Field | Type | Required | Notes |
|---|---|---|---|
| success | true | yes | |
| stripped | object | yes | |
| stripped.pages | integer | yes | At least 0. |
| stripped.articles | integer | yes | At least 0. |
Needs confirmed: ["destructive"] on the batch, which the single-operation CLI form does not set: put it in a batch file and run yarn splash apply <file> --dry-run.
Generated from the operation registry and the MCP tool catalogue (source 6366a0d24141b7cf).
Something wrong on this page? Write to docs@librettocms.com.