primcli 3.0.0-preview.14 → 3.0.0-preview.15
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/dist/{api-command-BTOIanV1.js → api-command-D5Nbd6Pq.js} +560 -60
- package/dist/{machine-session-BTkDAKda.js → machine-session-DyGP7wDs.js} +4 -4
- package/dist/{notify-session-b_0jyPIk.js → notify-session-B64Lgv6Z.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 +372 -64
- package/dist/oclif/receiver-heal.js +2 -2
- package/dist/{repeats-Dj_o6c-X-B7sSj0oc.js → repeats-Dj_o6c-X-C1y88ZwJ.js} +10 -10
- package/dist/{scoped-chat-Cqmn-k7q.js → scoped-chat-CocomDwR.js} +1 -1
- package/dist/{signal-command-ewPBzvjU.js → signal-command-lJM0763f.js} +4 -4
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $t as getOwnGrant, B as awaitingRejectedError, G as isAwaitingRejectedError, J as EMAIL_RULE_OBJECTION_EVENT_TYPES, Kn as sdk_gen_exports, R as ReplyStateUnsupportedError, V as ensureSearchReportsReplyState, Wt as getEmail, X as SENT_EMAIL_EVENT_TYPES, Y as EMAIL_RULE_REQUEST_EVENT_TYPES, Z as WEBHOOK_EVENT_TYPES, at as AutomatedFilterUnsupportedError, ct as automatedSurfaceForOperation, ft as isAutomatedRejectedError, lt as ensureSearchReportsAutomated, ot as assertAutomatedVerdict, q as replyStateSurfaceForOperation, rn as getThread, st as automatedRejectedError, ut as expectedAutomatedVerdicts, vn as listEndpoints, y as parseRetryAfter, z as assertAwaitingFilterRows } from "./repeats-Dj_o6c-X-
|
|
1
|
+
import { $t as getOwnGrant, B as awaitingRejectedError, G as isAwaitingRejectedError, J as EMAIL_RULE_OBJECTION_EVENT_TYPES, Kn as sdk_gen_exports, R as ReplyStateUnsupportedError, V as ensureSearchReportsReplyState, Wt as getEmail, X as SENT_EMAIL_EVENT_TYPES, Y as EMAIL_RULE_REQUEST_EVENT_TYPES, Z as WEBHOOK_EVENT_TYPES, at as AutomatedFilterUnsupportedError, ct as automatedSurfaceForOperation, ft as isAutomatedRejectedError, lt as ensureSearchReportsAutomated, ot as assertAutomatedVerdict, q as replyStateSurfaceForOperation, rn as getThread, st as automatedRejectedError, ut as expectedAutomatedVerdicts, vn as listEndpoints, y as parseRetryAfter, z as assertAwaitingFilterRows } from "./repeats-Dj_o6c-X-C1y88ZwJ.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";
|
|
@@ -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, as on every coverage notice."
|
|
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 (rule_now marks one whose rule was deleted)."
|
|
876
876
|
},
|
|
877
877
|
"owned_now": {
|
|
878
878
|
"type": "string",
|
|
@@ -902,10 +902,15 @@ const operationManifest = [
|
|
|
902
902
|
]
|
|
903
903
|
},
|
|
904
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.",
|
|
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, with details.reason rule_deleted once a rule you were told of is deleted.",
|
|
906
906
|
"type": "string",
|
|
907
907
|
"format": "uuid"
|
|
908
908
|
},
|
|
909
|
+
"rule_now": {
|
|
910
|
+
"description": "For email_rule_coverage: deleted once the rule it is about has been deleted. Left out while it exists, or when that could not be checked.",
|
|
911
|
+
"type": "string",
|
|
912
|
+
"enum": ["deleted"]
|
|
913
|
+
},
|
|
909
914
|
"receivers_change": {
|
|
910
915
|
"description": "For a receivers_changed notice: who received the rule's matches before and after, in totals. They can be equal when only an owner or a webhook site changed; covering-me shows them by owner. A rotated key counts once here while the old one still works; covering-me counts both.",
|
|
911
916
|
"type": "object",
|
|
@@ -1014,7 +1019,7 @@ const operationManifest = [
|
|
|
1014
1019
|
"as_of": {
|
|
1015
1020
|
"type": ["string", "null"],
|
|
1016
1021
|
"format": "date-time",
|
|
1017
|
-
"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."
|
|
1022
|
+
"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. They look only while one of its rules could cover someone, so this stops moving while none could."
|
|
1018
1023
|
},
|
|
1019
1024
|
"pending_complete": {
|
|
1020
1025
|
"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.",
|
|
@@ -6453,7 +6458,10 @@ const operationManifest = [
|
|
|
6453
6458
|
null
|
|
6454
6459
|
]
|
|
6455
6460
|
},
|
|
6456
|
-
"webhook_attempt_count": {
|
|
6461
|
+
"webhook_attempt_count": {
|
|
6462
|
+
"type": "integer",
|
|
6463
|
+
"description": "The email's own routed delivery only (where routing sent it); a rule's deliveries never change this, and are in `rule_deliveries` on GET /emails/{id} for the mailbox's owner. Its attempts."
|
|
6464
|
+
},
|
|
6457
6465
|
"thread_id": {
|
|
6458
6466
|
"type": ["string", "null"],
|
|
6459
6467
|
"format": "uuid",
|
|
@@ -10938,7 +10946,7 @@ const operationManifest = [
|
|
|
10938
10946
|
"binaryResponse": false,
|
|
10939
10947
|
"bodyRequired": true,
|
|
10940
10948
|
"command": "rotate-key",
|
|
10941
|
-
"description": "Mint a successor with a new id and the same name, grant, expiry and conditions, and return its secret once. The old key keeps working for overlap_seconds, then stops: 24 hours when overlap_seconds is omitted, at most 7 days, never past its own expires_at, and at once with 0 (which is how to rotate a key whose secret leaked). previous_key_expires_at says when the old key stops. Revoking the successor during the overlap also revokes the old key when you may revoke that one too; the revoke's predecessors_left counts any left working. Rotating does not extend a key: the successor keeps the old expiry unless expires_at gives it a new one. That needs keys:manage (403 forbidden otherwise), is held to the credential policy (400 when past its maximum lifetime, with the latest expiry it allows now in the message), and someone limited to their own keys can only keep or bring it forward (403 grant_forbidden, details.reason own_key_tighten_only); the old key then never outlives the new one. The person rotating must cover the key's access (403 grant_forbidden, details.reason target_not_covered), and a key an owner holds is rotated by an owner only (403 forbidden, details.reason owner_key_rotation), since rotating hands over the new secret. The person's own Primitive CLI login needs no step-up (it acts as the person, held to the same rules) unless the organization's credential policy sets cli_writes_require_approval; the Primitive app's token is refused, even with one. 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, the person's own Primitive CLI login with no step-up (unless the organization's credential policy sets cli_writes_require_approval), or the person's own OAuth token with a step-up token for purpose `keys.create` in the Primitive-Step-Up header. Without one any other OAuth token is answered 403 step_up_required, whose details carry the dashboard URL that issues it (or 403 grant_forbidden when the person's role, or the client, could not do it anyway). The person's role must hold keys:manage. API keys and agent connection keys are refused. An agent acting for the person is refused unless it carries a step-up token the person issued in the dashboard.",
|
|
10949
|
+
"description": "Mint a successor with a new id and the same name, grant, expiry and conditions, and return its secret once, with its name and grant so you can see they carried over. The old key keeps working for overlap_seconds, then stops: 24 hours when overlap_seconds is omitted, at most 7 days, never past its own expires_at, and at once with 0 (which is how to rotate a key whose secret leaked). previous_key_expires_at says when the old key stops. Revoking the successor during the overlap also revokes the old key when you may revoke that one too; the revoke's predecessors_left counts any left working. Rotating does not extend a key: the successor keeps the old expiry unless expires_at gives it a new one. That needs keys:manage (403 forbidden otherwise), is held to the credential policy (400 when past its maximum lifetime, with the latest expiry it allows now in the message), and someone limited to their own keys can only keep or bring it forward (403 grant_forbidden, details.reason own_key_tighten_only); the old key then never outlives the new one. The person rotating must cover the key's access (403 grant_forbidden, details.reason target_not_covered), and a key an owner holds is rotated by an owner only (403 forbidden, details.reason owner_key_rotation), since rotating hands over the new secret. The person's own Primitive CLI login needs no step-up (it acts as the person, held to the same rules) unless the organization's credential policy sets cli_writes_require_approval; the Primitive app's token is refused, even with one. 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, the person's own Primitive CLI login with no step-up (unless the organization's credential policy sets cli_writes_require_approval), or the person's own OAuth token with a step-up token for purpose `keys.create` in the Primitive-Step-Up header. Without one any other OAuth token is answered 403 step_up_required, whose details carry the dashboard URL that issues it (or 403 grant_forbidden when the person's role, or the client, could not do it anyway). The person's role must hold keys:manage. API keys and agent connection keys are refused. An agent acting for the person is refused unless it carries a step-up token the person issued in the dashboard.",
|
|
10942
10950
|
"hasJsonBody": true,
|
|
10943
10951
|
"method": "POST",
|
|
10944
10952
|
"operationId": "rotateKey",
|
|
@@ -10996,6 +11004,36 @@ const operationManifest = [
|
|
|
10996
11004
|
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
|
|
10997
11005
|
},
|
|
10998
11006
|
"previous_key_id": { "type": "string" },
|
|
11007
|
+
"name": {
|
|
11008
|
+
"description": "The successor's name: the rotated key's, which it keeps.",
|
|
11009
|
+
"type": ["string", "null"]
|
|
11010
|
+
},
|
|
11011
|
+
"grant": {
|
|
11012
|
+
"description": "The grant the successor holds, as a create answers it: the rotated key's own, carried over unchanged (rules, addresses and domains included).",
|
|
11013
|
+
"type": "object",
|
|
11014
|
+
"properties": {
|
|
11015
|
+
"template": { "type": ["string", "null"] },
|
|
11016
|
+
"credential_grant_id": { "type": ["string", "null"] },
|
|
11017
|
+
"permissions": {
|
|
11018
|
+
"type": ["array", "null"],
|
|
11019
|
+
"items": { "type": "string" }
|
|
11020
|
+
},
|
|
11021
|
+
"mail_scope": {},
|
|
11022
|
+
"resources": {}
|
|
11023
|
+
},
|
|
11024
|
+
"required": [
|
|
11025
|
+
"template",
|
|
11026
|
+
"credential_grant_id",
|
|
11027
|
+
"permissions",
|
|
11028
|
+
"mail_scope",
|
|
11029
|
+
"resources"
|
|
11030
|
+
],
|
|
11031
|
+
"additionalProperties": {}
|
|
11032
|
+
},
|
|
11033
|
+
"rotated_from": {
|
|
11034
|
+
"description": "The rotated key: previous_key_id, under the name GET /v1/keys/{id} gives it.",
|
|
11035
|
+
"type": "string"
|
|
11036
|
+
},
|
|
10999
11037
|
"previous_key_expires_at": {
|
|
11000
11038
|
"type": "string",
|
|
11001
11039
|
"format": "date-time",
|
|
@@ -13635,10 +13673,13 @@ const operationManifest = [
|
|
|
13635
13673
|
"description": "Whether it is to a rule you wrote, in your current membership."
|
|
13636
13674
|
},
|
|
13637
13675
|
"message": {
|
|
13638
|
-
"description": "Why the
|
|
13676
|
+
"description": "Why they object and what they ask (to turn the rule off, narrow it, or explain who receives it); null when none was given, or once withdrawn.",
|
|
13677
|
+
"type": ["string", "null"]
|
|
13678
|
+
},
|
|
13679
|
+
"decline_reason": {
|
|
13680
|
+
"description": "The author's answer when declining, which the objector sees; null when none was given.",
|
|
13639
13681
|
"type": ["string", "null"]
|
|
13640
13682
|
},
|
|
13641
|
-
"decline_reason": { "type": ["string", "null"] },
|
|
13642
13683
|
"created_at": {
|
|
13643
13684
|
"type": "string",
|
|
13644
13685
|
"format": "date-time"
|
|
@@ -13676,7 +13717,7 @@ const operationManifest = [
|
|
|
13676
13717
|
"binaryResponse": false,
|
|
13677
13718
|
"bodyRequired": true,
|
|
13678
13719
|
"command": "create-email-rule-objection",
|
|
13679
|
-
"description": "
|
|
13720
|
+
"description": "Objects to a rule that covers one of your own mailboxes now: say in the message what you ask its author, to turn it off, narrow it, or explain who receives what it matches. The author answers by accepting, which turns it off, or by declining, optionally with a reason you see; the rule keeps running unless they accept. 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 (optionally with a reason the objector sees), 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.",
|
|
13680
13721
|
"hasJsonBody": true,
|
|
13681
13722
|
"method": "POST",
|
|
13682
13723
|
"operationId": "createEmailRuleObjection",
|
|
@@ -13704,7 +13745,7 @@ const operationManifest = [
|
|
|
13704
13745
|
"type": ["string", "null"],
|
|
13705
13746
|
"minLength": 1,
|
|
13706
13747
|
"maxLength": 500,
|
|
13707
|
-
"description": "Why you object, up to 500 characters
|
|
13748
|
+
"description": "Why you object and what you ask, up to 500 characters: to turn the rule off, to narrow it, or to explain who receives what it matches. Null or absent for none. The rule's author and the organization's owners and admins see it while it stands; withdrawing clears it."
|
|
13708
13749
|
}
|
|
13709
13750
|
},
|
|
13710
13751
|
"required": ["rule_id"],
|
|
@@ -13789,10 +13830,13 @@ const operationManifest = [
|
|
|
13789
13830
|
"description": "Whether it is to a rule you wrote, in your current membership."
|
|
13790
13831
|
},
|
|
13791
13832
|
"message": {
|
|
13792
|
-
"description": "Why the
|
|
13833
|
+
"description": "Why they object and what they ask (to turn the rule off, narrow it, or explain who receives it); null when none was given, or once withdrawn.",
|
|
13834
|
+
"type": ["string", "null"]
|
|
13835
|
+
},
|
|
13836
|
+
"decline_reason": {
|
|
13837
|
+
"description": "The author's answer when declining, which the objector sees; null when none was given.",
|
|
13793
13838
|
"type": ["string", "null"]
|
|
13794
13839
|
},
|
|
13795
|
-
"decline_reason": { "type": ["string", "null"] },
|
|
13796
13840
|
"created_at": {
|
|
13797
13841
|
"type": "string",
|
|
13798
13842
|
"format": "date-time"
|
|
@@ -13830,7 +13874,7 @@ const operationManifest = [
|
|
|
13830
13874
|
"binaryResponse": false,
|
|
13831
13875
|
"bodyRequired": false,
|
|
13832
13876
|
"command": "decline-email-rule-objection",
|
|
13833
|
-
"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.",
|
|
13877
|
+
"description": "Declines a pending objection to a rule you wrote, optionally saying why (reason), which the member who objected sees; the rule stays as it is. When its message asks you to narrow the rule or explain who receives it, the reason is your answer; narrow it with a new version as well if you agree. 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.",
|
|
13834
13878
|
"hasJsonBody": true,
|
|
13835
13879
|
"method": "POST",
|
|
13836
13880
|
"operationId": "declineEmailRuleObjection",
|
|
@@ -13858,7 +13902,7 @@ const operationManifest = [
|
|
|
13858
13902
|
"type": ["string", "null"],
|
|
13859
13903
|
"minLength": 1,
|
|
13860
13904
|
"maxLength": 500,
|
|
13861
|
-
"description": "Why you are declining, up to 500 characters; null or absent for none. The member who objected sees it."
|
|
13905
|
+
"description": "Why you are declining, up to 500 characters; null or absent for none. The member who objected sees it: it is how to answer one that asks you to narrow the rule or explain who receives it."
|
|
13862
13906
|
} },
|
|
13863
13907
|
"additionalProperties": false
|
|
13864
13908
|
},
|
|
@@ -13941,10 +13985,13 @@ const operationManifest = [
|
|
|
13941
13985
|
"description": "Whether it is to a rule you wrote, in your current membership."
|
|
13942
13986
|
},
|
|
13943
13987
|
"message": {
|
|
13944
|
-
"description": "Why the
|
|
13988
|
+
"description": "Why they object and what they ask (to turn the rule off, narrow it, or explain who receives it); null when none was given, or once withdrawn.",
|
|
13989
|
+
"type": ["string", "null"]
|
|
13990
|
+
},
|
|
13991
|
+
"decline_reason": {
|
|
13992
|
+
"description": "The author's answer when declining, which the objector sees; null when none was given.",
|
|
13945
13993
|
"type": ["string", "null"]
|
|
13946
13994
|
},
|
|
13947
|
-
"decline_reason": { "type": ["string", "null"] },
|
|
13948
13995
|
"created_at": {
|
|
13949
13996
|
"type": "string",
|
|
13950
13997
|
"format": "date-time"
|
|
@@ -13982,7 +14029,7 @@ const operationManifest = [
|
|
|
13982
14029
|
"binaryResponse": false,
|
|
13983
14030
|
"bodyRequired": false,
|
|
13984
14031
|
"command": "get-email-rule-covering-me",
|
|
13985
|
-
"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.",
|
|
14032
|
+
"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. For what happened to one email of yours, every rule's decision on it and, for another member's rule covering you, who receives what it shares: GET /v1/emails/{id}/rule-results (primitive email-rules list-email-rule-results --email-id <email-id>). 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.",
|
|
13986
14033
|
"hasJsonBody": false,
|
|
13987
14034
|
"method": "GET",
|
|
13988
14035
|
"operationId": "getEmailRuleCoveringMe",
|
|
@@ -14024,6 +14071,10 @@ const operationManifest = [
|
|
|
14024
14071
|
"enum": ["grant", "do_not_share"],
|
|
14025
14072
|
"description": "grant: what it matches can be shared. do_not_share: it blocks sharing what it matches."
|
|
14026
14073
|
},
|
|
14074
|
+
"do_not_share_note": {
|
|
14075
|
+
"description": "On a grant rule: that the active do-not-share rules over an email run first, keeping from it what they match and holding back what they cannot decide, which is decided again for up to a day and shared only if none of them then matches it.",
|
|
14076
|
+
"type": "string"
|
|
14077
|
+
},
|
|
14027
14078
|
"author": {
|
|
14028
14079
|
"type": "object",
|
|
14029
14080
|
"properties": {
|
|
@@ -14528,7 +14579,7 @@ const operationManifest = [
|
|
|
14528
14579
|
"binaryResponse": false,
|
|
14529
14580
|
"bodyRequired": false,
|
|
14530
14581
|
"command": "get-email-rule-objection",
|
|
14531
|
-
"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.",
|
|
14582
|
+
"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 (optionally with a reason the objector sees), 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.",
|
|
14532
14583
|
"hasJsonBody": false,
|
|
14533
14584
|
"method": "GET",
|
|
14534
14585
|
"operationId": "getEmailRuleObjection",
|
|
@@ -14624,10 +14675,13 @@ const operationManifest = [
|
|
|
14624
14675
|
"description": "Whether it is to a rule you wrote, in your current membership."
|
|
14625
14676
|
},
|
|
14626
14677
|
"message": {
|
|
14627
|
-
"description": "Why the
|
|
14678
|
+
"description": "Why they object and what they ask (to turn the rule off, narrow it, or explain who receives it); null when none was given, or once withdrawn.",
|
|
14679
|
+
"type": ["string", "null"]
|
|
14680
|
+
},
|
|
14681
|
+
"decline_reason": {
|
|
14682
|
+
"description": "The author's answer when declining, which the objector sees; null when none was given.",
|
|
14628
14683
|
"type": ["string", "null"]
|
|
14629
14684
|
},
|
|
14630
|
-
"decline_reason": { "type": ["string", "null"] },
|
|
14631
14685
|
"created_at": {
|
|
14632
14686
|
"type": "string",
|
|
14633
14687
|
"format": "date-time"
|
|
@@ -14788,7 +14842,7 @@ const operationManifest = [
|
|
|
14788
14842
|
"binaryResponse": false,
|
|
14789
14843
|
"bodyRequired": false,
|
|
14790
14844
|
"command": "list-email-rule-objections",
|
|
14791
|
-
"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.",
|
|
14845
|
+
"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 (optionally with a reason the objector sees), 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.",
|
|
14792
14846
|
"hasJsonBody": false,
|
|
14793
14847
|
"method": "GET",
|
|
14794
14848
|
"operationId": "listEmailRuleObjections",
|
|
@@ -14923,10 +14977,13 @@ const operationManifest = [
|
|
|
14923
14977
|
"description": "Whether it is to a rule you wrote, in your current membership."
|
|
14924
14978
|
},
|
|
14925
14979
|
"message": {
|
|
14926
|
-
"description": "Why the
|
|
14980
|
+
"description": "Why they object and what they ask (to turn the rule off, narrow it, or explain who receives it); null when none was given, or once withdrawn.",
|
|
14981
|
+
"type": ["string", "null"]
|
|
14982
|
+
},
|
|
14983
|
+
"decline_reason": {
|
|
14984
|
+
"description": "The author's answer when declining, which the objector sees; null when none was given.",
|
|
14927
14985
|
"type": ["string", "null"]
|
|
14928
14986
|
},
|
|
14929
|
-
"decline_reason": { "type": ["string", "null"] },
|
|
14930
14987
|
"created_at": {
|
|
14931
14988
|
"type": "string",
|
|
14932
14989
|
"format": "date-time"
|
|
@@ -15085,7 +15142,7 @@ const operationManifest = [
|
|
|
15085
15142
|
"binaryResponse": false,
|
|
15086
15143
|
"bodyRequired": false,
|
|
15087
15144
|
"command": "list-email-rules-covering-me",
|
|
15088
|
-
"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.",
|
|
15145
|
+
"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. For what happened to one email of yours, every rule's decision on it and, for another member's rule covering you, who receives what it shares: GET /v1/emails/{id}/rule-results (primitive email-rules list-email-rule-results --email-id <email-id>). 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.",
|
|
15089
15146
|
"hasJsonBody": false,
|
|
15090
15147
|
"method": "GET",
|
|
15091
15148
|
"operationId": "listEmailRulesCoveringMe",
|
|
@@ -15135,6 +15192,10 @@ const operationManifest = [
|
|
|
15135
15192
|
"enum": ["grant", "do_not_share"],
|
|
15136
15193
|
"description": "grant: what it matches can be shared. do_not_share: it blocks sharing what it matches."
|
|
15137
15194
|
},
|
|
15195
|
+
"do_not_share_note": {
|
|
15196
|
+
"description": "On a grant rule: that the active do-not-share rules over an email run first, keeping from it what they match and holding back what they cannot decide, which is decided again for up to a day and shared only if none of them then matches it.",
|
|
15197
|
+
"type": "string"
|
|
15198
|
+
},
|
|
15138
15199
|
"author": {
|
|
15139
15200
|
"type": "object",
|
|
15140
15201
|
"properties": {
|
|
@@ -15658,10 +15719,13 @@ const operationManifest = [
|
|
|
15658
15719
|
"description": "Whether it is to a rule you wrote, in your current membership."
|
|
15659
15720
|
},
|
|
15660
15721
|
"message": {
|
|
15661
|
-
"description": "Why the
|
|
15722
|
+
"description": "Why they object and what they ask (to turn the rule off, narrow it, or explain who receives it); null when none was given, or once withdrawn.",
|
|
15723
|
+
"type": ["string", "null"]
|
|
15724
|
+
},
|
|
15725
|
+
"decline_reason": {
|
|
15726
|
+
"description": "The author's answer when declining, which the objector sees; null when none was given.",
|
|
15662
15727
|
"type": ["string", "null"]
|
|
15663
15728
|
},
|
|
15664
|
-
"decline_reason": { "type": ["string", "null"] },
|
|
15665
15729
|
"created_at": {
|
|
15666
15730
|
"type": "string",
|
|
15667
15731
|
"format": "date-time"
|
|
@@ -15836,6 +15900,44 @@ const operationManifest = [
|
|
|
15836
15900
|
"required": ["checked", "matched"]
|
|
15837
15901
|
}, { "type": "null" }]
|
|
15838
15902
|
},
|
|
15903
|
+
"breadth_scope": {
|
|
15904
|
+
"type": "object",
|
|
15905
|
+
"properties": {
|
|
15906
|
+
"evaluation_scope": {
|
|
15907
|
+
"type": "string",
|
|
15908
|
+
"enum": [
|
|
15909
|
+
"author",
|
|
15910
|
+
"own_mailboxes",
|
|
15911
|
+
"selected"
|
|
15912
|
+
],
|
|
15913
|
+
"description": "author, own_mailboxes or selected, as a rule's evaluation_scope."
|
|
15914
|
+
},
|
|
15915
|
+
"scope_selection": {
|
|
15916
|
+
"type": ["object", "null"],
|
|
15917
|
+
"properties": {
|
|
15918
|
+
"addresses": {
|
|
15919
|
+
"maxItems": 100,
|
|
15920
|
+
"type": "array",
|
|
15921
|
+
"items": {
|
|
15922
|
+
"type": "string",
|
|
15923
|
+
"maxLength": 320
|
|
15924
|
+
}
|
|
15925
|
+
},
|
|
15926
|
+
"domains": {
|
|
15927
|
+
"maxItems": 50,
|
|
15928
|
+
"type": "array",
|
|
15929
|
+
"items": {
|
|
15930
|
+
"type": "string",
|
|
15931
|
+
"maxLength": 253
|
|
15932
|
+
}
|
|
15933
|
+
}
|
|
15934
|
+
},
|
|
15935
|
+
"required": ["addresses", "domains"],
|
|
15936
|
+
"description": "What a selected scope names; null for any other."
|
|
15937
|
+
}
|
|
15938
|
+
},
|
|
15939
|
+
"required": ["evaluation_scope", "scope_selection"]
|
|
15940
|
+
},
|
|
15839
15941
|
"kind": {
|
|
15840
15942
|
"description": "Only grant.",
|
|
15841
15943
|
"type": "string",
|
|
@@ -16125,7 +16227,7 @@ const operationManifest = [
|
|
|
16125
16227
|
"type": ["boolean", "null"]
|
|
16126
16228
|
},
|
|
16127
16229
|
"notice": {
|
|
16128
|
-
"description": "For the member asked, while pending: what the rule actually does (server_explanation), Primitive's warnings,
|
|
16230
|
+
"description": "For the member asked, while pending: what the rule actually does (server_explanation), Primitive's warnings, what accepting would share, then where to see what becomes of one email (rule-results). For the member who asked, once accepted with changes: that the request is not what is shared. Else null.",
|
|
16129
16231
|
"type": ["string", "null"]
|
|
16130
16232
|
}
|
|
16131
16233
|
},
|
|
@@ -16248,7 +16350,7 @@ const operationManifest = [
|
|
|
16248
16350
|
"minimum": 0
|
|
16249
16351
|
},
|
|
16250
16352
|
"objection_notice": {
|
|
16251
|
-
"description": "With pending_objections above 0: that members
|
|
16353
|
+
"description": "With pending_objections above 0: that members objected (each message says what they ask: to turn it off, narrow it or explain it), and how to answer.",
|
|
16252
16354
|
"type": "string"
|
|
16253
16355
|
},
|
|
16254
16356
|
"created_at": {
|
|
@@ -16518,7 +16620,7 @@ const operationManifest = [
|
|
|
16518
16620
|
]
|
|
16519
16621
|
},
|
|
16520
16622
|
"notice": {
|
|
16521
|
-
"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.",
|
|
16623
|
+
"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; when you changed its english, tree or explanation (edited_on_accept; a new name alone is no change), that rule.current is what you agreed to and request what was asked.",
|
|
16522
16624
|
"type": "string"
|
|
16523
16625
|
}
|
|
16524
16626
|
},
|
|
@@ -16787,6 +16889,44 @@ const operationManifest = [
|
|
|
16787
16889
|
"required": ["checked", "matched"]
|
|
16788
16890
|
}, { "type": "null" }]
|
|
16789
16891
|
},
|
|
16892
|
+
"breadth_scope": {
|
|
16893
|
+
"type": "object",
|
|
16894
|
+
"properties": {
|
|
16895
|
+
"evaluation_scope": {
|
|
16896
|
+
"type": "string",
|
|
16897
|
+
"enum": [
|
|
16898
|
+
"author",
|
|
16899
|
+
"own_mailboxes",
|
|
16900
|
+
"selected"
|
|
16901
|
+
],
|
|
16902
|
+
"description": "author, own_mailboxes or selected, as a rule's evaluation_scope."
|
|
16903
|
+
},
|
|
16904
|
+
"scope_selection": {
|
|
16905
|
+
"type": ["object", "null"],
|
|
16906
|
+
"properties": {
|
|
16907
|
+
"addresses": {
|
|
16908
|
+
"maxItems": 100,
|
|
16909
|
+
"type": "array",
|
|
16910
|
+
"items": {
|
|
16911
|
+
"type": "string",
|
|
16912
|
+
"maxLength": 320
|
|
16913
|
+
}
|
|
16914
|
+
},
|
|
16915
|
+
"domains": {
|
|
16916
|
+
"maxItems": 50,
|
|
16917
|
+
"type": "array",
|
|
16918
|
+
"items": {
|
|
16919
|
+
"type": "string",
|
|
16920
|
+
"maxLength": 253
|
|
16921
|
+
}
|
|
16922
|
+
}
|
|
16923
|
+
},
|
|
16924
|
+
"required": ["addresses", "domains"],
|
|
16925
|
+
"description": "What a selected scope names; null for any other."
|
|
16926
|
+
}
|
|
16927
|
+
},
|
|
16928
|
+
"required": ["evaluation_scope", "scope_selection"]
|
|
16929
|
+
},
|
|
16790
16930
|
"sql": {
|
|
16791
16931
|
"description": "Present only when include_sql was true.",
|
|
16792
16932
|
"type": "object",
|
|
@@ -17140,6 +17280,44 @@ const operationManifest = [
|
|
|
17140
17280
|
},
|
|
17141
17281
|
"required": ["checked", "matched"]
|
|
17142
17282
|
}, { "type": "null" }]
|
|
17283
|
+
},
|
|
17284
|
+
"breadth_scope": {
|
|
17285
|
+
"type": "object",
|
|
17286
|
+
"properties": {
|
|
17287
|
+
"evaluation_scope": {
|
|
17288
|
+
"type": "string",
|
|
17289
|
+
"enum": [
|
|
17290
|
+
"author",
|
|
17291
|
+
"own_mailboxes",
|
|
17292
|
+
"selected"
|
|
17293
|
+
],
|
|
17294
|
+
"description": "author, own_mailboxes or selected, as a rule's evaluation_scope."
|
|
17295
|
+
},
|
|
17296
|
+
"scope_selection": {
|
|
17297
|
+
"type": ["object", "null"],
|
|
17298
|
+
"properties": {
|
|
17299
|
+
"addresses": {
|
|
17300
|
+
"maxItems": 100,
|
|
17301
|
+
"type": "array",
|
|
17302
|
+
"items": {
|
|
17303
|
+
"type": "string",
|
|
17304
|
+
"maxLength": 320
|
|
17305
|
+
}
|
|
17306
|
+
},
|
|
17307
|
+
"domains": {
|
|
17308
|
+
"maxItems": 50,
|
|
17309
|
+
"type": "array",
|
|
17310
|
+
"items": {
|
|
17311
|
+
"type": "string",
|
|
17312
|
+
"maxLength": 253
|
|
17313
|
+
}
|
|
17314
|
+
}
|
|
17315
|
+
},
|
|
17316
|
+
"required": ["addresses", "domains"],
|
|
17317
|
+
"description": "What a selected scope names; null for any other."
|
|
17318
|
+
}
|
|
17319
|
+
},
|
|
17320
|
+
"required": ["evaluation_scope", "scope_selection"]
|
|
17143
17321
|
}
|
|
17144
17322
|
},
|
|
17145
17323
|
"required": [
|
|
@@ -17245,7 +17423,7 @@ const operationManifest = [
|
|
|
17245
17423
|
"minimum": 0
|
|
17246
17424
|
},
|
|
17247
17425
|
"objection_notice": {
|
|
17248
|
-
"description": "With pending_objections above 0: that members
|
|
17426
|
+
"description": "With pending_objections above 0: that members objected (each message says what they ask: to turn it off, narrow it or explain it), and how to answer.",
|
|
17249
17427
|
"type": "string"
|
|
17250
17428
|
},
|
|
17251
17429
|
"created_at": {
|
|
@@ -17374,6 +17552,10 @@ const operationManifest = [
|
|
|
17374
17552
|
]
|
|
17375
17553
|
}
|
|
17376
17554
|
},
|
|
17555
|
+
"do_not_share_note": {
|
|
17556
|
+
"description": "On a grant rule's create answer: that active do-not-share rules reaching an email run first: one that matches it keeps it from being shared through this rule, and one that cannot decide it holds it back while it is decided again for up to a day; it is shared through this rule only if none of them then matches it.",
|
|
17557
|
+
"type": "string"
|
|
17558
|
+
},
|
|
17377
17559
|
"expectations": {
|
|
17378
17560
|
"description": "Its saved expectations, each list by email id, as stored: on every create, and on an update that set or removed them.",
|
|
17379
17561
|
"type": "object",
|
|
@@ -17634,7 +17816,7 @@ const operationManifest = [
|
|
|
17634
17816
|
"binaryResponse": false,
|
|
17635
17817
|
"bodyRequired": true,
|
|
17636
17818
|
"command": "create-email-rule-request",
|
|
17637
|
-
"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).",
|
|
17819
|
+
"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. With an Idempotency-Key, asking again for exactly what a pending request of yours to the same member asks (name, english, tree, explanation and message, naming them the same way) returns that request with existing: true (200), so a retry never asks them twice. 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).",
|
|
17638
17820
|
"hasJsonBody": true,
|
|
17639
17821
|
"method": "POST",
|
|
17640
17822
|
"operationId": "createEmailRuleRequest",
|
|
@@ -17642,7 +17824,7 @@ const operationManifest = [
|
|
|
17642
17824
|
"pathParams": [],
|
|
17643
17825
|
"queryParams": [],
|
|
17644
17826
|
"headerParams": [{
|
|
17645
|
-
"description": "Optional,
|
|
17827
|
+
"description": "Optional. With a key, a create identical to a pending request of yours to the same member (name, english, tree, explanation and message, naming the member the same way) returns that request with existing: true (200) instead of making a second one. The key itself is not stored, so any key does this, and a create without one is never matched to an existing request. A key that is empty, longer than 255 characters or not printable ASCII is refused with 400 `validation_error`; a valid one is echoed in the Idempotency-Key response header.",
|
|
17646
17828
|
"enum": null,
|
|
17647
17829
|
"name": "Idempotency-Key",
|
|
17648
17830
|
"required": false,
|
|
@@ -17783,6 +17965,44 @@ const operationManifest = [
|
|
|
17783
17965
|
"required": ["checked", "matched"]
|
|
17784
17966
|
}, { "type": "null" }]
|
|
17785
17967
|
},
|
|
17968
|
+
"breadth_scope": {
|
|
17969
|
+
"type": "object",
|
|
17970
|
+
"properties": {
|
|
17971
|
+
"evaluation_scope": {
|
|
17972
|
+
"type": "string",
|
|
17973
|
+
"enum": [
|
|
17974
|
+
"author",
|
|
17975
|
+
"own_mailboxes",
|
|
17976
|
+
"selected"
|
|
17977
|
+
],
|
|
17978
|
+
"description": "author, own_mailboxes or selected, as a rule's evaluation_scope."
|
|
17979
|
+
},
|
|
17980
|
+
"scope_selection": {
|
|
17981
|
+
"type": ["object", "null"],
|
|
17982
|
+
"properties": {
|
|
17983
|
+
"addresses": {
|
|
17984
|
+
"maxItems": 100,
|
|
17985
|
+
"type": "array",
|
|
17986
|
+
"items": {
|
|
17987
|
+
"type": "string",
|
|
17988
|
+
"maxLength": 320
|
|
17989
|
+
}
|
|
17990
|
+
},
|
|
17991
|
+
"domains": {
|
|
17992
|
+
"maxItems": 50,
|
|
17993
|
+
"type": "array",
|
|
17994
|
+
"items": {
|
|
17995
|
+
"type": "string",
|
|
17996
|
+
"maxLength": 253
|
|
17997
|
+
}
|
|
17998
|
+
}
|
|
17999
|
+
},
|
|
18000
|
+
"required": ["addresses", "domains"],
|
|
18001
|
+
"description": "What a selected scope names; null for any other."
|
|
18002
|
+
}
|
|
18003
|
+
},
|
|
18004
|
+
"required": ["evaluation_scope", "scope_selection"]
|
|
18005
|
+
},
|
|
17786
18006
|
"kind": {
|
|
17787
18007
|
"description": "Only grant.",
|
|
17788
18008
|
"type": "string",
|
|
@@ -17958,7 +18178,7 @@ const operationManifest = [
|
|
|
17958
18178
|
"type": ["boolean", "null"]
|
|
17959
18179
|
},
|
|
17960
18180
|
"notice": {
|
|
17961
|
-
"description": "For the member asked, while pending: what the rule actually does (server_explanation), Primitive's warnings,
|
|
18181
|
+
"description": "For the member asked, while pending: what the rule actually does (server_explanation), Primitive's warnings, what accepting would share, then where to see what becomes of one email (rule-results). For the member who asked, once accepted with changes: that the request is not what is shared. Else null.",
|
|
17962
18182
|
"type": ["string", "null"]
|
|
17963
18183
|
},
|
|
17964
18184
|
"target_can_accept": {
|
|
@@ -17968,6 +18188,11 @@ const operationManifest = [
|
|
|
17968
18188
|
"target_warning": {
|
|
17969
18189
|
"description": "Why the member asked cannot accept it yet, naming the permission their role lacks. The request is still sent. Null when they can, or when target_can_accept is null.",
|
|
17970
18190
|
"type": ["string", "null"]
|
|
18191
|
+
},
|
|
18192
|
+
"existing": {
|
|
18193
|
+
"description": "Present, as true, when the create carried an Idempotency-Key and you already had a pending request to this member asking exactly this (name, english, tree, explanation and message, naming the member the same way): that request is returned (200), and no second one is made or sent.",
|
|
18194
|
+
"type": "boolean",
|
|
18195
|
+
"const": true
|
|
17971
18196
|
}
|
|
17972
18197
|
},
|
|
17973
18198
|
"required": [
|
|
@@ -18196,7 +18421,7 @@ const operationManifest = [
|
|
|
18196
18421
|
"type": ["boolean", "null"]
|
|
18197
18422
|
},
|
|
18198
18423
|
"notice": {
|
|
18199
|
-
"description": "For the member asked, while pending: what the rule actually does (server_explanation), Primitive's warnings,
|
|
18424
|
+
"description": "For the member asked, while pending: what the rule actually does (server_explanation), Primitive's warnings, what accepting would share, then where to see what becomes of one email (rule-results). For the member who asked, once accepted with changes: that the request is not what is shared. Else null.",
|
|
18200
18425
|
"type": ["string", "null"]
|
|
18201
18426
|
}
|
|
18202
18427
|
},
|
|
@@ -18470,7 +18695,7 @@ const operationManifest = [
|
|
|
18470
18695
|
"format": "uuid"
|
|
18471
18696
|
},
|
|
18472
18697
|
"kind": {
|
|
18473
|
-
"description": "For an unsaved tree: do_not_share tests it as a rule that blocks sharing, so an email it cannot decide counts as matched. A saved rule uses its own.",
|
|
18698
|
+
"description": "For an unsaved tree: do_not_share tests it as a rule that blocks sharing, so an email it cannot decide counts as matched. A saved rule or a request uses its own.",
|
|
18474
18699
|
"type": "string",
|
|
18475
18700
|
"enum": ["grant", "do_not_share"]
|
|
18476
18701
|
},
|
|
@@ -18821,7 +19046,7 @@ const operationManifest = [
|
|
|
18821
19046
|
"minimum": 0
|
|
18822
19047
|
},
|
|
18823
19048
|
"objection_notice": {
|
|
18824
|
-
"description": "With pending_objections above 0: that members
|
|
19049
|
+
"description": "With pending_objections above 0: that members objected (each message says what they ask: to turn it off, narrow it or explain it), and how to answer.",
|
|
18825
19050
|
"type": "string"
|
|
18826
19051
|
},
|
|
18827
19052
|
"created_at": {
|
|
@@ -19258,7 +19483,7 @@ const operationManifest = [
|
|
|
19258
19483
|
"type": ["boolean", "null"]
|
|
19259
19484
|
},
|
|
19260
19485
|
"notice": {
|
|
19261
|
-
"description": "For the member asked, while pending: what the rule actually does (server_explanation), Primitive's warnings,
|
|
19486
|
+
"description": "For the member asked, while pending: what the rule actually does (server_explanation), Primitive's warnings, what accepting would share, then where to see what becomes of one email (rule-results). For the member who asked, once accepted with changes: that the request is not what is shared. Else null.",
|
|
19262
19487
|
"type": ["string", "null"]
|
|
19263
19488
|
}
|
|
19264
19489
|
},
|
|
@@ -20157,7 +20382,7 @@ const operationManifest = [
|
|
|
20157
20382
|
"type": ["boolean", "null"]
|
|
20158
20383
|
},
|
|
20159
20384
|
"notice": {
|
|
20160
|
-
"description": "For the member asked, while pending: what the rule actually does (server_explanation), Primitive's warnings,
|
|
20385
|
+
"description": "For the member asked, while pending: what the rule actually does (server_explanation), Primitive's warnings, what accepting would share, then where to see what becomes of one email (rule-results). For the member who asked, once accepted with changes: that the request is not what is shared. Else null.",
|
|
20161
20386
|
"type": ["string", "null"]
|
|
20162
20387
|
}
|
|
20163
20388
|
},
|
|
@@ -20412,9 +20637,10 @@ const operationManifest = [
|
|
|
20412
20637
|
"enum": [
|
|
20413
20638
|
"draft",
|
|
20414
20639
|
"created_after_email",
|
|
20640
|
+
"outside_scope",
|
|
20415
20641
|
null
|
|
20416
20642
|
],
|
|
20417
|
-
"description": "What is known about a rule with no result on this email. draft: the rule is a draft now. created_after_email: the rule was created after the email arrived. Null when it has a result, or when nothing is known."
|
|
20643
|
+
"description": "What is known about a rule with no result on this email. draft: the rule is a draft now. created_after_email: the rule was created after the email arrived. outside_scope: the mailbox this email is in is outside what its scope names (its author's own mailboxes, its selection, or all its author reads now), so it does not decide on it. Null when it has a result, or when nothing is known (it may not have decided yet)."
|
|
20418
20644
|
},
|
|
20419
20645
|
"author_left": {
|
|
20420
20646
|
"description": "On a do-not-share rule whose author is no longer a member of the organization: it blocks nothing now, whatever it decided. Absent otherwise.",
|
|
@@ -21609,7 +21835,7 @@ const operationManifest = [
|
|
|
21609
21835
|
"minimum": 0
|
|
21610
21836
|
},
|
|
21611
21837
|
"objection_notice": {
|
|
21612
|
-
"description": "With pending_objections above 0: that members
|
|
21838
|
+
"description": "With pending_objections above 0: that members objected (each message says what they ask: to turn it off, narrow it or explain it), and how to answer.",
|
|
21613
21839
|
"type": "string"
|
|
21614
21840
|
},
|
|
21615
21841
|
"created_at": {
|
|
@@ -21852,7 +22078,7 @@ const operationManifest = [
|
|
|
21852
22078
|
"binaryResponse": false,
|
|
21853
22079
|
"bodyRequired": true,
|
|
21854
22080
|
"command": "test-email-rule",
|
|
21855
|
-
"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,
|
|
22081
|
+
"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, a saved rule by rule_id (its current version, as its author), or a pending rule request by request_id (its rule as asked, as you, over your own mailboxes). 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).",
|
|
21856
22082
|
"hasJsonBody": true,
|
|
21857
22083
|
"method": "POST",
|
|
21858
22084
|
"operationId": "testEmailRule",
|
|
@@ -21942,8 +22168,13 @@ const operationManifest = [
|
|
|
21942
22168
|
"type": "string",
|
|
21943
22169
|
"format": "uuid"
|
|
21944
22170
|
},
|
|
22171
|
+
"request_id": {
|
|
22172
|
+
"description": "A pending rule request you can see: its rule as asked, tested as you over your own mailboxes (what accepting would share, for the member asked). Give one of tree, rule_id and request_id.",
|
|
22173
|
+
"type": "string",
|
|
22174
|
+
"format": "uuid"
|
|
22175
|
+
},
|
|
21945
22176
|
"kind": {
|
|
21946
|
-
"description": "For an unsaved tree: do_not_share tests it as a rule that blocks sharing, so an email it cannot decide counts as matched. A saved rule uses its own.",
|
|
22177
|
+
"description": "For an unsaved tree: do_not_share tests it as a rule that blocks sharing, so an email it cannot decide counts as matched. A saved rule or a request uses its own.",
|
|
21947
22178
|
"type": "string",
|
|
21948
22179
|
"enum": ["grant", "do_not_share"]
|
|
21949
22180
|
},
|
|
@@ -22148,6 +22379,54 @@ const operationManifest = [
|
|
|
22148
22379
|
"type": "integer",
|
|
22149
22380
|
"minimum": 0,
|
|
22150
22381
|
"description": "The most emails the recent window holds: 200, less one place per expected email."
|
|
22382
|
+
},
|
|
22383
|
+
"scope": {
|
|
22384
|
+
"type": "object",
|
|
22385
|
+
"properties": {
|
|
22386
|
+
"evaluation_scope": {
|
|
22387
|
+
"type": "string",
|
|
22388
|
+
"enum": [
|
|
22389
|
+
"author",
|
|
22390
|
+
"own_mailboxes",
|
|
22391
|
+
"selected"
|
|
22392
|
+
],
|
|
22393
|
+
"description": "author, own_mailboxes or selected, as a rule's evaluation_scope."
|
|
22394
|
+
},
|
|
22395
|
+
"scope_selection": {
|
|
22396
|
+
"type": ["object", "null"],
|
|
22397
|
+
"properties": {
|
|
22398
|
+
"addresses": {
|
|
22399
|
+
"maxItems": 100,
|
|
22400
|
+
"type": "array",
|
|
22401
|
+
"items": {
|
|
22402
|
+
"type": "string",
|
|
22403
|
+
"maxLength": 320
|
|
22404
|
+
}
|
|
22405
|
+
},
|
|
22406
|
+
"domains": {
|
|
22407
|
+
"maxItems": 50,
|
|
22408
|
+
"type": "array",
|
|
22409
|
+
"items": {
|
|
22410
|
+
"type": "string",
|
|
22411
|
+
"maxLength": 253
|
|
22412
|
+
}
|
|
22413
|
+
}
|
|
22414
|
+
},
|
|
22415
|
+
"required": ["addresses", "domains"],
|
|
22416
|
+
"description": "What a selected scope names; null for any other."
|
|
22417
|
+
}
|
|
22418
|
+
},
|
|
22419
|
+
"required": ["evaluation_scope", "scope_selection"]
|
|
22420
|
+
},
|
|
22421
|
+
"oldest_at": {
|
|
22422
|
+
"type": ["string", "null"],
|
|
22423
|
+
"format": "date-time",
|
|
22424
|
+
"description": "When the oldest email tested arrived, expected ones included; null when none was. The window is the newest 200 the scope reaches, so a narrower scope reaches further back: compare counts only over the same scope and span."
|
|
22425
|
+
},
|
|
22426
|
+
"newest_at": {
|
|
22427
|
+
"type": ["string", "null"],
|
|
22428
|
+
"format": "date-time",
|
|
22429
|
+
"description": "When the newest email tested arrived; null when none was."
|
|
22151
22430
|
}
|
|
22152
22431
|
},
|
|
22153
22432
|
"required": [
|
|
@@ -22654,7 +22933,7 @@ const operationManifest = [
|
|
|
22654
22933
|
"binaryResponse": false,
|
|
22655
22934
|
"bodyRequired": true,
|
|
22656
22935
|
"command": "test-email-rule-on-sample",
|
|
22657
|
-
"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
|
|
22936
|
+
"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, a saved rule by rule_id, or a pending rule request by request_id (its rule as asked, as you). 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).",
|
|
22658
22937
|
"hasJsonBody": true,
|
|
22659
22938
|
"method": "POST",
|
|
22660
22939
|
"operationId": "testEmailRuleOnSample",
|
|
@@ -22744,8 +23023,13 @@ const operationManifest = [
|
|
|
22744
23023
|
"type": "string",
|
|
22745
23024
|
"format": "uuid"
|
|
22746
23025
|
},
|
|
23026
|
+
"request_id": {
|
|
23027
|
+
"description": "A pending rule request you can see: its rule as asked, tested as you over your own mailboxes (what accepting would share, for the member asked). Give one of tree, rule_id and request_id.",
|
|
23028
|
+
"type": "string",
|
|
23029
|
+
"format": "uuid"
|
|
23030
|
+
},
|
|
22747
23031
|
"kind": {
|
|
22748
|
-
"description": "For an unsaved tree: do_not_share tests it as a rule that blocks sharing, so an email it cannot decide counts as matched. A saved rule uses its own.",
|
|
23032
|
+
"description": "For an unsaved tree: do_not_share tests it as a rule that blocks sharing, so an email it cannot decide counts as matched. A saved rule or a request uses its own.",
|
|
22749
23033
|
"type": "string",
|
|
22750
23034
|
"enum": ["grant", "do_not_share"]
|
|
22751
23035
|
},
|
|
@@ -22844,6 +23128,10 @@ const operationManifest = [
|
|
|
22844
23128
|
],
|
|
22845
23129
|
"additionalProperties": false,
|
|
22846
23130
|
"description": "A made-up received email. Nothing about it is stored."
|
|
23131
|
+
},
|
|
23132
|
+
"with_protection": {
|
|
23133
|
+
"description": "With true, a grant rule that matches is also judged against the active do-not-share rules over the first recipient's mailbox, which you must read in full and the rule must run over; see protection. Limited to 20 an hour per member.",
|
|
23134
|
+
"type": "boolean"
|
|
22847
23135
|
}
|
|
22848
23136
|
},
|
|
22849
23137
|
"required": ["email"],
|
|
@@ -23000,6 +23288,59 @@ const operationManifest = [
|
|
|
23000
23288
|
"required": ["value", "confidence"]
|
|
23001
23289
|
},
|
|
23002
23290
|
"description": "What the classifier read from the email, by fact: its value and confidence."
|
|
23291
|
+
},
|
|
23292
|
+
"protection": {
|
|
23293
|
+
"description": "With with_protection: whether a match would be shared. Nothing is stored.",
|
|
23294
|
+
"type": "object",
|
|
23295
|
+
"properties": {
|
|
23296
|
+
"mailbox": {
|
|
23297
|
+
"type": "string",
|
|
23298
|
+
"description": "The mailbox judged: the first recipient."
|
|
23299
|
+
},
|
|
23300
|
+
"outcome": {
|
|
23301
|
+
"type": "string",
|
|
23302
|
+
"enum": [
|
|
23303
|
+
"shared",
|
|
23304
|
+
"withheld",
|
|
23305
|
+
"not_matched"
|
|
23306
|
+
],
|
|
23307
|
+
"description": "not_matched: the rule did not match, so nothing would be shared and no do-not-share rule was judged."
|
|
23308
|
+
},
|
|
23309
|
+
"withheld_by": {
|
|
23310
|
+
"type": "array",
|
|
23311
|
+
"items": {
|
|
23312
|
+
"type": "object",
|
|
23313
|
+
"properties": {
|
|
23314
|
+
"id": {
|
|
23315
|
+
"type": "string",
|
|
23316
|
+
"format": "uuid"
|
|
23317
|
+
},
|
|
23318
|
+
"name": { "type": "string" },
|
|
23319
|
+
"reason": {
|
|
23320
|
+
"type": "string",
|
|
23321
|
+
"enum": ["matched", "undecided"]
|
|
23322
|
+
}
|
|
23323
|
+
},
|
|
23324
|
+
"required": [
|
|
23325
|
+
"id",
|
|
23326
|
+
"name",
|
|
23327
|
+
"reason"
|
|
23328
|
+
]
|
|
23329
|
+
},
|
|
23330
|
+
"description": "Do-not-share rules you can see that would keep it from being shared. undecided: left undecided as real mail would leave it, or not reached by this test (past 50 rules, 10 rules' questions, or the time limit); it is held back either way."
|
|
23331
|
+
},
|
|
23332
|
+
"withheld_by_hidden": {
|
|
23333
|
+
"type": "integer",
|
|
23334
|
+
"minimum": 0,
|
|
23335
|
+
"description": "Rules you cannot see that would."
|
|
23336
|
+
}
|
|
23337
|
+
},
|
|
23338
|
+
"required": [
|
|
23339
|
+
"mailbox",
|
|
23340
|
+
"outcome",
|
|
23341
|
+
"withheld_by",
|
|
23342
|
+
"withheld_by_hidden"
|
|
23343
|
+
]
|
|
23003
23344
|
}
|
|
23004
23345
|
},
|
|
23005
23346
|
"required": [
|
|
@@ -23161,6 +23502,44 @@ const operationManifest = [
|
|
|
23161
23502
|
"required": ["checked", "matched"]
|
|
23162
23503
|
}, { "type": "null" }]
|
|
23163
23504
|
},
|
|
23505
|
+
"breadth_scope": {
|
|
23506
|
+
"type": "object",
|
|
23507
|
+
"properties": {
|
|
23508
|
+
"evaluation_scope": {
|
|
23509
|
+
"type": "string",
|
|
23510
|
+
"enum": [
|
|
23511
|
+
"author",
|
|
23512
|
+
"own_mailboxes",
|
|
23513
|
+
"selected"
|
|
23514
|
+
],
|
|
23515
|
+
"description": "author, own_mailboxes or selected, as a rule's evaluation_scope."
|
|
23516
|
+
},
|
|
23517
|
+
"scope_selection": {
|
|
23518
|
+
"type": ["object", "null"],
|
|
23519
|
+
"properties": {
|
|
23520
|
+
"addresses": {
|
|
23521
|
+
"maxItems": 100,
|
|
23522
|
+
"type": "array",
|
|
23523
|
+
"items": {
|
|
23524
|
+
"type": "string",
|
|
23525
|
+
"maxLength": 320
|
|
23526
|
+
}
|
|
23527
|
+
},
|
|
23528
|
+
"domains": {
|
|
23529
|
+
"maxItems": 50,
|
|
23530
|
+
"type": "array",
|
|
23531
|
+
"items": {
|
|
23532
|
+
"type": "string",
|
|
23533
|
+
"maxLength": 253
|
|
23534
|
+
}
|
|
23535
|
+
}
|
|
23536
|
+
},
|
|
23537
|
+
"required": ["addresses", "domains"],
|
|
23538
|
+
"description": "What a selected scope names; null for any other."
|
|
23539
|
+
}
|
|
23540
|
+
},
|
|
23541
|
+
"required": ["evaluation_scope", "scope_selection"]
|
|
23542
|
+
},
|
|
23164
23543
|
"kind": {
|
|
23165
23544
|
"description": "Must be the rule's own (400 kind_mismatch).",
|
|
23166
23545
|
"type": "string",
|
|
@@ -23576,7 +23955,7 @@ const operationManifest = [
|
|
|
23576
23955
|
"minimum": 0
|
|
23577
23956
|
},
|
|
23578
23957
|
"objection_notice": {
|
|
23579
|
-
"description": "With pending_objections above 0: that members
|
|
23958
|
+
"description": "With pending_objections above 0: that members objected (each message says what they ask: to turn it off, narrow it or explain it), and how to answer.",
|
|
23580
23959
|
"type": "string"
|
|
23581
23960
|
},
|
|
23582
23961
|
"created_at": {
|
|
@@ -23705,6 +24084,10 @@ const operationManifest = [
|
|
|
23705
24084
|
]
|
|
23706
24085
|
}
|
|
23707
24086
|
},
|
|
24087
|
+
"do_not_share_note": {
|
|
24088
|
+
"description": "On a grant rule's create answer: that active do-not-share rules reaching an email run first: one that matches it keeps it from being shared through this rule, and one that cannot decide it holds it back while it is decided again for up to a day; it is shared through this rule only if none of them then matches it.",
|
|
24089
|
+
"type": "string"
|
|
24090
|
+
},
|
|
23708
24091
|
"expectations": {
|
|
23709
24092
|
"description": "Its saved expectations, each list by email id, as stored: on every create, and on an update that set or removed them.",
|
|
23710
24093
|
"type": "object",
|
|
@@ -24150,7 +24533,7 @@ const operationManifest = [
|
|
|
24150
24533
|
"type": ["boolean", "null"]
|
|
24151
24534
|
},
|
|
24152
24535
|
"notice": {
|
|
24153
|
-
"description": "For the member asked, while pending: what the rule actually does (server_explanation), Primitive's warnings,
|
|
24536
|
+
"description": "For the member asked, while pending: what the rule actually does (server_explanation), Primitive's warnings, what accepting would share, then where to see what becomes of one email (rule-results). For the member who asked, once accepted with changes: that the request is not what is shared. Else null.",
|
|
24154
24537
|
"type": ["string", "null"]
|
|
24155
24538
|
}
|
|
24156
24539
|
},
|
|
@@ -24868,16 +25251,27 @@ const operationManifest = [
|
|
|
24868
25251
|
null
|
|
24869
25252
|
]
|
|
24870
25253
|
},
|
|
24871
|
-
"webhook_attempt_count": {
|
|
25254
|
+
"webhook_attempt_count": {
|
|
25255
|
+
"type": "integer",
|
|
25256
|
+
"description": "The email's own routed delivery only (where routing sent it); a rule's deliveries never change this, and are in `rule_deliveries` on GET /emails/{id} for the mailbox's owner. Its attempts."
|
|
25257
|
+
},
|
|
24872
25258
|
"webhook_last_attempt_at": {
|
|
24873
25259
|
"type": ["string", "null"],
|
|
24874
|
-
"format": "date-time"
|
|
25260
|
+
"format": "date-time",
|
|
25261
|
+
"description": "The email's own routed delivery only (where routing sent it); a rule's deliveries never change this, and are in `rule_deliveries` on GET /emails/{id} for the mailbox's owner. Its last attempt."
|
|
25262
|
+
},
|
|
25263
|
+
"webhook_last_status_code": {
|
|
25264
|
+
"type": ["integer", "null"],
|
|
25265
|
+
"description": "The email's own routed delivery only (where routing sent it); a rule's deliveries never change this, and are in `rule_deliveries` on GET /emails/{id} for the mailbox's owner. What it last answered."
|
|
25266
|
+
},
|
|
25267
|
+
"webhook_last_error": {
|
|
25268
|
+
"type": ["string", "null"],
|
|
25269
|
+
"description": "The email's own routed delivery only (where routing sent it); a rule's deliveries never change this, and are in `rule_deliveries` on GET /emails/{id} for the mailbox's owner. Its last error."
|
|
24875
25270
|
},
|
|
24876
|
-
"webhook_last_status_code": { "type": ["integer", "null"] },
|
|
24877
|
-
"webhook_last_error": { "type": ["string", "null"] },
|
|
24878
25271
|
"webhook_fired_at": {
|
|
24879
25272
|
"type": ["string", "null"],
|
|
24880
|
-
"format": "date-time"
|
|
25273
|
+
"format": "date-time",
|
|
25274
|
+
"description": "The email's own routed delivery only (where routing sent it); a rule's deliveries never change this, and are in `rule_deliveries` on GET /emails/{id} for the mailbox's owner. When it was delivered."
|
|
24881
25275
|
},
|
|
24882
25276
|
"smtp_helo": { "type": ["string", "null"] },
|
|
24883
25277
|
"smtp_mail_from": {
|
|
@@ -25431,6 +25825,81 @@ const operationManifest = [
|
|
|
25431
25825
|
}
|
|
25432
25826
|
}
|
|
25433
25827
|
},
|
|
25828
|
+
"rule_deliveries": {
|
|
25829
|
+
"type": ["object", "null"],
|
|
25830
|
+
"description": "Where Email Rules delivered this email by webhook, for the owner of the mailbox it is at, on their own dashboard session or the Primitive CLI. Null for everyone else, and when it could not be read in time. A key reading it through a rule is not a delivery.",
|
|
25831
|
+
"required": [
|
|
25832
|
+
"rules",
|
|
25833
|
+
"hidden",
|
|
25834
|
+
"complete"
|
|
25835
|
+
],
|
|
25836
|
+
"properties": {
|
|
25837
|
+
"rules": {
|
|
25838
|
+
"type": "array",
|
|
25839
|
+
"description": "Each rule over your mail that queued a webhook delivery of this email, newest rule first.",
|
|
25840
|
+
"items": {
|
|
25841
|
+
"type": "object",
|
|
25842
|
+
"required": [
|
|
25843
|
+
"rule_id",
|
|
25844
|
+
"name",
|
|
25845
|
+
"delivered",
|
|
25846
|
+
"pending",
|
|
25847
|
+
"failed",
|
|
25848
|
+
"not_sent",
|
|
25849
|
+
"hosts",
|
|
25850
|
+
"hosts_not_listed"
|
|
25851
|
+
],
|
|
25852
|
+
"properties": {
|
|
25853
|
+
"rule_id": {
|
|
25854
|
+
"type": "string",
|
|
25855
|
+
"format": "uuid",
|
|
25856
|
+
"description": "The rule. A webhook sent it through several rules counts under one."
|
|
25857
|
+
},
|
|
25858
|
+
"name": { "type": "string" },
|
|
25859
|
+
"delivered": {
|
|
25860
|
+
"type": "integer",
|
|
25861
|
+
"minimum": 0,
|
|
25862
|
+
"description": "Webhooks it was delivered to."
|
|
25863
|
+
},
|
|
25864
|
+
"pending": {
|
|
25865
|
+
"type": "integer",
|
|
25866
|
+
"minimum": 0,
|
|
25867
|
+
"description": "Webhooks still owed it."
|
|
25868
|
+
},
|
|
25869
|
+
"failed": {
|
|
25870
|
+
"type": "integer",
|
|
25871
|
+
"minimum": 0,
|
|
25872
|
+
"description": "Webhooks whose attempts gave up."
|
|
25873
|
+
},
|
|
25874
|
+
"not_sent": {
|
|
25875
|
+
"type": "integer",
|
|
25876
|
+
"minimum": 0,
|
|
25877
|
+
"description": "Webhooks it was not sent to after all."
|
|
25878
|
+
},
|
|
25879
|
+
"hosts": {
|
|
25880
|
+
"type": "array",
|
|
25881
|
+
"items": { "type": "string" },
|
|
25882
|
+
"description": "The sites it was delivered to at the time, named as the covering view names sites; they may differ from the rule's current receivers there."
|
|
25883
|
+
},
|
|
25884
|
+
"hosts_not_listed": {
|
|
25885
|
+
"type": "integer",
|
|
25886
|
+
"minimum": 0,
|
|
25887
|
+
"description": "Sites past the listed ones."
|
|
25888
|
+
}
|
|
25889
|
+
}
|
|
25890
|
+
}
|
|
25891
|
+
},
|
|
25892
|
+
"hidden": {
|
|
25893
|
+
"type": "integer",
|
|
25894
|
+
"minimum": 0,
|
|
25895
|
+
"description": "Rules that queued a delivery of it that are not listed: they do not cover your mailboxes now, or are past the 50 one answer judges."
|
|
25896
|
+
},
|
|
25897
|
+
"complete": {
|
|
25898
|
+
"type": "boolean",
|
|
25899
|
+
"description": "False when a delivery may be missing: the email is older than 14 days, or it has more deliveries or rules than one answer reads."
|
|
25900
|
+
}
|
|
25901
|
+
}
|
|
25902
|
+
},
|
|
25434
25903
|
"from_name": {
|
|
25435
25904
|
"type": ["string", "null"],
|
|
25436
25905
|
"description": "Display name from the `From:` header, decoded for display: RFC 2047 encoded words are decoded in their declared charset and folded lines are joined (e.g. `Dana Rúiz` for `=?UTF-8?Q?Dana_R=C3=BAiz?= <dana@example.com>`). Null when the header carries no display name. For display only: identify the sender by `from_email`, never by this name, which the sender chooses freely."
|
|
@@ -26326,7 +26795,10 @@ const operationManifest = [
|
|
|
26326
26795
|
null
|
|
26327
26796
|
]
|
|
26328
26797
|
},
|
|
26329
|
-
"webhook_attempt_count": {
|
|
26798
|
+
"webhook_attempt_count": {
|
|
26799
|
+
"type": "integer",
|
|
26800
|
+
"description": "The email's own routed delivery only (where routing sent it); a rule's deliveries never change this, and are in `rule_deliveries` on GET /emails/{id} for the mailbox's owner. Its attempts."
|
|
26801
|
+
},
|
|
26330
26802
|
"thread_id": {
|
|
26331
26803
|
"type": ["string", "null"],
|
|
26332
26804
|
"format": "uuid",
|
|
@@ -27061,7 +27533,10 @@ const operationManifest = [
|
|
|
27061
27533
|
null
|
|
27062
27534
|
]
|
|
27063
27535
|
},
|
|
27064
|
-
"webhook_attempt_count": {
|
|
27536
|
+
"webhook_attempt_count": {
|
|
27537
|
+
"type": "integer",
|
|
27538
|
+
"description": "The email's own routed delivery only (where routing sent it); a rule's deliveries never change this, and are in `rule_deliveries` on GET /emails/{id} for the mailbox's owner. Its attempts."
|
|
27539
|
+
},
|
|
27065
27540
|
"thread_id": {
|
|
27066
27541
|
"type": ["string", "null"],
|
|
27067
27542
|
"format": "uuid",
|
|
@@ -47218,7 +47693,7 @@ const operationManifest = [
|
|
|
47218
47693
|
"type": "object",
|
|
47219
47694
|
"additionalProperties": false,
|
|
47220
47695
|
"required": ["url"],
|
|
47221
|
-
"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
|
|
47696
|
+
"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 a message would get the same `url`, so another recipient could unsubscribe whoever it identifies: a reply with `unsubscribe` must go to the one address it answers, and one with `reply_all` that adds a cc is refused with a `validation_error`. 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.",
|
|
47222
47697
|
"properties": {
|
|
47223
47698
|
"url": {
|
|
47224
47699
|
"type": "string",
|
|
@@ -48406,7 +48881,7 @@ const operationManifest = [
|
|
|
48406
48881
|
"type": "object",
|
|
48407
48882
|
"additionalProperties": false,
|
|
48408
48883
|
"required": ["url"],
|
|
48409
|
-
"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
|
|
48884
|
+
"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 a message would get the same `url`, so another recipient could unsubscribe whoever it identifies: a send with `unsubscribe` must have exactly one recipient, one entry across `to`, `cc` and `bcc` (an address given twice counts twice), and a send to more is refused with a `validation_error`. Send one message per recipient, for example with `POST /v1/send-mail/batch`. 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.",
|
|
48410
48885
|
"properties": {
|
|
48411
48886
|
"url": {
|
|
48412
48887
|
"type": "string",
|
|
@@ -48913,7 +49388,7 @@ const operationManifest = [
|
|
|
48913
49388
|
"type": "object",
|
|
48914
49389
|
"additionalProperties": false,
|
|
48915
49390
|
"required": ["url"],
|
|
48916
|
-
"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
|
|
49391
|
+
"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 a message would get the same `url`, so another recipient could unsubscribe whoever it identifies: a send with `unsubscribe` must have exactly one recipient, one entry across `to`, `cc` and `bcc` (an address given twice counts twice), and a send to more is refused with a `validation_error`. Send one message per recipient, for example with `POST /v1/send-mail/batch`. 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.",
|
|
48917
49392
|
"properties": {
|
|
48918
49393
|
"url": {
|
|
48919
49394
|
"type": "string",
|
|
@@ -54616,7 +55091,11 @@ function writtenEmailRuleReport(data, request) {
|
|
|
54616
55091
|
if (restored) lines.push(restored);
|
|
54617
55092
|
const reach = affectsLine(rule.affects);
|
|
54618
55093
|
if (reach) lines.push(reach);
|
|
54619
|
-
for (const note of [
|
|
55094
|
+
for (const note of [
|
|
55095
|
+
rule.share_notice,
|
|
55096
|
+
rule.notice,
|
|
55097
|
+
rule.do_not_share_note
|
|
55098
|
+
]) {
|
|
54620
55099
|
const line = noteLine(note);
|
|
54621
55100
|
if (line) lines.push(line);
|
|
54622
55101
|
}
|
|
@@ -54838,6 +55317,25 @@ function updateEmailRuleErrorExitCode(payload) {
|
|
|
54838
55317
|
function undecidedSamplesMayStay(count, reason) {
|
|
54839
55318
|
return count > 0 && !RETRYABLE_REASONS.has(reason) && reason !== "author_unresolvable";
|
|
54840
55319
|
}
|
|
55320
|
+
/**
|
|
55321
|
+
* The stderr report of test-email-rule-on-sample with --with-protection:
|
|
55322
|
+
* whether a match would be shared, and the do-not-share rules that would
|
|
55323
|
+
* keep it from being shared. Nothing without protection in the answer.
|
|
55324
|
+
*/
|
|
55325
|
+
function testSampleProtectionReport(data) {
|
|
55326
|
+
if (!isRecord(data) || !isRecord(data.protection)) return { lines: [] };
|
|
55327
|
+
const protection = data.protection;
|
|
55328
|
+
const mailbox = typeof protection.mailbox === "string" && protection.mailbox ? ` over ${protection.mailbox}` : "";
|
|
55329
|
+
if (protection.outcome === "not_matched") return { lines: [`Protection${mailbox}: the rule did not match, so nothing would be shared and no do-not-share rule was judged.`] };
|
|
55330
|
+
if (protection.outcome === "shared") return { lines: [`Protection${mailbox}: a match would be shared; no do-not-share rule keeps it back.`] };
|
|
55331
|
+
if (protection.outcome !== "withheld") return { lines: [] };
|
|
55332
|
+
const withheld = (Array.isArray(protection.withheld_by) ? protection.withheld_by : []).filter(isRecord);
|
|
55333
|
+
const named = withheld.map((rule) => `${typeof rule.name === "string" ? rule.name : "a rule"} (${rule.id}, ${rule.reason === "undecided" ? "undecided" : "matched"})`);
|
|
55334
|
+
const hidden = typeof protection.withheld_by_hidden === "number" && protection.withheld_by_hidden > 0 ? protection.withheld_by_hidden : 0;
|
|
55335
|
+
const by = [...named, ...hidden > 0 ? [plural$1(hidden, "rule you cannot see", "rules you cannot see")] : []];
|
|
55336
|
+
const undecided = withheld.some((rule) => rule.reason === "undecided") ? " An undecided one holds it back until it is decided." : "";
|
|
55337
|
+
return { lines: [`Protection${mailbox}: a match would be withheld${by.length > 0 ? ` by ${by.join(", ")}` : ""}.${undecided}`] };
|
|
55338
|
+
}
|
|
54841
55339
|
/** Where compile counted breadth, by the evaluation_scope it was sent. */
|
|
54842
55340
|
const BREADTH_SCOPE = {
|
|
54843
55341
|
own_mailboxes: "in your own mailboxes",
|
|
@@ -54850,7 +55348,8 @@ function compileEmailRuleReport(data, request) {
|
|
|
54850
55348
|
const lines = (Array.isArray(data.warnings) ? data.warnings : []).filter((warning) => typeof warning === "string" && warning.trim() !== "").map((warning) => `Warning: ${warning.trim()}`);
|
|
54851
55349
|
const breadth = data.breadth;
|
|
54852
55350
|
const sent = isRecord(request?.body) && typeof request.body.evaluation_scope === "string" ? request.body.evaluation_scope : void 0;
|
|
54853
|
-
const
|
|
55351
|
+
const counted = isRecord(data.breadth_scope) && typeof data.breadth_scope.evaluation_scope === "string" ? data.breadth_scope.evaluation_scope : sent;
|
|
55352
|
+
const where = sent === void 0 && (counted === void 0 || counted === "own_mailboxes") ? "in your own mailboxes, the default; pass --evaluation-scope to count over the scope you will save it with" : BREADTH_SCOPE[counted ?? "own_mailboxes"] ?? `in evaluation_scope ${counted}`;
|
|
54854
55353
|
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}.`);
|
|
54855
55354
|
return { lines };
|
|
54856
55355
|
}
|
|
@@ -55005,7 +55504,8 @@ const EMAIL_RULE_OPERATION_EXTENSIONS = {
|
|
|
55005
55504
|
testEmailRuleOnSample: {
|
|
55006
55505
|
flags: scopeSelectionFlags(),
|
|
55007
55506
|
bodyFields: scopeSelectionBodyFields,
|
|
55008
|
-
bodyProperties: ["scope_selection"]
|
|
55507
|
+
bodyProperties: ["scope_selection"],
|
|
55508
|
+
report: testSampleProtectionReport
|
|
55009
55509
|
},
|
|
55010
55510
|
acceptEmailRuleRequest: {
|
|
55011
55511
|
flags: {
|
|
@@ -57293,7 +57793,7 @@ function savedConnectedProfiles(configDir, exclude) {
|
|
|
57293
57793
|
*/
|
|
57294
57794
|
async function otherProfiles(configDir, session, current) {
|
|
57295
57795
|
if (session) try {
|
|
57296
|
-
const { connectedProfilesForSession } = await import("./machine-session-
|
|
57796
|
+
const { connectedProfilesForSession } = await import("./machine-session-DyGP7wDs.js").then((n) => n.s);
|
|
57297
57797
|
return {
|
|
57298
57798
|
inSession: true,
|
|
57299
57799
|
profiles: connectedProfilesForSession(configDir, session, current)
|