primcli 3.0.0-preview.11 → 3.0.0-preview.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/{api-command-CkMEFiBL.js → api-command-D5Tj9C-K.js} +1746 -146
- package/dist/{machine-session-D39TUEGF.js → machine-session-BMr-zPLx.js} +4 -4
- package/dist/{notify-session-DcFHxUL9.js → notify-session-cIUz_kxR.js} +2 -2
- package/dist/oclif/auto-signal-worker.js +3 -3
- package/dist/oclif/auto-signals.js +1 -1
- package/dist/oclif/index.js +1371 -232
- package/dist/oclif/receiver-heal.js +2 -2
- package/dist/{repeats-Dj_o6c-X-ChTwFlyB.js → repeats-Dj_o6c-X-ykfsraq6.js} +89 -39
- package/dist/{scoped-chat-DVhJu-DF.js → scoped-chat-DVSsLSRw.js} +1 -1
- package/dist/{signal-command-CGgHQ_po.js → signal-command-gpH2AhIi.js} +4 -4
- package/man/primitive.1 +3 -2
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as ensureSearchReportsReplyState, Gn as sdk_gen_exports, J as EMAIL_RULE_REQUEST_EVENT_TYPES, K as replyStateSurfaceForOperation, L as ReplyStateUnsupportedError, Qt as getOwnGrant, R as assertAwaitingFilterRows, Ut as getEmail, W as isAwaitingRejectedError, X as WEBHOOK_EVENT_TYPES, Y as SENT_EMAIL_EVENT_TYPES, _n as listEndpoints, at as assertAutomatedVerdict, ct as ensureSearchReportsAutomated, dt as isAutomatedRejectedError, it as AutomatedFilterUnsupportedError, lt as expectedAutomatedVerdicts, nn as getThread, ot as automatedRejectedError, q as EMAIL_RULE_OBJECTION_EVENT_TYPES, st as automatedSurfaceForOperation, v as parseRetryAfter, z as awaitingRejectedError } from "./repeats-Dj_o6c-X-
|
|
1
|
+
import { B as ensureSearchReportsReplyState, Gn as sdk_gen_exports, J as EMAIL_RULE_REQUEST_EVENT_TYPES, K as replyStateSurfaceForOperation, L as ReplyStateUnsupportedError, Qt as getOwnGrant, R as assertAwaitingFilterRows, Ut as getEmail, W as isAwaitingRejectedError, X as WEBHOOK_EVENT_TYPES, Y as SENT_EMAIL_EVENT_TYPES, _n as listEndpoints, at as assertAutomatedVerdict, ct as ensureSearchReportsAutomated, dt as isAutomatedRejectedError, it as AutomatedFilterUnsupportedError, lt as expectedAutomatedVerdicts, nn as getThread, ot as automatedRejectedError, q as EMAIL_RULE_OBJECTION_EVENT_TYPES, st as automatedSurfaceForOperation, v as parseRetryAfter, z as awaitingRejectedError } from "./repeats-Dj_o6c-X-ykfsraq6.js";
|
|
2
2
|
import { C as saveCliCredentials, F as agentProfilesDirectory, H as requireDefaultLoginProfile, N as agentProfileDirectory, R as loadConnectedAgentProfile, S as resolveCliAuth, W as PrimitiveApiClient, _ as deleteCliCredentials, b as loadCliCredentials, c as resolveConfigEnvironment, d as validateCliHeaderName, f as validateCliHeaderValue, i as loadCliConfig, j as AGENT_PROFILE_ENV, m as cliAccessTokenExpiresAt, p as acquireCliCredentialsLock, w as saveSignupCredentials, x as normalizeApiBaseUrl, y as detectPrimitiveKeyEnvMisname } from "./cli-config-Ms_0vNjq.js";
|
|
3
3
|
import "./oclif/global-org-flag.js";
|
|
4
4
|
import { a as thrownErrorBody } from "./json-output-ch756TXV.js";
|
|
@@ -780,7 +780,7 @@ const operationManifest = [
|
|
|
780
780
|
"binaryResponse": false,
|
|
781
781
|
"bodyRequired": false,
|
|
782
782
|
"command": "list-activity-objects",
|
|
783
|
-
"description": "The objects the caller created, newest first, each with where it stands now, including ones since disabled, deleted or revoked where the object keeps a row: Functions, endpoints, Function triggers, pull subscriptions, recipient routes, filters, wake schedules, repeating sends and scheduled sends. An API key, an app or an agent sees what it created itself; a webhook given to an API key lists under that key. A person (a dashboard session, or their own Primitive CLI or app login) sees what they created through any credential of theirs, each item naming it, and also their API keys, personal agents, email rules, rule requests and objections to rules over their mail (objections only on the dashboard or the Primitive CLI). Each kind is listed only if the caller could list it through that kind's own route; a kind it could not is named in withheld, with no count. Ids, names and states only: never a webhook URL or mail content. Needs activity:read_self. With relation=asked it lists instead what other members asked of the person, open or answered: the rule requests made to them, and the objections to rules they wrote, under their current membership, each naming the member who asked or objected in created_through. A key, an app or an agent has none, and gets both kinds in withheld. With relation=concerning it lists instead what other members did that concerns the person's own mail: each time a rule started covering one of their mailboxes or saved a new version while covering it, named as the rule was then, naming its author in created_through, under their current membership; only on the dashboard or the Primitive CLI. A key, an app or an agent has none, and gets email_rule_coverage in withheld. A notice never reads as ended.",
|
|
783
|
+
"description": "The objects the caller created, newest first, each with where it stands now, including ones since disabled, deleted or revoked where the object keeps a row: Functions, endpoints, Function triggers, pull subscriptions, recipient routes, filters, wake schedules, repeating sends and scheduled sends. An API key, an app or an agent sees what it created itself; a webhook given to an API key lists under that key. A person (a dashboard session, or their own Primitive CLI or app login) sees what they created through any credential of theirs, each item naming it, and also their API keys, personal agents, email rules, rule requests and objections to rules over their mail (objections only on the dashboard or the Primitive CLI). Each kind is listed only if the caller could list it through that kind's own route; a kind it could not is named in withheld, with no count. Ids, names and states only: never a webhook URL or mail content. Needs activity:read_self. With relation=asked it lists instead what other members asked of the person, open or answered: the rule requests made to them, and the objections to rules they wrote, under their current membership, each naming the member who asked or objected in created_through. A key, an app or an agent has none, and gets both kinds in withheld. With relation=concerning it lists instead what other members did that concerns the person's own mail: each time a rule started covering one of their mailboxes or saved a new version while covering it, named as the rule was then, naming its author in created_through, under their current membership; only on the dashboard or the Primitive CLI. A key, an app or an agent has none, and gets email_rule_coverage in withheld. A notice never reads as ended. Notices are written by a periodic job and can lag: until the notices record a rule starting to cover you, the first page lists that rule as pending (pending_complete says whether that check finished), and as_of says about when the notices last looked. For what covers you now, read GET /email-rules/covering-me.",
|
|
784
784
|
"hasJsonBody": false,
|
|
785
785
|
"method": "GET",
|
|
786
786
|
"operationId": "listActivityObjects",
|
|
@@ -820,7 +820,7 @@ const operationManifest = [
|
|
|
820
820
|
},
|
|
821
821
|
{
|
|
822
822
|
"default": 50,
|
|
823
|
-
"description": "Objects per page, from 1 to 200; defaults to 50.",
|
|
823
|
+
"description": "Objects per page, from 1 to 200; defaults to 50. With relation=concerning the first page may also hold pending items beyond it.",
|
|
824
824
|
"enum": null,
|
|
825
825
|
"maximum": 200,
|
|
826
826
|
"minimum": 1,
|
|
@@ -863,7 +863,7 @@ const operationManifest = [
|
|
|
863
863
|
},
|
|
864
864
|
"state": {
|
|
865
865
|
"type": "string",
|
|
866
|
-
"description": "Where it stands now: enabled, disabled, deleted or replaced (endpoints and routes), enabled or disabled (filters, wake schedules), live, suspended or deleted (Functions), active, paused or ended (repeating sends), scheduled (scheduled sends), active, suspended, expired or revoked (API keys), pending, claimed, connected or revoked (agents), draft, observe or active (email rules), pending, accepted, declined or withdrawn (rule requests and objections), and for a coverage notice what it told: started (a rule
|
|
866
|
+
"description": "Where it stands now: enabled, disabled, deleted or replaced (endpoints and routes), enabled or disabled (filters, wake schedules), live, suspended or deleted (Functions), active, paused or ended (repeating sends), scheduled (scheduled sends), active, suspended, expired or revoked (API keys), pending, claimed, connected or revoked (agents), draft, observe or active (email rules), pending, accepted, declined or withdrawn (rule requests and objections), and for a coverage notice what it told: started (a rule was made or turned active over your mailboxes, or an active rule came to reach you; once per rule, not per mailbox), new_version, or baseline (it already covered you when notices began). pending: a rule started covering your mailbox and the notices have not recorded that start yet (a restart within an hour of the last start notice is recorded without a new one); its id is then the rule's, and created_at when the rule last changed."
|
|
867
867
|
},
|
|
868
868
|
"created_at": {
|
|
869
869
|
"type": "string",
|
|
@@ -872,7 +872,7 @@ const operationManifest = [
|
|
|
872
872
|
"ended_at": {
|
|
873
873
|
"type": ["string", "null"],
|
|
874
874
|
"format": "date-time",
|
|
875
|
-
"description": "When it was deleted, replaced or revoked, when an API key expired, when a repeating send stopped, or when a rule request or objection was decided (accepted, declined or withdrawn); null otherwise."
|
|
875
|
+
"description": "When it was deleted, replaced or revoked, when an API key expired, when a repeating send stopped, or when a rule request or objection was decided (accepted, declined or withdrawn); null otherwise, as on every coverage notice."
|
|
876
876
|
},
|
|
877
877
|
"owned_now": {
|
|
878
878
|
"type": "string",
|
|
@@ -900,6 +900,11 @@ const operationManifest = [
|
|
|
900
900
|
"id",
|
|
901
901
|
"name"
|
|
902
902
|
]
|
|
903
|
+
},
|
|
904
|
+
"rule_id": {
|
|
905
|
+
"description": "For email_rule_coverage, always: the rule it is about, since names need not be unique (for pending, the same as id). GET /v1/email-rules/covering-me/{rule_id} shows the rule while it covers you, or as it last decided on your mail; otherwise it answers not_found.",
|
|
906
|
+
"type": "string",
|
|
907
|
+
"format": "uuid"
|
|
903
908
|
}
|
|
904
909
|
},
|
|
905
910
|
"required": [
|
|
@@ -942,6 +947,15 @@ const operationManifest = [
|
|
|
942
947
|
"next_cursor": {
|
|
943
948
|
"description": "Pass as cursor to read the next page; null on the last page. A page can hold fewer items than limit, or none, while next_cursor is set.",
|
|
944
949
|
"type": ["string", "null"]
|
|
950
|
+
},
|
|
951
|
+
"as_of": {
|
|
952
|
+
"type": ["string", "null"],
|
|
953
|
+
"format": "date-time",
|
|
954
|
+
"description": "With relation=concerning only: about when the notices last looked at your organization; null if never or unread. Coverage since may have no notice yet."
|
|
955
|
+
},
|
|
956
|
+
"pending_complete": {
|
|
957
|
+
"description": "With relation=concerning, on the first page only: whether the check for rules that started covering you without their start notice (state pending, listed ahead of the notices and beyond limit) was finished. false: some may be missing. Absent where there is nothing to check.",
|
|
958
|
+
"type": "boolean"
|
|
945
959
|
}
|
|
946
960
|
},
|
|
947
961
|
"required": [
|
|
@@ -6689,6 +6703,35 @@ const operationManifest = [
|
|
|
6689
6703
|
"format": "uuid",
|
|
6690
6704
|
"description": "With `group=message`: the send of this message, when you can read it (under a connected agent key, only its own sends)."
|
|
6691
6705
|
},
|
|
6706
|
+
"imported": {
|
|
6707
|
+
"type": ["object", "null"],
|
|
6708
|
+
"description": "Historical acquisition; never sender or SMTP delivery proof. Null for live mail. Excluded from live tails and deltas.",
|
|
6709
|
+
"required": [
|
|
6710
|
+
"from",
|
|
6711
|
+
"method",
|
|
6712
|
+
"verification",
|
|
6713
|
+
"at"
|
|
6714
|
+
],
|
|
6715
|
+
"properties": {
|
|
6716
|
+
"from": {
|
|
6717
|
+
"type": "string",
|
|
6718
|
+
"enum": ["google_workspace"]
|
|
6719
|
+
},
|
|
6720
|
+
"method": {
|
|
6721
|
+
"type": "string",
|
|
6722
|
+
"enum": ["primitive_direct"]
|
|
6723
|
+
},
|
|
6724
|
+
"verification": {
|
|
6725
|
+
"type": "string",
|
|
6726
|
+
"enum": ["provider_fetched"]
|
|
6727
|
+
},
|
|
6728
|
+
"at": {
|
|
6729
|
+
"type": "string",
|
|
6730
|
+
"format": "date-time",
|
|
6731
|
+
"description": "When Primitive acquired this historical message."
|
|
6732
|
+
}
|
|
6733
|
+
}
|
|
6734
|
+
},
|
|
6692
6735
|
"snippet": {
|
|
6693
6736
|
"type": ["string", "null"],
|
|
6694
6737
|
"maxLength": 200,
|
|
@@ -6711,6 +6754,7 @@ const operationManifest = [
|
|
|
6711
6754
|
"automated_reasons",
|
|
6712
6755
|
"from_verified",
|
|
6713
6756
|
"from_header_email",
|
|
6757
|
+
"imported",
|
|
6714
6758
|
"snippet"
|
|
6715
6759
|
]
|
|
6716
6760
|
}, {
|
|
@@ -9473,7 +9517,7 @@ const operationManifest = [
|
|
|
9473
9517
|
"binaryResponse": false,
|
|
9474
9518
|
"bodyRequired": false,
|
|
9475
9519
|
"command": "get-key",
|
|
9476
|
-
"description": "One key's metadata, never its secret, with whether it works now (status). A revoked key whose record is kept is answered too, with status revoked, revoked_at and revoked_by, under the same access rules as a key that works: one the caller may not read is 404, revoked or not. Its grant's mail_scope.depth is raw only when the key holds mail.raw:read and its scope lists an address or a domain, otherwise content. A rule the key lists that reads nothing any more (a deleted rule, or a share that ended) is listed under grant.mail_scope.ended_rules, each with its id and reason (rule_deleted or share_ended), and not under rules. The person needs access to the whole organization's mail. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature. Contact Primitive to turn them on.\n\nPerson only: a dashboard session or the person's own Primitive CLI token; no other OAuth app. The person's role must hold keys:read. API keys, agent connection keys and agents are refused.",
|
|
9520
|
+
"description": "One key's metadata, never its secret, with whether it works now (status). A revoked key whose record is kept is answered too, with status revoked, revoked_at and revoked_by, under the same access rules as a key that works: one the caller may not read is 404, revoked or not. Its grant's mail_scope.depth is raw only when the key holds mail.raw:read and its scope lists an address or a domain, otherwise content. A rule the key lists that reads nothing any more (a deleted rule, or a share that ended) is listed under grant.mail_scope.ended_rules, each with its id and reason (rule_deleted or share_ended), and not under rules. grant.mail_scope.rule_versions gives each rule it lists directly its current_version, state and version_saved_at. The person needs access to the whole organization's mail. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature. Contact Primitive to turn them on.\n\nPerson only: a dashboard session or the person's own Primitive CLI token; no other OAuth app. The person's role must hold keys:read. API keys, agent connection keys and agents are refused.",
|
|
9477
9521
|
"hasJsonBody": false,
|
|
9478
9522
|
"method": "GET",
|
|
9479
9523
|
"operationId": "getKey",
|
|
@@ -9566,6 +9610,24 @@ const operationManifest = [
|
|
|
9566
9610
|
"rotated_to": {
|
|
9567
9611
|
"description": "The id of the newest key rotated from this key that the caller may read; null until it is rotated, or when the caller may read no key rotated from it. A revoked one is still named: GET /v1/keys/{id} answers it.",
|
|
9568
9612
|
"type": ["string", "null"]
|
|
9613
|
+
},
|
|
9614
|
+
"address_warnings": {
|
|
9615
|
+
"type": "array",
|
|
9616
|
+
"items": {
|
|
9617
|
+
"type": "object",
|
|
9618
|
+
"properties": {
|
|
9619
|
+
"address": { "type": "string" },
|
|
9620
|
+
"reason": { "type": "string" },
|
|
9621
|
+
"description": { "type": "string" }
|
|
9622
|
+
},
|
|
9623
|
+
"required": [
|
|
9624
|
+
"address",
|
|
9625
|
+
"reason",
|
|
9626
|
+
"description"
|
|
9627
|
+
],
|
|
9628
|
+
"additionalProperties": {}
|
|
9629
|
+
},
|
|
9630
|
+
"description": "Notes on the key's grant, worked out from it on every read: whole_mailbox, an address or domain listed beside email rules, which the key reads in full; no_send_address, with address empty, a key that can send but lists only email rules. The notes that need the organization's mailboxes and domains (member_address, unowned_domain) are given only when the grant is written. Only rules not deleted and shares not ended count. Empty, or absent, for a key on a template, and empty for a revoked key."
|
|
9569
9631
|
}
|
|
9570
9632
|
},
|
|
9571
9633
|
"required": [
|
|
@@ -10300,6 +10362,24 @@ const operationManifest = [
|
|
|
10300
10362
|
"agent_address",
|
|
10301
10363
|
"person"
|
|
10302
10364
|
]
|
|
10365
|
+
},
|
|
10366
|
+
"address_warnings": {
|
|
10367
|
+
"type": "array",
|
|
10368
|
+
"items": {
|
|
10369
|
+
"type": "object",
|
|
10370
|
+
"properties": {
|
|
10371
|
+
"address": { "type": "string" },
|
|
10372
|
+
"reason": { "type": "string" },
|
|
10373
|
+
"description": { "type": "string" }
|
|
10374
|
+
},
|
|
10375
|
+
"required": [
|
|
10376
|
+
"address",
|
|
10377
|
+
"reason",
|
|
10378
|
+
"description"
|
|
10379
|
+
],
|
|
10380
|
+
"additionalProperties": {}
|
|
10381
|
+
},
|
|
10382
|
+
"description": "Notes on the key's grant, worked out from it on every read: whole_mailbox, an address or domain listed beside email rules, which the key reads in full; no_send_address, with address empty, a key that can send but lists only email rules. The notes that need the organization's mailboxes and domains (member_address, unowned_domain) are given only when the grant is written. Only rules not deleted and shares not ended count. Empty, or absent, for a key on a template, and empty for a revoked key."
|
|
10303
10383
|
}
|
|
10304
10384
|
},
|
|
10305
10385
|
"required": [
|
|
@@ -10339,7 +10419,7 @@ const operationManifest = [
|
|
|
10339
10419
|
"binaryResponse": false,
|
|
10340
10420
|
"bodyRequired": false,
|
|
10341
10421
|
"command": "list-keys",
|
|
10342
|
-
"description": "Key metadata, never a secret: name, prefix, grant, creator, last use, expiry, suspension and whether each key works now (status). Revoked keys are left out unless include_revoked is true, which lists them too with status revoked, revoked_at and revoked_by, under the same access rules as keys that work. A grant's mail_scope.depth is raw only when the key holds mail.raw:read and its scope lists an address or a domain, otherwise content. A rule the key lists that reads nothing any more (a deleted rule, or a share that ended) is listed under grant.mail_scope.ended_rules, each with its id and reason (rule_deleted or share_ended), and not under rules. The person needs access to the whole organization's mail. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature. Contact Primitive to turn them on.\n\nPerson only: a dashboard session or the person's own Primitive CLI token; no other OAuth app. The person's role must hold keys:read. API keys, agent connection keys and agents are refused.",
|
|
10422
|
+
"description": "Key metadata, never a secret: name, prefix, grant, creator, last use, expiry, suspension and whether each key works now (status). Revoked keys are left out unless include_revoked is true, which lists them too with status revoked, revoked_at and revoked_by, under the same access rules as keys that work. A grant's mail_scope.depth is raw only when the key holds mail.raw:read and its scope lists an address or a domain, otherwise content. A rule the key lists that reads nothing any more (a deleted rule, or a share that ended) is listed under grant.mail_scope.ended_rules, each with its id and reason (rule_deleted or share_ended), and not under rules. grant.mail_scope.rule_versions gives each rule it lists directly its current_version, state and version_saved_at. The person needs access to the whole organization's mail. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature. Contact Primitive to turn them on.\n\nPerson only: a dashboard session or the person's own Primitive CLI token; no other OAuth app. The person's role must hold keys:read. API keys, agent connection keys and agents are refused.",
|
|
10343
10423
|
"hasJsonBody": false,
|
|
10344
10424
|
"method": "GET",
|
|
10345
10425
|
"operationId": "listKeys",
|
|
@@ -10443,6 +10523,24 @@ const operationManifest = [
|
|
|
10443
10523
|
"rotated_to": {
|
|
10444
10524
|
"description": "The id of the newest key rotated from this key that the caller may read; null until it is rotated, or when the caller may read no key rotated from it. A revoked one is still named: GET /v1/keys/{id} answers it.",
|
|
10445
10525
|
"type": ["string", "null"]
|
|
10526
|
+
},
|
|
10527
|
+
"address_warnings": {
|
|
10528
|
+
"type": "array",
|
|
10529
|
+
"items": {
|
|
10530
|
+
"type": "object",
|
|
10531
|
+
"properties": {
|
|
10532
|
+
"address": { "type": "string" },
|
|
10533
|
+
"reason": { "type": "string" },
|
|
10534
|
+
"description": { "type": "string" }
|
|
10535
|
+
},
|
|
10536
|
+
"required": [
|
|
10537
|
+
"address",
|
|
10538
|
+
"reason",
|
|
10539
|
+
"description"
|
|
10540
|
+
],
|
|
10541
|
+
"additionalProperties": {}
|
|
10542
|
+
},
|
|
10543
|
+
"description": "Notes on the key's grant, worked out from it on every read: whole_mailbox, an address or domain listed beside email rules, which the key reads in full; no_send_address, with address empty, a key that can send but lists only email rules. The notes that need the organization's mailboxes and domains (member_address, unowned_domain) are given only when the grant is written. Only rules not deleted and shares not ended count. Empty, or absent, for a key on a template, and empty for a revoked key."
|
|
10446
10544
|
}
|
|
10447
10545
|
},
|
|
10448
10546
|
"required": [
|
|
@@ -11134,6 +11232,27 @@ const operationManifest = [
|
|
|
11134
11232
|
"additionalProperties": {}
|
|
11135
11233
|
}
|
|
11136
11234
|
},
|
|
11235
|
+
"rules_added": {
|
|
11236
|
+
"description": "Each rule (or share) the edit put on a key that reads mail, with granted_emails, how many emails it has already shared, which the key can now read while it is active: counted up to 10,000, with more: true past that; null when not counted.",
|
|
11237
|
+
"type": "array",
|
|
11238
|
+
"items": {
|
|
11239
|
+
"type": "object",
|
|
11240
|
+
"properties": {
|
|
11241
|
+
"id": { "type": "string" },
|
|
11242
|
+
"granted_emails": {
|
|
11243
|
+
"type": ["integer", "null"],
|
|
11244
|
+
"minimum": 0,
|
|
11245
|
+
"maximum": 9007199254740991
|
|
11246
|
+
},
|
|
11247
|
+
"more": {
|
|
11248
|
+
"type": "boolean",
|
|
11249
|
+
"const": true
|
|
11250
|
+
}
|
|
11251
|
+
},
|
|
11252
|
+
"required": ["id", "granted_emails"],
|
|
11253
|
+
"additionalProperties": {}
|
|
11254
|
+
}
|
|
11255
|
+
},
|
|
11137
11256
|
"grant_unguarded": {
|
|
11138
11257
|
"description": "Present, as true, when the grant was changed without expected_grant_ref, so the change was not checked against changes made since the key was read. Send grant.ref from GET /v1/keys/{id} as expected_grant_ref to have such a change refused instead (409 conflict, details.reason grant_changed).",
|
|
11139
11258
|
"type": "boolean",
|
|
@@ -12251,11 +12370,17 @@ const operationManifest = [
|
|
|
12251
12370
|
"type": "string"
|
|
12252
12371
|
}],
|
|
12253
12372
|
"queryParams": [{
|
|
12254
|
-
"description": "When true, include only outbound DNS records.
|
|
12373
|
+
"description": "When true, include only outbound DNS records. Cannot be combined with inbound_only=true. By default, include all records.",
|
|
12255
12374
|
"enum": null,
|
|
12256
12375
|
"name": "outbound_only",
|
|
12257
12376
|
"required": false,
|
|
12258
12377
|
"type": "boolean"
|
|
12378
|
+
}, {
|
|
12379
|
+
"description": "When true, include only inbound MX and ownership TXT records. Cannot be combined with outbound_only=true.",
|
|
12380
|
+
"enum": null,
|
|
12381
|
+
"name": "inbound_only",
|
|
12382
|
+
"required": false,
|
|
12383
|
+
"type": "boolean"
|
|
12259
12384
|
}],
|
|
12260
12385
|
"headerParams": [],
|
|
12261
12386
|
"permissions": ["domains:read"],
|
|
@@ -12955,7 +13080,7 @@ const operationManifest = [
|
|
|
12955
13080
|
"binaryResponse": false,
|
|
12956
13081
|
"bodyRequired": false,
|
|
12957
13082
|
"command": "accept-email-rule-objection",
|
|
12958
|
-
"description": "Accepts a pending objection to a rule you wrote: turns the rule off (state draft), as updating it would, and records the objection accepted, together. You can turn the rule on again later. Needs mail:read, a member's own
|
|
13083
|
+
"description": "Accepts a pending objection to a rule you wrote: turns the rule off (state draft), as updating it would, and records the objection accepted, together. You can turn the rule on again later. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token). Only on your own dashboard session or the Primitive CLI.",
|
|
12959
13084
|
"hasJsonBody": false,
|
|
12960
13085
|
"method": "POST",
|
|
12961
13086
|
"operationId": "acceptEmailRuleObjection",
|
|
@@ -13048,8 +13173,14 @@ const operationManifest = [
|
|
|
13048
13173
|
"email"
|
|
13049
13174
|
]
|
|
13050
13175
|
},
|
|
13051
|
-
"is_objector": {
|
|
13052
|
-
|
|
13176
|
+
"is_objector": {
|
|
13177
|
+
"type": "boolean",
|
|
13178
|
+
"description": "Whether you made it, in your current membership."
|
|
13179
|
+
},
|
|
13180
|
+
"is_author": {
|
|
13181
|
+
"type": "boolean",
|
|
13182
|
+
"description": "Whether it is to a rule you wrote, in your current membership."
|
|
13183
|
+
},
|
|
13053
13184
|
"message": {
|
|
13054
13185
|
"description": "Why the objector objects; null when none was given, or once withdrawn.",
|
|
13055
13186
|
"type": ["string", "null"]
|
|
@@ -13092,7 +13223,7 @@ const operationManifest = [
|
|
|
13092
13223
|
"binaryResponse": false,
|
|
13093
13224
|
"bodyRequired": true,
|
|
13094
13225
|
"command": "create-email-rule-objection",
|
|
13095
|
-
"description": "Asks the author of a rule that covers one of your own mailboxes now to turn it off. Only a rule that covers you now: one you see only because it once decided on your mail cannot be objected to. An objection is seen by the member who made it, the rule's author and the organization's owners and admins. It stays pending until the rule's author accepts it, turning the rule off, or declines it, or the member who made it withdraws it, which clears its message. It never changes after that. You may have one pending objection per rule and 50 in all, and object to the same rule again only 10 minutes after you last did, whatever became of it. Needs mail:read, a member's own
|
|
13226
|
+
"description": "Asks the author of a rule that covers one of your own mailboxes now to turn it off. Only a rule that covers you now: one you see only because it once decided on your mail cannot be objected to. An objection is seen by the member who made it, the rule's author and the organization's owners and admins. It stays pending until the rule's author accepts it, turning the rule off, or declines it, or the member who made it withdraws it, which clears its message. It never changes after that. You may have one pending objection per rule and 50 in all, and object to the same rule again only 10 minutes after you last did, whatever became of it. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token). Only on your own dashboard session or the Primitive CLI.",
|
|
13096
13227
|
"hasJsonBody": true,
|
|
13097
13228
|
"method": "POST",
|
|
13098
13229
|
"operationId": "createEmailRuleObjection",
|
|
@@ -13196,8 +13327,14 @@ const operationManifest = [
|
|
|
13196
13327
|
"email"
|
|
13197
13328
|
]
|
|
13198
13329
|
},
|
|
13199
|
-
"is_objector": {
|
|
13200
|
-
|
|
13330
|
+
"is_objector": {
|
|
13331
|
+
"type": "boolean",
|
|
13332
|
+
"description": "Whether you made it, in your current membership."
|
|
13333
|
+
},
|
|
13334
|
+
"is_author": {
|
|
13335
|
+
"type": "boolean",
|
|
13336
|
+
"description": "Whether it is to a rule you wrote, in your current membership."
|
|
13337
|
+
},
|
|
13201
13338
|
"message": {
|
|
13202
13339
|
"description": "Why the objector objects; null when none was given, or once withdrawn.",
|
|
13203
13340
|
"type": ["string", "null"]
|
|
@@ -13240,7 +13377,7 @@ const operationManifest = [
|
|
|
13240
13377
|
"binaryResponse": false,
|
|
13241
13378
|
"bodyRequired": false,
|
|
13242
13379
|
"command": "decline-email-rule-objection",
|
|
13243
|
-
"description": "Declines a pending objection to a rule you wrote, optionally saying why; the rule stays as it is. Needs mail:read, a member's own
|
|
13380
|
+
"description": "Declines a pending objection to a rule you wrote, optionally saying why; the rule stays as it is. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token). Only on your own dashboard session or the Primitive CLI.",
|
|
13244
13381
|
"hasJsonBody": true,
|
|
13245
13382
|
"method": "POST",
|
|
13246
13383
|
"operationId": "declineEmailRuleObjection",
|
|
@@ -13342,8 +13479,14 @@ const operationManifest = [
|
|
|
13342
13479
|
"email"
|
|
13343
13480
|
]
|
|
13344
13481
|
},
|
|
13345
|
-
"is_objector": {
|
|
13346
|
-
|
|
13482
|
+
"is_objector": {
|
|
13483
|
+
"type": "boolean",
|
|
13484
|
+
"description": "Whether you made it, in your current membership."
|
|
13485
|
+
},
|
|
13486
|
+
"is_author": {
|
|
13487
|
+
"type": "boolean",
|
|
13488
|
+
"description": "Whether it is to a rule you wrote, in your current membership."
|
|
13489
|
+
},
|
|
13347
13490
|
"message": {
|
|
13348
13491
|
"description": "Why the objector objects; null when none was given, or once withdrawn.",
|
|
13349
13492
|
"type": ["string", "null"]
|
|
@@ -13386,7 +13529,7 @@ const operationManifest = [
|
|
|
13386
13529
|
"binaryResponse": false,
|
|
13387
13530
|
"bodyRequired": false,
|
|
13388
13531
|
"command": "get-email-rule-covering-me",
|
|
13389
|
-
"description": "One rule that covers one of your own mailboxes, read-only, with its current version; or one that no longer does but decided on mail at your own mailbox (covers_now false), shown as the version that last decided on your mail, without its current name. You see its name, wording, current tree, state, kind and author, and which of your own mailboxes it reaches. Its wording and tree are shown as written, so they can name other addresses (a condition on who an email is from or to). While it covers you, you also see who receives what it matches (receivers): how many API keys, webhooks and shares,
|
|
13532
|
+
"description": "One rule that covers one of your own mailboxes, read-only, with its current version; or one that no longer does but decided on mail at your own mailbox (covers_now false), shown as the version that last decided on your mail, without its current name. You see its name, wording, current tree, state, kind and author, and which of your own mailboxes it reaches. Its wording and tree are shown as written, so they can name other addresses (a condition on who an email is from or to). While it covers you, you also see who receives what it matches (receivers): how many API keys, webhooks and shares, the member each belongs to (or the organization), and the sites the webhooks deliver to. You do not see which keys, webhooks or shares they are (no ids, names, prefixes, or URLs beyond the site), the other inboxes and domains its scope names, or its saved expectations. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token). Only on your own dashboard session or the Primitive CLI.",
|
|
13390
13533
|
"hasJsonBody": false,
|
|
13391
13534
|
"method": "GET",
|
|
13392
13535
|
"operationId": "getEmailRuleCoveringMe",
|
|
@@ -13483,7 +13626,7 @@ const operationManifest = [
|
|
|
13483
13626
|
"description": "Null when covers_now is false."
|
|
13484
13627
|
},
|
|
13485
13628
|
"receivers": {
|
|
13486
|
-
"description": "Null when covers_now is false (who receives it now is not about your mail),
|
|
13629
|
+
"description": "Null when covers_now is false (who receives it now is not about your mail), when it could not be read in time, or for a rule shown in draft or observe that turned active or was deleted after it was read; try again.",
|
|
13487
13630
|
"anyOf": [{
|
|
13488
13631
|
"type": "object",
|
|
13489
13632
|
"properties": {
|
|
@@ -13526,11 +13669,16 @@ const operationManifest = [
|
|
|
13526
13669
|
"count": {
|
|
13527
13670
|
"type": "integer",
|
|
13528
13671
|
"exclusiveMinimum": 0
|
|
13672
|
+
},
|
|
13673
|
+
"reads_in_full": {
|
|
13674
|
+
"description": "On a rule over your mail: how many of these keys also list one of your own mailboxes, or its domain, so they read your mail there beyond what this rule matches.",
|
|
13675
|
+
"type": "integer",
|
|
13676
|
+
"minimum": 0
|
|
13529
13677
|
}
|
|
13530
13678
|
},
|
|
13531
13679
|
"required": ["owner", "count"]
|
|
13532
13680
|
},
|
|
13533
|
-
"description": "API keys that work now (not revoked, expired or suspended) whose access lists the rule
|
|
13681
|
+
"description": "API keys that work now (not revoked, expired or suspended) and hold mail:read, whose access lists the rule or its live share. Owner: who holds each, or the organization."
|
|
13534
13682
|
},
|
|
13535
13683
|
"webhooks": {
|
|
13536
13684
|
"type": "array",
|
|
@@ -13571,11 +13719,21 @@ const operationManifest = [
|
|
|
13571
13719
|
"count": {
|
|
13572
13720
|
"type": "integer",
|
|
13573
13721
|
"exclusiveMinimum": 0
|
|
13722
|
+
},
|
|
13723
|
+
"hosts": {
|
|
13724
|
+
"description": "Distinct sites they deliver to (the domain a host is registered under, an app's own name on a known app platform, or a function URL service in its region), sorted, at most 10; \"unknown host\" (last) for any that cannot be named.",
|
|
13725
|
+
"type": "array",
|
|
13726
|
+
"items": { "type": "string" }
|
|
13727
|
+
},
|
|
13728
|
+
"hosts_not_listed": {
|
|
13729
|
+
"description": "Hosts past those listed.",
|
|
13730
|
+
"type": "integer",
|
|
13731
|
+
"minimum": 0
|
|
13574
13732
|
}
|
|
13575
13733
|
},
|
|
13576
13734
|
"required": ["owner", "count"]
|
|
13577
13735
|
},
|
|
13578
|
-
"description": "Webhooks that are sent what it matches: those
|
|
13736
|
+
"description": "Webhooks taking received mail, bounces or reports that are sent what it matches: those of the key delivery acts as, when it lists the rule or its live share (owner: its holder, or the organization), and those of the member it is shared with (owner: that member)."
|
|
13579
13737
|
},
|
|
13580
13738
|
"shares": {
|
|
13581
13739
|
"type": "array",
|
|
@@ -13612,7 +13770,7 @@ const operationManifest = [
|
|
|
13612
13770
|
},
|
|
13613
13771
|
"required": ["beneficiary", "count"]
|
|
13614
13772
|
},
|
|
13615
|
-
"description": "The rule's live share
|
|
13773
|
+
"description": "The rule's live share (at most one), by its member, if they can read it and it is among their newest 20 shares."
|
|
13616
13774
|
}
|
|
13617
13775
|
},
|
|
13618
13776
|
"required": [
|
|
@@ -13620,7 +13778,163 @@ const operationManifest = [
|
|
|
13620
13778
|
"webhooks",
|
|
13621
13779
|
"shares"
|
|
13622
13780
|
],
|
|
13623
|
-
"description": "Who receives what the rule shares
|
|
13781
|
+
"description": "Who receives what the rule shares, by person and count. As receivers, empty unless it is an active grant rule."
|
|
13782
|
+
}, { "type": "null" }]
|
|
13783
|
+
},
|
|
13784
|
+
"receivers_once_active": {
|
|
13785
|
+
"description": "As on the list; also null when covers_now is false.",
|
|
13786
|
+
"anyOf": [{
|
|
13787
|
+
"type": "object",
|
|
13788
|
+
"properties": {
|
|
13789
|
+
"keys": {
|
|
13790
|
+
"type": "array",
|
|
13791
|
+
"items": {
|
|
13792
|
+
"type": "object",
|
|
13793
|
+
"properties": {
|
|
13794
|
+
"owner": { "anyOf": [{
|
|
13795
|
+
"type": "object",
|
|
13796
|
+
"properties": {
|
|
13797
|
+
"kind": {
|
|
13798
|
+
"type": "string",
|
|
13799
|
+
"const": "member"
|
|
13800
|
+
},
|
|
13801
|
+
"user_id": {
|
|
13802
|
+
"type": "string",
|
|
13803
|
+
"description": "The member's user id.",
|
|
13804
|
+
"format": "uuid"
|
|
13805
|
+
},
|
|
13806
|
+
"name": {
|
|
13807
|
+
"description": "Their name; null when they have none set.",
|
|
13808
|
+
"type": ["string", "null"]
|
|
13809
|
+
}
|
|
13810
|
+
},
|
|
13811
|
+
"required": [
|
|
13812
|
+
"kind",
|
|
13813
|
+
"user_id",
|
|
13814
|
+
"name"
|
|
13815
|
+
]
|
|
13816
|
+
}, {
|
|
13817
|
+
"type": "object",
|
|
13818
|
+
"properties": { "kind": {
|
|
13819
|
+
"type": "string",
|
|
13820
|
+
"const": "organization",
|
|
13821
|
+
"description": "Held by no member: an organization key, or one whose holder has left."
|
|
13822
|
+
} },
|
|
13823
|
+
"required": ["kind"]
|
|
13824
|
+
}] },
|
|
13825
|
+
"count": {
|
|
13826
|
+
"type": "integer",
|
|
13827
|
+
"exclusiveMinimum": 0
|
|
13828
|
+
},
|
|
13829
|
+
"reads_in_full": {
|
|
13830
|
+
"description": "On a rule over your mail: how many of these keys also list one of your own mailboxes, or its domain, so they read your mail there beyond what this rule matches.",
|
|
13831
|
+
"type": "integer",
|
|
13832
|
+
"minimum": 0
|
|
13833
|
+
}
|
|
13834
|
+
},
|
|
13835
|
+
"required": ["owner", "count"]
|
|
13836
|
+
},
|
|
13837
|
+
"description": "API keys that work now (not revoked, expired or suspended) and hold mail:read, whose access lists the rule or its live share. Owner: who holds each, or the organization."
|
|
13838
|
+
},
|
|
13839
|
+
"webhooks": {
|
|
13840
|
+
"type": "array",
|
|
13841
|
+
"items": {
|
|
13842
|
+
"type": "object",
|
|
13843
|
+
"properties": {
|
|
13844
|
+
"owner": { "anyOf": [{
|
|
13845
|
+
"type": "object",
|
|
13846
|
+
"properties": {
|
|
13847
|
+
"kind": {
|
|
13848
|
+
"type": "string",
|
|
13849
|
+
"const": "member"
|
|
13850
|
+
},
|
|
13851
|
+
"user_id": {
|
|
13852
|
+
"type": "string",
|
|
13853
|
+
"description": "The member's user id.",
|
|
13854
|
+
"format": "uuid"
|
|
13855
|
+
},
|
|
13856
|
+
"name": {
|
|
13857
|
+
"description": "Their name; null when they have none set.",
|
|
13858
|
+
"type": ["string", "null"]
|
|
13859
|
+
}
|
|
13860
|
+
},
|
|
13861
|
+
"required": [
|
|
13862
|
+
"kind",
|
|
13863
|
+
"user_id",
|
|
13864
|
+
"name"
|
|
13865
|
+
]
|
|
13866
|
+
}, {
|
|
13867
|
+
"type": "object",
|
|
13868
|
+
"properties": { "kind": {
|
|
13869
|
+
"type": "string",
|
|
13870
|
+
"const": "organization",
|
|
13871
|
+
"description": "Held by no member: an organization key, or one whose holder has left."
|
|
13872
|
+
} },
|
|
13873
|
+
"required": ["kind"]
|
|
13874
|
+
}] },
|
|
13875
|
+
"count": {
|
|
13876
|
+
"type": "integer",
|
|
13877
|
+
"exclusiveMinimum": 0
|
|
13878
|
+
},
|
|
13879
|
+
"hosts": {
|
|
13880
|
+
"description": "Distinct sites they deliver to (the domain a host is registered under, an app's own name on a known app platform, or a function URL service in its region), sorted, at most 10; \"unknown host\" (last) for any that cannot be named.",
|
|
13881
|
+
"type": "array",
|
|
13882
|
+
"items": { "type": "string" }
|
|
13883
|
+
},
|
|
13884
|
+
"hosts_not_listed": {
|
|
13885
|
+
"description": "Hosts past those listed.",
|
|
13886
|
+
"type": "integer",
|
|
13887
|
+
"minimum": 0
|
|
13888
|
+
}
|
|
13889
|
+
},
|
|
13890
|
+
"required": ["owner", "count"]
|
|
13891
|
+
},
|
|
13892
|
+
"description": "Webhooks taking received mail, bounces or reports that are sent what it matches: those of the key delivery acts as, when it lists the rule or its live share (owner: its holder, or the organization), and those of the member it is shared with (owner: that member)."
|
|
13893
|
+
},
|
|
13894
|
+
"shares": {
|
|
13895
|
+
"type": "array",
|
|
13896
|
+
"items": {
|
|
13897
|
+
"type": "object",
|
|
13898
|
+
"properties": {
|
|
13899
|
+
"beneficiary": {
|
|
13900
|
+
"type": "object",
|
|
13901
|
+
"properties": {
|
|
13902
|
+
"kind": {
|
|
13903
|
+
"type": "string",
|
|
13904
|
+
"const": "member"
|
|
13905
|
+
},
|
|
13906
|
+
"user_id": {
|
|
13907
|
+
"type": "string",
|
|
13908
|
+
"description": "The member's user id.",
|
|
13909
|
+
"format": "uuid"
|
|
13910
|
+
},
|
|
13911
|
+
"name": {
|
|
13912
|
+
"description": "Their name; null when they have none set.",
|
|
13913
|
+
"type": ["string", "null"]
|
|
13914
|
+
}
|
|
13915
|
+
},
|
|
13916
|
+
"required": [
|
|
13917
|
+
"kind",
|
|
13918
|
+
"user_id",
|
|
13919
|
+
"name"
|
|
13920
|
+
]
|
|
13921
|
+
},
|
|
13922
|
+
"count": {
|
|
13923
|
+
"type": "integer",
|
|
13924
|
+
"exclusiveMinimum": 0
|
|
13925
|
+
}
|
|
13926
|
+
},
|
|
13927
|
+
"required": ["beneficiary", "count"]
|
|
13928
|
+
},
|
|
13929
|
+
"description": "The rule's live share (at most one), by its member, if they can read it and it is among their newest 20 shares."
|
|
13930
|
+
}
|
|
13931
|
+
},
|
|
13932
|
+
"required": [
|
|
13933
|
+
"keys",
|
|
13934
|
+
"webhooks",
|
|
13935
|
+
"shares"
|
|
13936
|
+
],
|
|
13937
|
+
"description": "Who receives what the rule shares, by person and count. As receivers, empty unless it is an active grant rule."
|
|
13624
13938
|
}, { "type": "null" }]
|
|
13625
13939
|
},
|
|
13626
13940
|
"created_at": {
|
|
@@ -13716,6 +14030,7 @@ const operationManifest = [
|
|
|
13716
14030
|
"covers",
|
|
13717
14031
|
"current_version",
|
|
13718
14032
|
"receivers",
|
|
14033
|
+
"receivers_once_active",
|
|
13719
14034
|
"created_at",
|
|
13720
14035
|
"covers_now",
|
|
13721
14036
|
"current"
|
|
@@ -13730,7 +14045,7 @@ const operationManifest = [
|
|
|
13730
14045
|
"binaryResponse": false,
|
|
13731
14046
|
"bodyRequired": false,
|
|
13732
14047
|
"command": "get-email-rule-objection",
|
|
13733
|
-
"description": "One objection you can see. An objection is seen by the member who made it, the rule's author and the organization's owners and admins. It stays pending until the rule's author accepts it, turning the rule off, or declines it, or the member who made it withdraws it, which clears its message. It never changes after that. Needs mail:read, a member's own
|
|
14048
|
+
"description": "One objection you can see. An objection is seen by the member who made it, the rule's author and the organization's owners and admins. It stays pending until the rule's author accepts it, turning the rule off, or declines it, or the member who made it withdraws it, which clears its message. It never changes after that. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token). Only on your own dashboard session or the Primitive CLI.",
|
|
13734
14049
|
"hasJsonBody": false,
|
|
13735
14050
|
"method": "GET",
|
|
13736
14051
|
"operationId": "getEmailRuleObjection",
|
|
@@ -13817,8 +14132,14 @@ const operationManifest = [
|
|
|
13817
14132
|
"email"
|
|
13818
14133
|
]
|
|
13819
14134
|
},
|
|
13820
|
-
"is_objector": {
|
|
13821
|
-
|
|
14135
|
+
"is_objector": {
|
|
14136
|
+
"type": "boolean",
|
|
14137
|
+
"description": "Whether you made it, in your current membership."
|
|
14138
|
+
},
|
|
14139
|
+
"is_author": {
|
|
14140
|
+
"type": "boolean",
|
|
14141
|
+
"description": "Whether it is to a rule you wrote, in your current membership."
|
|
14142
|
+
},
|
|
13822
14143
|
"message": {
|
|
13823
14144
|
"description": "Why the objector objects; null when none was given, or once withdrawn.",
|
|
13824
14145
|
"type": ["string", "null"]
|
|
@@ -13861,7 +14182,7 @@ const operationManifest = [
|
|
|
13861
14182
|
"binaryResponse": false,
|
|
13862
14183
|
"bodyRequired": false,
|
|
13863
14184
|
"command": "list-email-rule-decisions-on-my-mail",
|
|
13864
|
-
"description": "What a rule that covers your mailboxes, or decided on your mail, decided about mail at your own mailboxes, newest first: never about anyone else's mail. Each decision is in the words of the version that made it, which can be earlier than the current one: the questions it asked about that email (question_answers) and the columns its conditions read (parts). Needs mail:read, a member's own
|
|
14185
|
+
"description": "What a rule that covers your mailboxes, or decided on your mail, decided about mail at your own mailboxes, newest first: never about anyone else's mail. Each decision is in the words of the version that made it, which can be earlier than the current one: the questions it asked about that email (question_answers) and the columns its conditions read (parts). Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token). Only on your own dashboard session or the Primitive CLI.",
|
|
13865
14186
|
"hasJsonBody": false,
|
|
13866
14187
|
"method": "GET",
|
|
13867
14188
|
"operationId": "listEmailRuleDecisionsOnMyMail",
|
|
@@ -13984,7 +14305,7 @@ const operationManifest = [
|
|
|
13984
14305
|
"binaryResponse": false,
|
|
13985
14306
|
"bodyRequired": false,
|
|
13986
14307
|
"command": "list-email-rule-objections",
|
|
13987
|
-
"description": "Objections you made
|
|
14308
|
+
"description": "Objections you made and objections to rules you wrote (by default), only one of the two, or every objection you can see, newest first. An objection is seen by the member who made it, the rule's author and the organization's owners and admins. It stays pending until the rule's author accepts it, turning the rule off, or declines it, or the member who made it withdraws it, which clears its message. It never changes after that. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token). Only on your own dashboard session or the Primitive CLI.",
|
|
13988
14309
|
"hasJsonBody": false,
|
|
13989
14310
|
"method": "GET",
|
|
13990
14311
|
"operationId": "listEmailRuleObjections",
|
|
@@ -13992,9 +14313,10 @@ const operationManifest = [
|
|
|
13992
14313
|
"pathParams": [],
|
|
13993
14314
|
"queryParams": [
|
|
13994
14315
|
{
|
|
13995
|
-
"default": "
|
|
13996
|
-
"description": "
|
|
14316
|
+
"default": "mine",
|
|
14317
|
+
"description": "mine (the default): objections you made and objections to rules you wrote, each saying which (is_objector, is_author). outgoing: only those you made. incoming: only those to rules you wrote. all: every objection you can see.",
|
|
13997
14318
|
"enum": [
|
|
14319
|
+
"mine",
|
|
13998
14320
|
"outgoing",
|
|
13999
14321
|
"incoming",
|
|
14000
14322
|
"all"
|
|
@@ -14109,8 +14431,14 @@ const operationManifest = [
|
|
|
14109
14431
|
"email"
|
|
14110
14432
|
]
|
|
14111
14433
|
},
|
|
14112
|
-
"is_objector": {
|
|
14113
|
-
|
|
14434
|
+
"is_objector": {
|
|
14435
|
+
"type": "boolean",
|
|
14436
|
+
"description": "Whether you made it, in your current membership."
|
|
14437
|
+
},
|
|
14438
|
+
"is_author": {
|
|
14439
|
+
"type": "boolean",
|
|
14440
|
+
"description": "Whether it is to a rule you wrote, in your current membership."
|
|
14441
|
+
},
|
|
14114
14442
|
"message": {
|
|
14115
14443
|
"description": "Why the objector objects; null when none was given, or once withdrawn.",
|
|
14116
14444
|
"type": ["string", "null"]
|
|
@@ -14150,11 +14478,131 @@ const operationManifest = [
|
|
|
14150
14478
|
"tag": "Email Rule Oversight",
|
|
14151
14479
|
"tagCommand": "email-rule-oversight"
|
|
14152
14480
|
},
|
|
14481
|
+
{
|
|
14482
|
+
"binaryResponse": false,
|
|
14483
|
+
"bodyRequired": false,
|
|
14484
|
+
"command": "list-email-rule-versions-covering-me",
|
|
14485
|
+
"description": "The versions of a rule that covers one of your own mailboxes now that applied to your mail: its current version and each earlier one that decided on mail at your own mailboxes, so a decision can be read in the words of the version that made it. Each has what the covering view shows of a version: its wording, tree, explanation and assumptions. A version that did neither is not listed. Without versions, newest first, a page at a time (meta.cursor); with versions, only those named that are listed, oldest first. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token). Only on your own dashboard session or the Primitive CLI.",
|
|
14486
|
+
"hasJsonBody": false,
|
|
14487
|
+
"method": "GET",
|
|
14488
|
+
"operationId": "listEmailRuleVersionsCoveringMe",
|
|
14489
|
+
"path": "/email-rules/covering-me/{id}/versions",
|
|
14490
|
+
"pathParams": [{
|
|
14491
|
+
"description": "The rule id.",
|
|
14492
|
+
"enum": null,
|
|
14493
|
+
"name": "id",
|
|
14494
|
+
"required": true,
|
|
14495
|
+
"type": "string"
|
|
14496
|
+
}],
|
|
14497
|
+
"queryParams": [
|
|
14498
|
+
{
|
|
14499
|
+
"description": "Versions per page when versions is not given: 1 to 100, default 50.",
|
|
14500
|
+
"enum": null,
|
|
14501
|
+
"maximum": 100,
|
|
14502
|
+
"minimum": 1,
|
|
14503
|
+
"name": "limit",
|
|
14504
|
+
"required": false,
|
|
14505
|
+
"type": "integer"
|
|
14506
|
+
},
|
|
14507
|
+
{
|
|
14508
|
+
"description": "meta.cursor from the preceding page. Omit for the first page. Not with versions.",
|
|
14509
|
+
"enum": null,
|
|
14510
|
+
"name": "cursor",
|
|
14511
|
+
"required": false,
|
|
14512
|
+
"type": "string"
|
|
14513
|
+
},
|
|
14514
|
+
{
|
|
14515
|
+
"description": "Read only these version numbers, comma-separated, at most 100. Not with limit or cursor.",
|
|
14516
|
+
"enum": null,
|
|
14517
|
+
"name": "versions",
|
|
14518
|
+
"required": false,
|
|
14519
|
+
"type": "string"
|
|
14520
|
+
}
|
|
14521
|
+
],
|
|
14522
|
+
"headerParams": [],
|
|
14523
|
+
"permissions": ["mail:read"],
|
|
14524
|
+
"access": null,
|
|
14525
|
+
"requestSchema": null,
|
|
14526
|
+
"responseSchema": {
|
|
14527
|
+
"type": "array",
|
|
14528
|
+
"items": {
|
|
14529
|
+
"type": "object",
|
|
14530
|
+
"properties": {
|
|
14531
|
+
"version": {
|
|
14532
|
+
"type": "integer",
|
|
14533
|
+
"exclusiveMinimum": 0
|
|
14534
|
+
},
|
|
14535
|
+
"english": {
|
|
14536
|
+
"type": "string",
|
|
14537
|
+
"description": "What its author asked for, in their words."
|
|
14538
|
+
},
|
|
14539
|
+
"tree": {
|
|
14540
|
+
"type": "object",
|
|
14541
|
+
"properties": {
|
|
14542
|
+
"version": {
|
|
14543
|
+
"type": "number",
|
|
14544
|
+
"const": 1
|
|
14545
|
+
},
|
|
14546
|
+
"vocabulary": {
|
|
14547
|
+
"type": "string",
|
|
14548
|
+
"description": "Vocabulary version, such as v1."
|
|
14549
|
+
},
|
|
14550
|
+
"when": {
|
|
14551
|
+
"type": "object",
|
|
14552
|
+
"propertyNames": { "type": "string" },
|
|
14553
|
+
"additionalProperties": {},
|
|
14554
|
+
"description": "A condition {column, op, value?, min_confidence?} (see GET /email-rules/vocabulary) or {all: [...]}, {any: [...]}, {not: ...}."
|
|
14555
|
+
},
|
|
14556
|
+
"questions": {
|
|
14557
|
+
"type": "array",
|
|
14558
|
+
"items": { "type": "string" },
|
|
14559
|
+
"description": "Yes/no questions asked once the conditions match, over the email's text and attachment names, never attachment contents. A grant rule needs every one yes; a do_not_share rule matches on any yes."
|
|
14560
|
+
}
|
|
14561
|
+
},
|
|
14562
|
+
"required": [
|
|
14563
|
+
"version",
|
|
14564
|
+
"vocabulary",
|
|
14565
|
+
"when",
|
|
14566
|
+
"questions"
|
|
14567
|
+
]
|
|
14568
|
+
},
|
|
14569
|
+
"explanation": {
|
|
14570
|
+
"type": "string",
|
|
14571
|
+
"description": "What the rule matches, as compiled."
|
|
14572
|
+
},
|
|
14573
|
+
"assumptions": {
|
|
14574
|
+
"type": "array",
|
|
14575
|
+
"items": { "type": "string" }
|
|
14576
|
+
},
|
|
14577
|
+
"compiled_by": { "type": "string" },
|
|
14578
|
+
"vocabulary": { "type": "string" },
|
|
14579
|
+
"created_at": {
|
|
14580
|
+
"type": "string",
|
|
14581
|
+
"format": "date-time"
|
|
14582
|
+
}
|
|
14583
|
+
},
|
|
14584
|
+
"required": [
|
|
14585
|
+
"version",
|
|
14586
|
+
"english",
|
|
14587
|
+
"tree",
|
|
14588
|
+
"explanation",
|
|
14589
|
+
"assumptions",
|
|
14590
|
+
"compiled_by",
|
|
14591
|
+
"vocabulary",
|
|
14592
|
+
"created_at"
|
|
14593
|
+
]
|
|
14594
|
+
}
|
|
14595
|
+
},
|
|
14596
|
+
"sdkName": "listEmailRuleVersionsCoveringMe",
|
|
14597
|
+
"summary": "Read versions of a rule over your mail",
|
|
14598
|
+
"tag": "Email Rule Oversight",
|
|
14599
|
+
"tagCommand": "email-rule-oversight"
|
|
14600
|
+
},
|
|
14153
14601
|
{
|
|
14154
14602
|
"binaryResponse": false,
|
|
14155
14603
|
"bodyRequired": false,
|
|
14156
14604
|
"command": "list-email-rules-covering-me",
|
|
14157
|
-
"description": "Every email rule that covers one of your own mailboxes now, yours included, newest first, in any state. A rule covers you when the scope it runs with now reaches one of your own mailboxes (your member mailbox, or a personal agent's address): one whose author reads all your mail (author scope, for an author who reads the organization's mail or holds an access entry for your mailbox), or one that names your mailbox or its domain (selected). Another member's own_mailboxes rule never covers you. You see its name, wording, current tree, state, kind and author, and which of your own mailboxes it reaches. Its wording and tree are shown as written, so they can name other addresses (a condition on who an email is from or to). While it covers you, you also see who receives what it matches (receivers): how many API keys, webhooks and shares,
|
|
14605
|
+
"description": "Every email rule that covers one of your own mailboxes now, yours included, newest first, in any state. A rule covers you when the scope it runs with now reaches one of your own mailboxes (your member mailbox, or a personal agent's address): one whose author reads all your mail (author scope, for an author who reads the organization's mail or holds an access entry for your mailbox), or one that names your mailbox or its domain (selected). Another member's own_mailboxes rule never covers you. You see its name, wording, current tree, state, kind and author, and which of your own mailboxes it reaches. Its wording and tree are shown as written, so they can name other addresses (a condition on who an email is from or to). While it covers you, you also see who receives what it matches (receivers): how many API keys, webhooks and shares, the member each belongs to (or the organization), and the sites the webhooks deliver to. You do not see which keys, webhooks or shares they are (no ids, names, prefixes, or URLs beyond the site), the other inboxes and domains its scope names, or its saved expectations. A page can hold fewer rules than limit, or none, and still carry a cursor (one request reads a bounded number of rules): keep reading until meta.cursor is null. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token). Only on your own dashboard session or the Primitive CLI.",
|
|
14158
14606
|
"hasJsonBody": false,
|
|
14159
14607
|
"method": "GET",
|
|
14160
14608
|
"operationId": "listEmailRulesCoveringMe",
|
|
@@ -14255,7 +14703,7 @@ const operationManifest = [
|
|
|
14255
14703
|
"exclusiveMinimum": 0
|
|
14256
14704
|
},
|
|
14257
14705
|
"receivers": {
|
|
14258
|
-
"description": "Null when it could not be read in time; try again.",
|
|
14706
|
+
"description": "Null when it could not be read in time, or for a rule shown in draft or observe that turned active or was deleted after the page was read; try again.",
|
|
14259
14707
|
"anyOf": [{
|
|
14260
14708
|
"type": "object",
|
|
14261
14709
|
"properties": {
|
|
@@ -14298,11 +14746,16 @@ const operationManifest = [
|
|
|
14298
14746
|
"count": {
|
|
14299
14747
|
"type": "integer",
|
|
14300
14748
|
"exclusiveMinimum": 0
|
|
14749
|
+
},
|
|
14750
|
+
"reads_in_full": {
|
|
14751
|
+
"description": "On a rule over your mail: how many of these keys also list one of your own mailboxes, or its domain, so they read your mail there beyond what this rule matches.",
|
|
14752
|
+
"type": "integer",
|
|
14753
|
+
"minimum": 0
|
|
14301
14754
|
}
|
|
14302
14755
|
},
|
|
14303
14756
|
"required": ["owner", "count"]
|
|
14304
14757
|
},
|
|
14305
|
-
"description": "API keys that work now (not revoked, expired or suspended) whose access lists the rule
|
|
14758
|
+
"description": "API keys that work now (not revoked, expired or suspended) and hold mail:read, whose access lists the rule or its live share. Owner: who holds each, or the organization."
|
|
14306
14759
|
},
|
|
14307
14760
|
"webhooks": {
|
|
14308
14761
|
"type": "array",
|
|
@@ -14343,11 +14796,21 @@ const operationManifest = [
|
|
|
14343
14796
|
"count": {
|
|
14344
14797
|
"type": "integer",
|
|
14345
14798
|
"exclusiveMinimum": 0
|
|
14799
|
+
},
|
|
14800
|
+
"hosts": {
|
|
14801
|
+
"description": "Distinct sites they deliver to (the domain a host is registered under, an app's own name on a known app platform, or a function URL service in its region), sorted, at most 10; \"unknown host\" (last) for any that cannot be named.",
|
|
14802
|
+
"type": "array",
|
|
14803
|
+
"items": { "type": "string" }
|
|
14804
|
+
},
|
|
14805
|
+
"hosts_not_listed": {
|
|
14806
|
+
"description": "Hosts past those listed.",
|
|
14807
|
+
"type": "integer",
|
|
14808
|
+
"minimum": 0
|
|
14346
14809
|
}
|
|
14347
14810
|
},
|
|
14348
14811
|
"required": ["owner", "count"]
|
|
14349
14812
|
},
|
|
14350
|
-
"description": "Webhooks that are sent what it matches: those
|
|
14813
|
+
"description": "Webhooks taking received mail, bounces or reports that are sent what it matches: those of the key delivery acts as, when it lists the rule or its live share (owner: its holder, or the organization), and those of the member it is shared with (owner: that member)."
|
|
14351
14814
|
},
|
|
14352
14815
|
"shares": {
|
|
14353
14816
|
"type": "array",
|
|
@@ -14384,7 +14847,7 @@ const operationManifest = [
|
|
|
14384
14847
|
},
|
|
14385
14848
|
"required": ["beneficiary", "count"]
|
|
14386
14849
|
},
|
|
14387
|
-
"description": "The rule's live share
|
|
14850
|
+
"description": "The rule's live share (at most one), by its member, if they can read it and it is among their newest 20 shares."
|
|
14388
14851
|
}
|
|
14389
14852
|
},
|
|
14390
14853
|
"required": [
|
|
@@ -14392,7 +14855,163 @@ const operationManifest = [
|
|
|
14392
14855
|
"webhooks",
|
|
14393
14856
|
"shares"
|
|
14394
14857
|
],
|
|
14395
|
-
"description": "Who receives what the rule shares
|
|
14858
|
+
"description": "Who receives what the rule shares, by person and count. As receivers, empty unless it is an active grant rule."
|
|
14859
|
+
}, { "type": "null" }]
|
|
14860
|
+
},
|
|
14861
|
+
"receivers_once_active": {
|
|
14862
|
+
"description": "For a grant rule in draft or observe: who would receive what it matches once it is turned active. None of them receives anything yet. Null for any other rule, and as receivers is null.",
|
|
14863
|
+
"anyOf": [{
|
|
14864
|
+
"type": "object",
|
|
14865
|
+
"properties": {
|
|
14866
|
+
"keys": {
|
|
14867
|
+
"type": "array",
|
|
14868
|
+
"items": {
|
|
14869
|
+
"type": "object",
|
|
14870
|
+
"properties": {
|
|
14871
|
+
"owner": { "anyOf": [{
|
|
14872
|
+
"type": "object",
|
|
14873
|
+
"properties": {
|
|
14874
|
+
"kind": {
|
|
14875
|
+
"type": "string",
|
|
14876
|
+
"const": "member"
|
|
14877
|
+
},
|
|
14878
|
+
"user_id": {
|
|
14879
|
+
"type": "string",
|
|
14880
|
+
"description": "The member's user id.",
|
|
14881
|
+
"format": "uuid"
|
|
14882
|
+
},
|
|
14883
|
+
"name": {
|
|
14884
|
+
"description": "Their name; null when they have none set.",
|
|
14885
|
+
"type": ["string", "null"]
|
|
14886
|
+
}
|
|
14887
|
+
},
|
|
14888
|
+
"required": [
|
|
14889
|
+
"kind",
|
|
14890
|
+
"user_id",
|
|
14891
|
+
"name"
|
|
14892
|
+
]
|
|
14893
|
+
}, {
|
|
14894
|
+
"type": "object",
|
|
14895
|
+
"properties": { "kind": {
|
|
14896
|
+
"type": "string",
|
|
14897
|
+
"const": "organization",
|
|
14898
|
+
"description": "Held by no member: an organization key, or one whose holder has left."
|
|
14899
|
+
} },
|
|
14900
|
+
"required": ["kind"]
|
|
14901
|
+
}] },
|
|
14902
|
+
"count": {
|
|
14903
|
+
"type": "integer",
|
|
14904
|
+
"exclusiveMinimum": 0
|
|
14905
|
+
},
|
|
14906
|
+
"reads_in_full": {
|
|
14907
|
+
"description": "On a rule over your mail: how many of these keys also list one of your own mailboxes, or its domain, so they read your mail there beyond what this rule matches.",
|
|
14908
|
+
"type": "integer",
|
|
14909
|
+
"minimum": 0
|
|
14910
|
+
}
|
|
14911
|
+
},
|
|
14912
|
+
"required": ["owner", "count"]
|
|
14913
|
+
},
|
|
14914
|
+
"description": "API keys that work now (not revoked, expired or suspended) and hold mail:read, whose access lists the rule or its live share. Owner: who holds each, or the organization."
|
|
14915
|
+
},
|
|
14916
|
+
"webhooks": {
|
|
14917
|
+
"type": "array",
|
|
14918
|
+
"items": {
|
|
14919
|
+
"type": "object",
|
|
14920
|
+
"properties": {
|
|
14921
|
+
"owner": { "anyOf": [{
|
|
14922
|
+
"type": "object",
|
|
14923
|
+
"properties": {
|
|
14924
|
+
"kind": {
|
|
14925
|
+
"type": "string",
|
|
14926
|
+
"const": "member"
|
|
14927
|
+
},
|
|
14928
|
+
"user_id": {
|
|
14929
|
+
"type": "string",
|
|
14930
|
+
"description": "The member's user id.",
|
|
14931
|
+
"format": "uuid"
|
|
14932
|
+
},
|
|
14933
|
+
"name": {
|
|
14934
|
+
"description": "Their name; null when they have none set.",
|
|
14935
|
+
"type": ["string", "null"]
|
|
14936
|
+
}
|
|
14937
|
+
},
|
|
14938
|
+
"required": [
|
|
14939
|
+
"kind",
|
|
14940
|
+
"user_id",
|
|
14941
|
+
"name"
|
|
14942
|
+
]
|
|
14943
|
+
}, {
|
|
14944
|
+
"type": "object",
|
|
14945
|
+
"properties": { "kind": {
|
|
14946
|
+
"type": "string",
|
|
14947
|
+
"const": "organization",
|
|
14948
|
+
"description": "Held by no member: an organization key, or one whose holder has left."
|
|
14949
|
+
} },
|
|
14950
|
+
"required": ["kind"]
|
|
14951
|
+
}] },
|
|
14952
|
+
"count": {
|
|
14953
|
+
"type": "integer",
|
|
14954
|
+
"exclusiveMinimum": 0
|
|
14955
|
+
},
|
|
14956
|
+
"hosts": {
|
|
14957
|
+
"description": "Distinct sites they deliver to (the domain a host is registered under, an app's own name on a known app platform, or a function URL service in its region), sorted, at most 10; \"unknown host\" (last) for any that cannot be named.",
|
|
14958
|
+
"type": "array",
|
|
14959
|
+
"items": { "type": "string" }
|
|
14960
|
+
},
|
|
14961
|
+
"hosts_not_listed": {
|
|
14962
|
+
"description": "Hosts past those listed.",
|
|
14963
|
+
"type": "integer",
|
|
14964
|
+
"minimum": 0
|
|
14965
|
+
}
|
|
14966
|
+
},
|
|
14967
|
+
"required": ["owner", "count"]
|
|
14968
|
+
},
|
|
14969
|
+
"description": "Webhooks taking received mail, bounces or reports that are sent what it matches: those of the key delivery acts as, when it lists the rule or its live share (owner: its holder, or the organization), and those of the member it is shared with (owner: that member)."
|
|
14970
|
+
},
|
|
14971
|
+
"shares": {
|
|
14972
|
+
"type": "array",
|
|
14973
|
+
"items": {
|
|
14974
|
+
"type": "object",
|
|
14975
|
+
"properties": {
|
|
14976
|
+
"beneficiary": {
|
|
14977
|
+
"type": "object",
|
|
14978
|
+
"properties": {
|
|
14979
|
+
"kind": {
|
|
14980
|
+
"type": "string",
|
|
14981
|
+
"const": "member"
|
|
14982
|
+
},
|
|
14983
|
+
"user_id": {
|
|
14984
|
+
"type": "string",
|
|
14985
|
+
"description": "The member's user id.",
|
|
14986
|
+
"format": "uuid"
|
|
14987
|
+
},
|
|
14988
|
+
"name": {
|
|
14989
|
+
"description": "Their name; null when they have none set.",
|
|
14990
|
+
"type": ["string", "null"]
|
|
14991
|
+
}
|
|
14992
|
+
},
|
|
14993
|
+
"required": [
|
|
14994
|
+
"kind",
|
|
14995
|
+
"user_id",
|
|
14996
|
+
"name"
|
|
14997
|
+
]
|
|
14998
|
+
},
|
|
14999
|
+
"count": {
|
|
15000
|
+
"type": "integer",
|
|
15001
|
+
"exclusiveMinimum": 0
|
|
15002
|
+
}
|
|
15003
|
+
},
|
|
15004
|
+
"required": ["beneficiary", "count"]
|
|
15005
|
+
},
|
|
15006
|
+
"description": "The rule's live share (at most one), by its member, if they can read it and it is among their newest 20 shares."
|
|
15007
|
+
}
|
|
15008
|
+
},
|
|
15009
|
+
"required": [
|
|
15010
|
+
"keys",
|
|
15011
|
+
"webhooks",
|
|
15012
|
+
"shares"
|
|
15013
|
+
],
|
|
15014
|
+
"description": "Who receives what the rule shares, by person and count. As receivers, empty unless it is an active grant rule."
|
|
14396
15015
|
}, { "type": "null" }]
|
|
14397
15016
|
},
|
|
14398
15017
|
"created_at": {
|
|
@@ -14410,6 +15029,7 @@ const operationManifest = [
|
|
|
14410
15029
|
"covers",
|
|
14411
15030
|
"current_version",
|
|
14412
15031
|
"receivers",
|
|
15032
|
+
"receivers_once_active",
|
|
14413
15033
|
"created_at"
|
|
14414
15034
|
]
|
|
14415
15035
|
}
|
|
@@ -14423,7 +15043,7 @@ const operationManifest = [
|
|
|
14423
15043
|
"binaryResponse": false,
|
|
14424
15044
|
"bodyRequired": false,
|
|
14425
15045
|
"command": "withdraw-email-rule-objection",
|
|
14426
|
-
"description": "Withdraws a pending objection you made, and clears its message. Needs mail:read, a member's own
|
|
15046
|
+
"description": "Withdraws a pending objection you made, and clears its message. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token). Only on your own dashboard session or the Primitive CLI.",
|
|
14427
15047
|
"hasJsonBody": false,
|
|
14428
15048
|
"method": "POST",
|
|
14429
15049
|
"operationId": "withdrawEmailRuleObjection",
|
|
@@ -14516,8 +15136,14 @@ const operationManifest = [
|
|
|
14516
15136
|
"email"
|
|
14517
15137
|
]
|
|
14518
15138
|
},
|
|
14519
|
-
"is_objector": {
|
|
14520
|
-
|
|
15139
|
+
"is_objector": {
|
|
15140
|
+
"type": "boolean",
|
|
15141
|
+
"description": "Whether you made it, in your current membership."
|
|
15142
|
+
},
|
|
15143
|
+
"is_author": {
|
|
15144
|
+
"type": "boolean",
|
|
15145
|
+
"description": "Whether it is to a rule you wrote, in your current membership."
|
|
15146
|
+
},
|
|
14521
15147
|
"message": {
|
|
14522
15148
|
"description": "Why the objector objects; null when none was given, or once withdrawn.",
|
|
14523
15149
|
"type": ["string", "null"]
|
|
@@ -14560,7 +15186,7 @@ const operationManifest = [
|
|
|
14560
15186
|
"binaryResponse": false,
|
|
14561
15187
|
"bodyRequired": false,
|
|
14562
15188
|
"command": "accept-email-rule-request",
|
|
14563
|
-
"description": "Writes the rule as yours, over your own mailboxes only, turns it on, and shares what it matches from now on with the member who asked: each email in full with its attachments, but never raw. It does not go back through mail already received. Send no body to accept it as asked, or change it first with english and tree together (and an explanation, or the server writes one). Because this gives your mail to someone else, it is limited to the dashboard and the Primitive CLI: other OAuth apps and agent tokens are refused. Before accepting, test it on your mail: pass the request's tree to POST /v1/email-rules/test. To try it on an email that has not arrived, pass the request's tree to POST /v1/email-rules/test-sample with one you make up, or have look-alikes written (POST /v1/email-rules/look-alikes with request_id); neither stores anything. expectation_samples are kept on the rule it writes. Accepting also needs mail:share_own. Needs mail:read, a member's own
|
|
15189
|
+
"description": "Writes the rule as yours, over your own mailboxes only, turns it on, and shares what it matches from now on with the member who asked: each email in full with its attachments, but never raw. It does not go back through mail already received. Send no body to accept it as asked, or change it first with english and tree together (and an explanation, or the server writes one). Because this gives your mail to someone else, it is limited to the dashboard and the Primitive CLI: other OAuth apps and agent tokens are refused. Before accepting, test it on your mail: pass the request's tree to POST /v1/email-rules/test. To try it on an email that has not arrived, pass the request's tree to POST /v1/email-rules/test-sample with one you make up, or have look-alikes written (POST /v1/email-rules/look-alikes with request_id); neither stores anything. expectation_samples are kept on the rule it writes. Accepting also needs mail:share_own. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
|
|
14564
15190
|
"hasJsonBody": true,
|
|
14565
15191
|
"method": "POST",
|
|
14566
15192
|
"operationId": "acceptEmailRuleRequest",
|
|
@@ -14644,7 +15270,7 @@ const operationManifest = [
|
|
|
14644
15270
|
}
|
|
14645
15271
|
},
|
|
14646
15272
|
"warnings": {
|
|
14647
|
-
"description": "The compile response's warnings. Stored as sent, then any server note they lack on an address or domain the description names that the rule does not test (on a rule request, every compiler note on the rule).",
|
|
15273
|
+
"description": "The compile response's warnings. Stored as sent, then any server note they lack on an address or domain the description names that the rule does not test, or on a grant rule that tests only who an email was sent to (on a rule request, every compiler note on the rule).",
|
|
14648
15274
|
"maxItems": 10,
|
|
14649
15275
|
"type": "array",
|
|
14650
15276
|
"items": {
|
|
@@ -14667,7 +15293,7 @@ const operationManifest = [
|
|
|
14667
15293
|
"checked": {
|
|
14668
15294
|
"type": "integer",
|
|
14669
15295
|
"minimum": 0,
|
|
14670
|
-
"description": "Classified emails the conditions were decided for: of the newest 200 from the last 30 days in your own mailboxes
|
|
15296
|
+
"description": "Classified emails the conditions were decided for: of the newest 200 from the last 30 days in the scope counted (evaluation_scope as sent; by default your own mailboxes, for a grant rule those you may share), the ones you can still read."
|
|
14671
15297
|
},
|
|
14672
15298
|
"matched": {
|
|
14673
15299
|
"type": "integer",
|
|
@@ -14678,6 +15304,30 @@ const operationManifest = [
|
|
|
14678
15304
|
"required": ["checked", "matched"]
|
|
14679
15305
|
}, { "type": "null" }]
|
|
14680
15306
|
},
|
|
15307
|
+
"conditions_breadth": {
|
|
15308
|
+
"description": "Ignored.",
|
|
15309
|
+
"anyOf": [{
|
|
15310
|
+
"type": "object",
|
|
15311
|
+
"properties": {
|
|
15312
|
+
"checked": {
|
|
15313
|
+
"type": "integer",
|
|
15314
|
+
"minimum": 0,
|
|
15315
|
+
"description": "Classified emails the conditions were decided for: of the newest 200 from the last 30 days in the scope counted (evaluation_scope as sent; by default your own mailboxes, for a grant rule those you may share), the ones you can still read."
|
|
15316
|
+
},
|
|
15317
|
+
"matched": {
|
|
15318
|
+
"type": "integer",
|
|
15319
|
+
"minimum": 0,
|
|
15320
|
+
"description": "Of those, how many they hold for (for a do-not-share rule, one they cannot decide counts)."
|
|
15321
|
+
}
|
|
15322
|
+
},
|
|
15323
|
+
"required": ["checked", "matched"]
|
|
15324
|
+
}, { "type": "null" }]
|
|
15325
|
+
},
|
|
15326
|
+
"kind": {
|
|
15327
|
+
"description": "Only grant.",
|
|
15328
|
+
"type": "string",
|
|
15329
|
+
"const": "grant"
|
|
15330
|
+
},
|
|
14681
15331
|
"expectation_samples": {
|
|
14682
15332
|
"description": "Made-up emails the rule must match or not, such as look-alikes it must never match, kept on the rule this accept writes.",
|
|
14683
15333
|
"minItems": 1,
|
|
@@ -14759,6 +15409,16 @@ const operationManifest = [
|
|
|
14759
15409
|
"pattern": "^[^\\u0000]*$"
|
|
14760
15410
|
}
|
|
14761
15411
|
},
|
|
15412
|
+
"attachment_names": {
|
|
15413
|
+
"maxItems": 10,
|
|
15414
|
+
"type": "array",
|
|
15415
|
+
"items": {
|
|
15416
|
+
"type": "string",
|
|
15417
|
+
"minLength": 1,
|
|
15418
|
+
"maxLength": 255,
|
|
15419
|
+
"pattern": "^[^\\u0000-\\u001f\\u007f]*$"
|
|
15420
|
+
}
|
|
15421
|
+
},
|
|
14762
15422
|
"automated": { "type": "boolean" },
|
|
14763
15423
|
"from_mailing_list": { "type": "boolean" },
|
|
14764
15424
|
"spam_score": {
|
|
@@ -15069,6 +15729,15 @@ const operationManifest = [
|
|
|
15069
15729
|
"type": "boolean",
|
|
15070
15730
|
"description": "Whether you are its author, in your current membership. Only its author edits it."
|
|
15071
15731
|
},
|
|
15732
|
+
"pending_objections": {
|
|
15733
|
+
"description": "To its author, on the dashboard or the Primitive CLI: objections to it waiting for their answer (GET /email-rule-objections). A write's answer leaves it out when it could not be read in time: absent is not 0.",
|
|
15734
|
+
"type": "integer",
|
|
15735
|
+
"minimum": 0
|
|
15736
|
+
},
|
|
15737
|
+
"objection_notice": {
|
|
15738
|
+
"description": "With pending_objections above 0: that members asked you to turn it off, and how to answer.",
|
|
15739
|
+
"type": "string"
|
|
15740
|
+
},
|
|
15072
15741
|
"created_at": {
|
|
15073
15742
|
"type": "string",
|
|
15074
15743
|
"format": "date-time"
|
|
@@ -15336,7 +16005,7 @@ const operationManifest = [
|
|
|
15336
16005
|
]
|
|
15337
16006
|
},
|
|
15338
16007
|
"notice": {
|
|
15339
|
-
"description": "What is now shared, in words.",
|
|
16008
|
+
"description": "What is now shared, in words. When you changed the rule and it can now match mail the request left out by who it was sent to (such as mail where an address is only copied), that comes first.",
|
|
15340
16009
|
"type": "string"
|
|
15341
16010
|
}
|
|
15342
16011
|
},
|
|
@@ -15355,7 +16024,7 @@ const operationManifest = [
|
|
|
15355
16024
|
"binaryResponse": false,
|
|
15356
16025
|
"bodyRequired": true,
|
|
15357
16026
|
"command": "check-email-rule-request-target",
|
|
15358
|
-
"description": "Says, before you ask, whether a member could accept a rule request now under their role, and if not, which permission their role lacks. Nothing is sent and nothing is recorded. Needs members:read, as listing members and their roles does. At most 60 checks an hour. Name them by user id, or by their member mailbox address or verified work email (counted with asking: at most 30 lookups by address an hour). Needs mail:read, a member's own
|
|
16027
|
+
"description": "Says, before you ask, whether a member could accept a rule request now under their role, and if not, which permission their role lacks. Nothing is sent and nothing is recorded. Needs members:read, as listing members and their roles does. At most 60 checks an hour. Name them by user id, or by their member mailbox address or verified work email (counted with asking: at most 30 lookups by address an hour). Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
|
|
15359
16028
|
"hasJsonBody": true,
|
|
15360
16029
|
"method": "POST",
|
|
15361
16030
|
"operationId": "checkEmailRuleRequestTarget",
|
|
@@ -15437,7 +16106,7 @@ const operationManifest = [
|
|
|
15437
16106
|
"binaryResponse": false,
|
|
15438
16107
|
"bodyRequired": true,
|
|
15439
16108
|
"command": "compile-email-rule",
|
|
15440
|
-
"description": "Turns a plain-English description of which received emails to match into a rule tree over the column contract, with an explanation of what it matches, the assumptions made, and warnings for what the columns cannot express. Where the columns fall short it adds up to five yes/no questions, asked only after the conditions match; they read the subject, the new text and attachment file names, never attachment contents. Nothing is saved. For a rule with no questions, breadth counts, read only, how much of
|
|
16109
|
+
"description": "Turns a plain-English description of which received emails to match into a rule tree over the column contract, with an explanation of what it matches, the assumptions made, and warnings for what the columns cannot express. Where the columns fall short it adds up to five yes/no questions, asked only after the conditions match; they read the subject, the new text and attachment file names, never attachment contents. Nothing is saved. For a rule with no questions, breadth counts, read only, how much of the recent classified mail in evaluation_scope (by default your own mailboxes) its conditions match; for a grant rule with questions, conditions_breadth counts its conditions alone. include_sql returns the SQL it renders to. kind do_not_share compiles for recall. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
|
|
15441
16110
|
"hasJsonBody": true,
|
|
15442
16111
|
"method": "POST",
|
|
15443
16112
|
"operationId": "compileEmailRule",
|
|
@@ -15470,6 +16139,42 @@ const operationManifest = [
|
|
|
15470
16139
|
"include_sql": {
|
|
15471
16140
|
"description": "Also return the SQL the rule renders to. Off by default.",
|
|
15472
16141
|
"type": "boolean"
|
|
16142
|
+
},
|
|
16143
|
+
"evaluation_scope": {
|
|
16144
|
+
"description": "The scope breadth is counted over, as a test of the tree runs it: send the one you will save the rule with. Nothing is saved. own_mailboxes (the default): mail to your own addresses and agents (for a rule that shares, those mail:share_own lets you share). author: all you can read, inboxes added later included. selected: what scope_selection names.",
|
|
16145
|
+
"type": "string",
|
|
16146
|
+
"enum": [
|
|
16147
|
+
"author",
|
|
16148
|
+
"own_mailboxes",
|
|
16149
|
+
"selected"
|
|
16150
|
+
]
|
|
16151
|
+
},
|
|
16152
|
+
"scope_selection": {
|
|
16153
|
+
"type": "object",
|
|
16154
|
+
"properties": {
|
|
16155
|
+
"addresses": {
|
|
16156
|
+
"maxItems": 100,
|
|
16157
|
+
"type": "array",
|
|
16158
|
+
"items": {
|
|
16159
|
+
"type": "string",
|
|
16160
|
+
"minLength": 3,
|
|
16161
|
+
"maxLength": 320,
|
|
16162
|
+
"pattern": "^[^\\s@]+@[^\\s@]+$"
|
|
16163
|
+
}
|
|
16164
|
+
},
|
|
16165
|
+
"domains": {
|
|
16166
|
+
"maxItems": 50,
|
|
16167
|
+
"type": "array",
|
|
16168
|
+
"items": {
|
|
16169
|
+
"type": "string",
|
|
16170
|
+
"minLength": 1,
|
|
16171
|
+
"maxLength": 253,
|
|
16172
|
+
"pattern": "^[^\\s@]+\\.[^\\s@]+$"
|
|
16173
|
+
}
|
|
16174
|
+
}
|
|
16175
|
+
},
|
|
16176
|
+
"additionalProperties": false,
|
|
16177
|
+
"description": "For a selected rule: inboxes, and domains (each address at them the author reads); each one you can read."
|
|
15473
16178
|
}
|
|
15474
16179
|
},
|
|
15475
16180
|
"required": ["english"],
|
|
@@ -15520,21 +16225,45 @@ const operationManifest = [
|
|
|
15520
16225
|
"warnings": {
|
|
15521
16226
|
"type": "array",
|
|
15522
16227
|
"items": { "type": "string" },
|
|
15523
|
-
"description": "Parts of the description the column contract cannot express,
|
|
16228
|
+
"description": "Parts of the description the column contract cannot express, how the rule handles them, and the compiler's own notes on the rule (the Email Rules docs list them). When the rule has no questions and its conditions hold for nearly all of your recent mail (see breadth), or it is a grant rule whose conditions alone hold for over 20% of at least 20 emails (see conditions_breadth), the first warning says so."
|
|
15524
16229
|
},
|
|
15525
16230
|
"compiled_by": {
|
|
15526
16231
|
"type": "string",
|
|
15527
16232
|
"description": "An opaque name for the version of the rule compiler that produced the rule, such as rule-compiler-v1. Send it back as compiled_by when you save the rule."
|
|
15528
16233
|
},
|
|
16234
|
+
"kind": {
|
|
16235
|
+
"description": "The kind it was compiled for. Send it with the tree to a test.",
|
|
16236
|
+
"type": "string",
|
|
16237
|
+
"enum": ["grant", "do_not_share"]
|
|
16238
|
+
},
|
|
15529
16239
|
"breadth": {
|
|
15530
|
-
"description": "How many
|
|
16240
|
+
"description": "How many recent emails its conditions hold for, warning or not, counted over evaluation_scope as sent (by default your own mailboxes, whatever scope you save it with). Null when not counted in full: a rule with questions, headers-only access, no test of it possible as you, a count that failed or ran out of time, or, with no scope sent, a rule that holds only for mail to To or Cc addresses outside your own mailboxes (a warning says so). Writes ignore it, so a compile answer (without include_sql) can be sent back unchanged.",
|
|
16241
|
+
"anyOf": [{
|
|
16242
|
+
"type": "object",
|
|
16243
|
+
"properties": {
|
|
16244
|
+
"checked": {
|
|
16245
|
+
"type": "integer",
|
|
16246
|
+
"minimum": 0,
|
|
16247
|
+
"description": "Classified emails the conditions were decided for: of the newest 200 from the last 30 days in the scope counted (evaluation_scope as sent; by default your own mailboxes, for a grant rule those you may share), the ones you can still read."
|
|
16248
|
+
},
|
|
16249
|
+
"matched": {
|
|
16250
|
+
"type": "integer",
|
|
16251
|
+
"minimum": 0,
|
|
16252
|
+
"description": "Of those, how many they hold for (for a do-not-share rule, one they cannot decide counts)."
|
|
16253
|
+
}
|
|
16254
|
+
},
|
|
16255
|
+
"required": ["checked", "matched"]
|
|
16256
|
+
}, { "type": "null" }]
|
|
16257
|
+
},
|
|
16258
|
+
"conditions_breadth": {
|
|
16259
|
+
"description": "For a grant rule with questions, breadth counted on its conditions alone: the emails its questions are asked about. Null for any other rule, or when not counted in full (as breadth).",
|
|
15531
16260
|
"anyOf": [{
|
|
15532
16261
|
"type": "object",
|
|
15533
16262
|
"properties": {
|
|
15534
16263
|
"checked": {
|
|
15535
16264
|
"type": "integer",
|
|
15536
16265
|
"minimum": 0,
|
|
15537
|
-
"description": "Classified emails the conditions were decided for: of the newest 200 from the last 30 days in your own mailboxes
|
|
16266
|
+
"description": "Classified emails the conditions were decided for: of the newest 200 from the last 30 days in the scope counted (evaluation_scope as sent; by default your own mailboxes, for a grant rule those you may share), the ones you can still read."
|
|
15538
16267
|
},
|
|
15539
16268
|
"matched": {
|
|
15540
16269
|
"type": "integer",
|
|
@@ -15579,7 +16308,7 @@ const operationManifest = [
|
|
|
15579
16308
|
"binaryResponse": false,
|
|
15580
16309
|
"bodyRequired": true,
|
|
15581
16310
|
"command": "create-email-rule",
|
|
15582
|
-
"description": "Saves a rule as version 1 from a compile response or a tree you wrote, checked against the column contract. It starts in observe (recorded, nothing granted or blocked) unless state is draft, or active for a do_not_share rule. You are its author, and it never reaches mail you cannot read. evaluation_scope is own_mailboxes unless you name author or selected (scope_selection names only what you can read). expectations are judged in expectations_check. kind do_not_share blocks sharing what it matches; a key cannot list it (details.reason rule_blocks_sharing). Needs mail:read, a member's own
|
|
16311
|
+
"description": "Saves a rule as version 1 from a compile response or a tree you wrote, checked against the column contract. It starts in observe (recorded, nothing granted or blocked) unless state is draft, or active for a do_not_share rule. You are its author, and it never reaches mail you cannot read. evaluation_scope is own_mailboxes unless you name author or selected (scope_selection names only what you can read). expectations are judged in expectations_check. kind do_not_share blocks sharing what it matches; a key cannot list it (details.reason rule_blocks_sharing). Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
|
|
15583
16312
|
"hasJsonBody": true,
|
|
15584
16313
|
"method": "POST",
|
|
15585
16314
|
"operationId": "createEmailRule",
|
|
@@ -15758,6 +16487,16 @@ const operationManifest = [
|
|
|
15758
16487
|
"pattern": "^[^\\u0000]*$"
|
|
15759
16488
|
}
|
|
15760
16489
|
},
|
|
16490
|
+
"attachment_names": {
|
|
16491
|
+
"maxItems": 10,
|
|
16492
|
+
"type": "array",
|
|
16493
|
+
"items": {
|
|
16494
|
+
"type": "string",
|
|
16495
|
+
"minLength": 1,
|
|
16496
|
+
"maxLength": 255,
|
|
16497
|
+
"pattern": "^[^\\u0000-\\u001f\\u007f]*$"
|
|
16498
|
+
}
|
|
16499
|
+
},
|
|
15761
16500
|
"automated": { "type": "boolean" },
|
|
15762
16501
|
"from_mailing_list": { "type": "boolean" },
|
|
15763
16502
|
"spam_score": {
|
|
@@ -15836,7 +16575,7 @@ const operationManifest = [
|
|
|
15836
16575
|
}
|
|
15837
16576
|
},
|
|
15838
16577
|
"warnings": {
|
|
15839
|
-
"description": "The compile response's warnings. Stored as sent, then any server note they lack on an address or domain the description names that the rule does not test (on a rule request, every compiler note on the rule).",
|
|
16578
|
+
"description": "The compile response's warnings. Stored as sent, then any server note they lack on an address or domain the description names that the rule does not test, or on a grant rule that tests only who an email was sent to (on a rule request, every compiler note on the rule).",
|
|
15840
16579
|
"maxItems": 10,
|
|
15841
16580
|
"type": "array",
|
|
15842
16581
|
"items": {
|
|
@@ -15859,7 +16598,26 @@ const operationManifest = [
|
|
|
15859
16598
|
"checked": {
|
|
15860
16599
|
"type": "integer",
|
|
15861
16600
|
"minimum": 0,
|
|
15862
|
-
"description": "Classified emails the conditions were decided for: of the newest 200 from the last 30 days in your own mailboxes
|
|
16601
|
+
"description": "Classified emails the conditions were decided for: of the newest 200 from the last 30 days in the scope counted (evaluation_scope as sent; by default your own mailboxes, for a grant rule those you may share), the ones you can still read."
|
|
16602
|
+
},
|
|
16603
|
+
"matched": {
|
|
16604
|
+
"type": "integer",
|
|
16605
|
+
"minimum": 0,
|
|
16606
|
+
"description": "Of those, how many they hold for (for a do-not-share rule, one they cannot decide counts)."
|
|
16607
|
+
}
|
|
16608
|
+
},
|
|
16609
|
+
"required": ["checked", "matched"]
|
|
16610
|
+
}, { "type": "null" }]
|
|
16611
|
+
},
|
|
16612
|
+
"conditions_breadth": {
|
|
16613
|
+
"description": "Ignored.",
|
|
16614
|
+
"anyOf": [{
|
|
16615
|
+
"type": "object",
|
|
16616
|
+
"properties": {
|
|
16617
|
+
"checked": {
|
|
16618
|
+
"type": "integer",
|
|
16619
|
+
"minimum": 0,
|
|
16620
|
+
"description": "Classified emails the conditions were decided for: of the newest 200 from the last 30 days in the scope counted (evaluation_scope as sent; by default your own mailboxes, for a grant rule those you may share), the ones you can still read."
|
|
15863
16621
|
},
|
|
15864
16622
|
"matched": {
|
|
15865
16623
|
"type": "integer",
|
|
@@ -15968,6 +16726,15 @@ const operationManifest = [
|
|
|
15968
16726
|
"type": "boolean",
|
|
15969
16727
|
"description": "Whether you are its author, in your current membership. Only its author edits it."
|
|
15970
16728
|
},
|
|
16729
|
+
"pending_objections": {
|
|
16730
|
+
"description": "To its author, on the dashboard or the Primitive CLI: objections to it waiting for their answer (GET /email-rule-objections). A write's answer leaves it out when it could not be read in time: absent is not 0.",
|
|
16731
|
+
"type": "integer",
|
|
16732
|
+
"minimum": 0
|
|
16733
|
+
},
|
|
16734
|
+
"objection_notice": {
|
|
16735
|
+
"description": "With pending_objections above 0: that members asked you to turn it off, and how to answer.",
|
|
16736
|
+
"type": "string"
|
|
16737
|
+
},
|
|
15971
16738
|
"created_at": {
|
|
15972
16739
|
"type": "string",
|
|
15973
16740
|
"format": "date-time"
|
|
@@ -16094,6 +16861,27 @@ const operationManifest = [
|
|
|
16094
16861
|
]
|
|
16095
16862
|
}
|
|
16096
16863
|
},
|
|
16864
|
+
"expectations": {
|
|
16865
|
+
"description": "Its saved expectations, each list by email id, as stored: on every create, and on an update that set or removed them.",
|
|
16866
|
+
"type": "object",
|
|
16867
|
+
"properties": {
|
|
16868
|
+
"match": {
|
|
16869
|
+
"type": "array",
|
|
16870
|
+
"items": {
|
|
16871
|
+
"type": "string",
|
|
16872
|
+
"format": "uuid"
|
|
16873
|
+
}
|
|
16874
|
+
},
|
|
16875
|
+
"no_match": {
|
|
16876
|
+
"type": "array",
|
|
16877
|
+
"items": {
|
|
16878
|
+
"type": "string",
|
|
16879
|
+
"format": "uuid"
|
|
16880
|
+
}
|
|
16881
|
+
}
|
|
16882
|
+
},
|
|
16883
|
+
"required": ["match", "no_match"]
|
|
16884
|
+
},
|
|
16097
16885
|
"expectation_samples": {
|
|
16098
16886
|
"description": "Its saved made-up emails, when this write set or added some.",
|
|
16099
16887
|
"type": "array",
|
|
@@ -16171,6 +16959,16 @@ const operationManifest = [
|
|
|
16171
16959
|
"pattern": "^[^\\u0000]*$"
|
|
16172
16960
|
}
|
|
16173
16961
|
},
|
|
16962
|
+
"attachment_names": {
|
|
16963
|
+
"maxItems": 10,
|
|
16964
|
+
"type": "array",
|
|
16965
|
+
"items": {
|
|
16966
|
+
"type": "string",
|
|
16967
|
+
"minLength": 1,
|
|
16968
|
+
"maxLength": 255,
|
|
16969
|
+
"pattern": "^[^\\u0000-\\u001f\\u007f]*$"
|
|
16970
|
+
}
|
|
16971
|
+
},
|
|
16174
16972
|
"automated": { "type": "boolean" },
|
|
16175
16973
|
"from_mailing_list": { "type": "boolean" },
|
|
16176
16974
|
"spam_score": {
|
|
@@ -16292,6 +17090,14 @@ const operationManifest = [
|
|
|
16292
17090
|
"endpoints",
|
|
16293
17091
|
"shares_ended"
|
|
16294
17092
|
]
|
|
17093
|
+
},
|
|
17094
|
+
"notice": {
|
|
17095
|
+
"description": "After a write that saved a version of an active rule keys or webhooks read without checking it first: what it changes, and how to have the next one checked.",
|
|
17096
|
+
"type": "string"
|
|
17097
|
+
},
|
|
17098
|
+
"share_notice": {
|
|
17099
|
+
"description": "After a write that ended the rule's share: that it did, given even when affects is not, with whom it was with and the version they accepted when those can be read.",
|
|
17100
|
+
"type": "string"
|
|
16295
17101
|
}
|
|
16296
17102
|
},
|
|
16297
17103
|
"required": [
|
|
@@ -16315,7 +17121,7 @@ const operationManifest = [
|
|
|
16315
17121
|
"binaryResponse": false,
|
|
16316
17122
|
"bodyRequired": true,
|
|
16317
17123
|
"command": "create-email-rule-request",
|
|
16318
|
-
"description": "Asks another member of the organization for a rule over their own mail, from a compile response or a tree you wrote. Name them by user id, or by their member mailbox address, or by their verified work email if you can list members (at most 30 lookups by address an hour). Nothing is evaluated or shared until they accept, and they may change the rule first. A message (up to 500 characters, fixed once sent) tells them why you ask. At most 5 pending requests to one member and 50 in all. With members:read the answer says whether they can accept it under their role (target_can_accept, target_warning); POST /v1/email-rule-requests/target-check checks first. Needs mail:read, a member's own
|
|
17124
|
+
"description": "Asks another member of the organization for a rule over their own mail, from a compile response or a tree you wrote. Name them by user id, or by their member mailbox address, or by their verified work email if you can list members (at most 30 lookups by address an hour). Nothing is evaluated or shared until they accept, and they may change the rule first. A message (up to 500 characters, fixed once sent) tells them why you ask. At most 5 pending requests to one member and 50 in all. With members:read the answer says whether they can accept it under their role (target_can_accept, target_warning); POST /v1/email-rule-requests/target-check checks first. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
|
|
16319
17125
|
"hasJsonBody": true,
|
|
16320
17126
|
"method": "POST",
|
|
16321
17127
|
"operationId": "createEmailRuleRequest",
|
|
@@ -16411,7 +17217,7 @@ const operationManifest = [
|
|
|
16411
17217
|
}
|
|
16412
17218
|
},
|
|
16413
17219
|
"warnings": {
|
|
16414
|
-
"description": "The compile response's warnings. Stored as sent, then any server note they lack on an address or domain the description names that the rule does not test (on a rule request, every compiler note on the rule).",
|
|
17220
|
+
"description": "The compile response's warnings. Stored as sent, then any server note they lack on an address or domain the description names that the rule does not test, or on a grant rule that tests only who an email was sent to (on a rule request, every compiler note on the rule).",
|
|
16415
17221
|
"maxItems": 10,
|
|
16416
17222
|
"type": "array",
|
|
16417
17223
|
"items": {
|
|
@@ -16434,7 +17240,7 @@ const operationManifest = [
|
|
|
16434
17240
|
"checked": {
|
|
16435
17241
|
"type": "integer",
|
|
16436
17242
|
"minimum": 0,
|
|
16437
|
-
"description": "Classified emails the conditions were decided for: of the newest 200 from the last 30 days in your own mailboxes
|
|
17243
|
+
"description": "Classified emails the conditions were decided for: of the newest 200 from the last 30 days in the scope counted (evaluation_scope as sent; by default your own mailboxes, for a grant rule those you may share), the ones you can still read."
|
|
16438
17244
|
},
|
|
16439
17245
|
"matched": {
|
|
16440
17246
|
"type": "integer",
|
|
@@ -16444,6 +17250,30 @@ const operationManifest = [
|
|
|
16444
17250
|
},
|
|
16445
17251
|
"required": ["checked", "matched"]
|
|
16446
17252
|
}, { "type": "null" }]
|
|
17253
|
+
},
|
|
17254
|
+
"conditions_breadth": {
|
|
17255
|
+
"description": "Ignored.",
|
|
17256
|
+
"anyOf": [{
|
|
17257
|
+
"type": "object",
|
|
17258
|
+
"properties": {
|
|
17259
|
+
"checked": {
|
|
17260
|
+
"type": "integer",
|
|
17261
|
+
"minimum": 0,
|
|
17262
|
+
"description": "Classified emails the conditions were decided for: of the newest 200 from the last 30 days in the scope counted (evaluation_scope as sent; by default your own mailboxes, for a grant rule those you may share), the ones you can still read."
|
|
17263
|
+
},
|
|
17264
|
+
"matched": {
|
|
17265
|
+
"type": "integer",
|
|
17266
|
+
"minimum": 0,
|
|
17267
|
+
"description": "Of those, how many they hold for (for a do-not-share rule, one they cannot decide counts)."
|
|
17268
|
+
}
|
|
17269
|
+
},
|
|
17270
|
+
"required": ["checked", "matched"]
|
|
17271
|
+
}, { "type": "null" }]
|
|
17272
|
+
},
|
|
17273
|
+
"kind": {
|
|
17274
|
+
"description": "Only grant.",
|
|
17275
|
+
"type": "string",
|
|
17276
|
+
"const": "grant"
|
|
16447
17277
|
}
|
|
16448
17278
|
},
|
|
16449
17279
|
"required": [
|
|
@@ -16659,7 +17489,7 @@ const operationManifest = [
|
|
|
16659
17489
|
"binaryResponse": false,
|
|
16660
17490
|
"bodyRequired": false,
|
|
16661
17491
|
"command": "decline-email-rule-request",
|
|
16662
|
-
"description": "Declines a pending request made to you. Nothing is written but the decision and, if you give one, its reason (reason, up to 500 characters), which the member who asked sees with the request. Needs mail:read, a member's own
|
|
17492
|
+
"description": "Declines a pending request made to you. Nothing is written but the decision and, if you give one, its reason (reason, up to 500 characters), which the member who asked sees with the request. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
|
|
16663
17493
|
"hasJsonBody": true,
|
|
16664
17494
|
"method": "POST",
|
|
16665
17495
|
"operationId": "declineEmailRuleRequest",
|
|
@@ -16889,7 +17719,7 @@ const operationManifest = [
|
|
|
16889
17719
|
"binaryResponse": false,
|
|
16890
17720
|
"bodyRequired": false,
|
|
16891
17721
|
"command": "delete-email-rule",
|
|
16892
|
-
"description": "Deletes a rule with its versions, its decisions and the access it granted. A share of it ends (end_reason rule_deleted), and the member who shared can still list what it handed over. The answer lists the shares it ended (ended_shares) and the unrevoked keys that still list it, which now read nothing through it (keys, other_keys; left out when they could not be read). The author or a reader of all the organization's mail may delete it; while it is shared, only the author or someone who manages members from the dashboard. Needs mail:read, a member's own
|
|
17722
|
+
"description": "Deletes a rule with its versions, its decisions and the access it granted. A share of it ends (end_reason rule_deleted), and the member who shared can still list what it handed over. The answer lists the shares it ended (ended_shares), says whom with (share_notice), and lists the unrevoked keys that still list it, which now read nothing through it (keys, other_keys; left out when they could not be read). The author or a reader of all the organization's mail may delete it; while it is shared, only the author or someone who manages members from the dashboard. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
|
|
16893
17723
|
"hasJsonBody": false,
|
|
16894
17724
|
"method": "DELETE",
|
|
16895
17725
|
"operationId": "deleteEmailRule",
|
|
@@ -16941,6 +17771,10 @@ const operationManifest = [
|
|
|
16941
17771
|
"other_keys": {
|
|
16942
17772
|
"description": "How many more keys, not revoked, list the rule that you may not read. They are not named.",
|
|
16943
17773
|
"type": "integer"
|
|
17774
|
+
},
|
|
17775
|
+
"share_notice": {
|
|
17776
|
+
"description": "When the delete ended a share: that it did, with whom it was with and the version they accepted when those can be read.",
|
|
17777
|
+
"type": "string"
|
|
16944
17778
|
}
|
|
16945
17779
|
},
|
|
16946
17780
|
"required": ["deleted"]
|
|
@@ -16954,7 +17788,7 @@ const operationManifest = [
|
|
|
16954
17788
|
"binaryResponse": false,
|
|
16955
17789
|
"bodyRequired": false,
|
|
16956
17790
|
"command": "delete-email-rule-request",
|
|
16957
|
-
"description": "Deletes a request you withdrew, for everyone who could see it. Needs mail:read, a member's own
|
|
17791
|
+
"description": "Deletes a request you withdrew, for everyone who could see it. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
|
|
16958
17792
|
"hasJsonBody": false,
|
|
16959
17793
|
"method": "DELETE",
|
|
16960
17794
|
"operationId": "deleteEmailRuleRequest",
|
|
@@ -17021,7 +17855,7 @@ const operationManifest = [
|
|
|
17021
17855
|
"binaryResponse": false,
|
|
17022
17856
|
"bodyRequired": true,
|
|
17023
17857
|
"command": "generate-look-alikes",
|
|
17024
|
-
"description": "Writes made-up emails that come close to what a grant rule describes, and reports what the rule decides for each, as test-sample would. Most should not match (expected no_match): business near misses from its senders and topic (kind other: an all-clear, a reply with nothing new, a related document, another subject) and private mail (a personal medical bill, pay for named people, a personal purchase, personal banking or tax). By default a third, rounded down, are near cases it should match (expected match, kind other). failed means the rule decided one against expected. Nothing is stored and no mail is read. Keep them, with their expected, with add_expectation_samples, or for a request with the accept's expectation_samples. Limited to 20 an hour per member. Needs mail:read, a member's own
|
|
17858
|
+
"description": "Writes made-up emails that come close to what a grant rule describes, and reports what the rule decides for each, as test-sample would. Most should not match (expected no_match): business near misses from its senders and topic (kind other: an all-clear, a reply with nothing new, a related document, another subject) and private mail (a personal medical bill, pay for named people, a personal purchase, personal banking or tax). By default a third, rounded down, are near cases it should match (expected match, kind other). failed means the rule decided one against expected. Nothing is stored and no mail is read. Keep them, with their expected, with add_expectation_samples, or for a request with the accept's expectation_samples. Limited to 20 an hour per member. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
|
|
17025
17859
|
"hasJsonBody": true,
|
|
17026
17860
|
"method": "POST",
|
|
17027
17861
|
"operationId": "generateLookAlikes",
|
|
@@ -17113,7 +17947,7 @@ const operationManifest = [
|
|
|
17113
17947
|
"description": "For a selected rule: inboxes, and domains (each address at them the author reads); each one you can read."
|
|
17114
17948
|
},
|
|
17115
17949
|
"rule_id": {
|
|
17116
|
-
"description": "A saved rule you can see: its current version and words.",
|
|
17950
|
+
"description": "A saved rule you can see, or one that covers your mailboxes (as you, sent to one of them; dashboard or Primitive CLI only): its current version and words.",
|
|
17117
17951
|
"type": "string",
|
|
17118
17952
|
"format": "uuid"
|
|
17119
17953
|
},
|
|
@@ -17173,7 +18007,16 @@ const operationManifest = [
|
|
|
17173
18007
|
"type": ["integer", "null"],
|
|
17174
18008
|
"exclusiveMinimum": 0
|
|
17175
18009
|
},
|
|
17176
|
-
"vocabulary": { "type": "string" }
|
|
18010
|
+
"vocabulary": { "type": "string" },
|
|
18011
|
+
"kind": {
|
|
18012
|
+
"description": "The kind it was tested as.",
|
|
18013
|
+
"type": "string",
|
|
18014
|
+
"enum": ["grant", "do_not_share"]
|
|
18015
|
+
},
|
|
18016
|
+
"note": {
|
|
18017
|
+
"description": "Present when a tree was sent without kind, so it was tested as grant.",
|
|
18018
|
+
"type": "string"
|
|
18019
|
+
}
|
|
17177
18020
|
},
|
|
17178
18021
|
"required": [
|
|
17179
18022
|
"id",
|
|
@@ -17230,6 +18073,10 @@ const operationManifest = [
|
|
|
17230
18073
|
"type": "array",
|
|
17231
18074
|
"items": { "type": "string" }
|
|
17232
18075
|
},
|
|
18076
|
+
"attachment_names": {
|
|
18077
|
+
"type": "array",
|
|
18078
|
+
"items": { "type": "string" }
|
|
18079
|
+
},
|
|
17233
18080
|
"automated": { "type": "boolean" },
|
|
17234
18081
|
"from_mailing_list": { "type": "boolean" }
|
|
17235
18082
|
},
|
|
@@ -17240,6 +18087,7 @@ const operationManifest = [
|
|
|
17240
18087
|
"subject",
|
|
17241
18088
|
"text",
|
|
17242
18089
|
"attachment_types",
|
|
18090
|
+
"attachment_names",
|
|
17243
18091
|
"automated",
|
|
17244
18092
|
"from_mailing_list"
|
|
17245
18093
|
],
|
|
@@ -17341,7 +18189,7 @@ const operationManifest = [
|
|
|
17341
18189
|
"binaryResponse": false,
|
|
17342
18190
|
"bodyRequired": false,
|
|
17343
18191
|
"command": "get-email-rule",
|
|
17344
|
-
"description": "A rule, its scope (evaluation_scope, and scope_selection for a selected rule), its current version and its saved expectations. The current version's text (english, tree, explanation, assumptions, warnings) is under current, and current_version is its number. What the scope comes to for its author now is GET /email-rules/{id}/scope. The SQL the version renders to is included only when include_sql is true. Needs mail:read, a member's own
|
|
18192
|
+
"description": "A rule, its scope (evaluation_scope, and scope_selection for a selected rule), its current version and its saved expectations. The current version's text (english, tree, explanation, assumptions, warnings) is under current, and current_version is its number. What the scope comes to for its author now is GET /email-rules/{id}/scope. The SQL the version renders to is included only when include_sql is true. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
|
|
17345
18193
|
"hasJsonBody": false,
|
|
17346
18194
|
"method": "GET",
|
|
17347
18195
|
"operationId": "getEmailRule",
|
|
@@ -17454,6 +18302,15 @@ const operationManifest = [
|
|
|
17454
18302
|
"type": "boolean",
|
|
17455
18303
|
"description": "Whether you are its author, in your current membership. Only its author edits it."
|
|
17456
18304
|
},
|
|
18305
|
+
"pending_objections": {
|
|
18306
|
+
"description": "To its author, on the dashboard or the Primitive CLI: objections to it waiting for their answer (GET /email-rule-objections). A write's answer leaves it out when it could not be read in time: absent is not 0.",
|
|
18307
|
+
"type": "integer",
|
|
18308
|
+
"minimum": 0
|
|
18309
|
+
},
|
|
18310
|
+
"objection_notice": {
|
|
18311
|
+
"description": "With pending_objections above 0: that members asked you to turn it off, and how to answer.",
|
|
18312
|
+
"type": "string"
|
|
18313
|
+
},
|
|
17457
18314
|
"created_at": {
|
|
17458
18315
|
"type": "string",
|
|
17459
18316
|
"format": "date-time"
|
|
@@ -17648,6 +18505,16 @@ const operationManifest = [
|
|
|
17648
18505
|
"pattern": "^[^\\u0000]*$"
|
|
17649
18506
|
}
|
|
17650
18507
|
},
|
|
18508
|
+
"attachment_names": {
|
|
18509
|
+
"maxItems": 10,
|
|
18510
|
+
"type": "array",
|
|
18511
|
+
"items": {
|
|
18512
|
+
"type": "string",
|
|
18513
|
+
"minLength": 1,
|
|
18514
|
+
"maxLength": 255,
|
|
18515
|
+
"pattern": "^[^\\u0000-\\u001f\\u007f]*$"
|
|
18516
|
+
}
|
|
18517
|
+
},
|
|
17651
18518
|
"automated": { "type": "boolean" },
|
|
17652
18519
|
"from_mailing_list": { "type": "boolean" },
|
|
17653
18520
|
"spam_score": {
|
|
@@ -17699,7 +18566,7 @@ const operationManifest = [
|
|
|
17699
18566
|
"binaryResponse": false,
|
|
17700
18567
|
"bodyRequired": false,
|
|
17701
18568
|
"command": "get-email-rule-request",
|
|
17702
|
-
"description": "A rule request: the rule as proposed, who made it and to whom, and whether each of them is still a member. A request is visible to the member who made it, the member it was made to, and the organization's owners and admins. If you are the member asked, you can try the rule as proposed before answering: pass the request's tree to POST /v1/email-rules/test to test it on mail you have received. To try it on an email that has not arrived, pass the request's tree to POST /v1/email-rules/test-sample with one you make up, or have look-alikes written (POST /v1/email-rules/look-alikes with request_id); neither stores anything. Needs mail:read, a member's own
|
|
18569
|
+
"description": "A rule request: the rule as proposed, who made it and to whom, and whether each of them is still a member. A request is visible to the member who made it, the member it was made to, and the organization's owners and admins. If you are the member asked, you can try the rule as proposed before answering: pass the request's tree to POST /v1/email-rules/test to test it on mail you have received. To try it on an email that has not arrived, pass the request's tree to POST /v1/email-rules/test-sample with one you make up, or have look-alikes written (POST /v1/email-rules/look-alikes with request_id); neither stores anything. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
|
|
17703
18570
|
"hasJsonBody": false,
|
|
17704
18571
|
"method": "GET",
|
|
17705
18572
|
"operationId": "getEmailRuleRequest",
|
|
@@ -17914,7 +18781,7 @@ const operationManifest = [
|
|
|
17914
18781
|
"binaryResponse": false,
|
|
17915
18782
|
"bodyRequired": false,
|
|
17916
18783
|
"command": "get-email-rule-scope",
|
|
17917
|
-
"description": "Whose mail the rule runs over, and what that comes to now: a rule never reaches further than what its author can read when it runs, so what a selected rule names and its author can no longer read stops matching. Needs mail:read, a member's own
|
|
18784
|
+
"description": "Whose mail the rule runs over, and what that comes to now: a rule never reaches further than what its author can read when it runs, so what a selected rule names and its author can no longer read stops matching. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
|
|
17918
18785
|
"hasJsonBody": false,
|
|
17919
18786
|
"method": "GET",
|
|
17920
18787
|
"operationId": "getEmailRuleScope",
|
|
@@ -18047,7 +18914,7 @@ const operationManifest = [
|
|
|
18047
18914
|
"binaryResponse": false,
|
|
18048
18915
|
"bodyRequired": false,
|
|
18049
18916
|
"command": "get-email-rule-share",
|
|
18050
|
-
"description": "One share. Needs mail:read, a member's own
|
|
18917
|
+
"description": "One share. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
|
|
18051
18918
|
"hasJsonBody": false,
|
|
18052
18919
|
"method": "GET",
|
|
18053
18920
|
"operationId": "getEmailRuleShare",
|
|
@@ -18230,7 +19097,7 @@ const operationManifest = [
|
|
|
18230
19097
|
"binaryResponse": false,
|
|
18231
19098
|
"bodyRequired": false,
|
|
18232
19099
|
"command": "get-email-rule-vocabulary",
|
|
18233
|
-
"description": "What a rule tree you write yourself can say: each column of the current vocabulary with its type, source, meaning, operators and the value each takes, options, and whether it takes min_confidence; and the tree's limits, its stored size included. Built from the checks a saved or tested tree must pass. A tree is {version: tree_version, vocabulary: version, when, questions}. Needs mail:read, a member's own
|
|
19100
|
+
"description": "What a rule tree you write yourself can say: each column of the current vocabulary with its type, source, meaning, operators and the value each takes, options, and whether it takes min_confidence; and the tree's limits, its stored size included. Built from the checks a saved or tested tree must pass. A tree is {version: tree_version, vocabulary: version, when, questions}. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
|
|
18234
19101
|
"hasJsonBody": false,
|
|
18235
19102
|
"method": "GET",
|
|
18236
19103
|
"operationId": "getEmailRuleVocabulary",
|
|
@@ -18404,7 +19271,7 @@ const operationManifest = [
|
|
|
18404
19271
|
"binaryResponse": false,
|
|
18405
19272
|
"bodyRequired": false,
|
|
18406
19273
|
"command": "list-email-rule-decisions",
|
|
18407
|
-
"description": "What the rule decided for each email it was evaluated against, newest first: whether it matched, whether it nearly did, how each part decided and the answers to its questions, with which email it was (from_address, subject, received_at). Only decisions on emails the caller can read are listed. With matched, only matches (true) or only the rest (false). Needs mail:read, a member's own
|
|
19274
|
+
"description": "What the rule decided for each email it was evaluated against, newest first: whether it matched, whether it nearly did, how each part decided and the answers to its questions, with which email it was (from_address, subject, received_at). Only decisions on emails the caller can read are listed. With matched, only matches (true) or only the rest (false). Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
|
|
18408
19275
|
"hasJsonBody": false,
|
|
18409
19276
|
"method": "GET",
|
|
18410
19277
|
"operationId": "listEmailRuleDecisions",
|
|
@@ -18560,7 +19427,7 @@ const operationManifest = [
|
|
|
18560
19427
|
"binaryResponse": false,
|
|
18561
19428
|
"bodyRequired": false,
|
|
18562
19429
|
"command": "list-email-rule-requests",
|
|
18563
|
-
"description": "Rule requests, newest first: those made to you (box incoming, the default), those you made (outgoing), or every one you can see (all). Pending ones by default; status decided lists accepted, declined and withdrawn ones, and any lists both. A request is visible to the member who made it, the member it was made to, and the organization's owners and admins. Needs mail:read, a member's own
|
|
19430
|
+
"description": "Rule requests, newest first: those made to you (box incoming, the default), those you made (outgoing), or every one you can see (all). Pending ones by default; status decided lists accepted, declined and withdrawn ones, and any lists both. A request is visible to the member who made it, the member it was made to, and the organization's owners and admins. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
|
|
18564
19431
|
"hasJsonBody": false,
|
|
18565
19432
|
"method": "GET",
|
|
18566
19433
|
"operationId": "listEmailRuleRequests",
|
|
@@ -18814,7 +19681,7 @@ const operationManifest = [
|
|
|
18814
19681
|
"binaryResponse": false,
|
|
18815
19682
|
"bodyRequired": false,
|
|
18816
19683
|
"command": "list-email-rule-results",
|
|
18817
|
-
"description": "What each rule you can see decided about this email (matched, not matched, or not run), in the words of the deciding version. A do_not_share rule that matched it blocks sharing while active; earlier shares stay. Only a caller who can read the email gets an answer. classification is every fact the classifier read, as rule conditions read it. At most 50 rules are listed, results first; not_listed counts the rest. Another member's rule that decided on your own mail is listed read_only (dashboard and CLI only), with who receives what it shares (receivers) while it covers you; hidden counts deciding rules you cannot see. Needs mail:read, a member's own
|
|
19684
|
+
"description": "What each rule you can see decided about this email (matched, not matched, or not run), in the words of the deciding version. A do_not_share rule that matched it blocks sharing while active; earlier shares stay. Only a caller who can read the email gets an answer. classification is every fact the classifier read, as rule conditions read it. At most 50 rules are listed, results first; not_listed counts the rest. Another member's rule that decided on your own mail is listed read_only (dashboard and CLI only), with who receives what it shares (receivers) while it covers you; hidden counts deciding rules you cannot see. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
|
|
18818
19685
|
"hasJsonBody": false,
|
|
18819
19686
|
"method": "GET",
|
|
18820
19687
|
"operationId": "listEmailRuleResults",
|
|
@@ -19112,11 +19979,16 @@ const operationManifest = [
|
|
|
19112
19979
|
"count": {
|
|
19113
19980
|
"type": "integer",
|
|
19114
19981
|
"exclusiveMinimum": 0
|
|
19982
|
+
},
|
|
19983
|
+
"reads_in_full": {
|
|
19984
|
+
"description": "On a rule over your mail: how many of these keys also list one of your own mailboxes, or its domain, so they read your mail there beyond what this rule matches.",
|
|
19985
|
+
"type": "integer",
|
|
19986
|
+
"minimum": 0
|
|
19115
19987
|
}
|
|
19116
19988
|
},
|
|
19117
19989
|
"required": ["owner", "count"]
|
|
19118
19990
|
},
|
|
19119
|
-
"description": "API keys that work now (not revoked, expired or suspended) whose access lists the rule
|
|
19991
|
+
"description": "API keys that work now (not revoked, expired or suspended) and hold mail:read, whose access lists the rule or its live share. Owner: who holds each, or the organization."
|
|
19120
19992
|
},
|
|
19121
19993
|
"webhooks": {
|
|
19122
19994
|
"type": "array",
|
|
@@ -19157,11 +20029,21 @@ const operationManifest = [
|
|
|
19157
20029
|
"count": {
|
|
19158
20030
|
"type": "integer",
|
|
19159
20031
|
"exclusiveMinimum": 0
|
|
20032
|
+
},
|
|
20033
|
+
"hosts": {
|
|
20034
|
+
"description": "Distinct sites they deliver to (the domain a host is registered under, an app's own name on a known app platform, or a function URL service in its region), sorted, at most 10; \"unknown host\" (last) for any that cannot be named.",
|
|
20035
|
+
"type": "array",
|
|
20036
|
+
"items": { "type": "string" }
|
|
20037
|
+
},
|
|
20038
|
+
"hosts_not_listed": {
|
|
20039
|
+
"description": "Hosts past those listed.",
|
|
20040
|
+
"type": "integer",
|
|
20041
|
+
"minimum": 0
|
|
19160
20042
|
}
|
|
19161
20043
|
},
|
|
19162
20044
|
"required": ["owner", "count"]
|
|
19163
20045
|
},
|
|
19164
|
-
"description": "Webhooks that are sent what it matches: those
|
|
20046
|
+
"description": "Webhooks taking received mail, bounces or reports that are sent what it matches: those of the key delivery acts as, when it lists the rule or its live share (owner: its holder, or the organization), and those of the member it is shared with (owner: that member)."
|
|
19165
20047
|
},
|
|
19166
20048
|
"shares": {
|
|
19167
20049
|
"type": "array",
|
|
@@ -19198,7 +20080,7 @@ const operationManifest = [
|
|
|
19198
20080
|
},
|
|
19199
20081
|
"required": ["beneficiary", "count"]
|
|
19200
20082
|
},
|
|
19201
|
-
"description": "The rule's live share
|
|
20083
|
+
"description": "The rule's live share (at most one), by its member, if they can read it and it is among their newest 20 shares."
|
|
19202
20084
|
}
|
|
19203
20085
|
},
|
|
19204
20086
|
"required": [
|
|
@@ -19206,7 +20088,7 @@ const operationManifest = [
|
|
|
19206
20088
|
"webhooks",
|
|
19207
20089
|
"shares"
|
|
19208
20090
|
],
|
|
19209
|
-
"description": "Who receives what the rule shares
|
|
20091
|
+
"description": "Who receives what the rule shares, by person and count. As receivers, empty unless it is an active grant rule."
|
|
19210
20092
|
}, { "type": "null" }]
|
|
19211
20093
|
}
|
|
19212
20094
|
},
|
|
@@ -19291,7 +20173,7 @@ const operationManifest = [
|
|
|
19291
20173
|
"binaryResponse": false,
|
|
19292
20174
|
"bodyRequired": false,
|
|
19293
20175
|
"command": "list-email-rule-scope-options",
|
|
19294
|
-
"description": "How much the caller can read, and the inboxes and domains the caller can read, which is what they may name when a rule runs over selected inboxes and domains. For a caller who reads the whole organization, addresses lists the inboxes known as someone's (member addresses, members' verified work emails at the organization's domains, agents' addresses and inboxes with shared access), not every address that receives mail: may_name_unlisted says when an address that is not listed, such as an inbox nobody has claimed, may be named too. Needs mail:read, a member's own
|
|
20176
|
+
"description": "How much the caller can read, and the inboxes and domains the caller can read, which is what they may name when a rule runs over selected inboxes and domains. For a caller who reads the whole organization, addresses lists the inboxes known as someone's (member addresses, members' verified work emails at the organization's domains, agents' addresses and inboxes with shared access), not every address that receives mail: may_name_unlisted says when an address that is not listed, such as an inbox nobody has claimed, may be named too. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
|
|
19295
20177
|
"hasJsonBody": false,
|
|
19296
20178
|
"method": "GET",
|
|
19297
20179
|
"operationId": "listEmailRuleScopeOptions",
|
|
@@ -19401,6 +20283,34 @@ const operationManifest = [
|
|
|
19401
20283
|
"items": {
|
|
19402
20284
|
"type": "object",
|
|
19403
20285
|
"properties": {
|
|
20286
|
+
"imported": {
|
|
20287
|
+
"type": ["object", "null"],
|
|
20288
|
+
"properties": {
|
|
20289
|
+
"from": {
|
|
20290
|
+
"type": "string",
|
|
20291
|
+
"const": "google_workspace"
|
|
20292
|
+
},
|
|
20293
|
+
"method": {
|
|
20294
|
+
"type": "string",
|
|
20295
|
+
"const": "primitive_direct"
|
|
20296
|
+
},
|
|
20297
|
+
"verification": {
|
|
20298
|
+
"type": "string",
|
|
20299
|
+
"const": "provider_fetched"
|
|
20300
|
+
},
|
|
20301
|
+
"at": {
|
|
20302
|
+
"type": "string",
|
|
20303
|
+
"format": "date-time"
|
|
20304
|
+
}
|
|
20305
|
+
},
|
|
20306
|
+
"required": [
|
|
20307
|
+
"from",
|
|
20308
|
+
"method",
|
|
20309
|
+
"verification",
|
|
20310
|
+
"at"
|
|
20311
|
+
],
|
|
20312
|
+
"default": null
|
|
20313
|
+
},
|
|
19404
20314
|
"delivery_report": {
|
|
19405
20315
|
"type": ["object", "null"],
|
|
19406
20316
|
"properties": {
|
|
@@ -19638,6 +20548,7 @@ const operationManifest = [
|
|
|
19638
20548
|
}
|
|
19639
20549
|
},
|
|
19640
20550
|
"required": [
|
|
20551
|
+
"imported",
|
|
19641
20552
|
"id",
|
|
19642
20553
|
"message_id",
|
|
19643
20554
|
"domain_id",
|
|
@@ -19676,7 +20587,7 @@ const operationManifest = [
|
|
|
19676
20587
|
"binaryResponse": false,
|
|
19677
20588
|
"bodyRequired": false,
|
|
19678
20589
|
"command": "list-email-rule-shares",
|
|
19679
|
-
"description": "Lists rules shared with you, rules you share, or every share you can see. A share is visible to its two people and the organization's owners and admins. Needs mail:read, a member's own
|
|
20590
|
+
"description": "Lists rules shared with you, rules you share, or every share you can see. A share is visible to its two people and the organization's owners and admins. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
|
|
19680
20591
|
"hasJsonBody": false,
|
|
19681
20592
|
"method": "GET",
|
|
19682
20593
|
"operationId": "listEmailRuleShares",
|
|
@@ -19898,7 +20809,7 @@ const operationManifest = [
|
|
|
19898
20809
|
"binaryResponse": false,
|
|
19899
20810
|
"bodyRequired": false,
|
|
19900
20811
|
"command": "list-email-rule-versions",
|
|
19901
|
-
"description": "A rule's versions as they were written: what each one's conditions and questions were, so a decision can be read against the version that made it. Without versions, every version newest first, a page at a time (meta.cursor). With versions, only those named, oldest first; numbers that are not versions of the rule are left out. Needs mail:read, a member's own
|
|
20812
|
+
"description": "A rule's versions as they were written: what each one's conditions and questions were, so a decision can be read against the version that made it. Without versions, every version newest first, a page at a time (meta.cursor). With versions, only those named, oldest first; numbers that are not versions of the rule are left out. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
|
|
19902
20813
|
"hasJsonBody": false,
|
|
19903
20814
|
"method": "GET",
|
|
19904
20815
|
"operationId": "listEmailRuleVersions",
|
|
@@ -20036,7 +20947,7 @@ const operationManifest = [
|
|
|
20036
20947
|
"binaryResponse": false,
|
|
20037
20948
|
"bodyRequired": false,
|
|
20038
20949
|
"command": "list-email-rules",
|
|
20039
|
-
"description": "The rules the caller can see, newest first: their own, or every member's rules for a caller who reads the whole organization's mail. Each carries its scope (evaluation_scope, and scope_selection for a selected rule) and current_version, but not the version's text: read that under current from GET /email-rules/{id}. With matched_email_id, only the rules that matched that email. Needs mail:read, a member's own
|
|
20950
|
+
"description": "The rules the caller can see, newest first: their own, or every member's rules for a caller who reads the whole organization's mail. Each carries its scope (evaluation_scope, and scope_selection for a selected rule) and current_version, but not the version's text: read that under current from GET /email-rules/{id}. With matched_email_id, only the rules that matched that email. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
|
|
20040
20951
|
"hasJsonBody": false,
|
|
20041
20952
|
"method": "GET",
|
|
20042
20953
|
"operationId": "listEmailRules",
|
|
@@ -20164,6 +21075,15 @@ const operationManifest = [
|
|
|
20164
21075
|
"type": "boolean",
|
|
20165
21076
|
"description": "Whether you are its author, in your current membership. Only its author edits it."
|
|
20166
21077
|
},
|
|
21078
|
+
"pending_objections": {
|
|
21079
|
+
"description": "To its author, on the dashboard or the Primitive CLI: objections to it waiting for their answer (GET /email-rule-objections). A write's answer leaves it out when it could not be read in time: absent is not 0.",
|
|
21080
|
+
"type": "integer",
|
|
21081
|
+
"minimum": 0
|
|
21082
|
+
},
|
|
21083
|
+
"objection_notice": {
|
|
21084
|
+
"description": "With pending_objections above 0: that members asked you to turn it off, and how to answer.",
|
|
21085
|
+
"type": "string"
|
|
21086
|
+
},
|
|
20167
21087
|
"created_at": {
|
|
20168
21088
|
"type": "string",
|
|
20169
21089
|
"format": "date-time"
|
|
@@ -20404,7 +21324,7 @@ const operationManifest = [
|
|
|
20404
21324
|
"binaryResponse": false,
|
|
20405
21325
|
"bodyRequired": true,
|
|
20406
21326
|
"command": "test-email-rule",
|
|
20407
|
-
"description": "Runs a rule over received mail and reports what it would decide for each email (matched, near_miss, no_match, unclassified, skipped or not_found), with a summary of how each top-level condition and question decided. Test an unsaved tree, or a saved rule by rule_id (its current version, as its author). It reads only mail its author can read and its scope covers. Without email_ids it tests the newest emails, at most 200 and none older than 30 days, plus any expected ones. Unclassified emails over 2 hours old are classified first unless classify_missing is false. It records no decision and grants nothing, and stops at about 90 seconds. Needs mail:read, a member's own
|
|
21327
|
+
"description": "Runs a rule over received mail and reports what it would decide for each email (matched, near_miss, no_match, unclassified, skipped or not_found), with a summary of how each top-level condition and question decided. Test an unsaved tree, or a saved rule by rule_id (its current version, as its author). It reads only mail its author can read and its scope covers. A rule you see only because it covers your own mailboxes runs as you, over only those, from the dashboard or the Primitive CLI. Without email_ids it tests the newest emails, at most 200 and none older than 30 days, plus any expected ones. Unclassified emails over 2 hours old are classified first unless classify_missing is false. It records no decision and grants nothing, and stops at about 90 seconds. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
|
|
20408
21328
|
"hasJsonBody": true,
|
|
20409
21329
|
"method": "POST",
|
|
20410
21330
|
"operationId": "testEmailRule",
|
|
@@ -20490,7 +21410,7 @@ const operationManifest = [
|
|
|
20490
21410
|
"description": "For a selected rule: inboxes, and domains (each address at them the author reads); each one you can read."
|
|
20491
21411
|
},
|
|
20492
21412
|
"rule_id": {
|
|
20493
|
-
"description": "A saved rule you can see. Its current version is tested, with its author's access.",
|
|
21413
|
+
"description": "A saved rule you can see. Its current version is tested, with its author's access; one you see only because it covers your mailboxes, with yours, over only those (dashboard or Primitive CLI only).",
|
|
20494
21414
|
"type": "string",
|
|
20495
21415
|
"format": "uuid"
|
|
20496
21416
|
},
|
|
@@ -20611,6 +21531,16 @@ const operationManifest = [
|
|
|
20611
21531
|
"pattern": "^[^\\u0000]*$"
|
|
20612
21532
|
}
|
|
20613
21533
|
},
|
|
21534
|
+
"attachment_names": {
|
|
21535
|
+
"maxItems": 10,
|
|
21536
|
+
"type": "array",
|
|
21537
|
+
"items": {
|
|
21538
|
+
"type": "string",
|
|
21539
|
+
"minLength": 1,
|
|
21540
|
+
"maxLength": 255,
|
|
21541
|
+
"pattern": "^[^\\u0000-\\u001f\\u007f]*$"
|
|
21542
|
+
}
|
|
21543
|
+
},
|
|
20614
21544
|
"automated": { "type": "boolean" },
|
|
20615
21545
|
"from_mailing_list": { "type": "boolean" },
|
|
20616
21546
|
"spam_score": {
|
|
@@ -20657,7 +21587,16 @@ const operationManifest = [
|
|
|
20657
21587
|
"type": ["integer", "null"],
|
|
20658
21588
|
"exclusiveMinimum": 0
|
|
20659
21589
|
},
|
|
20660
|
-
"vocabulary": { "type": "string" }
|
|
21590
|
+
"vocabulary": { "type": "string" },
|
|
21591
|
+
"kind": {
|
|
21592
|
+
"description": "The kind it was tested as.",
|
|
21593
|
+
"type": "string",
|
|
21594
|
+
"enum": ["grant", "do_not_share"]
|
|
21595
|
+
},
|
|
21596
|
+
"note": {
|
|
21597
|
+
"description": "Present when a tree was sent without kind, so it was tested as grant.",
|
|
21598
|
+
"type": "string"
|
|
21599
|
+
}
|
|
20661
21600
|
},
|
|
20662
21601
|
"required": [
|
|
20663
21602
|
"id",
|
|
@@ -20912,6 +21851,11 @@ const operationManifest = [
|
|
|
20912
21851
|
"minimum": 0,
|
|
20913
21852
|
"description": "Emails decided on their conditions: matched, near_miss and no_match, less any missing a fact the rule reads."
|
|
20914
21853
|
},
|
|
21854
|
+
"conditions_held": {
|
|
21855
|
+
"description": "Of decided, how many its conditions alone held for. Compile's breadth and conditions_breadth count this over recent mail in the scope sent to it, by default your own; here it is counted over the emails this test decided.",
|
|
21856
|
+
"type": "integer",
|
|
21857
|
+
"minimum": 0
|
|
21858
|
+
},
|
|
20915
21859
|
"conditions": {
|
|
20916
21860
|
"type": "array",
|
|
20917
21861
|
"items": {
|
|
@@ -20979,7 +21923,7 @@ const operationManifest = [
|
|
|
20979
21923
|
"warnings": {
|
|
20980
21924
|
"type": "array",
|
|
20981
21925
|
"items": { "type": "string" },
|
|
20982
|
-
"description": "What to look at first, such as what stopped every email when nothing matched."
|
|
21926
|
+
"description": "What to look at first, such as what stopped every email when nothing matched. On a test of the recent window, a grant rule whose conditions held for more than 20% of at least 20 emails checked (at least 90% if it has no questions), or for every one of fewer, gets a warning saying so, before those about what it decided."
|
|
20983
21927
|
}
|
|
20984
21928
|
},
|
|
20985
21929
|
"required": [
|
|
@@ -21182,7 +22126,7 @@ const operationManifest = [
|
|
|
21182
22126
|
"binaryResponse": false,
|
|
21183
22127
|
"bodyRequired": true,
|
|
21184
22128
|
"command": "test-email-rule-on-sample",
|
|
21185
|
-
"description": "Reports what a rule would decide for an email you describe (sender, recipients, subject, plain text, attachment types; optionally automated, from a mailing list, and a spam score), classified and decided as received mail would be. A rule reading a spam score you gave none for decides on none (unset_columns). Nothing is stored. Test an unsaved tree or a saved rule by rule_id. The answer includes what the classifier read. Needs mail:read, a member's own
|
|
22129
|
+
"description": "Reports what a rule would decide for an email you describe (sender, recipients, subject, plain text, attachment types and file names; optionally automated, from a mailing list, and a spam score), classified and decided as received mail would be. A rule reading a spam score you gave none for decides on none (unset_columns). Nothing is stored. Test an unsaved tree or a saved rule by rule_id. The answer includes what the classifier read. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
|
|
21186
22130
|
"hasJsonBody": true,
|
|
21187
22131
|
"method": "POST",
|
|
21188
22132
|
"operationId": "testEmailRuleOnSample",
|
|
@@ -21268,7 +22212,7 @@ const operationManifest = [
|
|
|
21268
22212
|
"description": "For a selected rule: inboxes, and domains (each address at them the author reads); each one you can read."
|
|
21269
22213
|
},
|
|
21270
22214
|
"rule_id": {
|
|
21271
|
-
"description": "A saved rule you can see. Its current version is tested.",
|
|
22215
|
+
"description": "A saved rule you can see, or one that covers your mailboxes (as you; dashboard or Primitive CLI only). Its current version is tested.",
|
|
21272
22216
|
"type": "string",
|
|
21273
22217
|
"format": "uuid"
|
|
21274
22218
|
},
|
|
@@ -21339,6 +22283,17 @@ const operationManifest = [
|
|
|
21339
22283
|
"maxLength": 255
|
|
21340
22284
|
}
|
|
21341
22285
|
},
|
|
22286
|
+
"attachment_names": {
|
|
22287
|
+
"description": "File names of those attachments, which the classifier and the questions read. With attachment_types, the same number, paired in order.",
|
|
22288
|
+
"maxItems": 20,
|
|
22289
|
+
"type": "array",
|
|
22290
|
+
"items": {
|
|
22291
|
+
"type": "string",
|
|
22292
|
+
"minLength": 1,
|
|
22293
|
+
"maxLength": 255,
|
|
22294
|
+
"pattern": "^[^\\u0000-\\u001f\\u007f]*$"
|
|
22295
|
+
}
|
|
22296
|
+
},
|
|
21342
22297
|
"automated": {
|
|
21343
22298
|
"description": "Whether the email was sent automatically, as its headers would show. Defaults to false.",
|
|
21344
22299
|
"type": "boolean"
|
|
@@ -21380,7 +22335,16 @@ const operationManifest = [
|
|
|
21380
22335
|
"type": ["integer", "null"],
|
|
21381
22336
|
"exclusiveMinimum": 0
|
|
21382
22337
|
},
|
|
21383
|
-
"vocabulary": { "type": "string" }
|
|
22338
|
+
"vocabulary": { "type": "string" },
|
|
22339
|
+
"kind": {
|
|
22340
|
+
"description": "The kind it was tested as.",
|
|
22341
|
+
"type": "string",
|
|
22342
|
+
"enum": ["grant", "do_not_share"]
|
|
22343
|
+
},
|
|
22344
|
+
"note": {
|
|
22345
|
+
"description": "Present when a tree was sent without kind, so it was tested as grant.",
|
|
22346
|
+
"type": "string"
|
|
22347
|
+
}
|
|
21384
22348
|
},
|
|
21385
22349
|
"required": [
|
|
21386
22350
|
"id",
|
|
@@ -21529,7 +22493,7 @@ const operationManifest = [
|
|
|
21529
22493
|
"binaryResponse": false,
|
|
21530
22494
|
"bodyRequired": true,
|
|
21531
22495
|
"command": "update-email-rule",
|
|
21532
|
-
"description": "Renames the rule, saves a new version (english and tree together; earlier versions stay) or restores one (restore_version), changes its state (draft is off; observe; active), its scope (evaluation_scope, with scope_selection when selected) or its saved expectations (judged in expectations_check). Anyone but its author who sees it may only set state draft, and while it is shared only if they manage members from the dashboard. A scope change saves a new version; a shared rule keeps its scope, and a kind never changes. A saved version takes effect at once. if_version refuses a write once a version was saved since you read it; if_revision, once anything changed. Without if_expectations_pass a version is saved even when its expectations fail. Needs mail:read, a member's own
|
|
22496
|
+
"description": "Renames the rule, saves a new version (english and tree together; earlier versions stay) or restores one (restore_version), changes its state (draft is off; observe; active), its scope (evaluation_scope, with scope_selection when selected) or its saved expectations (judged in expectations_check). Anyone but its author who sees it may only set state draft, and while it is shared only if they manage members from the dashboard. A scope change saves a new version; a shared rule keeps its scope, and a kind never changes. A saved version takes effect at once. if_version refuses a write once a version was saved since you read it; if_revision, once anything changed. Without if_expectations_pass a version is saved even when its expectations fail, except on an active rule keys or webhooks read: that write is checked first unless if_expectations_pass is false. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
|
|
21533
22497
|
"hasJsonBody": true,
|
|
21534
22498
|
"method": "PATCH",
|
|
21535
22499
|
"operationId": "updateEmailRule",
|
|
@@ -21616,7 +22580,7 @@ const operationManifest = [
|
|
|
21616
22580
|
}
|
|
21617
22581
|
},
|
|
21618
22582
|
"warnings": {
|
|
21619
|
-
"description": "The compile response's warnings. Stored as sent, then any server note they lack on an address or domain the description names that the rule does not test (on a rule request, every compiler note on the rule).",
|
|
22583
|
+
"description": "The compile response's warnings. Stored as sent, then any server note they lack on an address or domain the description names that the rule does not test, or on a grant rule that tests only who an email was sent to (on a rule request, every compiler note on the rule).",
|
|
21620
22584
|
"maxItems": 10,
|
|
21621
22585
|
"type": "array",
|
|
21622
22586
|
"items": {
|
|
@@ -21639,7 +22603,26 @@ const operationManifest = [
|
|
|
21639
22603
|
"checked": {
|
|
21640
22604
|
"type": "integer",
|
|
21641
22605
|
"minimum": 0,
|
|
21642
|
-
"description": "Classified emails the conditions were decided for: of the newest 200 from the last 30 days in your own mailboxes
|
|
22606
|
+
"description": "Classified emails the conditions were decided for: of the newest 200 from the last 30 days in the scope counted (evaluation_scope as sent; by default your own mailboxes, for a grant rule those you may share), the ones you can still read."
|
|
22607
|
+
},
|
|
22608
|
+
"matched": {
|
|
22609
|
+
"type": "integer",
|
|
22610
|
+
"minimum": 0,
|
|
22611
|
+
"description": "Of those, how many they hold for (for a do-not-share rule, one they cannot decide counts)."
|
|
22612
|
+
}
|
|
22613
|
+
},
|
|
22614
|
+
"required": ["checked", "matched"]
|
|
22615
|
+
}, { "type": "null" }]
|
|
22616
|
+
},
|
|
22617
|
+
"conditions_breadth": {
|
|
22618
|
+
"description": "Ignored.",
|
|
22619
|
+
"anyOf": [{
|
|
22620
|
+
"type": "object",
|
|
22621
|
+
"properties": {
|
|
22622
|
+
"checked": {
|
|
22623
|
+
"type": "integer",
|
|
22624
|
+
"minimum": 0,
|
|
22625
|
+
"description": "Classified emails the conditions were decided for: of the newest 200 from the last 30 days in the scope counted (evaluation_scope as sent; by default your own mailboxes, for a grant rule those you may share), the ones you can still read."
|
|
21643
22626
|
},
|
|
21644
22627
|
"matched": {
|
|
21645
22628
|
"type": "integer",
|
|
@@ -21650,6 +22633,11 @@ const operationManifest = [
|
|
|
21650
22633
|
"required": ["checked", "matched"]
|
|
21651
22634
|
}, { "type": "null" }]
|
|
21652
22635
|
},
|
|
22636
|
+
"kind": {
|
|
22637
|
+
"description": "Must be the rule's own (400 kind_mismatch).",
|
|
22638
|
+
"type": "string",
|
|
22639
|
+
"enum": ["grant", "do_not_share"]
|
|
22640
|
+
},
|
|
21653
22641
|
"evaluation_scope": {
|
|
21654
22642
|
"type": "string",
|
|
21655
22643
|
"enum": [
|
|
@@ -21793,6 +22781,16 @@ const operationManifest = [
|
|
|
21793
22781
|
"pattern": "^[^\\u0000]*$"
|
|
21794
22782
|
}
|
|
21795
22783
|
},
|
|
22784
|
+
"attachment_names": {
|
|
22785
|
+
"maxItems": 10,
|
|
22786
|
+
"type": "array",
|
|
22787
|
+
"items": {
|
|
22788
|
+
"type": "string",
|
|
22789
|
+
"minLength": 1,
|
|
22790
|
+
"maxLength": 255,
|
|
22791
|
+
"pattern": "^[^\\u0000-\\u001f\\u007f]*$"
|
|
22792
|
+
}
|
|
22793
|
+
},
|
|
21796
22794
|
"automated": { "type": "boolean" },
|
|
21797
22795
|
"from_mailing_list": { "type": "boolean" },
|
|
21798
22796
|
"spam_score": {
|
|
@@ -21900,6 +22898,16 @@ const operationManifest = [
|
|
|
21900
22898
|
"pattern": "^[^\\u0000]*$"
|
|
21901
22899
|
}
|
|
21902
22900
|
},
|
|
22901
|
+
"attachment_names": {
|
|
22902
|
+
"maxItems": 10,
|
|
22903
|
+
"type": "array",
|
|
22904
|
+
"items": {
|
|
22905
|
+
"type": "string",
|
|
22906
|
+
"minLength": 1,
|
|
22907
|
+
"maxLength": 255,
|
|
22908
|
+
"pattern": "^[^\\u0000-\\u001f\\u007f]*$"
|
|
22909
|
+
}
|
|
22910
|
+
},
|
|
21903
22911
|
"automated": { "type": "boolean" },
|
|
21904
22912
|
"from_mailing_list": { "type": "boolean" },
|
|
21905
22913
|
"spam_score": {
|
|
@@ -21932,7 +22940,7 @@ const operationManifest = [
|
|
|
21932
22940
|
"maximum": 2147483647
|
|
21933
22941
|
},
|
|
21934
22942
|
"if_expectations_pass": {
|
|
21935
|
-
"description": "true: judge the rule as this write leaves it (new tree, restored version, new scope, or the version it activates) against the expectations it leaves, as POST /email-rules/test would, before saving; it can take as long as a test. Failed: 409 expectations_failed; on emails the rule cannot read: 409 expectations_unreadable; undecided: 409 expectations_undecided (each with details.expectations_check); none to judge: 400 no_expectations. Refused writes save nothing; a pass saves unless the rule moved meanwhile (409 email_rule_conflict). Only writes that save a version or activate the rule are judged.",
|
|
22943
|
+
"description": "true: judge the rule as this write leaves it (new tree, restored version, new scope, or the version it activates) against the expectations it leaves, as POST /email-rules/test would, before saving; it can take as long as a test. Failed: 409 expectations_failed; on emails the rule cannot read: 409 expectations_unreadable; undecided: 409 expectations_undecided (each with details.expectations_check); none to judge: 400 no_expectations. Refused writes save nothing; a pass saves unless the rule moved meanwhile (409 email_rule_conflict). Only writes that save a version or activate the rule are judged. Omitted: judged as with true when the write saves a version or changes the scope of an active rule that API keys or webhooks read and that has expectations. false: never judged first.",
|
|
21936
22944
|
"type": "boolean"
|
|
21937
22945
|
},
|
|
21938
22946
|
"restore_version": {
|
|
@@ -22034,6 +23042,15 @@ const operationManifest = [
|
|
|
22034
23042
|
"type": "boolean",
|
|
22035
23043
|
"description": "Whether you are its author, in your current membership. Only its author edits it."
|
|
22036
23044
|
},
|
|
23045
|
+
"pending_objections": {
|
|
23046
|
+
"description": "To its author, on the dashboard or the Primitive CLI: objections to it waiting for their answer (GET /email-rule-objections). A write's answer leaves it out when it could not be read in time: absent is not 0.",
|
|
23047
|
+
"type": "integer",
|
|
23048
|
+
"minimum": 0
|
|
23049
|
+
},
|
|
23050
|
+
"objection_notice": {
|
|
23051
|
+
"description": "With pending_objections above 0: that members asked you to turn it off, and how to answer.",
|
|
23052
|
+
"type": "string"
|
|
23053
|
+
},
|
|
22037
23054
|
"created_at": {
|
|
22038
23055
|
"type": "string",
|
|
22039
23056
|
"format": "date-time"
|
|
@@ -22160,6 +23177,27 @@ const operationManifest = [
|
|
|
22160
23177
|
]
|
|
22161
23178
|
}
|
|
22162
23179
|
},
|
|
23180
|
+
"expectations": {
|
|
23181
|
+
"description": "Its saved expectations, each list by email id, as stored: on every create, and on an update that set or removed them.",
|
|
23182
|
+
"type": "object",
|
|
23183
|
+
"properties": {
|
|
23184
|
+
"match": {
|
|
23185
|
+
"type": "array",
|
|
23186
|
+
"items": {
|
|
23187
|
+
"type": "string",
|
|
23188
|
+
"format": "uuid"
|
|
23189
|
+
}
|
|
23190
|
+
},
|
|
23191
|
+
"no_match": {
|
|
23192
|
+
"type": "array",
|
|
23193
|
+
"items": {
|
|
23194
|
+
"type": "string",
|
|
23195
|
+
"format": "uuid"
|
|
23196
|
+
}
|
|
23197
|
+
}
|
|
23198
|
+
},
|
|
23199
|
+
"required": ["match", "no_match"]
|
|
23200
|
+
},
|
|
22163
23201
|
"expectation_samples": {
|
|
22164
23202
|
"description": "Its saved made-up emails, when this write set or added some.",
|
|
22165
23203
|
"type": "array",
|
|
@@ -22237,6 +23275,16 @@ const operationManifest = [
|
|
|
22237
23275
|
"pattern": "^[^\\u0000]*$"
|
|
22238
23276
|
}
|
|
22239
23277
|
},
|
|
23278
|
+
"attachment_names": {
|
|
23279
|
+
"maxItems": 10,
|
|
23280
|
+
"type": "array",
|
|
23281
|
+
"items": {
|
|
23282
|
+
"type": "string",
|
|
23283
|
+
"minLength": 1,
|
|
23284
|
+
"maxLength": 255,
|
|
23285
|
+
"pattern": "^[^\\u0000-\\u001f\\u007f]*$"
|
|
23286
|
+
}
|
|
23287
|
+
},
|
|
22240
23288
|
"automated": { "type": "boolean" },
|
|
22241
23289
|
"from_mailing_list": { "type": "boolean" },
|
|
22242
23290
|
"spam_score": {
|
|
@@ -22358,6 +23406,14 @@ const operationManifest = [
|
|
|
22358
23406
|
"endpoints",
|
|
22359
23407
|
"shares_ended"
|
|
22360
23408
|
]
|
|
23409
|
+
},
|
|
23410
|
+
"notice": {
|
|
23411
|
+
"description": "After a write that saved a version of an active rule keys or webhooks read without checking it first: what it changes, and how to have the next one checked.",
|
|
23412
|
+
"type": "string"
|
|
23413
|
+
},
|
|
23414
|
+
"share_notice": {
|
|
23415
|
+
"description": "After a write that ended the rule's share: that it did, given even when affects is not, with whom it was with and the version they accepted when those can be read.",
|
|
23416
|
+
"type": "string"
|
|
22361
23417
|
}
|
|
22362
23418
|
},
|
|
22363
23419
|
"required": [
|
|
@@ -22381,7 +23437,7 @@ const operationManifest = [
|
|
|
22381
23437
|
"binaryResponse": false,
|
|
22382
23438
|
"bodyRequired": false,
|
|
22383
23439
|
"command": "withdraw-email-rule-request",
|
|
22384
|
-
"description": "Withdraws a pending request you made. Needs mail:read, a member's own
|
|
23440
|
+
"description": "Withdraws a pending request you made. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
|
|
22385
23441
|
"hasJsonBody": false,
|
|
22386
23442
|
"method": "POST",
|
|
22387
23443
|
"operationId": "withdrawEmailRuleRequest",
|
|
@@ -23078,6 +24134,35 @@ const operationManifest = [
|
|
|
23078
24134
|
},
|
|
23079
24135
|
"description": "Attachment metadata for this message, each item as its own detail read reports it: `parsed.attachments` on `/emails/{id}` for inbound, `attachments` on `/sent-emails/{id}` for outbound, in the same order. Empty when there are none or an inbound message has no parsed content. No bytes or download URLs; download a part with `/emails/{id}/attachments/{part_index}` or `/sent-emails/{id}/attachments/{part_index}`."
|
|
23080
24136
|
},
|
|
24137
|
+
"imported": {
|
|
24138
|
+
"type": ["object", "null"],
|
|
24139
|
+
"description": "Historical acquisition; never sender or SMTP delivery proof. Null for live mail. Excluded from live tails and deltas.",
|
|
24140
|
+
"required": [
|
|
24141
|
+
"from",
|
|
24142
|
+
"method",
|
|
24143
|
+
"verification",
|
|
24144
|
+
"at"
|
|
24145
|
+
],
|
|
24146
|
+
"properties": {
|
|
24147
|
+
"from": {
|
|
24148
|
+
"type": "string",
|
|
24149
|
+
"enum": ["google_workspace"]
|
|
24150
|
+
},
|
|
24151
|
+
"method": {
|
|
24152
|
+
"type": "string",
|
|
24153
|
+
"enum": ["primitive_direct"]
|
|
24154
|
+
},
|
|
24155
|
+
"verification": {
|
|
24156
|
+
"type": "string",
|
|
24157
|
+
"enum": ["provider_fetched"]
|
|
24158
|
+
},
|
|
24159
|
+
"at": {
|
|
24160
|
+
"type": "string",
|
|
24161
|
+
"format": "date-time",
|
|
24162
|
+
"description": "When Primitive acquired this historical message."
|
|
24163
|
+
}
|
|
24164
|
+
}
|
|
24165
|
+
},
|
|
23081
24166
|
"copies": {
|
|
23082
24167
|
"type": "array",
|
|
23083
24168
|
"items": {
|
|
@@ -23941,6 +25026,58 @@ const operationManifest = [
|
|
|
23941
25026
|
}
|
|
23942
25027
|
}
|
|
23943
25028
|
},
|
|
25029
|
+
"attachments": {
|
|
25030
|
+
"type": "array",
|
|
25031
|
+
"items": {
|
|
25032
|
+
"type": "object",
|
|
25033
|
+
"description": "Metadata for one attachment. The bytes are not inline; download\nall attachments for a message as a gzipped tarball via\n`/emails/{id}/attachments.tar.gz`. `sha256` lets you verify a\nspecific part after extraction.\n",
|
|
25034
|
+
"properties": {
|
|
25035
|
+
"filename": { "type": ["string", "null"] },
|
|
25036
|
+
"content_type": { "type": ["string", "null"] },
|
|
25037
|
+
"size_bytes": { "type": "integer" },
|
|
25038
|
+
"sha256": { "type": ["string", "null"] },
|
|
25039
|
+
"part_index": {
|
|
25040
|
+
"type": "integer",
|
|
25041
|
+
"description": "Zero-based index of this part within the message."
|
|
25042
|
+
},
|
|
25043
|
+
"tar_path": {
|
|
25044
|
+
"type": "string",
|
|
25045
|
+
"description": "This part's file name inside the message's attachments archive. Absent on attachments stored before it was recorded."
|
|
25046
|
+
}
|
|
25047
|
+
},
|
|
25048
|
+
"required": ["size_bytes"]
|
|
25049
|
+
},
|
|
25050
|
+
"description": "Attachment metadata (file name, type, size), the same items in the same order as `parsed.attachments`. Kept for a credential that reads headers only, where `parsed` is null. Empty when the email has none, its content is withheld (read `status` and `rejection_reason`), or it is not parsed yet or its parse failed (read `parse_status`). No bytes; download a part with `/emails/{id}/attachments/{part_index}`."
|
|
25051
|
+
},
|
|
25052
|
+
"imported": {
|
|
25053
|
+
"type": ["object", "null"],
|
|
25054
|
+
"description": "Historical acquisition; never sender or SMTP delivery proof. Null for live mail. Excluded from live tails and deltas.",
|
|
25055
|
+
"required": [
|
|
25056
|
+
"from",
|
|
25057
|
+
"method",
|
|
25058
|
+
"verification",
|
|
25059
|
+
"at"
|
|
25060
|
+
],
|
|
25061
|
+
"properties": {
|
|
25062
|
+
"from": {
|
|
25063
|
+
"type": "string",
|
|
25064
|
+
"enum": ["google_workspace"]
|
|
25065
|
+
},
|
|
25066
|
+
"method": {
|
|
25067
|
+
"type": "string",
|
|
25068
|
+
"enum": ["primitive_direct"]
|
|
25069
|
+
},
|
|
25070
|
+
"verification": {
|
|
25071
|
+
"type": "string",
|
|
25072
|
+
"enum": ["provider_fetched"]
|
|
25073
|
+
},
|
|
25074
|
+
"at": {
|
|
25075
|
+
"type": "string",
|
|
25076
|
+
"format": "date-time",
|
|
25077
|
+
"description": "When Primitive acquired this historical message."
|
|
25078
|
+
}
|
|
25079
|
+
}
|
|
25080
|
+
},
|
|
23944
25081
|
"snippet": {
|
|
23945
25082
|
"type": ["string", "null"],
|
|
23946
25083
|
"maxLength": 200,
|
|
@@ -23970,6 +25107,8 @@ const operationManifest = [
|
|
|
23970
25107
|
"from_verified",
|
|
23971
25108
|
"from_header_email",
|
|
23972
25109
|
"from_name",
|
|
25110
|
+
"attachments",
|
|
25111
|
+
"imported",
|
|
23973
25112
|
"snippet"
|
|
23974
25113
|
]
|
|
23975
25114
|
},
|
|
@@ -24030,6 +25169,7 @@ const operationManifest = [
|
|
|
24030
25169
|
"type": "object",
|
|
24031
25170
|
"description": "What an inbound email says, as plain text, with the fields that identify it.",
|
|
24032
25171
|
"required": [
|
|
25172
|
+
"imported",
|
|
24033
25173
|
"id",
|
|
24034
25174
|
"thread_id",
|
|
24035
25175
|
"received_at",
|
|
@@ -24050,6 +25190,35 @@ const operationManifest = [
|
|
|
24050
25190
|
"attachments"
|
|
24051
25191
|
],
|
|
24052
25192
|
"properties": {
|
|
25193
|
+
"imported": {
|
|
25194
|
+
"type": ["object", "null"],
|
|
25195
|
+
"description": "Historical acquisition; never sender or SMTP delivery proof. Null for live mail. Excluded from live tails and deltas.",
|
|
25196
|
+
"required": [
|
|
25197
|
+
"from",
|
|
25198
|
+
"method",
|
|
25199
|
+
"verification",
|
|
25200
|
+
"at"
|
|
25201
|
+
],
|
|
25202
|
+
"properties": {
|
|
25203
|
+
"from": {
|
|
25204
|
+
"type": "string",
|
|
25205
|
+
"enum": ["google_workspace"]
|
|
25206
|
+
},
|
|
25207
|
+
"method": {
|
|
25208
|
+
"type": "string",
|
|
25209
|
+
"enum": ["primitive_direct"]
|
|
25210
|
+
},
|
|
25211
|
+
"verification": {
|
|
25212
|
+
"type": "string",
|
|
25213
|
+
"enum": ["provider_fetched"]
|
|
25214
|
+
},
|
|
25215
|
+
"at": {
|
|
25216
|
+
"type": "string",
|
|
25217
|
+
"format": "date-time",
|
|
25218
|
+
"description": "When Primitive acquired this historical message."
|
|
25219
|
+
}
|
|
25220
|
+
}
|
|
25221
|
+
},
|
|
24053
25222
|
"id": {
|
|
24054
25223
|
"type": "string",
|
|
24055
25224
|
"format": "uuid",
|
|
@@ -24199,6 +25368,94 @@ const operationManifest = [
|
|
|
24199
25368
|
"tag": "Emails",
|
|
24200
25369
|
"tagCommand": "emails"
|
|
24201
25370
|
},
|
|
25371
|
+
{
|
|
25372
|
+
"binaryResponse": false,
|
|
25373
|
+
"bodyRequired": true,
|
|
25374
|
+
"command": "import-google-mail-message",
|
|
25375
|
+
"description": "Requires the organization email_import entitlement, granted by staff. Only the configured current owner, using a full personal session or verified first-party CLI, may import into the configured primary mailbox. Primitive verifies the transient provider token and fetches RAW content itself. No raw uploads or client provenance are accepted. Sent, draft, spam and trash messages are skipped. Historical mail appears in normal history without live delivery effects. An indeterminate response requires retrying the same provider ID. User provider credentials are never stored or queued.",
|
|
25376
|
+
"hasJsonBody": true,
|
|
25377
|
+
"method": "POST",
|
|
25378
|
+
"operationId": "importGoogleMailMessage",
|
|
25379
|
+
"path": "/mail-imports/google/messages",
|
|
25380
|
+
"pathParams": [],
|
|
25381
|
+
"queryParams": [],
|
|
25382
|
+
"headerParams": [{
|
|
25383
|
+
"description": "Transient provider user access token. Send only in this redacted header, never in a URL or JSON body. Uses the dedicated configured desktop client and readonly/identity scopes.",
|
|
25384
|
+
"enum": null,
|
|
25385
|
+
"name": "X-Primitive-Google-Access-Token",
|
|
25386
|
+
"required": true,
|
|
25387
|
+
"type": "string"
|
|
25388
|
+
}, {
|
|
25389
|
+
"description": "Optional, and not used to deduplicate: this operation stores no result by the key, so a retry with the same key runs the request again. Operations that need a credential refuse a key that is empty, longer than 255 characters or not printable ASCII with 400 `validation_error` and echo a valid one in the Idempotency-Key response header; operations that need none ignore it.",
|
|
25390
|
+
"enum": null,
|
|
25391
|
+
"name": "Idempotency-Key",
|
|
25392
|
+
"required": false,
|
|
25393
|
+
"type": "string"
|
|
25394
|
+
}],
|
|
25395
|
+
"permissions": ["mail:read"],
|
|
25396
|
+
"access": null,
|
|
25397
|
+
"requestSchema": {
|
|
25398
|
+
"type": "object",
|
|
25399
|
+
"properties": { "message_id": {
|
|
25400
|
+
"type": "string",
|
|
25401
|
+
"pattern": "^[A-Za-z0-9_-]{1,128}$"
|
|
25402
|
+
} },
|
|
25403
|
+
"required": ["message_id"],
|
|
25404
|
+
"additionalProperties": false
|
|
25405
|
+
},
|
|
25406
|
+
"responseSchema": { "anyOf": [
|
|
25407
|
+
{
|
|
25408
|
+
"type": "object",
|
|
25409
|
+
"properties": {
|
|
25410
|
+
"status": {
|
|
25411
|
+
"type": "string",
|
|
25412
|
+
"enum": ["imported", "already_present"]
|
|
25413
|
+
},
|
|
25414
|
+
"email_id": {
|
|
25415
|
+
"type": "string",
|
|
25416
|
+
"format": "uuid",
|
|
25417
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
25418
|
+
}
|
|
25419
|
+
},
|
|
25420
|
+
"required": ["status", "email_id"]
|
|
25421
|
+
},
|
|
25422
|
+
{
|
|
25423
|
+
"type": "object",
|
|
25424
|
+
"properties": { "status": {
|
|
25425
|
+
"type": "string",
|
|
25426
|
+
"enum": [
|
|
25427
|
+
"suppressed",
|
|
25428
|
+
"in_progress",
|
|
25429
|
+
"indeterminate"
|
|
25430
|
+
]
|
|
25431
|
+
} },
|
|
25432
|
+
"required": ["status"]
|
|
25433
|
+
},
|
|
25434
|
+
{
|
|
25435
|
+
"type": "object",
|
|
25436
|
+
"properties": {
|
|
25437
|
+
"status": {
|
|
25438
|
+
"type": "string",
|
|
25439
|
+
"const": "skipped"
|
|
25440
|
+
},
|
|
25441
|
+
"reason": {
|
|
25442
|
+
"type": "string",
|
|
25443
|
+
"enum": [
|
|
25444
|
+
"excluded_label",
|
|
25445
|
+
"out_of_window",
|
|
25446
|
+
"too_large",
|
|
25447
|
+
"provider_missing"
|
|
25448
|
+
]
|
|
25449
|
+
}
|
|
25450
|
+
},
|
|
25451
|
+
"required": ["status", "reason"]
|
|
25452
|
+
}
|
|
25453
|
+
] },
|
|
25454
|
+
"sdkName": "importGoogleMailMessage",
|
|
25455
|
+
"summary": "Import one historical Google Workspace message",
|
|
25456
|
+
"tag": "Emails",
|
|
25457
|
+
"tagCommand": "emails"
|
|
25458
|
+
},
|
|
24202
25459
|
{
|
|
24203
25460
|
"binaryResponse": false,
|
|
24204
25461
|
"bodyRequired": false,
|
|
@@ -24854,6 +26111,35 @@ const operationManifest = [
|
|
|
24854
26111
|
"format": "uuid",
|
|
24855
26112
|
"description": "With `group=message`: the send of this message, when you can read it (under a connected agent key, only its own sends)."
|
|
24856
26113
|
},
|
|
26114
|
+
"imported": {
|
|
26115
|
+
"type": ["object", "null"],
|
|
26116
|
+
"description": "Historical acquisition; never sender or SMTP delivery proof. Null for live mail. Excluded from live tails and deltas.",
|
|
26117
|
+
"required": [
|
|
26118
|
+
"from",
|
|
26119
|
+
"method",
|
|
26120
|
+
"verification",
|
|
26121
|
+
"at"
|
|
26122
|
+
],
|
|
26123
|
+
"properties": {
|
|
26124
|
+
"from": {
|
|
26125
|
+
"type": "string",
|
|
26126
|
+
"enum": ["google_workspace"]
|
|
26127
|
+
},
|
|
26128
|
+
"method": {
|
|
26129
|
+
"type": "string",
|
|
26130
|
+
"enum": ["primitive_direct"]
|
|
26131
|
+
},
|
|
26132
|
+
"verification": {
|
|
26133
|
+
"type": "string",
|
|
26134
|
+
"enum": ["provider_fetched"]
|
|
26135
|
+
},
|
|
26136
|
+
"at": {
|
|
26137
|
+
"type": "string",
|
|
26138
|
+
"format": "date-time",
|
|
26139
|
+
"description": "When Primitive acquired this historical message."
|
|
26140
|
+
}
|
|
26141
|
+
}
|
|
26142
|
+
},
|
|
24857
26143
|
"snippet": {
|
|
24858
26144
|
"type": ["string", "null"],
|
|
24859
26145
|
"maxLength": 200,
|
|
@@ -24876,6 +26162,7 @@ const operationManifest = [
|
|
|
24876
26162
|
"automated_reasons",
|
|
24877
26163
|
"from_verified",
|
|
24878
26164
|
"from_header_email",
|
|
26165
|
+
"imported",
|
|
24879
26166
|
"snippet"
|
|
24880
26167
|
]
|
|
24881
26168
|
}
|
|
@@ -24885,6 +26172,50 @@ const operationManifest = [
|
|
|
24885
26172
|
"tag": "Emails",
|
|
24886
26173
|
"tagCommand": "emails"
|
|
24887
26174
|
},
|
|
26175
|
+
{
|
|
26176
|
+
"binaryResponse": false,
|
|
26177
|
+
"bodyRequired": true,
|
|
26178
|
+
"command": "reconcile-google-mail-import",
|
|
26179
|
+
"description": "The same configured owner may recover expired attempts after the email_import entitlement is revoked. Recovery does not require that entitlement. Selects only server-owned manifests for the configured mailbox/account/policy. No provider token, object keys, prefixes or email IDs are accepted. Unsettled uploads remain unresolved and charged; this operation does not promise automatic cleanup after a process dies.",
|
|
26180
|
+
"hasJsonBody": true,
|
|
26181
|
+
"method": "POST",
|
|
26182
|
+
"operationId": "reconcileGoogleMailImport",
|
|
26183
|
+
"path": "/mail-imports/google/reconcile",
|
|
26184
|
+
"pathParams": [],
|
|
26185
|
+
"queryParams": [],
|
|
26186
|
+
"headerParams": [{
|
|
26187
|
+
"description": "Optional, and not used to deduplicate: this operation stores no result by the key, so a retry with the same key runs the request again. Operations that need a credential refuse a key that is empty, longer than 255 characters or not printable ASCII with 400 `validation_error` and echo a valid one in the Idempotency-Key response header; operations that need none ignore it.",
|
|
26188
|
+
"enum": null,
|
|
26189
|
+
"name": "Idempotency-Key",
|
|
26190
|
+
"required": false,
|
|
26191
|
+
"type": "string"
|
|
26192
|
+
}],
|
|
26193
|
+
"permissions": ["mail:read"],
|
|
26194
|
+
"access": null,
|
|
26195
|
+
"requestSchema": {
|
|
26196
|
+
"type": "object",
|
|
26197
|
+
"properties": {},
|
|
26198
|
+
"additionalProperties": false
|
|
26199
|
+
},
|
|
26200
|
+
"responseSchema": {
|
|
26201
|
+
"type": "object",
|
|
26202
|
+
"properties": {
|
|
26203
|
+
"cleaned": {
|
|
26204
|
+
"type": "integer",
|
|
26205
|
+
"minimum": 0
|
|
26206
|
+
},
|
|
26207
|
+
"unresolved": {
|
|
26208
|
+
"type": "integer",
|
|
26209
|
+
"minimum": 0
|
|
26210
|
+
}
|
|
26211
|
+
},
|
|
26212
|
+
"required": ["cleaned", "unresolved"]
|
|
26213
|
+
},
|
|
26214
|
+
"sdkName": "reconcileGoogleMailImport",
|
|
26215
|
+
"summary": "Reconcile scoped historical import attempts",
|
|
26216
|
+
"tag": "Emails",
|
|
26217
|
+
"tagCommand": "emails"
|
|
26218
|
+
},
|
|
24888
26219
|
{
|
|
24889
26220
|
"binaryResponse": false,
|
|
24890
26221
|
"bodyRequired": false,
|
|
@@ -25515,6 +26846,35 @@ const operationManifest = [
|
|
|
25515
26846
|
"format": "uuid",
|
|
25516
26847
|
"description": "With `group=message`: the send of this message, when you can read it (under a connected agent key, only its own sends)."
|
|
25517
26848
|
},
|
|
26849
|
+
"imported": {
|
|
26850
|
+
"type": ["object", "null"],
|
|
26851
|
+
"description": "Historical acquisition; never sender or SMTP delivery proof. Null for live mail. Excluded from live tails and deltas.",
|
|
26852
|
+
"required": [
|
|
26853
|
+
"from",
|
|
26854
|
+
"method",
|
|
26855
|
+
"verification",
|
|
26856
|
+
"at"
|
|
26857
|
+
],
|
|
26858
|
+
"properties": {
|
|
26859
|
+
"from": {
|
|
26860
|
+
"type": "string",
|
|
26861
|
+
"enum": ["google_workspace"]
|
|
26862
|
+
},
|
|
26863
|
+
"method": {
|
|
26864
|
+
"type": "string",
|
|
26865
|
+
"enum": ["primitive_direct"]
|
|
26866
|
+
},
|
|
26867
|
+
"verification": {
|
|
26868
|
+
"type": "string",
|
|
26869
|
+
"enum": ["provider_fetched"]
|
|
26870
|
+
},
|
|
26871
|
+
"at": {
|
|
26872
|
+
"type": "string",
|
|
26873
|
+
"format": "date-time",
|
|
26874
|
+
"description": "When Primitive acquired this historical message."
|
|
26875
|
+
}
|
|
26876
|
+
}
|
|
26877
|
+
},
|
|
25518
26878
|
"snippet": {
|
|
25519
26879
|
"type": ["string", "null"],
|
|
25520
26880
|
"maxLength": 200,
|
|
@@ -25537,6 +26897,7 @@ const operationManifest = [
|
|
|
25537
26897
|
"automated_reasons",
|
|
25538
26898
|
"from_verified",
|
|
25539
26899
|
"from_header_email",
|
|
26900
|
+
"imported",
|
|
25540
26901
|
"snippet"
|
|
25541
26902
|
]
|
|
25542
26903
|
}, {
|
|
@@ -25995,7 +27356,7 @@ const operationManifest = [
|
|
|
25995
27356
|
}
|
|
25996
27357
|
}
|
|
25997
27358
|
},
|
|
25998
|
-
"responseSchema": {
|
|
27359
|
+
"responseSchema": { "allOf": [{
|
|
25999
27360
|
"type": "object",
|
|
26000
27361
|
"properties": {
|
|
26001
27362
|
"recipient": {
|
|
@@ -26261,7 +27622,28 @@ const operationManifest = [
|
|
|
26261
27622
|
"failure_count",
|
|
26262
27623
|
"consecutive_fails"
|
|
26263
27624
|
]
|
|
26264
|
-
},
|
|
27625
|
+
}, {
|
|
27626
|
+
"type": "object",
|
|
27627
|
+
"properties": { "warnings": {
|
|
27628
|
+
"description": "For a webhook (kind http). same_path_as_another_endpoint: another webhook you can see, on and not deleted, sends to the same scheme, host and path with any query string, so each email both receive is delivered twice; endpoint_id names it (at most 5, newest first). The URL is never echoed. Empty when none; absent when it could not be checked (a caller who may not read endpoints, or a failed read). Other codes may be added.",
|
|
27629
|
+
"type": "array",
|
|
27630
|
+
"items": {
|
|
27631
|
+
"type": "object",
|
|
27632
|
+
"properties": {
|
|
27633
|
+
"code": { "type": "string" },
|
|
27634
|
+
"message": { "type": "string" },
|
|
27635
|
+
"endpoint_id": {
|
|
27636
|
+
"description": "The other webhook a same_path_as_another_endpoint warning names.",
|
|
27637
|
+
"type": "string",
|
|
27638
|
+
"format": "uuid",
|
|
27639
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
27640
|
+
}
|
|
27641
|
+
},
|
|
27642
|
+
"required": ["code", "message"],
|
|
27643
|
+
"additionalProperties": {}
|
|
27644
|
+
}
|
|
27645
|
+
} }
|
|
27646
|
+
}] },
|
|
26265
27647
|
"sdkName": "createEndpoint",
|
|
26266
27648
|
"summary": "Create a webhook endpoint",
|
|
26267
27649
|
"tag": "Endpoints",
|
|
@@ -38924,7 +40306,7 @@ const operationManifest = [
|
|
|
38924
40306
|
"binaryResponse": false,
|
|
38925
40307
|
"bodyRequired": false,
|
|
38926
40308
|
"command": "get-relay-auto-join",
|
|
38927
|
-
"description": "Whether someone who proves an address on the organization's mail relay domain with Google Workspace joins automatically
|
|
40309
|
+
"description": "Whether someone who proves an address on the organization's mail relay domain with Google Workspace joins automatically. Auto-joined people have no mail access until an owner or admin assigns a role. `option` is null when auto-join is off and an invitation is required; legacy mail-grant settings read as `no_access`. `options` lists the choices. Answers 404 `feature_disabled` unless the organization has mail relay.",
|
|
38928
40310
|
"hasJsonBody": false,
|
|
38929
40311
|
"method": "GET",
|
|
38930
40312
|
"operationId": "getRelayAutoJoin",
|
|
@@ -39733,7 +41115,7 @@ const operationManifest = [
|
|
|
39733
41115
|
"binaryResponse": false,
|
|
39734
41116
|
"bodyRequired": true,
|
|
39735
41117
|
"command": "set-relay-auto-join",
|
|
39736
|
-
"description": "`option` is a choice's id from the GET, or null to require an invitation (turning it off needs only members:manage). Choosing an option answers 404 `feature_disabled` unless the organization has mail relay, 400 `validation_error` for an id
|
|
41118
|
+
"description": "`option` is a choice's id from the GET, or null to require an invitation (turning it off needs only members:manage). Auto-joined people have no mail access until an owner or admin assigns a role; legacy mail-grant choices cannot be selected. Choosing an option answers 404 `feature_disabled` unless the organization has mail relay, 400 `validation_error` for an id outside the current catalog, 403 `grant_forbidden` without owner or admin assignment authority, and 409 `role_assignment_unavailable` when the restricted role cannot be assigned yet. Person only: a dashboard session, or the person's own OAuth or CLI token with a session step-up of purpose `relay_auto_join.write` (the person confirms at the step_up_url a 403 step_up_required answer carries, which names this client, then send the token in the Primitive-Step-Up header; the token works only with the client it was confirmed for). Needs members:manage, and roles:assign to turn it on. API keys are refused.",
|
|
39737
41119
|
"hasJsonBody": true,
|
|
39738
41120
|
"method": "PUT",
|
|
39739
41121
|
"operationId": "setRelayAutoJoin",
|
|
@@ -45304,6 +46686,33 @@ const operationManifest = [
|
|
|
45304
46686
|
"type": "boolean",
|
|
45305
46687
|
"description": "Send an informational message the receiver need not answer or wake for. It is sent as an `ack` signal (status `received`) about the message in `in_reply_to`, whose note is `body_text` (at most 2000 characters, which may be omitted). Receivers see it as `fyi: true`. Plain text only: it cannot be combined with `body_html`, `attachments`, `payload_attachments` or `scheduled_at`, and on `/send-mail` it requires `in_reply_to`."
|
|
45306
46688
|
},
|
|
46689
|
+
"unsubscribe": {
|
|
46690
|
+
"type": "object",
|
|
46691
|
+
"additionalProperties": false,
|
|
46692
|
+
"required": ["url"],
|
|
46693
|
+
"description": "One-click unsubscribe for the message. Primitive writes a `List-Unsubscribe` header naming `url` (and `mailto` when given) and, unless `one_click` is false, `List-Unsubscribe-Post: List-Unsubscribe=One-Click` (RFC 8058), and DKIM-signs both. A receiver that offers one-click unsubscribe sends an HTTPS POST to `url` with the form body `List-Unsubscribe=One-Click`; your endpoint records the unsubscribe. Every recipient of the message gets the same `url`, so send one message per recipient when the URL identifies who to unsubscribe. The `headers` map refuses both header names, so this field is the only way to set them, and the headers it adds count toward the 25 entries `headers` may hold. A field whose rendered `List-Unsubscribe` would pass 980 characters is refused. Not accepted on a repeating send.",
|
|
46694
|
+
"properties": {
|
|
46695
|
+
"url": {
|
|
46696
|
+
"type": "string",
|
|
46697
|
+
"minLength": 1,
|
|
46698
|
+
"maxLength": 700,
|
|
46699
|
+
"pattern": "^[Hh][Tt][Tt][Pp][Ss]://(?:[A-Za-z0-9\\-._~:/?#\\[\\]@!$&'()*+;=]|%[0-9A-Fa-f]{2})+$",
|
|
46700
|
+
"description": "Absolute https URL that unsubscribes the recipient, at most 700 characters of URL characters only: printable ASCII with no spaces, double quotes, angle brackets or commas (percent-encode a comma as %2C), `%` only as a percent-encoded byte, `[` and `]` only around an IPv6 address host, a port from 1 to 65535, no `=?` (which mail readers can decode as an encoded word), and no user name or password. The host must be public: not a single-label name, `localhost` or a name under `.localhost`, `.internal`, `.local`, `.home.arpa` or `.localdomain`, or a loopback, link-local, private, shared, reserved, multicast or unspecified IP address, including an IPv6 address that embeds one. The scheme is written in lower case."
|
|
46701
|
+
},
|
|
46702
|
+
"one_click": {
|
|
46703
|
+
"type": "boolean",
|
|
46704
|
+
"default": true,
|
|
46705
|
+
"description": "Whether to also write `List-Unsubscribe-Post: List-Unsubscribe=One-Click`, which tells the receiver it may unsubscribe with a single POST to `url`. Set false when `url` needs the recipient to open a page and confirm."
|
|
46706
|
+
},
|
|
46707
|
+
"mailto": {
|
|
46708
|
+
"type": "string",
|
|
46709
|
+
"minLength": 3,
|
|
46710
|
+
"maxLength": 254,
|
|
46711
|
+
"pattern": "^[A-Za-z0-9!$'*+=_~-]+(?:\\.[A-Za-z0-9!$'*+=_~-]+)*@[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?(?:\\.[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)+$",
|
|
46712
|
+
"description": "An address to also offer as a `mailto:` unsubscribe, written after `url`. The address alone, without the `mailto:` prefix: at most 64 letters, digits and `.!$'*+=_~-` before the `@`, and a dotted domain after it. An `=` is written as `%3D` in the header."
|
|
46713
|
+
}
|
|
46714
|
+
}
|
|
46715
|
+
},
|
|
45307
46716
|
"headers": {
|
|
45308
46717
|
"type": "object",
|
|
45309
46718
|
"maxProperties": 25,
|
|
@@ -46465,6 +47874,33 @@ const operationManifest = [
|
|
|
46465
47874
|
}
|
|
46466
47875
|
}
|
|
46467
47876
|
},
|
|
47877
|
+
"unsubscribe": {
|
|
47878
|
+
"type": "object",
|
|
47879
|
+
"additionalProperties": false,
|
|
47880
|
+
"required": ["url"],
|
|
47881
|
+
"description": "One-click unsubscribe for the message. Primitive writes a `List-Unsubscribe` header naming `url` (and `mailto` when given) and, unless `one_click` is false, `List-Unsubscribe-Post: List-Unsubscribe=One-Click` (RFC 8058), and DKIM-signs both. A receiver that offers one-click unsubscribe sends an HTTPS POST to `url` with the form body `List-Unsubscribe=One-Click`; your endpoint records the unsubscribe. Every recipient of the message gets the same `url`, so send one message per recipient when the URL identifies who to unsubscribe. The `headers` map refuses both header names, so this field is the only way to set them, and the headers it adds count toward the 25 entries `headers` may hold. A field whose rendered `List-Unsubscribe` would pass 980 characters is refused. Not accepted on a repeating send.",
|
|
47882
|
+
"properties": {
|
|
47883
|
+
"url": {
|
|
47884
|
+
"type": "string",
|
|
47885
|
+
"minLength": 1,
|
|
47886
|
+
"maxLength": 700,
|
|
47887
|
+
"pattern": "^[Hh][Tt][Tt][Pp][Ss]://(?:[A-Za-z0-9\\-._~:/?#\\[\\]@!$&'()*+;=]|%[0-9A-Fa-f]{2})+$",
|
|
47888
|
+
"description": "Absolute https URL that unsubscribes the recipient, at most 700 characters of URL characters only: printable ASCII with no spaces, double quotes, angle brackets or commas (percent-encode a comma as %2C), `%` only as a percent-encoded byte, `[` and `]` only around an IPv6 address host, a port from 1 to 65535, no `=?` (which mail readers can decode as an encoded word), and no user name or password. The host must be public: not a single-label name, `localhost` or a name under `.localhost`, `.internal`, `.local`, `.home.arpa` or `.localdomain`, or a loopback, link-local, private, shared, reserved, multicast or unspecified IP address, including an IPv6 address that embeds one. The scheme is written in lower case."
|
|
47889
|
+
},
|
|
47890
|
+
"one_click": {
|
|
47891
|
+
"type": "boolean",
|
|
47892
|
+
"default": true,
|
|
47893
|
+
"description": "Whether to also write `List-Unsubscribe-Post: List-Unsubscribe=One-Click`, which tells the receiver it may unsubscribe with a single POST to `url`. Set false when `url` needs the recipient to open a page and confirm."
|
|
47894
|
+
},
|
|
47895
|
+
"mailto": {
|
|
47896
|
+
"type": "string",
|
|
47897
|
+
"minLength": 3,
|
|
47898
|
+
"maxLength": 254,
|
|
47899
|
+
"pattern": "^[A-Za-z0-9!$'*+=_~-]+(?:\\.[A-Za-z0-9!$'*+=_~-]+)*@[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?(?:\\.[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)+$",
|
|
47900
|
+
"description": "An address to also offer as a `mailto:` unsubscribe, written after `url`. The address alone, without the `mailto:` prefix: at most 64 letters, digits and `.!$'*+=_~-` before the `@`, and a dotted domain after it. An `=` is written as `%3D` in the header."
|
|
47901
|
+
}
|
|
47902
|
+
}
|
|
47903
|
+
},
|
|
46468
47904
|
"headers": {
|
|
46469
47905
|
"type": "object",
|
|
46470
47906
|
"maxProperties": 25,
|
|
@@ -46945,6 +48381,33 @@ const operationManifest = [
|
|
|
46945
48381
|
}
|
|
46946
48382
|
}
|
|
46947
48383
|
},
|
|
48384
|
+
"unsubscribe": {
|
|
48385
|
+
"type": "object",
|
|
48386
|
+
"additionalProperties": false,
|
|
48387
|
+
"required": ["url"],
|
|
48388
|
+
"description": "One-click unsubscribe for the message. Primitive writes a `List-Unsubscribe` header naming `url` (and `mailto` when given) and, unless `one_click` is false, `List-Unsubscribe-Post: List-Unsubscribe=One-Click` (RFC 8058), and DKIM-signs both. A receiver that offers one-click unsubscribe sends an HTTPS POST to `url` with the form body `List-Unsubscribe=One-Click`; your endpoint records the unsubscribe. Every recipient of the message gets the same `url`, so send one message per recipient when the URL identifies who to unsubscribe. The `headers` map refuses both header names, so this field is the only way to set them, and the headers it adds count toward the 25 entries `headers` may hold. A field whose rendered `List-Unsubscribe` would pass 980 characters is refused. Not accepted on a repeating send.",
|
|
48389
|
+
"properties": {
|
|
48390
|
+
"url": {
|
|
48391
|
+
"type": "string",
|
|
48392
|
+
"minLength": 1,
|
|
48393
|
+
"maxLength": 700,
|
|
48394
|
+
"pattern": "^[Hh][Tt][Tt][Pp][Ss]://(?:[A-Za-z0-9\\-._~:/?#\\[\\]@!$&'()*+;=]|%[0-9A-Fa-f]{2})+$",
|
|
48395
|
+
"description": "Absolute https URL that unsubscribes the recipient, at most 700 characters of URL characters only: printable ASCII with no spaces, double quotes, angle brackets or commas (percent-encode a comma as %2C), `%` only as a percent-encoded byte, `[` and `]` only around an IPv6 address host, a port from 1 to 65535, no `=?` (which mail readers can decode as an encoded word), and no user name or password. The host must be public: not a single-label name, `localhost` or a name under `.localhost`, `.internal`, `.local`, `.home.arpa` or `.localdomain`, or a loopback, link-local, private, shared, reserved, multicast or unspecified IP address, including an IPv6 address that embeds one. The scheme is written in lower case."
|
|
48396
|
+
},
|
|
48397
|
+
"one_click": {
|
|
48398
|
+
"type": "boolean",
|
|
48399
|
+
"default": true,
|
|
48400
|
+
"description": "Whether to also write `List-Unsubscribe-Post: List-Unsubscribe=One-Click`, which tells the receiver it may unsubscribe with a single POST to `url`. Set false when `url` needs the recipient to open a page and confirm."
|
|
48401
|
+
},
|
|
48402
|
+
"mailto": {
|
|
48403
|
+
"type": "string",
|
|
48404
|
+
"minLength": 3,
|
|
48405
|
+
"maxLength": 254,
|
|
48406
|
+
"pattern": "^[A-Za-z0-9!$'*+=_~-]+(?:\\.[A-Za-z0-9!$'*+=_~-]+)*@[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?(?:\\.[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)+$",
|
|
48407
|
+
"description": "An address to also offer as a `mailto:` unsubscribe, written after `url`. The address alone, without the `mailto:` prefix: at most 64 letters, digits and `.!$'*+=_~-` before the `@`, and a dotted domain after it. An `=` is written as `%3D` in the header."
|
|
48408
|
+
}
|
|
48409
|
+
}
|
|
48410
|
+
},
|
|
46948
48411
|
"headers": {
|
|
46949
48412
|
"type": "object",
|
|
46950
48413
|
"maxProperties": 25,
|
|
@@ -51592,6 +53055,7 @@ const SAMPLE_EMAIL_KEYS = /* @__PURE__ */ new Set([
|
|
|
51592
53055
|
"subject",
|
|
51593
53056
|
"text",
|
|
51594
53057
|
"attachment_types",
|
|
53058
|
+
"attachment_names",
|
|
51595
53059
|
"automated",
|
|
51596
53060
|
"from_mailing_list",
|
|
51597
53061
|
"spam_score"
|
|
@@ -51619,6 +53083,10 @@ function checkSampleEmail(email, at) {
|
|
|
51619
53083
|
list("to", 1);
|
|
51620
53084
|
list("cc", 0);
|
|
51621
53085
|
list("attachment_types", 0);
|
|
53086
|
+
list("attachment_names", 0);
|
|
53087
|
+
const types = email.attachment_types;
|
|
53088
|
+
const names = email.attachment_names;
|
|
53089
|
+
if (Array.isArray(types) && Array.isArray(names) && types.length > 0 && names.length > 0 && types.length !== names.length) fail("attachment_names pairs with attachment_types by position, so give the same number of each");
|
|
51622
53090
|
if (email.subject !== void 0 && (typeof email.subject !== "string" || email.subject.length > SAMPLE_SUBJECT_MAX)) fail(`subject must be a string of at most ${SAMPLE_SUBJECT_MAX} characters`);
|
|
51623
53091
|
if (typeof email.text !== "string" || email.text.length === 0 || email.text.length > SAMPLE_TEXT_MAX) fail(`text must be 1 to ${SAMPLE_TEXT_MAX} characters`);
|
|
51624
53092
|
for (const key of ["automated", "from_mailing_list"]) if (email[key] !== void 0 && typeof email[key] !== "boolean") fail(`${key} must be true or false`);
|
|
@@ -52175,7 +53643,9 @@ function answerText(answer) {
|
|
|
52175
53643
|
function conditionLines(summary) {
|
|
52176
53644
|
const conditions = Array.isArray(summary?.conditions) ? summary.conditions : [];
|
|
52177
53645
|
if (conditions.length === 0) return [];
|
|
52178
|
-
|
|
53646
|
+
const held = summary?.conditions_held;
|
|
53647
|
+
const together = typeof held === "number" ? `; together they held on ${held}` : "";
|
|
53648
|
+
return [`Conditions (${summary?.decided ?? 0} decided${together}):`, ...conditions.map((condition) => ` ${condition.index}. ${condition.text}: held on ${condition.held}, failed on ${condition.failed} (the only failure on ${condition.only_failure})`)];
|
|
52179
53649
|
}
|
|
52180
53650
|
function questionLines(summary, results) {
|
|
52181
53651
|
const questions = Array.isArray(summary?.questions) ? summary.questions : [];
|
|
@@ -52519,6 +53989,10 @@ function authorLine(author) {
|
|
|
52519
53989
|
if (name || email) return `Author: ${name ?? email}`;
|
|
52520
53990
|
return `Author: user ${author.user_id} (name and email not shown to you)`;
|
|
52521
53991
|
}
|
|
53992
|
+
/** A note the server wrote on a rule answer, as a line, or undefined. */
|
|
53993
|
+
function noteLine(note) {
|
|
53994
|
+
return typeof note === "string" && note.trim() ? note.trim() : void 0;
|
|
53995
|
+
}
|
|
52522
53996
|
/** The stderr report of a rule written by create-email-rule or update-email-rule. */
|
|
52523
53997
|
function writtenEmailRuleReport(data, request) {
|
|
52524
53998
|
if (!isRecord(data)) return { lines: [] };
|
|
@@ -52533,11 +54007,17 @@ function writtenEmailRuleReport(data, request) {
|
|
|
52533
54007
|
if (restored) lines.push(restored);
|
|
52534
54008
|
const reach = affectsLine(rule.affects);
|
|
52535
54009
|
if (reach) lines.push(reach);
|
|
54010
|
+
for (const note of [rule.share_notice, rule.notice]) {
|
|
54011
|
+
const line = noteLine(note);
|
|
54012
|
+
if (line) lines.push(line);
|
|
54013
|
+
}
|
|
52536
54014
|
const sentExpectations = sentExpectationsIn(request.body);
|
|
52537
54015
|
const name = writtenSampleNamer(request.body, request.flags, rule.expectation_samples);
|
|
52538
54016
|
const checked = expectationsCheckLine(rule.expectations_check, ruleId, name);
|
|
52539
54017
|
if (checked) lines.push(checked);
|
|
52540
54018
|
else if (sentExpectations) lines.push(`Expectations were not checked on this write. Test them with \`primitive email-rules test-email-rule --rule-id ${ruleId}\`.`);
|
|
54019
|
+
const objections = noteLine(rule.objection_notice);
|
|
54020
|
+
if (objections) lines.push(objections);
|
|
52541
54021
|
if (request.flags?.["fail-on-expectations"] !== true) return { lines };
|
|
52542
54022
|
return {
|
|
52543
54023
|
lines,
|
|
@@ -52588,7 +54068,9 @@ function deleteEmailRuleReport(data, request) {
|
|
|
52588
54068
|
const answer = data;
|
|
52589
54069
|
const lines = [];
|
|
52590
54070
|
const ended = Array.isArray(answer.ended_shares) ? answer.ended_shares.length : 0;
|
|
52591
|
-
|
|
54071
|
+
const shareNotice = noteLine(answer.share_notice);
|
|
54072
|
+
if (shareNotice) lines.push(shareNotice);
|
|
54073
|
+
else if (ended > 0) lines.push(`Ended ${ended === 1 ? "1 share" : `${ended} shares`} of this rule (end_reason rule_deleted). ${ended === 1 ? "It keeps its record" : "Each keeps its record"}.`);
|
|
52592
54074
|
const keys = Array.isArray(answer.keys) ? answer.keys : [];
|
|
52593
54075
|
const others = typeof answer.other_keys === "number" && answer.other_keys > 0 ? answer.other_keys : 0;
|
|
52594
54076
|
const ruleId = typeof request.path.id === "string" ? request.path.id : "<rule-id>";
|
|
@@ -52625,16 +54107,37 @@ function readAgain(id) {
|
|
|
52625
54107
|
return `Read it again with \`primitive email-rules get-email-rule ${id}\` and send the write again`;
|
|
52626
54108
|
}
|
|
52627
54109
|
/**
|
|
54110
|
+
* Who reads an active rule, from a refusal's details.read_by: the server
|
|
54111
|
+
* sends it when it checked the write against the rule's expectations because
|
|
54112
|
+
* API keys or webhooks read the rule, whether or not the write asked.
|
|
54113
|
+
* Undefined without it.
|
|
54114
|
+
*/
|
|
54115
|
+
function readByText(details) {
|
|
54116
|
+
const readBy = details.read_by;
|
|
54117
|
+
if (!isRecord(readBy)) return void 0;
|
|
54118
|
+
const { keys, webhooks } = readBy;
|
|
54119
|
+
return typeof keys === "number" && typeof webhooks === "number" ? `${plural$1(keys, "API key", "API keys")} and ${plural$1(webhooks, "webhook", "webhooks")} read what it grants` : "API keys or webhooks may read what it grants (they could not be counted in time)";
|
|
54120
|
+
}
|
|
54121
|
+
/** How to save a write the default check refused, without the check. */
|
|
54122
|
+
function saveUncheckedText(flags) {
|
|
54123
|
+
return flags?.["fail-on-expectations"] === true ? `send it again without --${FAIL_ON_EXPECTATIONS_FLAG} and with --no-if-expectations-pass` : "send it again with --no-if-expectations-pass";
|
|
54124
|
+
}
|
|
54125
|
+
/**
|
|
52628
54126
|
* The hint for update-email-rule's refusals: an email_rule_conflict by its
|
|
52629
54127
|
* details.reason (version_moved, revision_moved, expectations_moved,
|
|
52630
|
-
* rule_changed), and the expectations guard's
|
|
52631
|
-
* expectations_undecided, expectations_unreadable and
|
|
52632
|
-
*
|
|
54128
|
+
* rule_changed, readers_changed), and the expectations guard's
|
|
54129
|
+
* expectations_failed, expectations_undecided, expectations_unreadable and
|
|
54130
|
+
* no_expectations. The guard runs when the write sends if_expectations_pass,
|
|
54131
|
+
* and by default (details.read_by) when it changes what an active rule that
|
|
54132
|
+
* API keys or webhooks read grants. Nothing was saved in any of them.
|
|
52633
54133
|
*/
|
|
52634
54134
|
function updateEmailRuleErrorHint(code, payload, ruleId, body, flags) {
|
|
52635
54135
|
const id = typeof ruleId === "string" && ruleId ? ruleId : "<rule-id>";
|
|
52636
54136
|
const details = errorDetails(payload);
|
|
52637
54137
|
const guarded = isRecord(body) && body.if_expectations_pass === true;
|
|
54138
|
+
const readBy = readByText(details);
|
|
54139
|
+
const judged = readBy ? "was judged against its expectations before saving, as a write that changes what an active rule grants is by default while API keys or webhooks read it, and nothing was saved" : "was judged against its expectations before saving (if_expectations_pass), and nothing was saved";
|
|
54140
|
+
const unchecked = readBy ? ` The rule is active and ${readBy}; to save the write without the check, ${saveUncheckedText(flags)}.` : "";
|
|
52638
54141
|
if (code === "email_rule_conflict") switch (details.reason) {
|
|
52639
54142
|
case "version_moved": return versionMovedHint(payload, ruleId);
|
|
52640
54143
|
case "revision_moved": {
|
|
@@ -52643,6 +54146,7 @@ function updateEmailRuleErrorHint(code, payload, ruleId, body, flags) {
|
|
|
52643
54146
|
}
|
|
52644
54147
|
case "expectations_moved": return `Hint: the rule's saved expectations changed while this write was checked against them, so nothing was saved. ${readAgain(id)}.`;
|
|
52645
54148
|
case "rule_changed": return guarded ? `Hint: the rule changed after this write was judged against its expectations and before it was saved, so saving it would have gone unchecked; nothing was saved. ${readAgain(id)}.` : `Hint: the rule changed while this write was being saved, so nothing was saved. ${readAgain(id)}.`;
|
|
54149
|
+
case "readers_changed": return "Hint: API keys or webhooks started reading this rule while this write was being saved, and saving it would have changed what they receive without checking it against the rule's expectations, so nothing was saved. Send the write again: it is then checked first.";
|
|
52646
54150
|
default: return;
|
|
52647
54151
|
}
|
|
52648
54152
|
if (code === "expectations_failed" || code === "expectations_undecided") {
|
|
@@ -52659,16 +54163,16 @@ function updateEmailRuleErrorHint(code, payload, ruleId, body, flags) {
|
|
|
52659
54163
|
const reason = String(details.reason);
|
|
52660
54164
|
const samplesMayStay = undecidedSamplesMayStay(undecidedSamples.length, reason);
|
|
52661
54165
|
const byReason = reason !== "none" && Object.hasOwn(UNDECIDED_NEXT_STEP, reason) ? UNDECIDED_NEXT_STEP[reason] : UNDECIDED_NEXT_STEP.none;
|
|
52662
|
-
return `Hint: the rule, as this write would leave it,
|
|
54166
|
+
return `Hint: the rule, as this write would leave it, ${judged}.${which}${code === "expectations_failed" ? "" : samplesMayStay ? `${undecided.length > 0 ? ` ${byReason}` : ""} ${UNDECIDED_SAMPLES_NEXT_STEP} ${refusedSampleTest(body, id)}` : ` ${byReason}`}${unchecked} The command exits ${updateEmailRuleErrorExitCode(payload) ?? 1}.`;
|
|
52663
54167
|
}
|
|
52664
54168
|
if (code === "expectations_unreadable") {
|
|
52665
54169
|
const unreadable = Array.isArray(details.unreadable) ? details.unreadable.filter((entry) => entry !== null && entry !== void 0 && entry !== "").map(String) : [];
|
|
52666
54170
|
const one = unreadable.length === 1;
|
|
52667
54171
|
const named = unreadable.length > 0 ? `: ${unreadable.join(", ")}` : "";
|
|
52668
54172
|
const them = one ? "it" : "them";
|
|
52669
|
-
return `Hint: the rule, as this write would leave it,
|
|
54173
|
+
return `Hint: the rule, as this write would leave it, ${judged}. ${one ? "An expectation names an email" : "Expectations name emails"} this rule cannot read (deleted, or outside its scope or its author's mail)${named}. Sending the write again will not decide ${them}: send --expectations-file without ${them}, or an evaluation_scope that reads ${them}.${unchecked} The command exits 1.`;
|
|
52670
54174
|
}
|
|
52671
|
-
if (code === "no_expectations") return "Hint: nothing was saved. Give the rule expectations with --expectations-file or made-up emails with --expectation-samples-file or --add-expectation-samples-file (in this write or before it), or send the write without if_expectations_pass (--fail-on-expectations or --if-expectations-pass).";
|
|
54175
|
+
if (code === "no_expectations") return readBy ? `Hint: nothing was saved: this write removes the rule's expectations, and the rule is active and ${readBy}, so a write that changes what it grants is checked against them first. Keep some with --expectations-file, --expectation-samples-file or --add-expectation-samples-file, or, to save the write without the check, ${saveUncheckedText(flags)}.` : "Hint: nothing was saved. Give the rule expectations with --expectations-file or made-up emails with --expectation-samples-file or --add-expectation-samples-file (in this write or before it), or send the write without if_expectations_pass (--fail-on-expectations or --if-expectations-pass).";
|
|
52672
54176
|
}
|
|
52673
54177
|
/** The reasons a guard's undecided judgment can be decided by sending the write again. */
|
|
52674
54178
|
const RETRYABLE_REASONS = /* @__PURE__ */ new Set([
|
|
@@ -52725,12 +54229,20 @@ function updateEmailRuleErrorExitCode(payload) {
|
|
|
52725
54229
|
function undecidedSamplesMayStay(count, reason) {
|
|
52726
54230
|
return count > 0 && !RETRYABLE_REASONS.has(reason) && reason !== "author_unresolvable";
|
|
52727
54231
|
}
|
|
54232
|
+
/** Where compile counted breadth, by the evaluation_scope it was sent. */
|
|
54233
|
+
const BREADTH_SCOPE = {
|
|
54234
|
+
own_mailboxes: "in your own mailboxes",
|
|
54235
|
+
author: "in all the mail you can read",
|
|
54236
|
+
selected: "in the inboxes and domains the selected scope names"
|
|
54237
|
+
};
|
|
52728
54238
|
/** The stderr report of compile-email-rule: how many recent emails it holds for. */
|
|
52729
|
-
function compileEmailRuleReport(data) {
|
|
54239
|
+
function compileEmailRuleReport(data, request) {
|
|
52730
54240
|
if (!isRecord(data)) return { lines: [] };
|
|
52731
54241
|
const lines = (Array.isArray(data.warnings) ? data.warnings : []).filter((warning) => typeof warning === "string" && warning.trim() !== "").map((warning) => `Warning: ${warning.trim()}`);
|
|
52732
54242
|
const breadth = data.breadth;
|
|
52733
|
-
|
|
54243
|
+
const sent = isRecord(request?.body) && typeof request.body.evaluation_scope === "string" ? request.body.evaluation_scope : void 0;
|
|
54244
|
+
const where = sent === void 0 ? "in your own mailboxes, the default; pass --evaluation-scope to count over the scope you will save it with" : BREADTH_SCOPE[sent] ?? `in evaluation_scope ${sent}`;
|
|
54245
|
+
if (isRecord(breadth) && typeof breadth.checked === "number" && typeof breadth.matched === "number") lines.push(`Breadth: its conditions hold for ${breadth.matched} of ${plural$1(breadth.checked, "recent email", "recent emails")} checked ${where}.`);
|
|
52734
54246
|
return { lines };
|
|
52735
54247
|
}
|
|
52736
54248
|
/** The stderr report of get-email-rule: who wrote it, and its revision. */
|
|
@@ -52742,6 +54254,8 @@ function getEmailRuleReport(data) {
|
|
|
52742
54254
|
const protection = protectionLine(data);
|
|
52743
54255
|
if (protection) lines.push(protection);
|
|
52744
54256
|
if (typeof data.revision === "number") lines.push(`Revision ${data.revision}: pass --if-revision ${data.revision} to update-email-rule so a change made since is never replaced unseen.`);
|
|
54257
|
+
const objections = noteLine(data.objection_notice);
|
|
54258
|
+
if (objections) lines.push(objections);
|
|
52745
54259
|
return { lines };
|
|
52746
54260
|
}
|
|
52747
54261
|
/** The stderr report of list-email-rules: the protective rules that protect nothing yet, or less than they seem. */
|
|
@@ -52761,9 +54275,11 @@ function listEmailRulesReport(data) {
|
|
|
52761
54275
|
/** create-email-rule's --fail-on-expectations: the exit code follows the check made after saving. */
|
|
52762
54276
|
const FAIL_ON_EXPECTATIONS_HELP = "Exit 1 when an expectation in the answer's expectations_check failed, and 3 when none failed but one is undecided or the expectations this write sent were not checked (test the rule to decide). A create does not judge made-up emails, so with some it exits 3. Without it the command exits 0 whatever the check says.";
|
|
52763
54277
|
/** update-email-rule's --fail-on-expectations: the server refuses the write. */
|
|
52764
|
-
const UPDATE_FAIL_ON_EXPECTATIONS_HELP = "Refuse the write unless the rule, as this write would leave it, passes its expectations. It sends if_expectations_pass (over any in --body-file or --raw-body), so the server judges a new version, a restored one, a new scope or turning the rule active before saving, on its emails by id and its made-up emails, and saves nothing when one failed (exit 1), one names an email the rule cannot read (exit 1, since sending again never decides it), one is undecided (exit 3, or 1 when the rule cannot run as its author or a made-up email is undecided for no reason the answer gives) or the rule has none (exit 1). It can take as long as a test of the rule; the command waits for it. Judging needs a credential that reads the mail's content. A write the server does not judge (one changing only expectations, say) is saved, and the exit code then follows the answer's expectations_check, as on create. With --json, a refused write's document holds the API's error alone; a saved write's holds the rule.";
|
|
54278
|
+
const UPDATE_FAIL_ON_EXPECTATIONS_HELP = "Refuse the write unless the rule, as this write would leave it, passes its expectations. It sends if_expectations_pass (over any in --body-file or --raw-body), so the server judges a new version, a restored one, a new scope or turning the rule active before saving, on its emails by id and its made-up emails, and saves nothing when one failed (exit 1), one names an email the rule cannot read (exit 1, since sending again never decides it), one is undecided (exit 3, or 1 when the rule cannot run as its author or a made-up email is undecided for no reason the answer gives) or the rule has none (exit 1). It can take as long as a test of the rule; the command waits for it. Judging needs a credential that reads the mail's content. A write the server does not judge (one changing only expectations, say) is saved, and the exit code then follows the answer's expectations_check, as on create. Without it, the server still judges, and refuses the same way, a write that saves a version or changes the scope of an active rule that API keys or webhooks read and that has expectations (the refusal's details.read_by counts them), unless --no-if-expectations-pass is sent. With --json, a refused write's document holds the API's error alone; a saved write's holds the rule.";
|
|
54279
|
+
/** When update-email-rule judges the made-up emails a samples flag sets. */
|
|
54280
|
+
const UPDATE_JUDGES_SAMPLES = `The write judges them before saving with --${FAIL_ON_EXPECTATIONS_FLAG}, when it saves a version or turns the rule active, and without it when it saves a version or changes the scope of an active rule that API keys or webhooks read, unless --no-if-expectations-pass is sent.`;
|
|
52765
54281
|
/** What a samples file flag reads. */
|
|
52766
|
-
const SAMPLES_FILE_SHAPE = "A JSON file of made-up emails the rule must match or not: an array such as [{\"expected\": \"no_match\", \"label\": \"a personal bill\", \"email\": {...}}], with email as test-email-rule-on-sample takes it (text up to 4,000 characters, at most 10 each of to, cc and
|
|
54282
|
+
const SAMPLES_FILE_SHAPE = "A JSON file of made-up emails the rule must match or not: an array such as [{\"expected\": \"no_match\", \"label\": \"a personal bill\", \"email\": {...}}], with email as test-email-rule-on-sample takes it (text up to 4,000 characters, at most 10 each of to, cc, attachment_types and attachment_names), like the one generate-look-alikes --samples-file writes, or a generate-look-alikes answer saved as it printed it.";
|
|
52767
54283
|
const EXPECTATION_FLAG_NOTE = "Replaces any expect in --body-file or --raw-body. The answer reports them in expectations (passed, counts, results) and the exit code follows it; see --help-full.";
|
|
52768
54284
|
/**
|
|
52769
54285
|
* update-email-rule's --fail-on-expectations sends if_expectations_pass, over
|
|
@@ -52841,11 +54357,11 @@ const EMAIL_RULE_OPERATION_EXTENSIONS = {
|
|
|
52841
54357
|
flags: {
|
|
52842
54358
|
"expectations-file": Flags.string({ description: "A JSON file holding the emails the rule must match and must not, such as {\"match\": [\"<email-id>\"], \"no_match\": [\"<email-id>\"]}, replacing its saved expectations; a file holding null removes them. Sets expectations, over any in --body-file or --raw-body; the answer judges them in expectations_check (passed, decided, failed, undecided); the report test-email-rule answers with is named expectations instead." }),
|
|
52843
54359
|
[SAMPLES_FILE_FLAG]: Flags.string({
|
|
52844
|
-
description: `${SAMPLES_FILE_SHAPE} They replace the rule's saved ones, and a file holding [] removes them. Sets expectation_samples, over any in --body-file or --raw-body. Not with --${ADD_SAMPLES_FILE_FLAG}.
|
|
54360
|
+
description: `${SAMPLES_FILE_SHAPE} They replace the rule's saved ones, and a file holding [] removes them. Sets expectation_samples, over any in --body-file or --raw-body. Not with --${ADD_SAMPLES_FILE_FLAG}. ${UPDATE_JUDGES_SAMPLES}`,
|
|
52845
54361
|
exclusive: [ADD_SAMPLES_FILE_FLAG]
|
|
52846
54362
|
}),
|
|
52847
54363
|
[ADD_SAMPLES_FILE_FLAG]: Flags.string({
|
|
52848
|
-
description: `${SAMPLES_FILE_SHAPE} They are added to the rule's saved ones, 20 at most in all. Sets add_expectation_samples, over any in --body-file or --raw-body. Not with --${SAMPLES_FILE_FLAG}.
|
|
54364
|
+
description: `${SAMPLES_FILE_SHAPE} They are added to the rule's saved ones, 20 at most in all. Sets add_expectation_samples, over any in --body-file or --raw-body. Not with --${SAMPLES_FILE_FLAG}. ${UPDATE_JUDGES_SAMPLES}`,
|
|
52849
54365
|
exclusive: [SAMPLES_FILE_FLAG]
|
|
52850
54366
|
}),
|
|
52851
54367
|
[PICK_FLAG]: Flags.string({ description: pickFlagHelp([SAMPLES_FILE_FLAG, ADD_SAMPLES_FILE_FLAG]) }),
|
|
@@ -52891,7 +54407,9 @@ const EMAIL_RULE_OPERATION_EXTENSIONS = {
|
|
|
52891
54407
|
bodyProperties: ["expectation_samples"]
|
|
52892
54408
|
},
|
|
52893
54409
|
compileEmailRule: {
|
|
52894
|
-
flags:
|
|
54410
|
+
flags: scopeSelectionFlags(),
|
|
54411
|
+
bodyFields: scopeSelectionBodyFields,
|
|
54412
|
+
bodyProperties: ["scope_selection"],
|
|
52895
54413
|
report: compileEmailRuleReport
|
|
52896
54414
|
},
|
|
52897
54415
|
endEmailRuleShare: {
|
|
@@ -55058,7 +56576,7 @@ function savedConnectedProfiles(configDir, exclude) {
|
|
|
55058
56576
|
*/
|
|
55059
56577
|
async function otherProfiles(configDir, session, current) {
|
|
55060
56578
|
if (session) try {
|
|
55061
|
-
const { connectedProfilesForSession } = await import("./machine-session-
|
|
56579
|
+
const { connectedProfilesForSession } = await import("./machine-session-BMr-zPLx.js").then((n) => n.s);
|
|
55062
56580
|
return {
|
|
55063
56581
|
inSession: true,
|
|
55064
56582
|
profiles: connectedProfilesForSession(configDir, session, current)
|
|
@@ -55132,6 +56650,96 @@ async function explainPendingMailNotFound(configDir, emailId, write = (line) =>
|
|
|
55132
56650
|
if (outcome.kind === "dropped") write(`Dropped the pending notice for ${id} from profile ${current.profile} after ${outcome.reads} consecutive not_found reads; the email is no longer visible to this profile.\n`);
|
|
55133
56651
|
} catch {}
|
|
55134
56652
|
}
|
|
56653
|
+
// src/oclif/rule-list-defaults.ts
|
|
56654
|
+
/** The box the objection list asks for when --box is not given: objections you made and objections to rules you wrote. */
|
|
56655
|
+
const OBJECTION_BOX_DEFAULT = "mine";
|
|
56656
|
+
/** The box asked for instead when a server refuses OBJECTION_BOX_DEFAULT: objections you made. */
|
|
56657
|
+
const OBJECTION_BOX_FALLBACK = "outgoing";
|
|
56658
|
+
/** --box on `email-rule-oversight list-email-rule-objections`, with the CLI's default. */
|
|
56659
|
+
const OBJECTION_BOX_FLAG = {
|
|
56660
|
+
description: "mine (the default): objections you made and objections to rules you wrote, each saying which (is_objector, is_author). outgoing: only those you made. incoming: only those to rules you wrote. all: every objection you can see. On a server that does not take mine, the CLI lists only those you made by default, and says so.",
|
|
56661
|
+
options: [
|
|
56662
|
+
OBJECTION_BOX_DEFAULT,
|
|
56663
|
+
"outgoing",
|
|
56664
|
+
"incoming",
|
|
56665
|
+
"all"
|
|
56666
|
+
]
|
|
56667
|
+
};
|
|
56668
|
+
/**
|
|
56669
|
+
* The query to send: for the objection list read without --box, the CLI's
|
|
56670
|
+
* default box by name; any other query as it is.
|
|
56671
|
+
*/
|
|
56672
|
+
function withDefaultObjectionBox(sdkName, query) {
|
|
56673
|
+
return sdkName === "listEmailRuleObjections" && query.box === void 0 ? {
|
|
56674
|
+
...query,
|
|
56675
|
+
box: OBJECTION_BOX_DEFAULT
|
|
56676
|
+
} : query;
|
|
56677
|
+
}
|
|
56678
|
+
function errorBody(payload) {
|
|
56679
|
+
if (payload === null || typeof payload !== "object") return {};
|
|
56680
|
+
const inner = payload.error;
|
|
56681
|
+
return inner !== null && typeof inner === "object" ? inner : payload;
|
|
56682
|
+
}
|
|
56683
|
+
/**
|
|
56684
|
+
* True when an API error is a server that predates box=mine refusing the
|
|
56685
|
+
* value: a validation error whose issue for box is an unknown option, not
|
|
56686
|
+
* any other refusal that happens to name box.
|
|
56687
|
+
*/
|
|
56688
|
+
function isObjectionBoxRefused(payload) {
|
|
56689
|
+
const body = errorBody(payload);
|
|
56690
|
+
return body.code === "validation_error" && typeof body.message === "string" && /(^|,\s*)box: Invalid (option|enum value)/.test(body.message);
|
|
56691
|
+
}
|
|
56692
|
+
/** The error line for `--box mine` given to a server that refuses it. */
|
|
56693
|
+
function objectionBoxErrorHint(payload, flags) {
|
|
56694
|
+
if (flags?.box !== "mine" || !isObjectionBoxRefused(payload)) return void 0;
|
|
56695
|
+
return "This server does not take --box mine: use --box outgoing for objections you made, and --box incoming for objections to rules you wrote.";
|
|
56696
|
+
}
|
|
56697
|
+
const widen = (flags) => `add \`${flags.join(" ")}\` to widen it`;
|
|
56698
|
+
/** The objection list's line: what its defaults left out, and how to see more. */
|
|
56699
|
+
function objectionsNote(box, status, refused) {
|
|
56700
|
+
if (box && refused) return `By default this server lists only ${status ? "pending objections you made" : "objections you made"}: add \`--box incoming\` for objections to rules you wrote, or \`${["--box all", ...status ? ["--status any"] : []].join(" ")}\` for every one you can see.`;
|
|
56701
|
+
const phrase = box && status ? "pending objections you made and those to rules you wrote" : box ? "objections you made and those to rules you wrote" : status ? "pending objections" : null;
|
|
56702
|
+
if (phrase === null) return void 0;
|
|
56703
|
+
return `By default this lists only ${phrase}: ${widen([...box ? ["--box all"] : [], ...status ? ["--status any"] : []])}.`;
|
|
56704
|
+
}
|
|
56705
|
+
/**
|
|
56706
|
+
* What a rule request, share or objection list read with `query` (the
|
|
56707
|
+
* flags as given) left out by its defaults, and the flags that show more.
|
|
56708
|
+
* Said on any page. Undefined for any other list, or when every default was
|
|
56709
|
+
* overridden.
|
|
56710
|
+
*/
|
|
56711
|
+
function ruleListDefaultsNote(sdkName, query, options = {}) {
|
|
56712
|
+
const unset = (name) => query[name] === void 0;
|
|
56713
|
+
const said = (phrase, flags) => phrase === null ? void 0 : `By default this lists only ${phrase}: ${widen(flags)}.`;
|
|
56714
|
+
if (sdkName === "listEmailRuleRequests") {
|
|
56715
|
+
const box = unset("box");
|
|
56716
|
+
const status = unset("status");
|
|
56717
|
+
return said(box && status ? "pending requests made to you" : box ? "requests made to you" : status ? "pending requests" : null, [...box ? ["--box all"] : [], ...status ? ["--status any"] : []]);
|
|
56718
|
+
}
|
|
56719
|
+
if (sdkName === "listEmailRuleShares") {
|
|
56720
|
+
const box = unset("box");
|
|
56721
|
+
const live = unset("live");
|
|
56722
|
+
return said(box && live ? "live shares made with you" : box ? "shares made with you" : live ? "live shares" : null, [...box ? ["--box all"] : [], ...live ? ["--live any"] : []]);
|
|
56723
|
+
}
|
|
56724
|
+
if (sdkName === "listGivenEmailRuleShares") return said(unset("live") ? "live shares of your mail" : null, ["--live any"]);
|
|
56725
|
+
if (sdkName === "listEmailRuleObjections") return objectionsNote(unset("box"), unset("status"), options.objectionBoxRefused === true);
|
|
56726
|
+
}
|
|
56727
|
+
const NOUNS = {
|
|
56728
|
+
listEmailRuleRequests: "requests",
|
|
56729
|
+
listEmailRuleShares: "shares",
|
|
56730
|
+
listGivenEmailRuleShares: "shares",
|
|
56731
|
+
listEmailRuleObjections: "objections"
|
|
56732
|
+
};
|
|
56733
|
+
/**
|
|
56734
|
+
* An empty first page of one of those lists: that nothing matched, then the
|
|
56735
|
+
* line above. Undefined for any other list, when every default was
|
|
56736
|
+
* overridden, or on a later page (--cursor), where the line alone is said.
|
|
56737
|
+
*/
|
|
56738
|
+
function emptyRuleListHint(sdkName, query, options = {}) {
|
|
56739
|
+
if (query.cursor !== void 0) return void 0;
|
|
56740
|
+
const note = ruleListDefaultsNote(sdkName, query, options);
|
|
56741
|
+
return note ? `(no results) No ${NOUNS[sdkName]} match. ${note}` : void 0;
|
|
56742
|
+
}
|
|
55135
56743
|
const RULE_REQUEST_WEBHOOK_CREATE_HINT = "Hint: a webhook for rule request or objection events is made by the person it is for, signed in as themself: after `primitive login`, run this without --api-key, PRIMITIVE_API_KEY or PRIMITIVE_AGENT_PROFILE set, or create it in the dashboard. An API key, another app or an agent cannot make one. If you are already signed in as yourself, try again. It is a route target whatever your access, so it never takes a domain's or the organization's default slot.";
|
|
55136
56744
|
const RULE_REQUEST_WEBHOOK_HTTP_HINT = "Hint: rule request and objection events go only to an http webhook (kind http).";
|
|
55137
56745
|
const RULE_REQUEST_WEBHOOK_SUBSCRIBE_HINT = "Hint: rule request and objection events go only to a webhook made for them. If this webhook does not list them yet, it cannot be given them: create a new one with `--event-types` naming them (such as 'email_rule_request.*' or 'email_rule_objection.*'), signed in as yourself. If it does, only its maker, signed in as themself, can change it.";
|
|
@@ -55541,6 +57149,7 @@ const OPERATION_PATH_FLAGS = {
|
|
|
55541
57149
|
flag: "email-id",
|
|
55542
57150
|
description: "The id of the email (from `primitive emails list`), not a rule id: lists what every rule you can see decided about this email, and why a rule did not run. --id is accepted too."
|
|
55543
57151
|
} },
|
|
57152
|
+
listEmailRuleObjections: { box: OBJECTION_BOX_FLAG },
|
|
55544
57153
|
replyToEmail: { id: {
|
|
55545
57154
|
flag: "email-id",
|
|
55546
57155
|
description: EMAIL_ID_NOT_SENT
|
|
@@ -55733,7 +57342,7 @@ function flagForParameter(parameter, override) {
|
|
|
55733
57342
|
});
|
|
55734
57343
|
if (parameter.enum && parameter.enum.length > 0) return Flags.string({
|
|
55735
57344
|
...common,
|
|
55736
|
-
options: parameter.enum
|
|
57345
|
+
options: [...override?.options ?? parameter.enum]
|
|
55737
57346
|
});
|
|
55738
57347
|
return Flags.string(common);
|
|
55739
57348
|
}
|
|
@@ -55989,7 +57598,7 @@ function buildFlags(operation) {
|
|
|
55989
57598
|
time: Flags.boolean({ description: TIME_FLAG_DESCRIPTION })
|
|
55990
57599
|
};
|
|
55991
57600
|
if (!operation.binaryResponse) {
|
|
55992
|
-
flags.json = Flags.boolean({ description: "Print exactly one JSON document on stdout, on success and on failure, and nothing on stderr. Stdout keeps its usual shape: the data payload, or with --envelope the full response envelope (data plus meta, including meta.cursor, and empty-result hints
|
|
57601
|
+
flags.json = Flags.boolean({ description: "Print exactly one JSON document on stdout, on success and on failure, and nothing on stderr. Stdout keeps its usual shape: the data payload, or with --envelope the full response envelope (data plus meta, including meta.cursor, and, in summary, empty-result hints and what a list's default filters left out). The next-cursor line is not printed; use --envelope to page. A failure prints the error with exit_code. Without --json, the cursor and notices go to stderr." });
|
|
55993
57602
|
flags.envelope = Flags.boolean({ description: "Print the full response envelope, including pagination metadata such as meta.cursor. Defaults to printing only the data payload for backward compatibility." });
|
|
55994
57603
|
}
|
|
55995
57604
|
const positional = positionalPathParameter(operation);
|
|
@@ -56168,6 +57777,7 @@ const OPERATION_ERROR_HINTS = {
|
|
|
56168
57777
|
createEndpoint: (code, body, payload) => createEndpointRuleRequestHint(code, body, payload),
|
|
56169
57778
|
updateEndpoint: (code, body, payload) => updateEndpointRuleRequestHint(code, body, payload),
|
|
56170
57779
|
updateEmailRule: (code, body, payload, path, flags) => updateEmailRuleErrorHint(code, payload, path?.id, body, flags),
|
|
57780
|
+
listEmailRuleObjections: (_code, _body, payload, _path, flags) => objectionBoxErrorHint(payload, flags),
|
|
56171
57781
|
verifyDomain: (code, _body, payload) => code === "dns_verification_failed" ? domainVerificationFailedHint(payload) : void 0,
|
|
56172
57782
|
addDomain: (code, body) => {
|
|
56173
57783
|
if (code === "mail_relay_unavailable") return MAIL_RELAY_UNAVAILABLE_MESSAGE;
|
|
@@ -56280,7 +57890,9 @@ function createOperationCommand(operation) {
|
|
|
56280
57890
|
const replyStateSurface = replyStateSurfaceForOperation(operation.sdkName, query);
|
|
56281
57891
|
const automatedSurface = automatedSurfaceForOperation(operation.sdkName, query);
|
|
56282
57892
|
const fromVerified = fromVerifiedExpectation(operation.sdkName, query);
|
|
56283
|
-
|
|
57893
|
+
let sentQuery = withDefaultObjectionBox(operation.sdkName, query);
|
|
57894
|
+
let objectionBoxRefused = false;
|
|
57895
|
+
const callOperation = (stepUpToken, pageQuery = sentQuery) => {
|
|
56284
57896
|
const sent = stepUpToken ? {
|
|
56285
57897
|
...headers,
|
|
56286
57898
|
[STEP_UP_HEADER]: stepUpToken
|
|
@@ -56325,7 +57937,7 @@ function createOperationCommand(operation) {
|
|
|
56325
57937
|
const rows = [];
|
|
56326
57938
|
let sentCursor = query.cursor;
|
|
56327
57939
|
let last = await callOperation(void 0, {
|
|
56328
|
-
...
|
|
57940
|
+
...sentQuery,
|
|
56329
57941
|
limit: Math.min(max, wanted)
|
|
56330
57942
|
});
|
|
56331
57943
|
const budget = Math.ceil(wanted / max) + 20;
|
|
@@ -56351,7 +57963,7 @@ function createOperationCommand(operation) {
|
|
|
56351
57963
|
};
|
|
56352
57964
|
sentCursor = cursor;
|
|
56353
57965
|
last = await callOperation(void 0, {
|
|
56354
|
-
...
|
|
57966
|
+
...sentQuery,
|
|
56355
57967
|
cursor,
|
|
56356
57968
|
limit: Math.min(max, wanted - rows.length)
|
|
56357
57969
|
});
|
|
@@ -56362,13 +57974,22 @@ function createOperationCommand(operation) {
|
|
|
56362
57974
|
const warning = typeof role === "string" ? roleReadsAllMailWarning(role, await readRoles(apiClient.client)) : null;
|
|
56363
57975
|
if (warning) process.stderr.write(`${warning}\n`);
|
|
56364
57976
|
}
|
|
56365
|
-
const
|
|
57977
|
+
const send = async () => paged ? await callPaged() : takesStepUp(operation) ? await callWithApproval() : ATTACHMENT_WAIT_OPERATIONS.has(operation.sdkName) ? await withAttachmentWait(callOperation, {
|
|
56366
57978
|
wait: parsedFlags.wait !== false,
|
|
56367
57979
|
errorCode: (error) => extractErrorCode(extractErrorPayload(error)),
|
|
56368
57980
|
onFirstWait: () => {
|
|
56369
57981
|
process.stderr.write(`Attachment content is not ready yet; waiting up to ${ATTACHMENT_WAIT_MAX_MS / 1e3}s. Pass --no-wait to return immediately.\n`);
|
|
56370
57982
|
}
|
|
56371
57983
|
}) : await callOperation();
|
|
57984
|
+
let result = await send();
|
|
57985
|
+
if (result.error && sentQuery !== query && isObjectionBoxRefused(extractErrorPayload(result.error))) {
|
|
57986
|
+
sentQuery = {
|
|
57987
|
+
...query,
|
|
57988
|
+
box: OBJECTION_BOX_FALLBACK
|
|
57989
|
+
};
|
|
57990
|
+
objectionBoxRefused = true;
|
|
57991
|
+
result = await send();
|
|
57992
|
+
}
|
|
56372
57993
|
if (result.error) {
|
|
56373
57994
|
const errorPayload = extractErrorPayload(result.error);
|
|
56374
57995
|
const operationErrorHint = OPERATION_ERROR_HINTS[operation.sdkName]?.(extractErrorCode(errorPayload), body, errorPayload, collectValues(operation.pathParams, parsedFlags, operation.sdkName), parsedFlags);
|
|
@@ -56448,18 +58069,26 @@ function createOperationCommand(operation) {
|
|
|
56448
58069
|
if (cursor && !jsonOutput) process.stderr.write(`next cursor: ${cursor}\n`);
|
|
56449
58070
|
if (pagingNote && !jsonOutput) process.stderr.write(`${pagingNote}\n`);
|
|
56450
58071
|
const summary = [];
|
|
58072
|
+
let ruleListHintSaid = false;
|
|
56451
58073
|
if (Array.isArray(envelope?.data) && envelope.data.length === 0 && (!jsonOutput || withEnvelope) && (jsonOutput || !metaExplainsEmptyList(envelope?.meta))) {
|
|
56452
58074
|
const tail = query.since !== void 0;
|
|
56453
58075
|
const more = envelope?.meta?.cursor ?? null;
|
|
58076
|
+
const ruleListHint = emptyRuleListHint(operation.sdkName, query, { objectionBoxRefused });
|
|
58077
|
+
ruleListHintSaid = ruleListHint !== void 0;
|
|
56454
58078
|
const hint = operation.sdkName === "listEmails" ? emptyEmailListHint({
|
|
56455
58079
|
filterFlags: listFilters(query).map((name) => `--${parameterFlagName(operation.sdkName, name)}`),
|
|
56456
58080
|
...tail ? { pastFlag: "--since" } : query.cursor !== void 0 ? { pastFlag: "--cursor" } : {},
|
|
56457
58081
|
nextCursor: tail ? null : more,
|
|
56458
58082
|
caller: tail || more ? null : await readCallerMailFor(auth, apiClient.client)
|
|
56459
|
-
}) :
|
|
58083
|
+
}) : ruleListHint ?? emptyDeliveriesHint(operation.sdkName, query) ?? EMPTY_RESULT_HINTS[operation.sdkName];
|
|
56460
58084
|
if (hint && jsonOutput) summary.push(hint);
|
|
56461
58085
|
else if (hint) process.stderr.write(`${hint}\n`);
|
|
56462
58086
|
}
|
|
58087
|
+
if (Array.isArray(envelope?.data) && (!jsonOutput || withEnvelope)) {
|
|
58088
|
+
const note = ruleListHintSaid ? void 0 : ruleListDefaultsNote(operation.sdkName, query, { objectionBoxRefused });
|
|
58089
|
+
if (note && jsonOutput) summary.push(note);
|
|
58090
|
+
else if (note) process.stderr.write(`${note}\n`);
|
|
58091
|
+
}
|
|
56463
58092
|
if (!jsonOutput) for (const line of metaNoteLines(envelope?.meta)) process.stderr.write(`${line}\n`);
|
|
56464
58093
|
if (operation.sdkName === "listSentEmails") {
|
|
56465
58094
|
const note = sentListOtherSendersNote(envelope?.data, auth.connectedAgent?.agentAddress);
|
|
@@ -56535,35 +58164,6 @@ const EMPTY_RESULT_HINTS = {
|
|
|
56535
58164
|
listFunctions: "(no results) No Functions configured yet. Start with `primitive functions templates`, then `primitive functions init --template <template>` and `primitive functions deploy --name <name> --file <bundle>`."
|
|
56536
58165
|
};
|
|
56537
58166
|
/**
|
|
56538
|
-
* An empty rule request, share or objection list, read by the filters the
|
|
56539
|
-
* call left at their defaults: each list shows only part of what you can see
|
|
56540
|
-
* by default (pending requests made to you; live shares made with you;
|
|
56541
|
-
* pending objections you made), so an empty answer says which flags widen
|
|
56542
|
-
* it. Undefined for any other list, when every filter was given, or on a
|
|
56543
|
-
* later page (--cursor), which is empty only past the end.
|
|
56544
|
-
*/
|
|
56545
|
-
function emptyRuleListHint(sdkName, query) {
|
|
56546
|
-
if (query.cursor !== void 0) return void 0;
|
|
56547
|
-
const unset = (name) => query[name] === void 0;
|
|
56548
|
-
const said = (noun, phrase, flags) => phrase === null ? void 0 : `(no results) No ${noun} match. By default this lists only ${phrase}: add \`${flags.join(" ")}\` to widen it.`;
|
|
56549
|
-
if (sdkName === "listEmailRuleRequests") {
|
|
56550
|
-
const box = unset("box");
|
|
56551
|
-
const status = unset("status");
|
|
56552
|
-
return said("requests", box && status ? "pending requests made to you" : box ? "requests made to you" : status ? "pending requests" : null, [...box ? ["--box all"] : [], ...status ? ["--status any"] : []]);
|
|
56553
|
-
}
|
|
56554
|
-
if (sdkName === "listEmailRuleShares") {
|
|
56555
|
-
const box = unset("box");
|
|
56556
|
-
const live = unset("live");
|
|
56557
|
-
return said("shares", box && live ? "live shares made with you" : box ? "shares made with you" : live ? "live shares" : null, [...box ? ["--box all"] : [], ...live ? ["--live any"] : []]);
|
|
56558
|
-
}
|
|
56559
|
-
if (sdkName === "listGivenEmailRuleShares") return said("shares", unset("live") ? "live shares of your mail" : null, ["--live any"]);
|
|
56560
|
-
if (sdkName === "listEmailRuleObjections") {
|
|
56561
|
-
const box = unset("box");
|
|
56562
|
-
const status = unset("status");
|
|
56563
|
-
return said("objections", box && status ? "pending objections you made" : box ? "objections you made" : status ? "pending objections" : null, [...box ? ["--box all"] : [], ...status ? ["--status any"] : []]);
|
|
56564
|
-
}
|
|
56565
|
-
}
|
|
56566
|
-
/**
|
|
56567
58167
|
* An empty delivery list narrowed by a filter (--endpoint-id, --status,
|
|
56568
58168
|
* --event-type and the rest) names the filters given, in place of the general
|
|
56569
58169
|
* hint, which reads as if nothing was ever delivered, and keeps its point that
|