Operazioni sugli iscritti
6 operazioni di nome member.*. Ognuna si esegue in un batch con apply_ops, dry_run_ops, la CLI o l’admin.
| Operation | What it does | Permission | Confirmation |
|---|---|---|---|
| member.list | List the members of the site, newest first, with their status and role keys, optionally only those with a status or matching a query on the email or name, a page at a time. | members.manage | none |
| member.invite | Invite a person by email: a pending member with the given roles, and an email with a one-use link to the site's reset page where they set a password. | members.manage | none |
| member.setStatus | Enable or disable a member. | members.manage | none |
| member.setRoles | Replace the roles a member holds with the given role keys, each a role of the site's catalogue. | members.manage | none |
| member.delete | Delete a member with their sessions and roles. | members.manage | destructive |
| member.signOutAll | Sign out every member of the site at once: the site's member cookies get a new key, so every cookie issued before stops working, and every session of the site is deleted. | site.admin | destructive |
member.list
List the members of the site, newest first, with their status and role keys, optionally only those with a status or matching a query on the email or name, a page at a time. Members are not versioned: a change takes effect at once.
Esempio di input
{
"status": "active",
"limit": 20
}Input
| Field | Type | Required | Notes |
|---|---|---|---|
| status | string | no | One of "pending", "active", "disabled". |
| query | string | no | At least 1 character. At most 120 characters. |
| offset | integer | no | At least 0. Default 0. |
| limit | integer | no | At least 1. At most 200. Default 50. |
Output
| Field | Type | Required | Notes |
|---|---|---|---|
| members | array of object | yes | |
| members[].id | string (uuid) | yes | |
| members[].email | string (email) | yes | |
| members[].name | string | yes | |
| members[].status | string | yes | One of "pending", "active", "disabled". |
| members[].roles | array of string | yes | |
| members[].emailVerifiedAt | string (date-time) | null | yes | |
| members[].lastLoginAt | string (date-time) | null | yes | |
| members[].createdAt | string (date-time) | yes | |
| total | integer | yes | At least 0. |
Provala
yarn splash member.list '{"status":"active","limit":20}' --dry-runmember.invite
Invite a person by email: a pending member with the given roles, and an email with a one-use link to the site's reset page where they set a password. Inviting a pending member again sends a fresh link; an active or disabled member is refused. Members are not versioned: a change takes effect at once.
Esempio di input
{
"email": "giulia@example.com",
"name": "Giulia Bianchi",
"roles": [
"press"
],
"locale": "it"
}Input
| Field | Type | Required | Notes |
|---|---|---|---|
| string | yes | ||
| name | string | yes | At least 1 character. At most 120 characters. |
| roles | array of string | no | At most 50 items. Default []. |
| locale | string | no | One of "it", "en". |
Output
| Field | Type | Required | Notes |
|---|---|---|---|
| member | object | yes | |
| member.id | string (uuid) | yes | |
| member.email | string (email) | yes | |
| member.name | string | yes | |
| member.status | string | yes | One of "pending", "active", "disabled". |
| member.roles | array of string | yes | |
| member.emailVerifiedAt | string (date-time) | null | yes | |
| member.lastLoginAt | string (date-time) | null | yes | |
| member.createdAt | string (date-time) | yes |
Provala
yarn splash member.invite '{"email":"giulia@example.com","name":"Giulia Bianchi","roles":["press"],"locale":"it"}' --dry-runmember.setStatus
Enable or disable a member. Disabling signs the member out everywhere at once. Members are not versioned: a change takes effect at once.
Esempio di input
{
"memberId": "0a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
"status": "disabled"
}Input
| Field | Type | Required | Notes |
|---|---|---|---|
| memberId | string (uuid) | yes | |
| status | string | yes | One of "active", "disabled". |
Output
| Field | Type | Required | Notes |
|---|---|---|---|
| member | object | yes | |
| member.id | string (uuid) | yes | |
| member.email | string (email) | yes | |
| member.name | string | yes | |
| member.status | string | yes | One of "pending", "active", "disabled". |
| member.roles | array of string | yes | |
| member.emailVerifiedAt | string (date-time) | null | yes | |
| member.lastLoginAt | string (date-time) | null | yes | |
| member.createdAt | string (date-time) | yes |
Provala
yarn splash member.setStatus '{"memberId":"0a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d","status":"disabled"}' --dry-runmember.setRoles
Replace the roles a member holds with the given role keys, each a role of the site's catalogue. Members are not versioned: a change takes effect at once.
Esempio di input
{
"memberId": "0a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
"roles": [
"press",
"board"
]
}Input
| Field | Type | Required | Notes |
|---|---|---|---|
| memberId | string (uuid) | yes | |
| roles | array of string | yes | At most 50 items. |
Output
| Field | Type | Required | Notes |
|---|---|---|---|
| member | object | yes | |
| member.id | string (uuid) | yes | |
| member.email | string (email) | yes | |
| member.name | string | yes | |
| member.status | string | yes | One of "pending", "active", "disabled". |
| member.roles | array of string | yes | |
| member.emailVerifiedAt | string (date-time) | null | yes | |
| member.lastLoginAt | string (date-time) | null | yes | |
| member.createdAt | string (date-time) | yes |
Provala
yarn splash member.setRoles '{"memberId":"0a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d","roles":["press","board"]}' --dry-runmember.delete
Delete a member with their sessions and roles. Run it with confirmed: ["destructive"]. Members are not versioned: a change takes effect at once.
Esempio di input
{
"memberId": "0a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d"
}Input
| Field | Type | Required | Notes |
|---|---|---|---|
| memberId | string (uuid) | yes |
Output
| Field | Type | Required | Notes |
|---|---|---|---|
| success | true | yes |
Vuole confirmed: ["destructive"] sul batch, che la forma della CLI per una sola operazione non imposta: mettila in un file di batch ed esegui yarn splash apply <file> --dry-run.
member.signOutAll
Sign out every member of the site at once: the site's member cookies get a new key, so every cookie issued before stops working, and every session of the site is deleted. Members keep their accounts and sign in again. Other sites are not affected. Run it with confirmed: ["destructive"]. Members are not versioned: a change takes effect at once.
Esempio di input
{}Input
L’input è un record: vedi lo schema qui sotto.
{
"type": "object",
"properties": {},
"additionalProperties": false
}Output
| Field | Type | Required | Notes |
|---|---|---|---|
| sessions | integer | yes | At least 0. |
Vuole confirmed: ["destructive"] sul batch, che la forma della CLI per una sola operazione non imposta: mettila in un file di batch ed esegui yarn splash apply <file> --dry-run.
Generato dal registro delle operazioni e dal catalogo degli strumenti MCP (sorgente 0c3a596608b37277).
Qualcosa non va in questa pagina? Scrivi a docs@librettocms.com.