SieveScript
SieveScript/get
Section titled “SieveScript/get”Capability: urn:ietf:params:jmap:sieve
Arguments
| Property | Type | Required | Description |
|---|---|---|---|
accountId | AccountId | Yes | The account to fetch scripts from. |
ids | any | No | IDs of specific scripts to fetch. Null or omitted to fetch all scripts. |
properties | any | No | SieveScript properties to include in the response. Null or omitted for all properties. |
Response
| Property | Type | Required | Description |
|---|---|---|---|
accountId | AccountId | Yes | The account the scripts belong to. |
state | string | Yes | The current state of the SieveScript type. |
list | SieveScript[] | Yes | The list of SieveScript objects that were found. |
notFound | string[] | Yes | IDs from the request that could not be found. |
SieveScript/set
Section titled “SieveScript/set”Capability: urn:ietf:params:jmap:sieve
Arguments
| Property | Type | Required | Description |
|---|---|---|---|
accountId | AccountId | Yes | The account to apply changes to. |
ifInState | string? | No | Optimistic concurrency guard. Fails with stateMismatch if the SieveScript state differs. |
create | object? | No | Map of client-assigned creation ids to SieveScript create objects. name is optional and nullable (defaults to the script id); blobId is required and is an upload id or an sv: id of this account. |
update | object? | No | Map of SieveScript id to PatchObject. Only explicitly listed properties are changed; server-set properties may be included only with their current value. |
destroy | array? | No | SieveScript ids to delete. |
onSuccessActivateScript | string? | No | Id of the script to activate if every create, update and destroy succeeded. Creation references (#id) are allowed. An invalid or unknown id is ignored. |
onSuccessDeactivateScript | boolean | No | If true and every create, update and destroy succeeded, deactivate the active script. Processed before onSuccessActivateScript. |
Response
| Property | Type | Required | Description |
|---|---|---|---|
accountId | AccountId | Yes | The account the changes were applied to. |
oldState | string? | No | The SieveScript state before this set, or null if the server cannot calculate it. |
newState | string | Yes | The SieveScript state after this set. |
created | object? | No | Successfully created scripts, keyed by client creation id. isActive is true when onSuccessActivateScript activated the script in the same call. |
updated | object? | No | Map of successfully updated SieveScript id to the server-side changes from every cause, or null when nothing changed server-side. Contains only changed properties: blobId after a content change, name after a null reset, isActive after activation or deactivation. |
destroyed | any | No | SieveScript ids that were successfully destroyed. |
notCreated | object? | No | Creation ids that failed, with a SetError. |
notUpdated | object? | No | SieveScript ids that failed to update, with a SetError. |
notDestroyed | object? | No | SieveScript ids that failed to destroy, with a SetError. |
SieveScript/query
Section titled “SieveScript/query”Capability: urn:ietf:params:jmap:sieve
Arguments
| Property | Type | Required | Description |
|---|---|---|---|
accountId | AccountId | Yes | The account to query scripts from. |
filter | any | No | Filter: a SieveScriptFilterCondition (name: case-insensitive contains; isActive: Boolean) or a FilterOperator over such conditions. Null or omitted returns all scripts. |
sort | array? | No | Sort criteria. Each Comparator has a property (name or isActive), optional isAscending (default true) and optional collation. Supported collations: i;unicode-casemap (the default), i;ascii-casemap and i;octet; any other is unsupportedSort. |
position | integer | No | Zero-based index of the first id to return. A negative value is an offset from the end of the list (RFC 8620 section 5.5). Ignored when anchor is given. |
anchor | string? | No | An id. When given, position is ignored and the first id returned is at the index of this id in the results plus anchorOffset, clamped to 0; an id that is not in the results is the error anchorNotFound (RFC 8620 section 5.5). |
anchorOffset | integer | No | Index of the first id to return relative to the index of the anchor; may be negative. Ignored without an anchor. |
limit | integer? | No | Maximum number of ids to return. A negative value is invalidArguments. |
calculateTotal | boolean | No | If true, return the total number of matching scripts. |
Response
| Property | Type | Required | Description |
|---|---|---|---|
accountId | AccountId | Yes | The account the query ran against. |
queryState | string | Yes | Opaque state string for the SieveScript query. |
canCalculateChanges | boolean | Yes | Always false: SieveScript/queryChanges is not offered. |
position | integer | Yes | 0-based index of the first id in the ids array. |
ids | Id[] | Yes | The matching SieveScript ids in the requested order. |
total | integer | No | Total number of matching scripts. Only present if calculateTotal was true. |
limit | integer | No | The limit applied. Only present if a limit was applied. |
SieveScript/validate
Section titled “SieveScript/validate”Capability: urn:ietf:params:jmap:sieve
Arguments
| Property | Type | Required | Description |
|---|---|---|---|
accountId | AccountId | Yes | The account the blob belongs to. |
blobId | BlobId | Yes | Upload blob id, or sv: blob id of this account, of the script content to check. |
Response
| Property | Type | Required | Description |
|---|---|---|---|
accountId | AccountId | Yes | The account the blob belongs to. |
error | any | Yes | The SetError describing why the content is invalid, or null if it is valid. |