@primitivedotdev/cli 3.0.0-preview.20 → 3.0.0-preview.22
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 +31 -15
- package/bin/run.js +21 -2
- package/dist/{api-command-DXiAX_N2.js → api-command-Dm1BKxOr.js} +731 -227
- package/dist/cli-command-names-DteMqL-H.js +362 -0
- package/dist/{json-output-xgN0ZLWP.js → json-output-BMZrLH47.js} +1 -1
- package/dist/{machine-session-Cvo9BqYB.js → machine-session-DPLiLNot.js} +6 -6
- package/dist/{notify-session-C8USviF_.js → notify-session-DHQbjXOq.js} +2 -2
- package/dist/oclif/auto-signal-worker.js +3 -3
- package/dist/oclif/auto-signals.js +1 -1
- package/dist/oclif/command-not-found.js +7 -3
- package/dist/oclif/command-stdin.js +9 -0
- package/dist/oclif/index.js +477 -66343
- package/dist/oclif/proxy-auto-detect.js +1 -1
- package/dist/oclif/receiver-heal.js +2 -2
- package/dist/receiver.d.ts +1 -1
- package/dist/{repeats-Dj_o6c-X-CliyH3ge.js → repeats-Dj_o6c-X-x61TNLz-.js} +61 -10
- package/dist/{scoped-chat-CUy0Ta_y.js → scoped-chat-Bss3OjFI.js} +1 -1
- package/dist/{shared-mail-watch-BAPMsFNv.js → shared-mail-watch-DdtgJOrV.js} +12 -0
- package/dist/{signal-command-DHwFky03.js → signal-command-vIo4maG0.js} +11 -7
- package/dist/skills/primitive-connect/references/contact-requests.md +4 -4
- package/dist/skills/primitive-connect/references/contacts.md +1 -1
- package/dist/skills/primitive-connect.json +4 -4
- package/man/primitive.1 +4 -4
- package/package.json +13 -12
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { $t as getThread, Bt as getEndpoint, C as parseRetryAfter, H as assertAwaitingFilterRows, J as isAwaitingRejectedError, U as awaitingRejectedError, V as ReplyStateUnsupportedError, Vn as sdk_gen_exports, W as ensureSearchReportsReplyState, X as replyStateSurfaceForOperation, Yt as getOwnGrant, at as expectedAutomatedVerdicts, et as AutomatedFilterUnsupportedError, it as ensureSearchReportsAutomated, nt as automatedRejectedError, pn as listEndpoints, rt as automatedSurfaceForOperation, st as isAutomatedRejectedError, tt as assertAutomatedVerdict, un as listDomains, zt as getEmail } from "./repeats-Dj_o6c-X-
|
|
1
|
+
import { $t as getThread, Bt as getEndpoint, C as parseRetryAfter, H as assertAwaitingFilterRows, J as isAwaitingRejectedError, U as awaitingRejectedError, V as ReplyStateUnsupportedError, Vn as sdk_gen_exports, W as ensureSearchReportsReplyState, X as replyStateSurfaceForOperation, Yt as getOwnGrant, at as expectedAutomatedVerdicts, et as AutomatedFilterUnsupportedError, it as ensureSearchReportsAutomated, nt as automatedRejectedError, pn as listEndpoints, rt as automatedSurfaceForOperation, st as isAutomatedRejectedError, tt as assertAutomatedVerdict, un as listDomains, zt as getEmail } from "./repeats-Dj_o6c-X-x61TNLz-.js";
|
|
2
|
+
import { a as canonicalCommandId, i as canonicalCliText, r as canonicalBodyFlagName } from "./cli-command-names-DteMqL-H.js";
|
|
2
3
|
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
4
|
import "./oclif/global-org-flag.js";
|
|
4
5
|
import { a as assertRequiredBodyFields, i as operationHelpInputs } from "./help-inputs-NGARVZL_.js";
|
|
5
|
-
import {
|
|
6
|
+
import { o as thrownErrorBody } from "./json-output-BMZrLH47.js";
|
|
6
7
|
import { d as readMailJson, h as writeMailJson, m as withMailLock, p as syncMailDirectory, u as privateMailPermissions } from "./shared-mail-files-BAQSGxxz.js";
|
|
7
8
|
import { a as writeRetryIdNotice, n as rememberRetryIds, r as retryIdFields, t as prepareRetryIds } from "./retry-ids-04ZPJCZY.js";
|
|
8
9
|
import { Args, Command, Errors, Flags } from "@oclif/core";
|
|
@@ -782,7 +783,7 @@ const operationManifest = [
|
|
|
782
783
|
"binaryResponse": false,
|
|
783
784
|
"bodyRequired": false,
|
|
784
785
|
"command": "list-activity-objects",
|
|
785
|
-
"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, saved a new version while covering it, or stopped 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, a held new version by up to about 15 minutes; GET /v1/email-rules/covering-me is the live view. For what covers you now, read GET /email-rules/covering-me.",
|
|
786
|
+
"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 in observe or active started covering one of their mailboxes, turned active after they were told of it in observe, saved a new version while covering it, or stopped 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, a held new version by up to about 15 minutes; GET /v1/email-rules/covering-me is the live view. For what covers you now, read GET /email-rules/covering-me.",
|
|
786
787
|
"hasJsonBody": false,
|
|
787
788
|
"method": "GET",
|
|
788
789
|
"operationId": "listActivityObjects",
|
|
@@ -865,7 +866,7 @@ const operationManifest = [
|
|
|
865
866
|
},
|
|
866
867
|
"state": {
|
|
867
868
|
"type": "string",
|
|
868
|
-
"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
|
|
869
|
+
"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, active or deleted (email rules), pending, accepted, declined or withdrawn (rule requests and objections; an objection may also be amended or closed), and for a coverage notice what it told: started (a rule in observe or active came to cover your mailboxes: made, turned on, or reaching you; once per rule, not per mailbox), activated (a rule you were told of while it was being tested in observe is now active), new_version, stopped (it no longer covers you, why in stop_reason), or baseline (it already covered you when notices began)."
|
|
869
870
|
},
|
|
870
871
|
"created_at": {
|
|
871
872
|
"type": "string",
|
|
@@ -909,7 +910,7 @@ const operationManifest = [
|
|
|
909
910
|
"format": "uuid"
|
|
910
911
|
},
|
|
911
912
|
"stop_reason": {
|
|
912
|
-
"description": "For a stopped notice: deleted, turned_off (
|
|
913
|
+
"description": "For a stopped notice: deleted, turned_off (set to draft), or no_longer_covers (in observe or active, reaching none of your mailboxes now). A rule moved from active back to observe still covers you and is not stopped.",
|
|
913
914
|
"type": "string",
|
|
914
915
|
"enum": [
|
|
915
916
|
"deleted",
|
|
@@ -9468,7 +9469,7 @@ const operationManifest = [
|
|
|
9468
9469
|
"items": { "type": "string" }
|
|
9469
9470
|
},
|
|
9470
9471
|
"rules": {
|
|
9471
|
-
"description": "Email rule ids: the key also reads the emails these rules granted. An address listed beside them is read in full, so rules beside a domain, a retired address or the address of a member other than the key's holder (its creator, or whoever it was transferred to) are refused (400 validation_error, details.reason rules_beside_domain or rules_beside_personal_mailbox). A rule shared with you goes here by its share's id, from your dashboard session only.",
|
|
9472
|
+
"description": "Email rule ids: the key also reads the emails these rules granted. An address listed beside them is read in full, so rules beside a domain, a retired address or the address of a member other than the key's holder (its creator, or whoever it was transferred to) are refused (400 validation_error, details.reason rules_beside_domain or rules_beside_personal_mailbox). A rule shared with you goes here by its share's id, from your dashboard session only; its rule's own id is refused (403 grant_forbidden, details.reason rule_shared_with_you, with the share in details.share_id) unless you could put the rule itself on a key.",
|
|
9472
9473
|
"maxItems": 20,
|
|
9473
9474
|
"type": "array",
|
|
9474
9475
|
"items": { "type": "string" }
|
|
@@ -11341,7 +11342,7 @@ const operationManifest = [
|
|
|
11341
11342
|
"items": { "type": "string" }
|
|
11342
11343
|
},
|
|
11343
11344
|
"rules": {
|
|
11344
|
-
"description": "Email rule ids: the key also reads the emails these rules granted. An address listed beside them is read in full, so rules beside a domain, a retired address or the address of a member other than the key's holder (its creator, or whoever it was transferred to) are refused (400 validation_error, details.reason rules_beside_domain or rules_beside_personal_mailbox). A rule shared with you goes here by its share's id, from your dashboard session only.",
|
|
11345
|
+
"description": "Email rule ids: the key also reads the emails these rules granted. An address listed beside them is read in full, so rules beside a domain, a retired address or the address of a member other than the key's holder (its creator, or whoever it was transferred to) are refused (400 validation_error, details.reason rules_beside_domain or rules_beside_personal_mailbox). A rule shared with you goes here by its share's id, from your dashboard session only; its rule's own id is refused (403 grant_forbidden, details.reason rule_shared_with_you, with the share in details.share_id) unless you could put the rule itself on a key.",
|
|
11345
11346
|
"maxItems": 20,
|
|
11346
11347
|
"type": "array",
|
|
11347
11348
|
"items": { "type": "string" }
|
|
@@ -14352,7 +14353,7 @@ const operationManifest = [
|
|
|
14352
14353
|
"binaryResponse": false,
|
|
14353
14354
|
"bodyRequired": false,
|
|
14354
14355
|
"command": "get-email-rule-covering-me",
|
|
14355
|
-
"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-
|
|
14356
|
+
"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-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).",
|
|
14356
14357
|
"hasJsonBody": false,
|
|
14357
14358
|
"method": "GET",
|
|
14358
14359
|
"operationId": "getEmailRuleCoveringMe",
|
|
@@ -14406,7 +14407,7 @@ const operationManifest = [
|
|
|
14406
14407
|
"type": ["string", "null"]
|
|
14407
14408
|
},
|
|
14408
14409
|
"email": {
|
|
14409
|
-
"description": "Sign-in email
|
|
14410
|
+
"description": "Sign-in email: a rule over your mail always names who wrote it. Null only when they have none.",
|
|
14410
14411
|
"type": ["string", "null"]
|
|
14411
14412
|
}
|
|
14412
14413
|
},
|
|
@@ -14951,6 +14952,29 @@ const operationManifest = [
|
|
|
14951
14952
|
"type": ["string", "null"],
|
|
14952
14953
|
"format": "date-time",
|
|
14953
14954
|
"description": "When the email arrived. Null, with from_address, subject and recipient, when you are not shown the email (it awaits sender authentication)."
|
|
14955
|
+
},
|
|
14956
|
+
"attachments": {
|
|
14957
|
+
"type": ["array", "null"],
|
|
14958
|
+
"items": {
|
|
14959
|
+
"type": "object",
|
|
14960
|
+
"properties": {
|
|
14961
|
+
"name": {
|
|
14962
|
+
"type": "string",
|
|
14963
|
+
"description": "The file name the email gives it, cut at 255 characters."
|
|
14964
|
+
},
|
|
14965
|
+
"description": {
|
|
14966
|
+
"description": "The one-line description read from the file where the organization has attachment reading on, as GET /v1/emails/{id} gives it; null when none was read, it could not be read, reading is off, or you cannot open the email yourself.",
|
|
14967
|
+
"type": ["string", "null"]
|
|
14968
|
+
}
|
|
14969
|
+
},
|
|
14970
|
+
"required": ["name", "description"]
|
|
14971
|
+
},
|
|
14972
|
+
"description": "The email's named attachments, in order, at most 10 (attachment_count counts them all). An empty list means the email has none. Null when you cannot read the email's content (withheld, awaiting sender authentication, not parsed yet, failed to parse, or discarded), or are not shown the email: then whether it has any is not known to you. A part with no file name is not listed or counted."
|
|
14973
|
+
},
|
|
14974
|
+
"attachment_count": {
|
|
14975
|
+
"type": ["integer", "null"],
|
|
14976
|
+
"minimum": 0,
|
|
14977
|
+
"description": "How many named attachments the email has in all, listed or not. Null exactly when attachments is."
|
|
14954
14978
|
}
|
|
14955
14979
|
},
|
|
14956
14980
|
"required": [
|
|
@@ -14966,7 +14990,9 @@ const operationManifest = [
|
|
|
14966
14990
|
"from_address",
|
|
14967
14991
|
"subject",
|
|
14968
14992
|
"recipient",
|
|
14969
|
-
"received_at"
|
|
14993
|
+
"received_at",
|
|
14994
|
+
"attachments",
|
|
14995
|
+
"attachment_count"
|
|
14970
14996
|
]
|
|
14971
14997
|
}
|
|
14972
14998
|
},
|
|
@@ -15293,7 +15319,7 @@ const operationManifest = [
|
|
|
15293
15319
|
"binaryResponse": false,
|
|
15294
15320
|
"bodyRequired": false,
|
|
15295
15321
|
"command": "list-email-rules-covering-me",
|
|
15296
|
-
"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), and covers.via says how: author_reach, it runs over everything its author can read, which includes your mail (an author who reads the organization's mail or holds an access entry for your mailbox); selected, it names your mailbox or its domain; own_mailboxes, it is your own rule over your own mail. 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. Each listed rule carries its current version's english and Primitive's reading of it (explanation); its tree is on GET /v1/email-rules/covering-me/{id}. 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-
|
|
15322
|
+
"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), and covers.via says how: author_reach, it runs over everything its author can read, which includes your mail (an author who reads the organization's mail or holds an access entry for your mailbox); selected, it names your mailbox or its domain; own_mailboxes, it is your own rule over your own mail. 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. Each listed rule carries its current version's english and Primitive's reading of it (explanation); its tree is on GET /v1/email-rules/covering-me/{id}. 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-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).",
|
|
15297
15323
|
"hasJsonBody": false,
|
|
15298
15324
|
"method": "GET",
|
|
15299
15325
|
"operationId": "listEmailRulesCoveringMe",
|
|
@@ -15355,7 +15381,7 @@ const operationManifest = [
|
|
|
15355
15381
|
"type": ["string", "null"]
|
|
15356
15382
|
},
|
|
15357
15383
|
"email": {
|
|
15358
|
-
"description": "Sign-in email
|
|
15384
|
+
"description": "Sign-in email: a rule over your mail always names who wrote it. Null only when they have none.",
|
|
15359
15385
|
"type": ["string", "null"]
|
|
15360
15386
|
}
|
|
15361
15387
|
},
|
|
@@ -16293,7 +16319,7 @@ const operationManifest = [
|
|
|
16293
16319
|
"rule_deleted",
|
|
16294
16320
|
null
|
|
16295
16321
|
],
|
|
16296
|
-
"description": "Why it ended, once it has: stopped_by_granter, removed_by_beneficiary, stopped_by_admin or rule_deleted (the rule was deleted; the share keeps its record, and the rule is no longer shown). Null while it has not."
|
|
16322
|
+
"description": "Why it ended, once it has: stopped_by_granter, removed_by_beneficiary, stopped_by_admin or rule_deleted (the rule was deleted; the share keeps its record and rule_name, and the rule is no longer shown). Null while it has not."
|
|
16297
16323
|
},
|
|
16298
16324
|
"accepted_rule_version": {
|
|
16299
16325
|
"type": "integer",
|
|
@@ -16303,6 +16329,22 @@ const operationManifest = [
|
|
|
16303
16329
|
"type": "boolean",
|
|
16304
16330
|
"description": "Whether the member who accepted changed the rule's English or tree before accepting (a new name does not count)."
|
|
16305
16331
|
},
|
|
16332
|
+
"accept_changes": {
|
|
16333
|
+
"type": ["object", "null"],
|
|
16334
|
+
"properties": {
|
|
16335
|
+
"requested_english": {
|
|
16336
|
+
"type": "string",
|
|
16337
|
+
"description": "The English the member who asked asked for."
|
|
16338
|
+
},
|
|
16339
|
+
"accepted_english": {
|
|
16340
|
+
"type": "string",
|
|
16341
|
+
"description": "The English that was accepted. Can match requested_english when only the tree changed."
|
|
16342
|
+
}
|
|
16343
|
+
},
|
|
16344
|
+
"required": ["requested_english", "accepted_english"],
|
|
16345
|
+
"default": null,
|
|
16346
|
+
"description": "When edited_on_accept, for the member sharing their mail and the member it is shared with, live or not: what was asked for beside what was accepted. Null otherwise, and for anyone else."
|
|
16347
|
+
},
|
|
16306
16348
|
"live": {
|
|
16307
16349
|
"type": "boolean",
|
|
16308
16350
|
"description": "Not ended, and both people are still members under the memberships that were recorded."
|
|
@@ -16346,7 +16388,7 @@ const operationManifest = [
|
|
|
16346
16388
|
},
|
|
16347
16389
|
"name": { "type": ["string", "null"] },
|
|
16348
16390
|
"email": {
|
|
16349
|
-
"description": "Sign-in email; null unless you can list member emails, this is you, or
|
|
16391
|
+
"description": "Sign-in email; null unless you can list member emails, this is you, or the share is with you (live or not).",
|
|
16350
16392
|
"type": ["string", "null"]
|
|
16351
16393
|
},
|
|
16352
16394
|
"active": {
|
|
@@ -16385,6 +16427,10 @@ const operationManifest = [
|
|
|
16385
16427
|
"active"
|
|
16386
16428
|
]
|
|
16387
16429
|
},
|
|
16430
|
+
"rule_name": {
|
|
16431
|
+
"description": "The rule's name, for anyone who can see the share. While the share is live, its current name; once it has ended, its name when it ended (a later rename is not shown), also after the rule is deleted. Null when the share is not live and no name was recorded as it ended (it ended before names were recorded, or one of its people is no longer a member), except for the member sharing their mail, who is told its current name.",
|
|
16432
|
+
"type": ["string", "null"]
|
|
16433
|
+
},
|
|
16388
16434
|
"rule": {
|
|
16389
16435
|
"type": ["object", "null"],
|
|
16390
16436
|
"properties": {
|
|
@@ -16411,12 +16457,12 @@ const operationManifest = [
|
|
|
16411
16457
|
"english",
|
|
16412
16458
|
"updated_at"
|
|
16413
16459
|
],
|
|
16414
|
-
"description": "The rule's name, state and description; null once the share is not live, except for the member sharing their mail."
|
|
16460
|
+
"description": "The rule's name, state and description; null once the share is not live, except for the member sharing their mail, and once the rule is deleted."
|
|
16415
16461
|
},
|
|
16416
16462
|
"rule_id": {
|
|
16417
16463
|
"type": ["string", "null"],
|
|
16418
16464
|
"format": "uuid",
|
|
16419
|
-
"description": "The rule itself
|
|
16465
|
+
"description": "The rule itself, given with rule: to the member sharing their mail, and while the share is live to anyone shown the rule, the member it is shared with included. Null otherwise, and for a deleted rule. It names the rule in webhook deliveries (email.analysis.understanding.rules[].id) and in GET /v1/emails/{id} shared_through; it opens none of the rule routes to someone who is not its author. The member it is shared with lists this share's id, not the rule's, in a key's grant.rules (from the dashboard), and their own webhooks receive what it shares."
|
|
16420
16466
|
}
|
|
16421
16467
|
},
|
|
16422
16468
|
"required": [
|
|
@@ -16427,6 +16473,7 @@ const operationManifest = [
|
|
|
16427
16473
|
"end_reason",
|
|
16428
16474
|
"accepted_rule_version",
|
|
16429
16475
|
"edited_on_accept",
|
|
16476
|
+
"accept_changes",
|
|
16430
16477
|
"live",
|
|
16431
16478
|
"delivery_paused",
|
|
16432
16479
|
"activity",
|
|
@@ -16434,6 +16481,7 @@ const operationManifest = [
|
|
|
16434
16481
|
"is_beneficiary",
|
|
16435
16482
|
"granter",
|
|
16436
16483
|
"beneficiary",
|
|
16484
|
+
"rule_name",
|
|
16437
16485
|
"rule",
|
|
16438
16486
|
"rule_id"
|
|
16439
16487
|
]
|
|
@@ -17869,6 +17917,11 @@ const operationManifest = [
|
|
|
17869
17917
|
"description": "For the member asked, while pending: what accepting would share. Null otherwise. Whether it was accepted with changes is edited_on_accept on the share.",
|
|
17870
17918
|
"type": ["string", "null"]
|
|
17871
17919
|
},
|
|
17920
|
+
"accepted_english": {
|
|
17921
|
+
"default": null,
|
|
17922
|
+
"description": "When it was accepted with changes, for the member who asked and the member asked: the English that was accepted, beside english, which stays what was asked for. Null otherwise. Older responses may omit this field. (The accepted English can match english when only the tree changed.)",
|
|
17923
|
+
"type": ["string", "null"]
|
|
17924
|
+
},
|
|
17872
17925
|
"existing": {
|
|
17873
17926
|
"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 and message, naming the member the same way): that request is returned (200), and no second one is made or sent.",
|
|
17874
17927
|
"type": "boolean",
|
|
@@ -17894,7 +17947,8 @@ const operationManifest = [
|
|
|
17894
17947
|
"share_id",
|
|
17895
17948
|
"message",
|
|
17896
17949
|
"decline_reason",
|
|
17897
|
-
"share_terms"
|
|
17950
|
+
"share_terms",
|
|
17951
|
+
"accepted_english"
|
|
17898
17952
|
]
|
|
17899
17953
|
},
|
|
17900
17954
|
"sdkName": "createEmailRuleRequest",
|
|
@@ -18078,6 +18132,11 @@ const operationManifest = [
|
|
|
18078
18132
|
"share_terms": {
|
|
18079
18133
|
"description": "For the member asked, while pending: what accepting would share. Null otherwise. Whether it was accepted with changes is edited_on_accept on the share.",
|
|
18080
18134
|
"type": ["string", "null"]
|
|
18135
|
+
},
|
|
18136
|
+
"accepted_english": {
|
|
18137
|
+
"default": null,
|
|
18138
|
+
"description": "When it was accepted with changes, for the member who asked and the member asked: the English that was accepted, beside english, which stays what was asked for. Null otherwise. Older responses may omit this field. (The accepted English can match english when only the tree changed.)",
|
|
18139
|
+
"type": ["string", "null"]
|
|
18081
18140
|
}
|
|
18082
18141
|
},
|
|
18083
18142
|
"required": [
|
|
@@ -18099,7 +18158,8 @@ const operationManifest = [
|
|
|
18099
18158
|
"share_id",
|
|
18100
18159
|
"message",
|
|
18101
18160
|
"decline_reason",
|
|
18102
|
-
"share_terms"
|
|
18161
|
+
"share_terms",
|
|
18162
|
+
"accepted_english"
|
|
18103
18163
|
]
|
|
18104
18164
|
},
|
|
18105
18165
|
"sdkName": "declineEmailRuleRequest",
|
|
@@ -18111,7 +18171,7 @@ const operationManifest = [
|
|
|
18111
18171
|
"binaryResponse": false,
|
|
18112
18172
|
"bodyRequired": false,
|
|
18113
18173
|
"command": "delete-email-rule",
|
|
18114
|
-
"description": "Deletes a rule
|
|
18174
|
+
"description": "Deletes a rule: it is kept only as deleted, a rule nothing reads or changes again that grants no access and is listed only in its author's activity, and its decisions go with it. 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 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).",
|
|
18115
18175
|
"hasJsonBody": false,
|
|
18116
18176
|
"method": "DELETE",
|
|
18117
18177
|
"operationId": "deleteEmailRule",
|
|
@@ -18176,7 +18236,7 @@ const operationManifest = [
|
|
|
18176
18236
|
"binaryResponse": false,
|
|
18177
18237
|
"bodyRequired": false,
|
|
18178
18238
|
"command": "delete-email-rule-request",
|
|
18179
|
-
"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).",
|
|
18239
|
+
"description": "Deletes a request you made that you withdrew or that was declined, for everyone who could see it. An accepted request stays: it is the record of who agreed to share. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
|
|
18180
18240
|
"hasJsonBody": false,
|
|
18181
18241
|
"method": "DELETE",
|
|
18182
18242
|
"operationId": "deleteEmailRuleRequest",
|
|
@@ -18199,7 +18259,7 @@ const operationManifest = [
|
|
|
18199
18259
|
"required": ["deleted"]
|
|
18200
18260
|
},
|
|
18201
18261
|
"sdkName": "deleteEmailRuleRequest",
|
|
18202
|
-
"summary": "Delete a withdrawn rule request",
|
|
18262
|
+
"summary": "Delete a withdrawn or declined rule request",
|
|
18203
18263
|
"tag": "Email Rules",
|
|
18204
18264
|
"tagCommand": "email-rules"
|
|
18205
18265
|
},
|
|
@@ -19342,6 +19402,11 @@ const operationManifest = [
|
|
|
19342
19402
|
"share_terms": {
|
|
19343
19403
|
"description": "For the member asked, while pending: what accepting would share. Null otherwise. Whether it was accepted with changes is edited_on_accept on the share.",
|
|
19344
19404
|
"type": ["string", "null"]
|
|
19405
|
+
},
|
|
19406
|
+
"accepted_english": {
|
|
19407
|
+
"default": null,
|
|
19408
|
+
"description": "When it was accepted with changes, for the member who asked and the member asked: the English that was accepted, beside english, which stays what was asked for. Null otherwise. Older responses may omit this field. (The accepted English can match english when only the tree changed.)",
|
|
19409
|
+
"type": ["string", "null"]
|
|
19345
19410
|
}
|
|
19346
19411
|
},
|
|
19347
19412
|
"required": [
|
|
@@ -19363,7 +19428,8 @@ const operationManifest = [
|
|
|
19363
19428
|
"share_id",
|
|
19364
19429
|
"message",
|
|
19365
19430
|
"decline_reason",
|
|
19366
|
-
"share_terms"
|
|
19431
|
+
"share_terms",
|
|
19432
|
+
"accepted_english"
|
|
19367
19433
|
]
|
|
19368
19434
|
},
|
|
19369
19435
|
"sdkName": "getEmailRuleRequest",
|
|
@@ -19560,7 +19626,7 @@ const operationManifest = [
|
|
|
19560
19626
|
"rule_deleted",
|
|
19561
19627
|
null
|
|
19562
19628
|
],
|
|
19563
|
-
"description": "Why it ended, once it has: stopped_by_granter, removed_by_beneficiary, stopped_by_admin or rule_deleted (the rule was deleted; the share keeps its record, and the rule is no longer shown). Null while it has not."
|
|
19629
|
+
"description": "Why it ended, once it has: stopped_by_granter, removed_by_beneficiary, stopped_by_admin or rule_deleted (the rule was deleted; the share keeps its record and rule_name, and the rule is no longer shown). Null while it has not."
|
|
19564
19630
|
},
|
|
19565
19631
|
"accepted_rule_version": {
|
|
19566
19632
|
"type": "integer",
|
|
@@ -19570,6 +19636,22 @@ const operationManifest = [
|
|
|
19570
19636
|
"type": "boolean",
|
|
19571
19637
|
"description": "Whether the member who accepted changed the rule's English or tree before accepting (a new name does not count)."
|
|
19572
19638
|
},
|
|
19639
|
+
"accept_changes": {
|
|
19640
|
+
"type": ["object", "null"],
|
|
19641
|
+
"properties": {
|
|
19642
|
+
"requested_english": {
|
|
19643
|
+
"type": "string",
|
|
19644
|
+
"description": "The English the member who asked asked for."
|
|
19645
|
+
},
|
|
19646
|
+
"accepted_english": {
|
|
19647
|
+
"type": "string",
|
|
19648
|
+
"description": "The English that was accepted. Can match requested_english when only the tree changed."
|
|
19649
|
+
}
|
|
19650
|
+
},
|
|
19651
|
+
"required": ["requested_english", "accepted_english"],
|
|
19652
|
+
"default": null,
|
|
19653
|
+
"description": "When edited_on_accept, for the member sharing their mail and the member it is shared with, live or not: what was asked for beside what was accepted. Null otherwise, and for anyone else."
|
|
19654
|
+
},
|
|
19573
19655
|
"live": {
|
|
19574
19656
|
"type": "boolean",
|
|
19575
19657
|
"description": "Not ended, and both people are still members under the memberships that were recorded."
|
|
@@ -19613,7 +19695,7 @@ const operationManifest = [
|
|
|
19613
19695
|
},
|
|
19614
19696
|
"name": { "type": ["string", "null"] },
|
|
19615
19697
|
"email": {
|
|
19616
|
-
"description": "Sign-in email; null unless you can list member emails, this is you, or
|
|
19698
|
+
"description": "Sign-in email; null unless you can list member emails, this is you, or the share is with you (live or not).",
|
|
19617
19699
|
"type": ["string", "null"]
|
|
19618
19700
|
},
|
|
19619
19701
|
"active": {
|
|
@@ -19652,6 +19734,10 @@ const operationManifest = [
|
|
|
19652
19734
|
"active"
|
|
19653
19735
|
]
|
|
19654
19736
|
},
|
|
19737
|
+
"rule_name": {
|
|
19738
|
+
"description": "The rule's name, for anyone who can see the share. While the share is live, its current name; once it has ended, its name when it ended (a later rename is not shown), also after the rule is deleted. Null when the share is not live and no name was recorded as it ended (it ended before names were recorded, or one of its people is no longer a member), except for the member sharing their mail, who is told its current name.",
|
|
19739
|
+
"type": ["string", "null"]
|
|
19740
|
+
},
|
|
19655
19741
|
"rule": {
|
|
19656
19742
|
"type": ["object", "null"],
|
|
19657
19743
|
"properties": {
|
|
@@ -19678,12 +19764,12 @@ const operationManifest = [
|
|
|
19678
19764
|
"english",
|
|
19679
19765
|
"updated_at"
|
|
19680
19766
|
],
|
|
19681
|
-
"description": "The rule's name, state and description; null once the share is not live, except for the member sharing their mail."
|
|
19767
|
+
"description": "The rule's name, state and description; null once the share is not live, except for the member sharing their mail, and once the rule is deleted."
|
|
19682
19768
|
},
|
|
19683
19769
|
"rule_id": {
|
|
19684
19770
|
"type": ["string", "null"],
|
|
19685
19771
|
"format": "uuid",
|
|
19686
|
-
"description": "The rule itself
|
|
19772
|
+
"description": "The rule itself, given with rule: to the member sharing their mail, and while the share is live to anyone shown the rule, the member it is shared with included. Null otherwise, and for a deleted rule. It names the rule in webhook deliveries (email.analysis.understanding.rules[].id) and in GET /v1/emails/{id} shared_through; it opens none of the rule routes to someone who is not its author. The member it is shared with lists this share's id, not the rule's, in a key's grant.rules (from the dashboard), and their own webhooks receive what it shares."
|
|
19687
19773
|
}
|
|
19688
19774
|
},
|
|
19689
19775
|
"required": [
|
|
@@ -19694,6 +19780,7 @@ const operationManifest = [
|
|
|
19694
19780
|
"end_reason",
|
|
19695
19781
|
"accepted_rule_version",
|
|
19696
19782
|
"edited_on_accept",
|
|
19783
|
+
"accept_changes",
|
|
19697
19784
|
"live",
|
|
19698
19785
|
"delivery_paused",
|
|
19699
19786
|
"activity",
|
|
@@ -19701,6 +19788,7 @@ const operationManifest = [
|
|
|
19701
19788
|
"is_beneficiary",
|
|
19702
19789
|
"granter",
|
|
19703
19790
|
"beneficiary",
|
|
19791
|
+
"rule_name",
|
|
19704
19792
|
"rule",
|
|
19705
19793
|
"rule_id"
|
|
19706
19794
|
]
|
|
@@ -20025,6 +20113,29 @@ const operationManifest = [
|
|
|
20025
20113
|
"type": ["string", "null"],
|
|
20026
20114
|
"format": "date-time",
|
|
20027
20115
|
"description": "When the decided email arrived. Null, with from_address, subject and recipient, when you are not shown the email (it awaits sender authentication)."
|
|
20116
|
+
},
|
|
20117
|
+
"attachments": {
|
|
20118
|
+
"type": ["array", "null"],
|
|
20119
|
+
"items": {
|
|
20120
|
+
"type": "object",
|
|
20121
|
+
"properties": {
|
|
20122
|
+
"name": {
|
|
20123
|
+
"type": "string",
|
|
20124
|
+
"description": "The file name the email gives it, cut at 255 characters."
|
|
20125
|
+
},
|
|
20126
|
+
"description": {
|
|
20127
|
+
"description": "The one-line description read from the file where the organization has attachment reading on, as GET /v1/emails/{id} gives it; null when none was read, it could not be read, reading is off, or you cannot open the email yourself.",
|
|
20128
|
+
"type": ["string", "null"]
|
|
20129
|
+
}
|
|
20130
|
+
},
|
|
20131
|
+
"required": ["name", "description"]
|
|
20132
|
+
},
|
|
20133
|
+
"description": "The email's named attachments, in order, at most 10 (attachment_count counts them all). An empty list means the email has none. Null when you cannot read the email's content (withheld, awaiting sender authentication, not parsed yet, failed to parse, or discarded), or are not shown the email: then whether it has any is not known to you. A part with no file name is not listed or counted."
|
|
20134
|
+
},
|
|
20135
|
+
"attachment_count": {
|
|
20136
|
+
"type": ["integer", "null"],
|
|
20137
|
+
"minimum": 0,
|
|
20138
|
+
"description": "How many named attachments the email has in all, listed or not. Null exactly when attachments is."
|
|
20028
20139
|
}
|
|
20029
20140
|
},
|
|
20030
20141
|
"required": [
|
|
@@ -20040,7 +20151,9 @@ const operationManifest = [
|
|
|
20040
20151
|
"from_address",
|
|
20041
20152
|
"subject",
|
|
20042
20153
|
"recipient",
|
|
20043
|
-
"received_at"
|
|
20154
|
+
"received_at",
|
|
20155
|
+
"attachments",
|
|
20156
|
+
"attachment_count"
|
|
20044
20157
|
]
|
|
20045
20158
|
}
|
|
20046
20159
|
},
|
|
@@ -20248,6 +20361,11 @@ const operationManifest = [
|
|
|
20248
20361
|
"share_terms": {
|
|
20249
20362
|
"description": "For the member asked, while pending: what accepting would share. Null otherwise. Whether it was accepted with changes is edited_on_accept on the share.",
|
|
20250
20363
|
"type": ["string", "null"]
|
|
20364
|
+
},
|
|
20365
|
+
"accepted_english": {
|
|
20366
|
+
"default": null,
|
|
20367
|
+
"description": "When it was accepted with changes, for the member who asked and the member asked: the English that was accepted, beside english, which stays what was asked for. Null otherwise. Older responses may omit this field. (The accepted English can match english when only the tree changed.)",
|
|
20368
|
+
"type": ["string", "null"]
|
|
20251
20369
|
}
|
|
20252
20370
|
},
|
|
20253
20371
|
"required": [
|
|
@@ -20269,7 +20387,8 @@ const operationManifest = [
|
|
|
20269
20387
|
"share_id",
|
|
20270
20388
|
"message",
|
|
20271
20389
|
"decline_reason",
|
|
20272
|
-
"share_terms"
|
|
20390
|
+
"share_terms",
|
|
20391
|
+
"accepted_english"
|
|
20273
20392
|
]
|
|
20274
20393
|
}
|
|
20275
20394
|
},
|
|
@@ -20302,6 +20421,29 @@ const operationManifest = [
|
|
|
20302
20421
|
"responseSchema": {
|
|
20303
20422
|
"type": "object",
|
|
20304
20423
|
"properties": {
|
|
20424
|
+
"attachments": {
|
|
20425
|
+
"type": ["array", "null"],
|
|
20426
|
+
"items": {
|
|
20427
|
+
"type": "object",
|
|
20428
|
+
"properties": {
|
|
20429
|
+
"name": {
|
|
20430
|
+
"type": "string",
|
|
20431
|
+
"description": "The file name the email gives it, cut at 255 characters."
|
|
20432
|
+
},
|
|
20433
|
+
"description": {
|
|
20434
|
+
"description": "The one-line description read from the file where the organization has attachment reading on, as GET /v1/emails/{id} gives it; null when none was read, it could not be read, reading is off, or you cannot open the email yourself.",
|
|
20435
|
+
"type": ["string", "null"]
|
|
20436
|
+
}
|
|
20437
|
+
},
|
|
20438
|
+
"required": ["name", "description"]
|
|
20439
|
+
},
|
|
20440
|
+
"description": "The email's named attachments, in order, at most 10 (attachment_count counts them all), each with its one-line description where one was read: the email every rule here decided on, so given once rather than on each rule. An empty list means it has none. Null when its content cannot be read (withheld, awaiting sender authentication, not parsed yet, failed to parse, or discarded): then whether it has any is not known to you."
|
|
20441
|
+
},
|
|
20442
|
+
"attachment_count": {
|
|
20443
|
+
"type": ["integer", "null"],
|
|
20444
|
+
"minimum": 0,
|
|
20445
|
+
"description": "How many named attachments the email has in all, listed or not. Null exactly when attachments is."
|
|
20446
|
+
},
|
|
20305
20447
|
"rules": {
|
|
20306
20448
|
"type": "array",
|
|
20307
20449
|
"items": {
|
|
@@ -20491,7 +20633,7 @@ const operationManifest = [
|
|
|
20491
20633
|
"type": ["string", "null"]
|
|
20492
20634
|
},
|
|
20493
20635
|
"email": {
|
|
20494
|
-
"description": "Sign-in email
|
|
20636
|
+
"description": "Sign-in email: a rule over your mail always names who wrote it. Null only when they have none.",
|
|
20495
20637
|
"type": ["string", "null"]
|
|
20496
20638
|
}
|
|
20497
20639
|
},
|
|
@@ -20664,6 +20806,8 @@ const operationManifest = [
|
|
|
20664
20806
|
}
|
|
20665
20807
|
},
|
|
20666
20808
|
"required": [
|
|
20809
|
+
"attachments",
|
|
20810
|
+
"attachment_count",
|
|
20667
20811
|
"rules",
|
|
20668
20812
|
"hidden",
|
|
20669
20813
|
"not_listed"
|
|
@@ -21201,7 +21345,7 @@ const operationManifest = [
|
|
|
21201
21345
|
"rule_deleted",
|
|
21202
21346
|
null
|
|
21203
21347
|
],
|
|
21204
|
-
"description": "Why it ended, once it has: stopped_by_granter, removed_by_beneficiary, stopped_by_admin or rule_deleted (the rule was deleted; the share keeps its record, and the rule is no longer shown). Null while it has not."
|
|
21348
|
+
"description": "Why it ended, once it has: stopped_by_granter, removed_by_beneficiary, stopped_by_admin or rule_deleted (the rule was deleted; the share keeps its record and rule_name, and the rule is no longer shown). Null while it has not."
|
|
21205
21349
|
},
|
|
21206
21350
|
"accepted_rule_version": {
|
|
21207
21351
|
"type": "integer",
|
|
@@ -21211,6 +21355,22 @@ const operationManifest = [
|
|
|
21211
21355
|
"type": "boolean",
|
|
21212
21356
|
"description": "Whether the member who accepted changed the rule's English or tree before accepting (a new name does not count)."
|
|
21213
21357
|
},
|
|
21358
|
+
"accept_changes": {
|
|
21359
|
+
"type": ["object", "null"],
|
|
21360
|
+
"properties": {
|
|
21361
|
+
"requested_english": {
|
|
21362
|
+
"type": "string",
|
|
21363
|
+
"description": "The English the member who asked asked for."
|
|
21364
|
+
},
|
|
21365
|
+
"accepted_english": {
|
|
21366
|
+
"type": "string",
|
|
21367
|
+
"description": "The English that was accepted. Can match requested_english when only the tree changed."
|
|
21368
|
+
}
|
|
21369
|
+
},
|
|
21370
|
+
"required": ["requested_english", "accepted_english"],
|
|
21371
|
+
"default": null,
|
|
21372
|
+
"description": "When edited_on_accept, for the member sharing their mail and the member it is shared with, live or not: what was asked for beside what was accepted. Null otherwise, and for anyone else."
|
|
21373
|
+
},
|
|
21214
21374
|
"live": {
|
|
21215
21375
|
"type": "boolean",
|
|
21216
21376
|
"description": "Not ended, and both people are still members under the memberships that were recorded."
|
|
@@ -21254,7 +21414,7 @@ const operationManifest = [
|
|
|
21254
21414
|
},
|
|
21255
21415
|
"name": { "type": ["string", "null"] },
|
|
21256
21416
|
"email": {
|
|
21257
|
-
"description": "Sign-in email; null unless you can list member emails, this is you, or
|
|
21417
|
+
"description": "Sign-in email; null unless you can list member emails, this is you, or the share is with you (live or not).",
|
|
21258
21418
|
"type": ["string", "null"]
|
|
21259
21419
|
},
|
|
21260
21420
|
"active": {
|
|
@@ -21293,6 +21453,10 @@ const operationManifest = [
|
|
|
21293
21453
|
"active"
|
|
21294
21454
|
]
|
|
21295
21455
|
},
|
|
21456
|
+
"rule_name": {
|
|
21457
|
+
"description": "The rule's name, for anyone who can see the share. While the share is live, its current name; once it has ended, its name when it ended (a later rename is not shown), also after the rule is deleted. Null when the share is not live and no name was recorded as it ended (it ended before names were recorded, or one of its people is no longer a member), except for the member sharing their mail, who is told its current name.",
|
|
21458
|
+
"type": ["string", "null"]
|
|
21459
|
+
},
|
|
21296
21460
|
"rule": {
|
|
21297
21461
|
"type": ["object", "null"],
|
|
21298
21462
|
"properties": {
|
|
@@ -21319,12 +21483,12 @@ const operationManifest = [
|
|
|
21319
21483
|
"english",
|
|
21320
21484
|
"updated_at"
|
|
21321
21485
|
],
|
|
21322
|
-
"description": "The rule's name, state and description; null once the share is not live, except for the member sharing their mail."
|
|
21486
|
+
"description": "The rule's name, state and description; null once the share is not live, except for the member sharing their mail, and once the rule is deleted."
|
|
21323
21487
|
},
|
|
21324
21488
|
"rule_id": {
|
|
21325
21489
|
"type": ["string", "null"],
|
|
21326
21490
|
"format": "uuid",
|
|
21327
|
-
"description": "The rule itself
|
|
21491
|
+
"description": "The rule itself, given with rule: to the member sharing their mail, and while the share is live to anyone shown the rule, the member it is shared with included. Null otherwise, and for a deleted rule. It names the rule in webhook deliveries (email.analysis.understanding.rules[].id) and in GET /v1/emails/{id} shared_through; it opens none of the rule routes to someone who is not its author. The member it is shared with lists this share's id, not the rule's, in a key's grant.rules (from the dashboard), and their own webhooks receive what it shares."
|
|
21328
21492
|
}
|
|
21329
21493
|
},
|
|
21330
21494
|
"required": [
|
|
@@ -21335,6 +21499,7 @@ const operationManifest = [
|
|
|
21335
21499
|
"end_reason",
|
|
21336
21500
|
"accepted_rule_version",
|
|
21337
21501
|
"edited_on_accept",
|
|
21502
|
+
"accept_changes",
|
|
21338
21503
|
"live",
|
|
21339
21504
|
"delivery_paused",
|
|
21340
21505
|
"activity",
|
|
@@ -21342,6 +21507,7 @@ const operationManifest = [
|
|
|
21342
21507
|
"is_beneficiary",
|
|
21343
21508
|
"granter",
|
|
21344
21509
|
"beneficiary",
|
|
21510
|
+
"rule_name",
|
|
21345
21511
|
"rule",
|
|
21346
21512
|
"rule_id"
|
|
21347
21513
|
]
|
|
@@ -21901,7 +22067,7 @@ const operationManifest = [
|
|
|
21901
22067
|
"rule_deleted",
|
|
21902
22068
|
null
|
|
21903
22069
|
],
|
|
21904
|
-
"description": "Why it ended, once it has: stopped_by_granter, removed_by_beneficiary, stopped_by_admin or rule_deleted (the rule was deleted; the share keeps its record, and the rule is no longer shown). Null while it has not."
|
|
22070
|
+
"description": "Why it ended, once it has: stopped_by_granter, removed_by_beneficiary, stopped_by_admin or rule_deleted (the rule was deleted; the share keeps its record and rule_name, and the rule is no longer shown). Null while it has not."
|
|
21905
22071
|
},
|
|
21906
22072
|
"accepted_rule_version": {
|
|
21907
22073
|
"type": "integer",
|
|
@@ -21911,6 +22077,22 @@ const operationManifest = [
|
|
|
21911
22077
|
"type": "boolean",
|
|
21912
22078
|
"description": "Whether the member who accepted changed the rule's English or tree before accepting (a new name does not count)."
|
|
21913
22079
|
},
|
|
22080
|
+
"accept_changes": {
|
|
22081
|
+
"type": ["object", "null"],
|
|
22082
|
+
"properties": {
|
|
22083
|
+
"requested_english": {
|
|
22084
|
+
"type": "string",
|
|
22085
|
+
"description": "The English the member who asked asked for."
|
|
22086
|
+
},
|
|
22087
|
+
"accepted_english": {
|
|
22088
|
+
"type": "string",
|
|
22089
|
+
"description": "The English that was accepted. Can match requested_english when only the tree changed."
|
|
22090
|
+
}
|
|
22091
|
+
},
|
|
22092
|
+
"required": ["requested_english", "accepted_english"],
|
|
22093
|
+
"default": null,
|
|
22094
|
+
"description": "When edited_on_accept, for the member sharing their mail and the member it is shared with, live or not: what was asked for beside what was accepted. Null otherwise, and for anyone else."
|
|
22095
|
+
},
|
|
21914
22096
|
"live": {
|
|
21915
22097
|
"type": "boolean",
|
|
21916
22098
|
"description": "Not ended, and both people are still members under the memberships that were recorded."
|
|
@@ -21954,7 +22136,7 @@ const operationManifest = [
|
|
|
21954
22136
|
},
|
|
21955
22137
|
"name": { "type": ["string", "null"] },
|
|
21956
22138
|
"email": {
|
|
21957
|
-
"description": "Sign-in email; null unless you can list member emails, this is you, or
|
|
22139
|
+
"description": "Sign-in email; null unless you can list member emails, this is you, or the share is with you (live or not).",
|
|
21958
22140
|
"type": ["string", "null"]
|
|
21959
22141
|
},
|
|
21960
22142
|
"active": {
|
|
@@ -21993,6 +22175,10 @@ const operationManifest = [
|
|
|
21993
22175
|
"active"
|
|
21994
22176
|
]
|
|
21995
22177
|
},
|
|
22178
|
+
"rule_name": {
|
|
22179
|
+
"description": "The rule's name, for anyone who can see the share. While the share is live, its current name; once it has ended, its name when it ended (a later rename is not shown), also after the rule is deleted. Null when the share is not live and no name was recorded as it ended (it ended before names were recorded, or one of its people is no longer a member), except for the member sharing their mail, who is told its current name.",
|
|
22180
|
+
"type": ["string", "null"]
|
|
22181
|
+
},
|
|
21996
22182
|
"rule": {
|
|
21997
22183
|
"type": ["object", "null"],
|
|
21998
22184
|
"properties": {
|
|
@@ -22019,12 +22205,12 @@ const operationManifest = [
|
|
|
22019
22205
|
"english",
|
|
22020
22206
|
"updated_at"
|
|
22021
22207
|
],
|
|
22022
|
-
"description": "The rule's name, state and description; null once the share is not live, except for the member sharing their mail."
|
|
22208
|
+
"description": "The rule's name, state and description; null once the share is not live, except for the member sharing their mail, and once the rule is deleted."
|
|
22023
22209
|
},
|
|
22024
22210
|
"rule_id": {
|
|
22025
22211
|
"type": ["string", "null"],
|
|
22026
22212
|
"format": "uuid",
|
|
22027
|
-
"description": "The rule itself
|
|
22213
|
+
"description": "The rule itself, given with rule: to the member sharing their mail, and while the share is live to anyone shown the rule, the member it is shared with included. Null otherwise, and for a deleted rule. It names the rule in webhook deliveries (email.analysis.understanding.rules[].id) and in GET /v1/emails/{id} shared_through; it opens none of the rule routes to someone who is not its author. The member it is shared with lists this share's id, not the rule's, in a key's grant.rules (from the dashboard), and their own webhooks receive what it shares."
|
|
22028
22214
|
}
|
|
22029
22215
|
},
|
|
22030
22216
|
"required": [
|
|
@@ -22035,6 +22221,7 @@ const operationManifest = [
|
|
|
22035
22221
|
"end_reason",
|
|
22036
22222
|
"accepted_rule_version",
|
|
22037
22223
|
"edited_on_accept",
|
|
22224
|
+
"accept_changes",
|
|
22038
22225
|
"live",
|
|
22039
22226
|
"delivery_paused",
|
|
22040
22227
|
"activity",
|
|
@@ -22042,6 +22229,7 @@ const operationManifest = [
|
|
|
22042
22229
|
"is_beneficiary",
|
|
22043
22230
|
"granter",
|
|
22044
22231
|
"beneficiary",
|
|
22232
|
+
"rule_name",
|
|
22045
22233
|
"rule",
|
|
22046
22234
|
"rule_id"
|
|
22047
22235
|
]
|
|
@@ -22541,15 +22729,28 @@ const operationManifest = [
|
|
|
22541
22729
|
"type": "string"
|
|
22542
22730
|
},
|
|
22543
22731
|
"subject": { "type": ["string", "null"] },
|
|
22544
|
-
"
|
|
22545
|
-
"
|
|
22546
|
-
"
|
|
22547
|
-
|
|
22732
|
+
"attachments": {
|
|
22733
|
+
"type": ["array", "null"],
|
|
22734
|
+
"items": {
|
|
22735
|
+
"type": "object",
|
|
22736
|
+
"properties": {
|
|
22737
|
+
"name": {
|
|
22738
|
+
"type": "string",
|
|
22739
|
+
"description": "The file name the email gives it, cut at 255 characters."
|
|
22740
|
+
},
|
|
22741
|
+
"description": {
|
|
22742
|
+
"description": "The one-line description read from the file where the organization has attachment reading on, as GET /v1/emails/{id} gives it; null when none was read, it could not be read, reading is off, or you cannot open the email yourself.",
|
|
22743
|
+
"type": ["string", "null"]
|
|
22744
|
+
}
|
|
22745
|
+
},
|
|
22746
|
+
"required": ["name", "description"]
|
|
22747
|
+
},
|
|
22748
|
+
"description": "On matched, near_miss and no_match: the email's named attachments, in order, at most 10 (attachment_count counts them all), each with its one-line description where one was read and you can open the email yourself. An empty list means it has none; null means its content could not be read, so whether it has any is not known. Absent on other outcomes."
|
|
22548
22749
|
},
|
|
22549
|
-
"
|
|
22550
|
-
"
|
|
22551
|
-
"
|
|
22552
|
-
"
|
|
22750
|
+
"attachment_count": {
|
|
22751
|
+
"type": ["integer", "null"],
|
|
22752
|
+
"minimum": 0,
|
|
22753
|
+
"description": "Given exactly when attachments is: how many named attachments the email has in all."
|
|
22553
22754
|
},
|
|
22554
22755
|
"parts": {
|
|
22555
22756
|
"description": "How each top-level part of the rule decided. Present for matched, near_miss and no_match.",
|
|
@@ -23100,13 +23301,38 @@ const operationManifest = [
|
|
|
23100
23301
|
"received_at": {
|
|
23101
23302
|
"type": ["string", "null"],
|
|
23102
23303
|
"format": "date-time"
|
|
23304
|
+
},
|
|
23305
|
+
"attachments": {
|
|
23306
|
+
"type": ["array", "null"],
|
|
23307
|
+
"items": {
|
|
23308
|
+
"type": "object",
|
|
23309
|
+
"properties": {
|
|
23310
|
+
"name": {
|
|
23311
|
+
"type": "string",
|
|
23312
|
+
"description": "The file name the email gives it, cut at 255 characters."
|
|
23313
|
+
},
|
|
23314
|
+
"description": {
|
|
23315
|
+
"description": "The one-line description read from the file where the organization has attachment reading on, as GET /v1/emails/{id} gives it; null when none was read, it could not be read, reading is off, or you cannot open the email yourself.",
|
|
23316
|
+
"type": ["string", "null"]
|
|
23317
|
+
}
|
|
23318
|
+
},
|
|
23319
|
+
"required": ["name", "description"]
|
|
23320
|
+
},
|
|
23321
|
+
"description": "The email's named attachments, as its row in results gives them: in order, at most 10 (attachment_count counts them all), [] for none, null when its content could not be read."
|
|
23322
|
+
},
|
|
23323
|
+
"attachment_count": {
|
|
23324
|
+
"type": ["integer", "null"],
|
|
23325
|
+
"minimum": 0,
|
|
23326
|
+
"description": "How many named attachments the email has in all, listed or not. Null exactly when attachments is."
|
|
23103
23327
|
}
|
|
23104
23328
|
},
|
|
23105
23329
|
"required": [
|
|
23106
23330
|
"email_id",
|
|
23107
23331
|
"subject",
|
|
23108
23332
|
"from",
|
|
23109
|
-
"received_at"
|
|
23333
|
+
"received_at",
|
|
23334
|
+
"attachments",
|
|
23335
|
+
"attachment_count"
|
|
23110
23336
|
]
|
|
23111
23337
|
},
|
|
23112
23338
|
"description": "Newest first, at most 50; count is the full number."
|
|
@@ -23135,13 +23361,38 @@ const operationManifest = [
|
|
|
23135
23361
|
"received_at": {
|
|
23136
23362
|
"type": ["string", "null"],
|
|
23137
23363
|
"format": "date-time"
|
|
23364
|
+
},
|
|
23365
|
+
"attachments": {
|
|
23366
|
+
"type": ["array", "null"],
|
|
23367
|
+
"items": {
|
|
23368
|
+
"type": "object",
|
|
23369
|
+
"properties": {
|
|
23370
|
+
"name": {
|
|
23371
|
+
"type": "string",
|
|
23372
|
+
"description": "The file name the email gives it, cut at 255 characters."
|
|
23373
|
+
},
|
|
23374
|
+
"description": {
|
|
23375
|
+
"description": "The one-line description read from the file where the organization has attachment reading on, as GET /v1/emails/{id} gives it; null when none was read, it could not be read, reading is off, or you cannot open the email yourself.",
|
|
23376
|
+
"type": ["string", "null"]
|
|
23377
|
+
}
|
|
23378
|
+
},
|
|
23379
|
+
"required": ["name", "description"]
|
|
23380
|
+
},
|
|
23381
|
+
"description": "The email's named attachments, as its row in results gives them: in order, at most 10 (attachment_count counts them all), [] for none, null when its content could not be read."
|
|
23382
|
+
},
|
|
23383
|
+
"attachment_count": {
|
|
23384
|
+
"type": ["integer", "null"],
|
|
23385
|
+
"minimum": 0,
|
|
23386
|
+
"description": "How many named attachments the email has in all, listed or not. Null exactly when attachments is."
|
|
23138
23387
|
}
|
|
23139
23388
|
},
|
|
23140
23389
|
"required": [
|
|
23141
23390
|
"email_id",
|
|
23142
23391
|
"subject",
|
|
23143
23392
|
"from",
|
|
23144
|
-
"received_at"
|
|
23393
|
+
"received_at",
|
|
23394
|
+
"attachments",
|
|
23395
|
+
"attachment_count"
|
|
23145
23396
|
]
|
|
23146
23397
|
},
|
|
23147
23398
|
"description": "Newest first, at most 50; count is the full number."
|
|
@@ -24743,6 +24994,11 @@ const operationManifest = [
|
|
|
24743
24994
|
"share_terms": {
|
|
24744
24995
|
"description": "For the member asked, while pending: what accepting would share. Null otherwise. Whether it was accepted with changes is edited_on_accept on the share.",
|
|
24745
24996
|
"type": ["string", "null"]
|
|
24997
|
+
},
|
|
24998
|
+
"accepted_english": {
|
|
24999
|
+
"default": null,
|
|
25000
|
+
"description": "When it was accepted with changes, for the member who asked and the member asked: the English that was accepted, beside english, which stays what was asked for. Null otherwise. Older responses may omit this field. (The accepted English can match english when only the tree changed.)",
|
|
25001
|
+
"type": ["string", "null"]
|
|
24746
25002
|
}
|
|
24747
25003
|
},
|
|
24748
25004
|
"required": [
|
|
@@ -24764,7 +25020,8 @@ const operationManifest = [
|
|
|
24764
25020
|
"share_id",
|
|
24765
25021
|
"message",
|
|
24766
25022
|
"decline_reason",
|
|
24767
|
-
"share_terms"
|
|
25023
|
+
"share_terms",
|
|
25024
|
+
"accepted_english"
|
|
24768
25025
|
]
|
|
24769
25026
|
},
|
|
24770
25027
|
"sdkName": "withdrawEmailRuleRequest",
|
|
@@ -26049,6 +26306,7 @@ const operationManifest = [
|
|
|
26049
26306
|
"description": "Only for a reader who has this email through a colleague's share of their mail, when that share is their only way to it: the share and who gave it. Null for everyone else, including on your own mail when a rule or share of yours gave it to someone: GET /v1/email-rule-shares/{id}/emails lists what a share you gave has given.",
|
|
26050
26307
|
"required": [
|
|
26051
26308
|
"share_id",
|
|
26309
|
+
"rule_id",
|
|
26052
26310
|
"rule_name",
|
|
26053
26311
|
"sharer"
|
|
26054
26312
|
],
|
|
@@ -26058,6 +26316,11 @@ const operationManifest = [
|
|
|
26058
26316
|
"format": "uuid",
|
|
26059
26317
|
"description": "The share."
|
|
26060
26318
|
},
|
|
26319
|
+
"rule_id": {
|
|
26320
|
+
"type": "string",
|
|
26321
|
+
"format": "uuid",
|
|
26322
|
+
"description": "The rule that was shared, as the share shows it to you while it is live. A key lists the share's id, not this one."
|
|
26323
|
+
},
|
|
26061
26324
|
"rule_name": {
|
|
26062
26325
|
"type": "string",
|
|
26063
26326
|
"description": "The name of the rule that was shared."
|
|
@@ -26992,7 +27255,7 @@ const operationManifest = [
|
|
|
26992
27255
|
"type": "string"
|
|
26993
27256
|
},
|
|
26994
27257
|
{
|
|
26995
|
-
"description": "Domain ids, comma-separated or with the key repeated, at most 50: only mail received at one of them. Only narrows: an id you cannot read, or of another organization, matches no mail and is not reported as unknown. `meta.domain_ids` echoes the list as given.",
|
|
27258
|
+
"description": "Domain ids, comma-separated or with the key repeated, at most 50: only mail received at one of them. A domain is matched by name within your organization: mail stored under an earlier record of a domain that was deleted and added again is included. Only narrows: an id you cannot read, or of another organization, matches no mail and is not reported as unknown. `meta.domain_ids` echoes the list as given.",
|
|
26996
27259
|
"enum": null,
|
|
26997
27260
|
"name": "domain_ids",
|
|
26998
27261
|
"required": false,
|
|
@@ -27778,7 +28041,7 @@ const operationManifest = [
|
|
|
27778
28041
|
"type": "string"
|
|
27779
28042
|
},
|
|
27780
28043
|
{
|
|
27781
|
-
"description": "Domain ids, comma-separated or with the key repeated, at most 50: received mail at one of them, and with `direction` `outbound` or `any`, sent mail from an address at one of them. Only narrows: an id you cannot read, or of another organization, matches no mail and is not reported as unknown. `meta.domain_ids` echoes the list as given.",
|
|
28044
|
+
"description": "Domain ids, comma-separated or with the key repeated, at most 50: received mail at one of them, and with `direction` `outbound` or `any`, sent mail from an address at one of them. A domain is matched by name within your organization: mail stored under an earlier record of a domain that was deleted and added again is included. Only narrows: an id you cannot read, or of another organization, matches no mail and is not reported as unknown. `meta.domain_ids` echoes the list as given.",
|
|
27782
28045
|
"enum": null,
|
|
27783
28046
|
"name": "domain_ids",
|
|
27784
28047
|
"required": false,
|
|
@@ -41644,7 +41907,7 @@ const operationManifest = [
|
|
|
41644
41907
|
"items": { "type": "string" }
|
|
41645
41908
|
},
|
|
41646
41909
|
"rules": {
|
|
41647
|
-
"description": "Email rule ids: the key also reads the emails these rules granted. An address listed beside them is read in full, so rules beside a domain, a retired address or the address of a member other than the key's holder (its creator, or whoever it was transferred to) are refused (400 validation_error, details.reason rules_beside_domain or rules_beside_personal_mailbox). A rule shared with you goes here by its share's id, from your dashboard session only.",
|
|
41910
|
+
"description": "Email rule ids: the key also reads the emails these rules granted. An address listed beside them is read in full, so rules beside a domain, a retired address or the address of a member other than the key's holder (its creator, or whoever it was transferred to) are refused (400 validation_error, details.reason rules_beside_domain or rules_beside_personal_mailbox). A rule shared with you goes here by its share's id, from your dashboard session only; its rule's own id is refused (403 grant_forbidden, details.reason rule_shared_with_you, with the share in details.share_id) unless you could put the rule itself on a key.",
|
|
41648
41911
|
"maxItems": 20,
|
|
41649
41912
|
"type": "array",
|
|
41650
41913
|
"items": { "type": "string" }
|
|
@@ -43887,7 +44150,7 @@ const operationManifest = [
|
|
|
43887
44150
|
},
|
|
43888
44151
|
"minItems": 1,
|
|
43889
44152
|
"maxItems": 50,
|
|
43890
|
-
"description": "Domain ids, at most 50: only received mail at one of them, tested on the ranked candidates, so a page can hold fewer than `limit` results. Received mail only: refused with corpus `outbound`, and the default corpus becomes `inbound`. Only narrows: an id you cannot read, or of another organization, matches no mail and is not reported as unknown. `meta.domain_ids` echoes the list as given."
|
|
44153
|
+
"description": "Domain ids, at most 50: only received mail at one of them, tested on the ranked candidates, so a page can hold fewer than `limit` results. Received mail only: refused with corpus `outbound`, and the default corpus becomes `inbound`. A domain is matched by name within your organization: mail stored under an earlier record of a domain that was deleted and added again is included. Only narrows: an id you cannot read, or of another organization, matches no mail and is not reported as unknown. `meta.domain_ids` echoes the list as given."
|
|
43891
44154
|
}
|
|
43892
44155
|
}
|
|
43893
44156
|
},
|
|
@@ -53847,11 +54110,16 @@ const operationManifest = [
|
|
|
53847
54110
|
"type": "object",
|
|
53848
54111
|
"properties": {
|
|
53849
54112
|
"id": { "type": "string" },
|
|
53850
|
-
"name": { "type": "string" }
|
|
54113
|
+
"name": { "type": "string" },
|
|
54114
|
+
"through_share": { "type": ["string", "null"] }
|
|
53851
54115
|
},
|
|
53852
|
-
"required": [
|
|
54116
|
+
"required": [
|
|
54117
|
+
"id",
|
|
54118
|
+
"name",
|
|
54119
|
+
"through_share"
|
|
54120
|
+
]
|
|
53853
54121
|
},
|
|
53854
|
-
"description": "The rules this attempt's payload named in email.analysis.understanding.rules, by id and name as sent,
|
|
54122
|
+
"description": "The rules this attempt's payload named in email.analysis.understanding.rules, by id and name as sent, with through_share: the id of the share the receiver reached the rule through, or null when it lists the rule itself. Lists only rules you can read now, and a rule reached through a share while you can see that share and it has not ended; empty when it named none of those. Recorded for deliveries Primitive's API sends and for replays. Null where it was not recorded (other deliveries, records of no attempt, attempts before this field), for a caller that cannot read email rules or whose organization does not have them, below content depth, and once the message's content is discarded."
|
|
53855
54123
|
},
|
|
53856
54124
|
"created_at": { "type": "string" },
|
|
53857
54125
|
"updated_at": { "type": "string" },
|
|
@@ -54134,13 +54402,21 @@ const operationManifest = [
|
|
|
54134
54402
|
},
|
|
54135
54403
|
"rules": {
|
|
54136
54404
|
"type": ["array", "null"],
|
|
54137
|
-
"description": "The rules this attempt's payload named in email.analysis.understanding.rules, by id and name as sent,
|
|
54405
|
+
"description": "The rules this attempt's payload named in email.analysis.understanding.rules, by id and name as sent, with through_share: the id of the share the receiver reached the rule through, or null when it lists the rule itself. Lists only rules you can read now, and a rule reached through a share while you can see that share and it has not ended; empty when it named none of those. Recorded for deliveries Primitive's API sends and for replays. Null where it was not recorded (other deliveries, records of no attempt, attempts before this field), for a caller that cannot read email rules or whose organization does not have them, below content depth, and once the message's content is discarded.",
|
|
54138
54406
|
"items": {
|
|
54139
54407
|
"type": "object",
|
|
54140
|
-
"required": [
|
|
54408
|
+
"required": [
|
|
54409
|
+
"id",
|
|
54410
|
+
"name",
|
|
54411
|
+
"through_share"
|
|
54412
|
+
],
|
|
54141
54413
|
"properties": {
|
|
54142
54414
|
"id": { "type": "string" },
|
|
54143
|
-
"name": { "type": "string" }
|
|
54415
|
+
"name": { "type": "string" },
|
|
54416
|
+
"through_share": {
|
|
54417
|
+
"type": ["string", "null"],
|
|
54418
|
+
"description": "The share the receiver reached the rule through; null when it lists the rule itself."
|
|
54419
|
+
}
|
|
54144
54420
|
}
|
|
54145
54421
|
}
|
|
54146
54422
|
},
|
|
@@ -54288,9 +54564,10 @@ function routeTable() {
|
|
|
54288
54564
|
}
|
|
54289
54565
|
function commandId(operation) {
|
|
54290
54566
|
if (operation.access === "session") return void 0;
|
|
54291
|
-
const
|
|
54567
|
+
const preferredName = PREFERRED_COMMANDS[operation.sdkName];
|
|
54568
|
+
const preferred = preferredName ? canonicalCommandId(preferredName) : void 0;
|
|
54292
54569
|
if (preferred && knownCommands.has(preferred)) return preferred;
|
|
54293
|
-
const generated = `${operation.tagCommand}:${operation.command}
|
|
54570
|
+
const generated = canonicalCommandId(`${operation.tagCommand}:${operation.command}`);
|
|
54294
54571
|
const id = shortNames.get(generated) ?? generated;
|
|
54295
54572
|
return knownCommands.has(id) ? id : void 0;
|
|
54296
54573
|
}
|
|
@@ -54393,7 +54670,7 @@ function terminalLine(line) {
|
|
|
54393
54670
|
return sanitizeForTerminal(line).replace(BIDI_CONTROLS, "").replaceAll(/[\r\n\t]+/g, " ");
|
|
54394
54671
|
}
|
|
54395
54672
|
// src/oclif/answer-reports.ts
|
|
54396
|
-
function isRecord$
|
|
54673
|
+
function isRecord$10(value) {
|
|
54397
54674
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
54398
54675
|
}
|
|
54399
54676
|
/** Text from an answer, made safe and one line for a report: no terminal controls. */
|
|
@@ -54402,10 +54679,10 @@ function oneLine(text) {
|
|
|
54402
54679
|
}
|
|
54403
54680
|
/** One line per warning a route write answers with (createRoute, updateRoute). */
|
|
54404
54681
|
function routeWarningLines(data) {
|
|
54405
|
-
const warnings = isRecord$
|
|
54682
|
+
const warnings = isRecord$10(data) ? data.warnings : void 0;
|
|
54406
54683
|
if (!Array.isArray(warnings)) return [];
|
|
54407
54684
|
return warnings.flatMap((warning) => {
|
|
54408
|
-
if (!isRecord$
|
|
54685
|
+
if (!isRecord$10(warning)) return [];
|
|
54409
54686
|
const message = typeof warning.message === "string" ? oneLine(warning.message) : "";
|
|
54410
54687
|
if (message) return [`Route warning: ${withCliCommands(message)}`];
|
|
54411
54688
|
const code = typeof warning.code === "string" ? oneLine(warning.code) : "";
|
|
@@ -54433,11 +54710,11 @@ const DELIVERED_STATUSES = /* @__PURE__ */ new Set(["delivered", "header_confirm
|
|
|
54433
54710
|
* and has no recorded answer says so.
|
|
54434
54711
|
*/
|
|
54435
54712
|
function deliveryAttemptLines(data) {
|
|
54436
|
-
const attempts = isRecord$
|
|
54713
|
+
const attempts = isRecord$10(data) ? data.attempts : void 0;
|
|
54437
54714
|
if (!Array.isArray(attempts)) return [];
|
|
54438
54715
|
const lines = [];
|
|
54439
54716
|
for (const attempt of attempts) {
|
|
54440
|
-
if (!isRecord$
|
|
54717
|
+
if (!isRecord$10(attempt)) continue;
|
|
54441
54718
|
const text = (value) => typeof value === "string" && value ? oneLine(value) : "";
|
|
54442
54719
|
const status = text(attempt.status);
|
|
54443
54720
|
const parts = [
|
|
@@ -54463,9 +54740,9 @@ function deliveryAttemptLines(data) {
|
|
|
54463
54740
|
*/
|
|
54464
54741
|
function deliveringCell(endpoint) {
|
|
54465
54742
|
const delivery = endpoint.delivery;
|
|
54466
|
-
if (isRecord$
|
|
54743
|
+
if (isRecord$10(delivery) && typeof delivery.delivering === "boolean") {
|
|
54467
54744
|
if (delivery.delivering) return "yes";
|
|
54468
|
-
const codes = Array.isArray(delivery.reasons) ? delivery.reasons.flatMap((reason) => isRecord$
|
|
54745
|
+
const codes = Array.isArray(delivery.reasons) ? delivery.reasons.flatMap((reason) => isRecord$10(reason) && typeof reason.code === "string" && reason.code ? [oneLine(reason.code)] : []) : [];
|
|
54469
54746
|
return codes.length > 0 ? `no (${codes.join(", ")})` : "no";
|
|
54470
54747
|
}
|
|
54471
54748
|
return endpoint.kind === void 0 || endpoint.kind === "http" ? "unknown" : "-";
|
|
@@ -54476,7 +54753,7 @@ function deliveringCell(endpoint) {
|
|
|
54476
54753
|
* (DELIVERING, from `delivery`), and its name. Nothing for an empty list.
|
|
54477
54754
|
*/
|
|
54478
54755
|
function endpointDeliveryLines(data) {
|
|
54479
|
-
const rows = Array.isArray(data) ? data.filter(isRecord$
|
|
54756
|
+
const rows = Array.isArray(data) ? data.filter(isRecord$10) : [];
|
|
54480
54757
|
if (rows.length === 0) return [];
|
|
54481
54758
|
const text = (value) => typeof value === "string" && value ? oneLine(value) : "";
|
|
54482
54759
|
const table = [[
|
|
@@ -54535,7 +54812,7 @@ const TOKEN_SKEW_MS = 6e4;
|
|
|
54535
54812
|
/** Cached tokens for organizations other than the current one. */
|
|
54536
54813
|
const MAX_CACHED_ORG_TOKENS = 20;
|
|
54537
54814
|
const USER_LOGIN_EXPIRED_MESSAGE = "Saved Primitive CLI login expired or was revoked. Run `primitive login` to sign in again.";
|
|
54538
|
-
const NO_CURRENT_ORG_MESSAGE = "No organization is selected for this login. Run `primitive
|
|
54815
|
+
const NO_CURRENT_ORG_MESSAGE = "No organization is selected for this login. Run `primitive org list` to see where you can use the CLI, then `primitive org use <org>`.";
|
|
54539
54816
|
/**
|
|
54540
54817
|
* The CLI login and the organization list report a person's stored role:
|
|
54541
54818
|
* the largest built-in role (owner, admin or member) their access fully
|
|
@@ -54549,13 +54826,18 @@ function isBuiltInRoleKey(role) {
|
|
|
54549
54826
|
}
|
|
54550
54827
|
/** What the role key `restricted` stands for. */
|
|
54551
54828
|
const RESTRICTED_ROLE_NOTE = "a template or custom role that does not fully include member, because it lacks some member permission (as Operator does) or reaches only some mailboxes";
|
|
54552
|
-
/**
|
|
54829
|
+
/** The built-in role /whoami reports for a stored role key. Display only. */
|
|
54830
|
+
function displayedRoleKey(role) {
|
|
54831
|
+
return role === "restricted" ? "member" : role;
|
|
54832
|
+
}
|
|
54833
|
+
/** A stored role key, using the same built-in name as /whoami. */
|
|
54553
54834
|
function roleKeyLabel(role) {
|
|
54554
|
-
|
|
54835
|
+
const displayed = displayedRoleKey(role);
|
|
54836
|
+
return isBuiltInRoleKey(displayed) ? `built-in role ${displayed}` : `role ${displayed}`;
|
|
54555
54837
|
}
|
|
54556
54838
|
/** A stored role key for a sentence, saying what `restricted` stands for. */
|
|
54557
54839
|
function roleKeyText(role) {
|
|
54558
|
-
return role === "restricted" ? `role
|
|
54840
|
+
return role === "restricted" ? `built-in role member (${RESTRICTED_ROLE_NOTE}; this label does not grant member permissions)` : roleKeyLabel(role);
|
|
54559
54841
|
}
|
|
54560
54842
|
const REFUSAL_FALLBACK_MESSAGES = {
|
|
54561
54843
|
not_a_member: "You are not a member of this organization.",
|
|
@@ -54577,7 +54859,7 @@ var CliOrgRefusedError = class extends Errors.CLIError {
|
|
|
54577
54859
|
this.orgId = params.orgId;
|
|
54578
54860
|
}
|
|
54579
54861
|
};
|
|
54580
|
-
function isRecord$
|
|
54862
|
+
function isRecord$9(value) {
|
|
54581
54863
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
54582
54864
|
}
|
|
54583
54865
|
function apiOrigin(apiBaseUrl) {
|
|
@@ -54604,7 +54886,7 @@ function isUuid(value) {
|
|
|
54604
54886
|
return /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(value);
|
|
54605
54887
|
}
|
|
54606
54888
|
function isOrgAccessToken(value) {
|
|
54607
|
-
return isRecord$
|
|
54889
|
+
return isRecord$9(value) && typeof value.access_token === "string" && value.access_token.length > 0 && value.token_type === "Bearer" && typeof value.expires_in === "number" && value.expires_in > 0 && typeof value.org_id === "string" && (value.org_name === null || typeof value.org_name === "string") && typeof value.oauth_grant_id === "string";
|
|
54608
54890
|
}
|
|
54609
54891
|
function orgTokenFromResponse(token, now = Date.now) {
|
|
54610
54892
|
return {
|
|
@@ -54651,7 +54933,7 @@ async function postTokenEndpoint(params) {
|
|
|
54651
54933
|
throw new Errors.CLIError(`Could not reach the Primitive OAuth token endpoint: ${detail}`, { exit: 1 });
|
|
54652
54934
|
}
|
|
54653
54935
|
const payload = await response.json().catch(() => null);
|
|
54654
|
-
if (response.ok && isRecord$
|
|
54936
|
+
if (response.ok && isRecord$9(payload)) return {
|
|
54655
54937
|
ok: true,
|
|
54656
54938
|
payload
|
|
54657
54939
|
};
|
|
@@ -54659,7 +54941,7 @@ async function postTokenEndpoint(params) {
|
|
|
54659
54941
|
ok: true,
|
|
54660
54942
|
payload: {}
|
|
54661
54943
|
};
|
|
54662
|
-
const record = isRecord$
|
|
54944
|
+
const record = isRecord$9(payload) ? payload : {};
|
|
54663
54945
|
return {
|
|
54664
54946
|
ok: false,
|
|
54665
54947
|
status: response.status,
|
|
@@ -54862,12 +55144,12 @@ async function fetchCliOrgs(params) {
|
|
|
54862
55144
|
}
|
|
54863
55145
|
const payload = await response.json().catch(() => null);
|
|
54864
55146
|
if (!response.ok) {
|
|
54865
|
-
const error = isRecord$
|
|
55147
|
+
const error = isRecord$9(payload) && isRecord$9(payload.error) ? payload.error : {};
|
|
54866
55148
|
if (response.status === 404 && error.code === "feature_disabled") throw new Errors.CLIError("This Primitive server does not support switching organizations for CLI logins.", { exit: 1 });
|
|
54867
55149
|
throw new Errors.CLIError(`Could not list organizations${typeof error.message === "string" ? `: ${error.message}` : ` (HTTP ${response.status}).`}`, { exit: 1 });
|
|
54868
55150
|
}
|
|
54869
|
-
const data = isRecord$
|
|
54870
|
-
if (!isRecord$
|
|
55151
|
+
const data = isRecord$9(payload) ? payload.data : null;
|
|
55152
|
+
if (!isRecord$9(data) || !Array.isArray(data.orgs)) throw new Errors.CLIError("Primitive API returned an unexpected organization list.", { exit: 1 });
|
|
54871
55153
|
return data;
|
|
54872
55154
|
}
|
|
54873
55155
|
/** How long a command waits for another CLI process to finish with the saved login. */
|
|
@@ -54915,7 +55197,7 @@ function matchOrg(selection, orgs) {
|
|
|
54915
55197
|
const byName = orgs.filter((org) => (org.name ?? "").trim().toLowerCase() === wanted.toLowerCase());
|
|
54916
55198
|
if (byName.length === 1) return byName[0];
|
|
54917
55199
|
if (byName.length > 1) throw new Errors.CLIError(`More than one organization is named ${JSON.stringify(wanted)}. Use its id: ${byName.map((org) => org.id).join(", ")}.`, { exit: 1 });
|
|
54918
|
-
throw new Errors.CLIError(`No organization matches ${JSON.stringify(wanted)}. Run \`primitive
|
|
55200
|
+
throw new Errors.CLIError(`No organization matches ${JSON.stringify(wanted)}. Run \`primitive org list\` to list yours.`, { exit: 1 });
|
|
54919
55201
|
}
|
|
54920
55202
|
/** Resolve an `--org` value to an organization id, listing orgs only for a name. */
|
|
54921
55203
|
async function resolveOrgSelection(params) {
|
|
@@ -55529,10 +55811,61 @@ function withBooleanFlagValues(argv, flags) {
|
|
|
55529
55811
|
}
|
|
55530
55812
|
return out;
|
|
55531
55813
|
}
|
|
55814
|
+
// src/oclif/bounded-pages.ts
|
|
55815
|
+
/** Read a bounded window, preserving the last page's metadata and errors. */
|
|
55816
|
+
async function fetchBoundedPages(options) {
|
|
55817
|
+
const { wanted, maximum, call } = options;
|
|
55818
|
+
const rows = [];
|
|
55819
|
+
const seen = /* @__PURE__ */ new Set([options.cursor]);
|
|
55820
|
+
let cursor = options.cursor;
|
|
55821
|
+
let merged = {};
|
|
55822
|
+
const budget = Math.ceil(wanted / maximum) + 20;
|
|
55823
|
+
for (let requests = 1;; requests += 1) {
|
|
55824
|
+
const result = await call(Math.min(maximum, wanted - rows.length), cursor);
|
|
55825
|
+
if (result.error) return { result };
|
|
55826
|
+
const envelope = result.data;
|
|
55827
|
+
rows.push(...Array.isArray(envelope?.data) ? envelope.data : []);
|
|
55828
|
+
const previousWarnings = merged.warnings;
|
|
55829
|
+
const previousMeta = { ...merged.meta };
|
|
55830
|
+
delete previousMeta.total;
|
|
55831
|
+
delete previousMeta.total_capped;
|
|
55832
|
+
delete previousMeta.total_unavailable;
|
|
55833
|
+
merged = {
|
|
55834
|
+
...merged,
|
|
55835
|
+
...envelope,
|
|
55836
|
+
meta: {
|
|
55837
|
+
...previousMeta,
|
|
55838
|
+
...envelope?.meta
|
|
55839
|
+
}
|
|
55840
|
+
};
|
|
55841
|
+
if (Array.isArray(previousWarnings) && Array.isArray(envelope?.warnings)) merged.warnings = [...previousWarnings, ...envelope.warnings];
|
|
55842
|
+
const next = envelope?.meta?.cursor ?? void 0;
|
|
55843
|
+
const repeated = Boolean(next) && seen.has(next);
|
|
55844
|
+
const bounded = Boolean(next) && rows.length < wanted && requests >= budget;
|
|
55845
|
+
if (!next || repeated || rows.length >= wanted || bounded) {
|
|
55846
|
+
const note = repeated ? `Stopped because the server repeated a cursor after ${requests} requests; more may remain. Continue with --cursor ${next}.` : bounded ? `Stopped after ${requests} requests with ${rows.length} of ${wanted}; more may remain. Continue with --cursor ${next}.` : void 0;
|
|
55847
|
+
return {
|
|
55848
|
+
result,
|
|
55849
|
+
envelope: {
|
|
55850
|
+
...merged,
|
|
55851
|
+
data: rows,
|
|
55852
|
+
meta: {
|
|
55853
|
+
...merged.meta,
|
|
55854
|
+
limit: wanted,
|
|
55855
|
+
cursor: next ?? null
|
|
55856
|
+
}
|
|
55857
|
+
},
|
|
55858
|
+
note
|
|
55859
|
+
};
|
|
55860
|
+
}
|
|
55861
|
+
seen.add(next);
|
|
55862
|
+
cursor = next;
|
|
55863
|
+
}
|
|
55864
|
+
}
|
|
55532
55865
|
// src/oclif/rule-notes.ts
|
|
55533
55866
|
/** The tags whose single-object answers get the notes printer. */
|
|
55534
55867
|
const RULE_NOTES_TAGS = /* @__PURE__ */ new Set(["Email Rules", "Email Rule Oversight"]);
|
|
55535
|
-
function isRecord$
|
|
55868
|
+
function isRecord$8(value) {
|
|
55536
55869
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
55537
55870
|
}
|
|
55538
55871
|
/** Server text as a report line shows it, or "" when there is none. */
|
|
@@ -55561,12 +55894,12 @@ function list(value) {
|
|
|
55561
55894
|
* rule's, each once.
|
|
55562
55895
|
*/
|
|
55563
55896
|
function ruleNotesLines(answer) {
|
|
55564
|
-
if (!isRecord$
|
|
55565
|
-
const summary = isRecord$
|
|
55566
|
-
const rule = isRecord$
|
|
55897
|
+
if (!isRecord$8(answer)) return [];
|
|
55898
|
+
const summary = isRecord$8(answer.summary) ? answer.summary : {};
|
|
55899
|
+
const rule = isRecord$8(answer.rule) ? answer.rule : {};
|
|
55567
55900
|
const notes = (from) => NOTE_KEYS.map((key) => from[key]);
|
|
55568
55901
|
const lines = [
|
|
55569
|
-
...list(answer.scope_warnings).filter(isRecord$
|
|
55902
|
+
...list(answer.scope_warnings).filter(isRecord$8).map(scopeWarningLine),
|
|
55570
55903
|
...[
|
|
55571
55904
|
...list(answer.warnings),
|
|
55572
55905
|
answer.warning,
|
|
@@ -55588,7 +55921,7 @@ function errorDetail(error) {
|
|
|
55588
55921
|
function usageError$3(message) {
|
|
55589
55922
|
return new Errors.CLIError(message, { exit: 2 });
|
|
55590
55923
|
}
|
|
55591
|
-
function isRecord$
|
|
55924
|
+
function isRecord$7(value) {
|
|
55592
55925
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
55593
55926
|
}
|
|
55594
55927
|
/** A JSON file a flag names, parsed, or a usage error (exit 2) saying why not. */
|
|
@@ -55647,7 +55980,7 @@ function lookAlikeExpected(lookAlike) {
|
|
|
55647
55980
|
* leaves it out of what a rule keeps.
|
|
55648
55981
|
*/
|
|
55649
55982
|
function lookAlikeSample(lookAlike) {
|
|
55650
|
-
if (!isRecord$
|
|
55983
|
+
if (!isRecord$7(lookAlike) || !isRecord$7(lookAlike.email)) return null;
|
|
55651
55984
|
const kind = typeof lookAlike.kind === "string" ? lookAlike.kind : "";
|
|
55652
55985
|
const why = typeof lookAlike.why === "string" ? lookAlike.why.trim() : "";
|
|
55653
55986
|
const both = kind && why ? `${kind}: ${why}` : kind || why;
|
|
@@ -55666,11 +55999,11 @@ function lookAlikeSample(lookAlike) {
|
|
|
55666
55999
|
* samples file holds these, so a number means the same email in both.
|
|
55667
56000
|
*/
|
|
55668
56001
|
function lookAlikeEntries(answer) {
|
|
55669
|
-
const list = isRecord$
|
|
56002
|
+
const list = isRecord$7(answer) && Array.isArray(answer.look_alikes) ? answer.look_alikes : [];
|
|
55670
56003
|
const entries = [];
|
|
55671
56004
|
for (const item of list) {
|
|
55672
56005
|
const sample = lookAlikeSample(item);
|
|
55673
|
-
if (sample && isRecord$
|
|
56006
|
+
if (sample && isRecord$7(item)) entries.push({
|
|
55674
56007
|
lookAlike: item,
|
|
55675
56008
|
sample
|
|
55676
56009
|
});
|
|
@@ -55690,15 +56023,15 @@ function lookAlikeSamples(answer) {
|
|
|
55690
56023
|
* refused, so it never empties a rule's.
|
|
55691
56024
|
*/
|
|
55692
56025
|
function samplesFromJson(value, source) {
|
|
55693
|
-
const data = isRecord$
|
|
55694
|
-
if (isRecord$
|
|
56026
|
+
const data = isRecord$7(value) && isRecord$7(value.data) ? value.data : value;
|
|
56027
|
+
if (isRecord$7(data) && Array.isArray(data.look_alikes)) {
|
|
55695
56028
|
const samples = lookAlikeSamples(data);
|
|
55696
56029
|
if (samples.length === 0) throw usageError$3(`${source} is a generate-look-alikes answer with no look-alikes in it.`);
|
|
55697
56030
|
return samples;
|
|
55698
56031
|
}
|
|
55699
56032
|
if (!Array.isArray(data)) throw usageError$3(`${source} must hold a JSON array of samples, such as [{"expected": "no_match", "label": "a personal bill", "email": {...}}], or a generate-look-alikes answer.`);
|
|
55700
56033
|
return data.map((item, index) => {
|
|
55701
|
-
if (!isRecord$
|
|
56034
|
+
if (!isRecord$7(item)) throw usageError$3(`${source}, sample ${index + 1} (index ${index}) is not an object.`);
|
|
55702
56035
|
const { id: _id, created_at: _createdAt, ...sample } = item;
|
|
55703
56036
|
return sample;
|
|
55704
56037
|
});
|
|
@@ -55725,8 +56058,8 @@ function pickSamples(samples, pick, source) {
|
|
|
55725
56058
|
return pickNumbers(pick, samples.length, source).map((n) => samples[n - 1]);
|
|
55726
56059
|
}
|
|
55727
56060
|
/** The samples file flags: replace (create and update), add (update), and test. */
|
|
55728
|
-
const SAMPLES_FILE_FLAG = "
|
|
55729
|
-
const ADD_SAMPLES_FILE_FLAG = "add-
|
|
56061
|
+
const SAMPLES_FILE_FLAG = "samples-file";
|
|
56062
|
+
const ADD_SAMPLES_FILE_FLAG = "add-samples-file";
|
|
55730
56063
|
const EXPECT_SAMPLES_FILE_FLAG = "expect-samples-file";
|
|
55731
56064
|
const PICK_FLAG = "pick";
|
|
55732
56065
|
/** The samples a samples file flag names, only those --pick chooses if given. */
|
|
@@ -55742,8 +56075,8 @@ function givenSamplesFlag(flags, names) {
|
|
|
55742
56075
|
return given;
|
|
55743
56076
|
}
|
|
55744
56077
|
/**
|
|
55745
|
-
* The body fields a samples file sets on create
|
|
55746
|
-
* update
|
|
56078
|
+
* The body fields a samples file sets on create and
|
|
56079
|
+
* update: expectation_samples (on update it replaces them) or, on
|
|
55747
56080
|
* update, add_expectation_samples. With --pick, only the samples it names.
|
|
55748
56081
|
* Each is sent as savedSample gives it, without a look-alike's group.
|
|
55749
56082
|
*/
|
|
@@ -55754,16 +56087,16 @@ function samplesBodyFields(canAdd) {
|
|
|
55754
56087
|
if (flag === null) return [];
|
|
55755
56088
|
const path = flags[flag];
|
|
55756
56089
|
const samples = readSamplesFile(path, flag, flags[PICK_FLAG]);
|
|
55757
|
-
if (samples.length === 0 && !(canAdd && flag === "
|
|
56090
|
+
if (samples.length === 0 && !(canAdd && flag === "samples-file")) throw usageError$3(`--${flag} ${path} holds no samples.`);
|
|
55758
56091
|
return [{
|
|
55759
56092
|
flag: `--${flag}`,
|
|
55760
|
-
property: flag === "add-
|
|
56093
|
+
property: flag === "add-samples-file" ? "add_expectation_samples" : "expectation_samples",
|
|
55761
56094
|
value: samples.map(savedSample)
|
|
55762
56095
|
}];
|
|
55763
56096
|
};
|
|
55764
56097
|
}
|
|
55765
56098
|
/**
|
|
55766
|
-
* The samples test
|
|
56099
|
+
* The samples test expects, from --expect-samples-file (only
|
|
55767
56100
|
* those --pick chooses if given), or null without the flag. They go in
|
|
55768
56101
|
* expect.samples, each look-alike keeping its group, which the answer counts
|
|
55769
56102
|
* samples by.
|
|
@@ -55791,11 +56124,11 @@ const CLOSE_CALL_NOTE = "a close call: decided by an answer below 0.75 confidenc
|
|
|
55791
56124
|
* them left out: "By group: private 3 passed; near_miss 1 passed, 1 failed."
|
|
55792
56125
|
*/
|
|
55793
56126
|
function groupCountsLines(byGroup) {
|
|
55794
|
-
if (!isRecord$
|
|
56127
|
+
if (!isRecord$7(byGroup)) return [];
|
|
55795
56128
|
const parts = [];
|
|
55796
56129
|
for (const group of SAMPLE_GROUPS) {
|
|
55797
56130
|
const tally = byGroup[group];
|
|
55798
|
-
if (!isRecord$
|
|
56131
|
+
if (!isRecord$7(tally)) continue;
|
|
55799
56132
|
const counted = [
|
|
55800
56133
|
"passed",
|
|
55801
56134
|
"failed",
|
|
@@ -55812,11 +56145,11 @@ function groupCountsLines(byGroup) {
|
|
|
55812
56145
|
* match it, and what the rule decided; the counts; then the server's notes.
|
|
55813
56146
|
*/
|
|
55814
56147
|
function lookAlikesReport(data) {
|
|
55815
|
-
if (!isRecord$
|
|
56148
|
+
if (!isRecord$7(data)) return { lines: [] };
|
|
55816
56149
|
const lines = [];
|
|
55817
56150
|
lookAlikeEntries(data).forEach(({ lookAlike }, index) => {
|
|
55818
56151
|
const email = lookAlike.email;
|
|
55819
|
-
const from = isRecord$
|
|
56152
|
+
const from = isRecord$7(email.from) ? shownText(email.from.address) : "";
|
|
55820
56153
|
const subject = shownText(email.subject);
|
|
55821
56154
|
const status = shownLine(lookAlike.status) || "undecided";
|
|
55822
56155
|
const kind = shownLine(lookAlike.kind) || "other";
|
|
@@ -55828,7 +56161,7 @@ function lookAlikesReport(data) {
|
|
|
55828
56161
|
if (why) lines.push(` Why it should ${expected === "match" ? "" : "not "}match: ${why}`);
|
|
55829
56162
|
lines.push(` ${outcome} (expected ${expected})${lookAlike.close_call === true ? `; ${CLOSE_CALL_NOTE}` : ""}`);
|
|
55830
56163
|
});
|
|
55831
|
-
const counts = isRecord$
|
|
56164
|
+
const counts = isRecord$7(data.counts) ? data.counts : {};
|
|
55832
56165
|
const count = (key) => typeof counts[key] === "number" ? counts[key] : 0;
|
|
55833
56166
|
const dropped = count("dropped");
|
|
55834
56167
|
const closeCalls = count("close_calls");
|
|
@@ -55838,7 +56171,7 @@ function lookAlikesReport(data) {
|
|
|
55838
56171
|
// src/oclif/email-rule-scope-flags.ts
|
|
55839
56172
|
const SCOPE_ADDRESS_FLAG = "scope-address";
|
|
55840
56173
|
const SCOPE_DOMAIN_FLAG = "scope-domain";
|
|
55841
|
-
const SCOPE_FLAG_NOTE = `Sends evaluation_scope selected unless --
|
|
56174
|
+
const SCOPE_FLAG_NOTE = `Sends evaluation_scope selected unless --scope or the body gives a scope. --${SCOPE_ADDRESS_FLAG} and --${SCOPE_DOMAIN_FLAG} set scope_selection as a whole, over any in --raw-body or --body-file, and a list not given is sent empty.`;
|
|
55842
56175
|
/**
|
|
55843
56176
|
* The two flags, made anew for each command. Each value is its own flag
|
|
55844
56177
|
* (`--scope-address a --scope-address b`) or a comma list, so a value after
|
|
@@ -55883,7 +56216,7 @@ function scopeList(values, flag) {
|
|
|
55883
56216
|
/**
|
|
55884
56217
|
* scope_selection from --scope-address and --scope-domain, or nothing when
|
|
55885
56218
|
* neither was given, with evaluation_scope selected when neither
|
|
55886
|
-
* --
|
|
56219
|
+
* --scope nor `base` (the body --raw-body or --body-file gave)
|
|
55887
56220
|
* gives a scope.
|
|
55888
56221
|
*/
|
|
55889
56222
|
function scopeSelectionBodyFields(flags, base) {
|
|
@@ -55900,13 +56233,59 @@ function scopeSelectionBodyFields(flags, base) {
|
|
|
55900
56233
|
}
|
|
55901
56234
|
}];
|
|
55902
56235
|
const baseScope = base !== null && typeof base === "object" && !Array.isArray(base) ? base.evaluation_scope : void 0;
|
|
55903
|
-
if (flags
|
|
56236
|
+
if (flags.scope === void 0 && baseScope === void 0) fields.push({
|
|
55904
56237
|
flag: given,
|
|
55905
56238
|
property: "evaluation_scope",
|
|
55906
56239
|
value: "selected"
|
|
55907
56240
|
});
|
|
55908
56241
|
return fields;
|
|
55909
56242
|
}
|
|
56243
|
+
function isRecord$6(value) {
|
|
56244
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
56245
|
+
}
|
|
56246
|
+
/**
|
|
56247
|
+
* Text a sender or a file reader wrote, on one line, in compatibility form (so a
|
|
56248
|
+
* fullwidth comma or parenthesis reads as the plain one), cut at `max` code
|
|
56249
|
+
* points.
|
|
56250
|
+
*/
|
|
56251
|
+
function cut(value, max) {
|
|
56252
|
+
const chars = Array.from(shownLine(value).normalize("NFKC"));
|
|
56253
|
+
return chars.length > max ? `${chars.slice(0, max - 3).join("").trimEnd()}...` : chars.join("");
|
|
56254
|
+
}
|
|
56255
|
+
/**
|
|
56256
|
+
* A file name as the line shows it: in double quotes when it holds a comma, a
|
|
56257
|
+
* parenthesis or a quote, or starts with a plus, so a name cannot pass for more
|
|
56258
|
+
* files, a description or the count of the rest.
|
|
56259
|
+
*/
|
|
56260
|
+
function fileName(value) {
|
|
56261
|
+
const name = cut(value, 40);
|
|
56262
|
+
if (name === "") return "(no name)";
|
|
56263
|
+
return /[,()"]|^\+/.test(name) ? `"${name.replaceAll("\"", "'")}"` : name;
|
|
56264
|
+
}
|
|
56265
|
+
/**
|
|
56266
|
+
* What a row's email carried, as one line without indentation: "2
|
|
56267
|
+
* attachments: rate-card.pdf (Contractor pay rates by role), logo.png",
|
|
56268
|
+
* "no attachments", or undefined when the row does not say (null or absent:
|
|
56269
|
+
* not known to the caller).
|
|
56270
|
+
*/
|
|
56271
|
+
function attachmentsSummary(row) {
|
|
56272
|
+
if (!isRecord$6(row) || !Array.isArray(row.attachments)) return void 0;
|
|
56273
|
+
const listed = row.attachments.filter(isRecord$6);
|
|
56274
|
+
const count = typeof row.attachment_count === "number" && row.attachment_count >= listed.length ? row.attachment_count : listed.length;
|
|
56275
|
+
if (count === 0) return "no attachments";
|
|
56276
|
+
const shown = listed.slice(0, 3).map((file) => {
|
|
56277
|
+
const name = fileName(file.name);
|
|
56278
|
+
const description = cut(file.description, 60).replaceAll("(", "[").replaceAll(")", "]");
|
|
56279
|
+
return description ? `${name} (${description})` : name;
|
|
56280
|
+
});
|
|
56281
|
+
const more = count - shown.length;
|
|
56282
|
+
return `${count} ${count === 1 ? "attachment" : "attachments"}: ${[...shown, ...more > 0 ? [`+${more} more`] : []].join(", ")}`;
|
|
56283
|
+
}
|
|
56284
|
+
/** attachmentsSummary as lines under a row, indented by `indent`; none when it does not say. */
|
|
56285
|
+
function attachmentsLines(row, indent) {
|
|
56286
|
+
const summary = attachmentsSummary(row);
|
|
56287
|
+
return summary === void 0 ? [] : [`${indent}${summary}`];
|
|
56288
|
+
}
|
|
55910
56289
|
// src/oclif/email-rule-authoring.ts
|
|
55911
56290
|
const EMAIL_ID = /^[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}$/i;
|
|
55912
56291
|
/** Whether `id` has the shape of an email id (a UUID). */
|
|
@@ -55916,7 +56295,7 @@ function isEmailId(id) {
|
|
|
55916
56295
|
function usageError$1(message) {
|
|
55917
56296
|
return new Errors.CLIError(message, { exit: 2 });
|
|
55918
56297
|
}
|
|
55919
|
-
function isRecord$
|
|
56298
|
+
function isRecord$5(value) {
|
|
55920
56299
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
55921
56300
|
}
|
|
55922
56301
|
/** `count` and the word for it: "1 expectation", "2 expectations". */
|
|
@@ -55946,12 +56325,12 @@ function parseEmailIdList(values, flag) {
|
|
|
55946
56325
|
* their own flag.
|
|
55947
56326
|
*/
|
|
55948
56327
|
function checkExpectations(value, label) {
|
|
55949
|
-
if (!isRecord$
|
|
55950
|
-
if ("samples" in value) throw usageError$1(`${label} takes emails by id only; give made-up emails with ${label.startsWith("--expectations-file") ? "--
|
|
56328
|
+
if (!isRecord$5(value)) throw usageError$1(`${label} must hold a JSON object such as {"match": ["<email-id>"], "no_match": ["<email-id>"]}.`);
|
|
56329
|
+
if ("samples" in value) throw usageError$1(`${label} takes emails by id only; give made-up emails with ${label.startsWith("--expectations-file") ? "--samples-file" : "--expect-samples-file"}.`);
|
|
55951
56330
|
return value;
|
|
55952
56331
|
}
|
|
55953
56332
|
/**
|
|
55954
|
-
* `expect` for test
|
|
56333
|
+
* `expect` for test, from --expect-file or the id flags, with the
|
|
55955
56334
|
* made-up emails --expect-samples-file holds in expect.samples.
|
|
55956
56335
|
*/
|
|
55957
56336
|
function expectBodyFields(flags) {
|
|
@@ -55984,10 +56363,10 @@ function expectBodyFields(flags) {
|
|
|
55984
56363
|
value: expect
|
|
55985
56364
|
}];
|
|
55986
56365
|
}
|
|
55987
|
-
/** test
|
|
56366
|
+
/** test's flag that tests the emails an earlier answer tested. */
|
|
55988
56367
|
const SAME_EMAILS_FLAG = "same-emails-as";
|
|
55989
56368
|
/**
|
|
55990
|
-
* `email_ids` for test
|
|
56369
|
+
* `email_ids` for test, from --same-emails-as: every email an
|
|
55991
56370
|
* earlier test's answer, saved as it printed it, tested (its results'
|
|
55992
56371
|
* email_id), so a second tree is tested over the same mail rather than over
|
|
55993
56372
|
* whatever is newest by then.
|
|
@@ -55996,10 +56375,10 @@ function sameEmailsBodyFields(flags) {
|
|
|
55996
56375
|
const file = flags[SAME_EMAILS_FLAG];
|
|
55997
56376
|
if (typeof file !== "string") return [];
|
|
55998
56377
|
const saved = readJsonFileFlag(file, `--${SAME_EMAILS_FLAG}`);
|
|
55999
|
-
const answer = isRecord$
|
|
56000
|
-
const results = isRecord$
|
|
56001
|
-
if (!results) throw usageError$1(`--${SAME_EMAILS_FLAG} ${file} is not a saved test
|
|
56002
|
-
const ids = [...new Set(results.flatMap((result) => isRecord$
|
|
56378
|
+
const answer = isRecord$5(saved) && isRecord$5(saved.data) ? saved.data : saved;
|
|
56379
|
+
const results = isRecord$5(answer) && Array.isArray(answer.results) ? answer.results : null;
|
|
56380
|
+
if (!results) throw usageError$1(`--${SAME_EMAILS_FLAG} ${file} is not a saved test answer: it has no results. Save one with primitive email-rules test --json > answer.json.`);
|
|
56381
|
+
const ids = [...new Set(results.flatMap((result) => isRecord$5(result) && typeof result.email_id === "string" && isEmailId(result.email_id) ? [result.email_id.toLowerCase()] : []))];
|
|
56003
56382
|
if (ids.length === 0) throw usageError$1(`--${SAME_EMAILS_FLAG} ${file} names no emails.`);
|
|
56004
56383
|
return [{
|
|
56005
56384
|
flag: `--${SAME_EMAILS_FLAG}`,
|
|
@@ -56008,7 +56387,7 @@ function sameEmailsBodyFields(flags) {
|
|
|
56008
56387
|
}];
|
|
56009
56388
|
}
|
|
56010
56389
|
/**
|
|
56011
|
-
* `expectations` for create
|
|
56390
|
+
* `expectations` for create and update, from
|
|
56012
56391
|
* --expectations-file. A file holding `null` removes the saved expectations
|
|
56013
56392
|
* (the API takes that on update only).
|
|
56014
56393
|
*/
|
|
@@ -56034,7 +56413,7 @@ function formatFactValue(fact) {
|
|
|
56034
56413
|
const value = fact?.value;
|
|
56035
56414
|
let text;
|
|
56036
56415
|
if (Array.isArray(value)) {
|
|
56037
|
-
const per = isRecord$
|
|
56416
|
+
const per = isRecord$5(fact?.value_confidences) ? fact.value_confidences : void 0;
|
|
56038
56417
|
text = `[${value.map((item) => {
|
|
56039
56418
|
const name = String(item);
|
|
56040
56419
|
const score = per?.[name];
|
|
@@ -56064,7 +56443,7 @@ function answerConfidence(answer) {
|
|
|
56064
56443
|
* decide it. An entry that does not say it can is taken as one that cannot.
|
|
56065
56444
|
*/
|
|
56066
56445
|
function undecidedOf(entry) {
|
|
56067
|
-
const given = isRecord$
|
|
56446
|
+
const given = isRecord$5(entry) ? entry : {};
|
|
56068
56447
|
return {
|
|
56069
56448
|
reason: typeof given.reason === "string" ? given.reason : "undecided",
|
|
56070
56449
|
retryable: given.retryable === true
|
|
@@ -56097,7 +56476,7 @@ function questionLines(summary, results) {
|
|
|
56097
56476
|
}
|
|
56098
56477
|
/** Whether an expectation entry is marked a close call. */
|
|
56099
56478
|
function isCloseCall(entry) {
|
|
56100
|
-
return isRecord$
|
|
56479
|
+
return isRecord$5(entry) && entry.close_call === true;
|
|
56101
56480
|
}
|
|
56102
56481
|
function expectationLine(result) {
|
|
56103
56482
|
const note = result.status === "undecided" ? undecidedNote(undecidedOf(result)) : isCloseCall(result) ? CLOSE_CALL_NOTE : void 0;
|
|
@@ -56105,13 +56484,13 @@ function expectationLine(result) {
|
|
|
56105
56484
|
}
|
|
56106
56485
|
/** The made-up emails a test's expectations judged, in order. */
|
|
56107
56486
|
function sampleJudgments(expectations) {
|
|
56108
|
-
return (isRecord$
|
|
56487
|
+
return (isRecord$5(expectations) && Array.isArray(expectations.samples) ? expectations.samples : []).filter(isRecord$5).map((item, position) => ({
|
|
56109
56488
|
index: typeof item.index === "number" ? item.index : position,
|
|
56110
56489
|
label: typeof item.label === "string" ? item.label : null,
|
|
56111
56490
|
expected: String(item.expected ?? ""),
|
|
56112
56491
|
outcome: String(item.outcome ?? "not_decided"),
|
|
56113
56492
|
status: String(item.status ?? "undecided"),
|
|
56114
|
-
question_answers: Array.isArray(item.question_answers) ? item.question_answers.filter(isRecord$
|
|
56493
|
+
question_answers: Array.isArray(item.question_answers) ? item.question_answers.filter(isRecord$5) : [],
|
|
56115
56494
|
entry: item
|
|
56116
56495
|
}));
|
|
56117
56496
|
}
|
|
@@ -56161,10 +56540,10 @@ function expectationsLines(expectations, name = sampleNamer()) {
|
|
|
56161
56540
|
* withheld.
|
|
56162
56541
|
*/
|
|
56163
56542
|
function changesLines(changes, kind) {
|
|
56164
|
-
if (!isRecord$
|
|
56543
|
+
if (!isRecord$5(changes)) return [];
|
|
56165
56544
|
const list = (value) => {
|
|
56166
|
-
const given = isRecord$
|
|
56167
|
-
const emails = Array.isArray(given.emails) ? given.emails.filter(isRecord$
|
|
56545
|
+
const given = isRecord$5(value) ? value : {};
|
|
56546
|
+
const emails = Array.isArray(given.emails) ? given.emails.filter(isRecord$5) : [];
|
|
56168
56547
|
return {
|
|
56169
56548
|
count: typeof given.count === "number" ? given.count : emails.length,
|
|
56170
56549
|
emails
|
|
@@ -56185,7 +56564,7 @@ function changesLines(changes, kind) {
|
|
|
56185
56564
|
for (const [label, entry] of [[words[0], newly], [words[1], stops]]) {
|
|
56186
56565
|
if (entry.emails.length === 0) continue;
|
|
56187
56566
|
const shown = entry.emails.slice(0, 3);
|
|
56188
|
-
lines.push(` ${label[0]?.toUpperCase()}${label.slice(1)}${entry.count > shown.length ? ` (${shown.length} of ${entry.count} shown; the JSON lists up to 50)` : ""}:`, ...shown.
|
|
56567
|
+
lines.push(` ${label[0]?.toUpperCase()}${label.slice(1)}${entry.count > shown.length ? ` (${shown.length} of ${entry.count} shown; the JSON lists up to 50)` : ""}:`, ...shown.flatMap((email) => [emailLine(email), ...attachmentsLines(email, " ").map(terminalLine)]));
|
|
56189
56568
|
}
|
|
56190
56569
|
return lines;
|
|
56191
56570
|
}
|
|
@@ -56217,20 +56596,16 @@ function notMatchedLine(result) {
|
|
|
56217
56596
|
return [...lines, ...attachmentsLine(result)];
|
|
56218
56597
|
}
|
|
56219
56598
|
/**
|
|
56220
|
-
*
|
|
56221
|
-
*
|
|
56222
|
-
* shows a sender's text.
|
|
56599
|
+
* What a decided result's email carried (attachments), on one line under it,
|
|
56600
|
+
* as the decision listings show it (attachmentsSummary).
|
|
56223
56601
|
*/
|
|
56224
56602
|
function attachmentsLine(result) {
|
|
56225
|
-
|
|
56226
|
-
if (!Array.isArray(names)) return [];
|
|
56227
|
-
const shown = names.map(shownText).filter(Boolean);
|
|
56228
|
-
return shown.length > 0 ? [` attachments: ${shown.join(", ")}`] : [];
|
|
56603
|
+
return attachmentsLines(result, " ").map(terminalLine);
|
|
56229
56604
|
}
|
|
56230
56605
|
/**
|
|
56231
|
-
* The matched emails, each with who sent it, its subject and
|
|
56232
|
-
*
|
|
56233
|
-
* matched list is.
|
|
56606
|
+
* The matched emails, each with who sent it, its subject and what it carried
|
|
56607
|
+
* (how many files, the first few names and descriptions), so a match can be
|
|
56608
|
+
* judged without opening it; cut as the not matched list is.
|
|
56234
56609
|
*/
|
|
56235
56610
|
function matchedLines(results, expectations) {
|
|
56236
56611
|
const flagged = new Set((expectations?.results ?? []).filter((result) => result.status !== "passed").map((result) => result.email_id));
|
|
@@ -56320,27 +56695,27 @@ function minuteUtc$1(value) {
|
|
|
56320
56695
|
}
|
|
56321
56696
|
/** The first line of a test report: which mail was tested. */
|
|
56322
56697
|
function windowLine(data, tested) {
|
|
56323
|
-
const window = isRecord$
|
|
56698
|
+
const window = isRecord$5(data.window) ? data.window : void 0;
|
|
56324
56699
|
const oldest = typeof window?.oldest_at === "string" ? window.oldest_at : void 0;
|
|
56325
56700
|
const newest = typeof window?.newest_at === "string" ? window.newest_at : void 0;
|
|
56326
56701
|
if (!window || !oldest || !newest) return [];
|
|
56327
56702
|
return [`Tested ${plural$1(tested, "email", "emails")} received ${minuteUtc$1(oldest)} to ${minuteUtc$1(newest)}.`];
|
|
56328
56703
|
}
|
|
56329
|
-
/** The stderr report and exit code of a test
|
|
56704
|
+
/** The stderr report and exit code of a test answer. */
|
|
56330
56705
|
function testEmailRuleReport(data) {
|
|
56331
|
-
if (!isRecord$
|
|
56706
|
+
if (!isRecord$5(data)) return { lines: [] };
|
|
56332
56707
|
const name = sampleNamer();
|
|
56333
56708
|
const result = data;
|
|
56334
56709
|
const results = Array.isArray(result.results) ? result.results : [];
|
|
56335
|
-
const summary = isRecord$
|
|
56336
|
-
const counts = isRecord$
|
|
56710
|
+
const summary = isRecord$5(result.summary) ? result.summary : void 0;
|
|
56711
|
+
const counts = isRecord$5(data.counts) ? data.counts : void 0;
|
|
56337
56712
|
return {
|
|
56338
56713
|
lines: [
|
|
56339
56714
|
...windowLine(data, (typeof counts?.emails === "number" ? counts.emails : results.length) - (typeof counts?.not_found === "number" ? counts.not_found : 0)),
|
|
56340
56715
|
...ruleNotesLines(data),
|
|
56341
56716
|
...conditionLines(summary),
|
|
56342
56717
|
...questionLines(summary, results),
|
|
56343
|
-
...changesLines(data.changes, isRecord$
|
|
56718
|
+
...changesLines(data.changes, isRecord$5(data.rule) ? data.rule.kind : void 0),
|
|
56344
56719
|
...expectationsLines(result.expectations, name),
|
|
56345
56720
|
...matchedLines(results, result.expectations),
|
|
56346
56721
|
...notMatchedLines(results, result.expectations)
|
|
@@ -56370,7 +56745,7 @@ const EMAIL_RULE_OPERATION_EXTENSIONS = {
|
|
|
56370
56745
|
}),
|
|
56371
56746
|
[EXPECT_SAMPLES_FILE_FLAG]: Flags.string({ description: `${SAMPLES_FILE_SHAPE} Sets expect.samples, beside any emails by id; the answer judges each in expectations.samples, and the report names each sample N, its place from 1 among those sent. Like any expect, it replaces a saved rule's own expectations and samples for this test. ${EXPECTATION_FLAG_NOTE}` }),
|
|
56372
56747
|
[PICK_FLAG]: Flags.string({ description: pickFlagHelp([EXPECT_SAMPLES_FILE_FLAG]) }),
|
|
56373
|
-
[SAME_EMAILS_FLAG]: Flags.string({ description: "Test the same emails as an earlier test: a file holding what
|
|
56748
|
+
[SAME_EMAILS_FLAG]: Flags.string({ description: "Test the same emails as an earlier test: a file holding what primitive email-rules test --json printed. Sets email_ids to its results' email_id, so two trees are tested over the same mail." }),
|
|
56374
56749
|
...scopeSelectionFlags()
|
|
56375
56750
|
},
|
|
56376
56751
|
bodyFields: (flags, base) => {
|
|
@@ -56391,8 +56766,8 @@ const EMAIL_RULE_OPERATION_EXTENSIONS = {
|
|
|
56391
56766
|
},
|
|
56392
56767
|
createEmailRule: {
|
|
56393
56768
|
flags: {
|
|
56394
|
-
"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>\"]}. Sets expectations, over any in --body-file or --raw-body. A create judges them before saving only for a do_not_share rule created active, in expectations_check (passed, failed, undecided); test
|
|
56395
|
-
[SAMPLES_FILE_FLAG]: Flags.string({ description: `${SAMPLES_FILE_SHAPE} Sets expectation_samples, over any in --body-file or --raw-body. A create judges them only for a do_not_share rule created active; test
|
|
56769
|
+
"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>\"]}. Sets expectations, over any in --body-file or --raw-body. A create judges them before saving only for a do_not_share rule created active, in expectations_check (passed, failed, undecided); test --rule-id judges them otherwise." }),
|
|
56770
|
+
[SAMPLES_FILE_FLAG]: Flags.string({ description: `${SAMPLES_FILE_SHAPE} Sets expectation_samples, over any in --body-file or --raw-body. A create judges them only for a do_not_share rule created active; test --rule-id does otherwise.` }),
|
|
56396
56771
|
[PICK_FLAG]: Flags.string({ description: pickFlagHelp([SAMPLES_FILE_FLAG]) }),
|
|
56397
56772
|
...scopeSelectionFlags()
|
|
56398
56773
|
},
|
|
@@ -56464,7 +56839,7 @@ const EMAIL_RULE_OPERATION_EXTENSIONS = {
|
|
|
56464
56839
|
}
|
|
56465
56840
|
};
|
|
56466
56841
|
// src/oclif/email-rule-listings.ts
|
|
56467
|
-
function isRecord$
|
|
56842
|
+
function isRecord$4(value) {
|
|
56468
56843
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
56469
56844
|
}
|
|
56470
56845
|
/** Rows as a table: every column padded to its widest cell but the last. */
|
|
@@ -56487,14 +56862,16 @@ function decisionOutcome(decision) {
|
|
|
56487
56862
|
/**
|
|
56488
56863
|
* A table of a rule's decisions (listEmailRuleDecisions and
|
|
56489
56864
|
* listEmailRuleDecisionsOnMyMail): when each was decided, what it decided,
|
|
56490
|
-
* the email, the mailbox it was received in, its sender and subject
|
|
56491
|
-
*
|
|
56865
|
+
* the email, the mailbox it was received in, its sender and subject, and
|
|
56866
|
+
* under each row what the email carried (attachmentsSummary). An email you
|
|
56867
|
+
* are not shown shows `-` for those and no attachments line. Nothing for an
|
|
56868
|
+
* empty list.
|
|
56492
56869
|
*/
|
|
56493
56870
|
function decisionLines(data) {
|
|
56494
|
-
const rows = Array.isArray(data) ? data.filter(isRecord$
|
|
56871
|
+
const rows = Array.isArray(data) ? data.filter(isRecord$4) : [];
|
|
56495
56872
|
if (rows.length === 0) return [];
|
|
56496
56873
|
const cell = (value) => shownText(value) || "-";
|
|
56497
|
-
|
|
56874
|
+
const [header = "", ...table] = tableLines([[
|
|
56498
56875
|
"DECIDED",
|
|
56499
56876
|
"OUTCOME",
|
|
56500
56877
|
"EMAIL",
|
|
@@ -56509,11 +56886,21 @@ function decisionLines(data) {
|
|
|
56509
56886
|
cell(row.from_address),
|
|
56510
56887
|
cell(row.subject)
|
|
56511
56888
|
])]);
|
|
56889
|
+
return [header, ...table.flatMap((line, i) => [line, ...attachmentsLines(rows[i], " ").map(terminalLine)])];
|
|
56890
|
+
}
|
|
56891
|
+
/**
|
|
56892
|
+
* The rule results on one email (listEmailRuleResults): what the email
|
|
56893
|
+
* carried, once for every rule listed, after any notes the answer carries.
|
|
56894
|
+
* Nothing when the answer says neither.
|
|
56895
|
+
*/
|
|
56896
|
+
function ruleResultsLines(data) {
|
|
56897
|
+
const summary = attachmentsSummary(data);
|
|
56898
|
+
return [...ruleNotesLines(data), ...summary === void 0 ? [] : [terminalLine(`Email: ${summary}`)]];
|
|
56512
56899
|
}
|
|
56513
56900
|
/** At most this many scope addresses and domains are named in COVERS. */
|
|
56514
56901
|
const COVERS_NAMED = 3;
|
|
56515
56902
|
function ruleAuthor(rule) {
|
|
56516
|
-
const author = isRecord$
|
|
56903
|
+
const author = isRecord$4(rule.author) ? rule.author : {};
|
|
56517
56904
|
const name = shownText(author.name) || shownText(author.email) || shownLine(author.user_id).slice(0, 8) || "-";
|
|
56518
56905
|
return rule.is_author === true ? `${name} (you)` : name;
|
|
56519
56906
|
}
|
|
@@ -56523,7 +56910,7 @@ function ruleCovers(rule) {
|
|
|
56523
56910
|
case "own_mailboxes": return "author's own mailboxes";
|
|
56524
56911
|
case "author": return "all mail the author reads";
|
|
56525
56912
|
case "selected": {
|
|
56526
|
-
const selection = isRecord$
|
|
56913
|
+
const selection = isRecord$4(rule.scope_selection) ? rule.scope_selection : {};
|
|
56527
56914
|
const names = [...(Array.isArray(selection.addresses) ? selection.addresses : []).map((address) => shownLine(address)), ...(Array.isArray(selection.domains) ? selection.domains : []).map((domain) => `@${shownLine(domain)}`)].filter((name) => name !== "" && name !== "@");
|
|
56528
56915
|
if (names.length === 0) return "selected";
|
|
56529
56916
|
const named = names.slice(0, COVERS_NAMED).join(", ");
|
|
@@ -56533,7 +56920,7 @@ function ruleCovers(rule) {
|
|
|
56533
56920
|
}
|
|
56534
56921
|
}
|
|
56535
56922
|
function countSum(list) {
|
|
56536
|
-
return Array.isArray(list) ? list.reduce((sum, entry) => sum + (isRecord$
|
|
56923
|
+
return Array.isArray(list) ? list.reduce((sum, entry) => sum + (isRecord$4(entry) && typeof entry.count === "number" ? entry.count : 0), 0) : 0;
|
|
56537
56924
|
}
|
|
56538
56925
|
/**
|
|
56539
56926
|
* Who receives what a rule matches now, from receivers (the --all list
|
|
@@ -56541,7 +56928,7 @@ function countSum(list) {
|
|
|
56541
56928
|
* `unknown` when it could not be read in time.
|
|
56542
56929
|
*/
|
|
56543
56930
|
function ruleReceivers(rule) {
|
|
56544
|
-
if (!isRecord$
|
|
56931
|
+
if (!isRecord$4(rule.receivers)) return "unknown";
|
|
56545
56932
|
const keys = countSum(rule.receivers.keys);
|
|
56546
56933
|
const webhooks = countSum(rule.receivers.webhooks);
|
|
56547
56934
|
const shares = countSum(rule.receivers.shares);
|
|
@@ -56554,7 +56941,7 @@ function ruleReceivers(rule) {
|
|
|
56554
56941
|
* with --all who receives what it matches. Nothing for an empty list.
|
|
56555
56942
|
*/
|
|
56556
56943
|
function ruleListLines(data, all) {
|
|
56557
|
-
const rows = Array.isArray(data) ? data.filter(isRecord$
|
|
56944
|
+
const rows = Array.isArray(data) ? data.filter(isRecord$4) : [];
|
|
56558
56945
|
if (rows.length === 0) return [];
|
|
56559
56946
|
return tableLines([[
|
|
56560
56947
|
"NAME",
|
|
@@ -56575,13 +56962,13 @@ function ruleListLines(data, all) {
|
|
|
56575
56962
|
])]);
|
|
56576
56963
|
}
|
|
56577
56964
|
/**
|
|
56578
|
-
* Why a list
|
|
56965
|
+
* Why a list request was refused, in the words a person can act
|
|
56579
56966
|
* on, or undefined to keep the generic hint for the error code.
|
|
56580
56967
|
*/
|
|
56581
56968
|
function listEmailRulesErrorHint(code, payload, flags = {}) {
|
|
56582
56969
|
if (code !== "grant_forbidden") return void 0;
|
|
56583
|
-
const error = isRecord$
|
|
56584
|
-
const details = isRecord$
|
|
56970
|
+
const error = isRecord$4(payload) && isRecord$4(payload.error) ? payload.error : payload;
|
|
56971
|
+
const details = isRecord$4(error) && isRecord$4(error.details) ? error.details : {};
|
|
56585
56972
|
switch (details.reason) {
|
|
56586
56973
|
case "owner_or_admin_only": return "Only owners and admins can list every rule. Run without --all to list the rules you can see.";
|
|
56587
56974
|
case "person_credential": return "Listing every rule needs your own CLI login, not an API key or agent sign-in.";
|
|
@@ -56592,11 +56979,11 @@ function listEmailRulesErrorHint(code, payload, flags = {}) {
|
|
|
56592
56979
|
default: return;
|
|
56593
56980
|
}
|
|
56594
56981
|
}
|
|
56595
|
-
/** The empty-list note of list
|
|
56982
|
+
/** The empty-list note of list, by whether --all was given. */
|
|
56596
56983
|
function emptyRuleListHint(all) {
|
|
56597
56984
|
return all ? "(no results) No rules in the organization match these filters." : "(no results) No rules you can see match. Owners and admins can list every rule in the organization with --all.";
|
|
56598
56985
|
}
|
|
56599
|
-
/** The API's page cap and default page size on list
|
|
56986
|
+
/** The API's page cap and default page size on list. */
|
|
56600
56987
|
const RULE_LIST_PAGE_MAX = 100;
|
|
56601
56988
|
const RULE_LIST_DEFAULT_LIMIT = 50;
|
|
56602
56989
|
const EMAIL_RULE_LISTING_EXTENSIONS = {
|
|
@@ -56606,7 +56993,7 @@ const EMAIL_RULE_LISTING_EXTENSIONS = {
|
|
|
56606
56993
|
const rows = Array.isArray(data) ? data : [];
|
|
56607
56994
|
const lines = ruleListLines(data, flags.all === true);
|
|
56608
56995
|
const limit = typeof flags.limit === "number" && flags.limit <= RULE_LIST_PAGE_MAX ? flags.limit : typeof flags.limit === "number" ? void 0 : RULE_LIST_DEFAULT_LIMIT;
|
|
56609
|
-
const cursor = isRecord$
|
|
56996
|
+
const cursor = isRecord$4(meta) ? meta.cursor : void 0;
|
|
56610
56997
|
if (typeof flags.mailbox === "string" && typeof cursor === "string" && cursor !== "" && limit !== void 0 && rows.length < limit) lines.push("Scanned part of the rules; run again with --cursor to continue.");
|
|
56611
56998
|
return { lines };
|
|
56612
56999
|
}
|
|
@@ -56618,6 +57005,91 @@ const EMAIL_RULE_LISTING_EXTENSIONS = {
|
|
|
56618
57005
|
listEmailRuleDecisionsOnMyMail: {
|
|
56619
57006
|
flags: {},
|
|
56620
57007
|
report: (data) => ({ lines: decisionLines(data) })
|
|
57008
|
+
},
|
|
57009
|
+
listEmailRuleResults: {
|
|
57010
|
+
flags: {},
|
|
57011
|
+
report: (data) => ({ lines: ruleResultsLines(data) })
|
|
57012
|
+
}
|
|
57013
|
+
};
|
|
57014
|
+
// src/oclif/email-rule-shares.ts
|
|
57015
|
+
function isRecord$3(value) {
|
|
57016
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
57017
|
+
}
|
|
57018
|
+
/** A person on a share: their name, else their email, else `-`. */
|
|
57019
|
+
function person(value) {
|
|
57020
|
+
if (!isRecord$3(value)) return "-";
|
|
57021
|
+
return shownText(value.name) || shownText(value.email) || "-";
|
|
57022
|
+
}
|
|
57023
|
+
/** The rule's name: the live rule's, else the name the share recorded. */
|
|
57024
|
+
function ruleName(share) {
|
|
57025
|
+
return shownText((isRecord$3(share.rule) ? share.rule : null)?.name) || shownText(share.rule_name) || "-";
|
|
57026
|
+
}
|
|
57027
|
+
/** The rule's id, or `-` when the share does not show it to you. */
|
|
57028
|
+
function ruleId(share) {
|
|
57029
|
+
return shownLine(share.rule_id) || "-";
|
|
57030
|
+
}
|
|
57031
|
+
/** Live, or why not: ended (with its reason) or not live because someone left. */
|
|
57032
|
+
function shareState(share) {
|
|
57033
|
+
if (share.live === true) return "live";
|
|
57034
|
+
const reason = shownLine(share.end_reason);
|
|
57035
|
+
if (typeof share.ended_at === "string") return reason ? `ended (${reason})` : "ended";
|
|
57036
|
+
return "not live";
|
|
57037
|
+
}
|
|
57038
|
+
/** The other person on the share, from the caller's side of it. */
|
|
57039
|
+
function otherSide(share) {
|
|
57040
|
+
if (share.is_granter === true) return `to ${person(share.beneficiary)}`;
|
|
57041
|
+
if (share.is_beneficiary === true) return `from ${person(share.granter)}`;
|
|
57042
|
+
return `${person(share.granter)} to ${person(share.beneficiary)}`;
|
|
57043
|
+
}
|
|
57044
|
+
/**
|
|
57045
|
+
* A table of shares (listEmailRuleShares, listGivenEmailRuleShares): each
|
|
57046
|
+
* share's id, its rule's name and id (`-` where the share does not show the
|
|
57047
|
+
* id), who it is with and whether it is live. Nothing for an empty list.
|
|
57048
|
+
*/
|
|
57049
|
+
function shareListLines(data) {
|
|
57050
|
+
const rows = Array.isArray(data) ? data.filter(isRecord$3) : [];
|
|
57051
|
+
if (rows.length === 0) return [];
|
|
57052
|
+
return [...tableLines([[
|
|
57053
|
+
"SHARE ID",
|
|
57054
|
+
"RULE",
|
|
57055
|
+
"RULE ID",
|
|
57056
|
+
"WITH",
|
|
57057
|
+
"STATE"
|
|
57058
|
+
], ...rows.map((share) => [
|
|
57059
|
+
shownLine(share.id) || "-",
|
|
57060
|
+
ruleName(share),
|
|
57061
|
+
ruleId(share),
|
|
57062
|
+
otherSide(share),
|
|
57063
|
+
shareState(share)
|
|
57064
|
+
])]), ...rows.some(showsReceivedRuleId) ? [KEY_NOTE] : []];
|
|
57065
|
+
}
|
|
57066
|
+
/** A share made with the caller that shows them its rule's id. */
|
|
57067
|
+
function showsReceivedRuleId(share) {
|
|
57068
|
+
return share.is_beneficiary === true && typeof share.rule_id === "string";
|
|
57069
|
+
}
|
|
57070
|
+
/** Said under a share made with the caller: which id goes where. */
|
|
57071
|
+
const KEY_NOTE = "RULE ID names the rule in your webhook deliveries (understanding.rules[].id, with through_share). A key reads a share by the SHARE ID, added from the dashboard's API keys page.";
|
|
57072
|
+
/** One share (getEmailRuleShare): the same facts as a list row, one per line. */
|
|
57073
|
+
function shareLines(data) {
|
|
57074
|
+
if (!isRecord$3(data)) return [];
|
|
57075
|
+
return [
|
|
57076
|
+
`Share ${shownLine(data.id) || "-"}: ${shareState(data)}, ${otherSide(data)}`,
|
|
57077
|
+
`Rule: ${ruleName(data)} (${typeof data.rule_id === "string" ? `id ${ruleId(data)}` : "id not shown to you"})`,
|
|
57078
|
+
...showsReceivedRuleId(data) ? [KEY_NOTE] : []
|
|
57079
|
+
];
|
|
57080
|
+
}
|
|
57081
|
+
const EMAIL_RULE_SHARE_EXTENSIONS = {
|
|
57082
|
+
listEmailRuleShares: {
|
|
57083
|
+
flags: {},
|
|
57084
|
+
report: (data) => ({ lines: shareListLines(data) })
|
|
57085
|
+
},
|
|
57086
|
+
listGivenEmailRuleShares: {
|
|
57087
|
+
flags: {},
|
|
57088
|
+
report: (data) => ({ lines: shareListLines(data) })
|
|
57089
|
+
},
|
|
57090
|
+
getEmailRuleShare: {
|
|
57091
|
+
flags: {},
|
|
57092
|
+
report: (data) => ({ lines: shareLines(data) })
|
|
56621
57093
|
}
|
|
56622
57094
|
};
|
|
56623
57095
|
// src/oclif/empty-mail-hint.ts
|
|
@@ -56748,7 +57220,7 @@ const GRANT_POINTER = "`primitive whoami --json --grant` shows which mail it rea
|
|
|
56748
57220
|
* holder, which its holder checks as a share.
|
|
56749
57221
|
*/
|
|
56750
57222
|
function rulesSentence(rules) {
|
|
56751
|
-
return `A rule grants an email it matches when the email is evaluated, shortly after it arrives, while the rule is active, and the key reads that mail only while the rule stays active. Each id (${named(rules)}) is an email rule or a rule shared with the key's holder: a rule's author, signed in as themselves, can check it with \`primitive email-rules get
|
|
57223
|
+
return `A rule grants an email it matches when the email is evaluated, shortly after it arrives, while the rule is active, and the key reads that mail only while the rule stays active. Each id (${named(rules)}) is an email rule or a rule shared with the key's holder: a rule's author, signed in as themselves, can check it with \`primitive email-rules get --id <id>\`, and a share's holder with \`primitive email-rules get-share --id <id>\`.`;
|
|
56752
57224
|
}
|
|
56753
57225
|
function holderOf(kind) {
|
|
56754
57226
|
if (kind === "org_key" || kind === "function_key") return "key";
|
|
@@ -56762,7 +57234,7 @@ const NOUN = {
|
|
|
56762
57234
|
unknown: "This credential"
|
|
56763
57235
|
};
|
|
56764
57236
|
/** A person also reads mail through rules colleagues shared with them, which sit beside the grant, not in it. */
|
|
56765
|
-
const SHARED = "mail from email rules colleagues shared with you (`primitive email-rules list-
|
|
57237
|
+
const SHARED = "mail from email rules colleagues shared with you (`primitive email-rules list-shares` lists them)";
|
|
56766
57238
|
/** A connection key also reads member mailboxes its owner gave it, asked for by name. */
|
|
56767
57239
|
const GIVEN = "any member mailbox its owner gave it (pass that mailbox with --recipient)";
|
|
56768
57240
|
/** What the credential reads, as sentences for the hint, or null when it reads every mailbox. */
|
|
@@ -57041,6 +57513,13 @@ const FREE_TEXT_ALIASES = /* @__PURE__ */ new Set([
|
|
|
57041
57513
|
"keywords",
|
|
57042
57514
|
"filter"
|
|
57043
57515
|
]);
|
|
57516
|
+
const FLAG_REPAIRS = /* @__PURE__ */ new Map([
|
|
57517
|
+
["evaluation-scope", ["scope"]],
|
|
57518
|
+
["expectation-samples-file", ["samples-file"]],
|
|
57519
|
+
["add-expectation-samples-file", ["add-samples-file"]],
|
|
57520
|
+
["samples-file", ["expect-samples-file"]],
|
|
57521
|
+
["expect-samples-file", ["samples-file"]]
|
|
57522
|
+
]);
|
|
57044
57523
|
function editDistance(left, right) {
|
|
57045
57524
|
let previous = Array.from({ length: right.length + 1 }, (_, i) => i);
|
|
57046
57525
|
for (let i = 0; i < left.length; i += 1) {
|
|
@@ -57057,6 +57536,9 @@ function editDistance(left, right) {
|
|
|
57057
57536
|
function suggestFlag(unknown, valid) {
|
|
57058
57537
|
const name = unknown.replace(/^-+/, "").split("=")[0]?.toLowerCase() ?? "";
|
|
57059
57538
|
if (!name) return null;
|
|
57539
|
+
if (valid.includes(name)) return name;
|
|
57540
|
+
const repair = FLAG_REPAIRS.get(name)?.find((flag) => valid.includes(flag));
|
|
57541
|
+
if (repair) return repair;
|
|
57060
57542
|
if (FREE_TEXT_ALIASES.has(name) && valid.includes("q")) return "q";
|
|
57061
57543
|
let best = null;
|
|
57062
57544
|
let bestDistance = Number.POSITIVE_INFINITY;
|
|
@@ -57078,7 +57560,7 @@ function withFlagSuggestion(error, valid) {
|
|
|
57078
57560
|
if (!(error instanceof Error) || !error.message.startsWith("Nonexistent flag") || !Array.isArray(flags)) return error;
|
|
57079
57561
|
const hints = flags.filter((flag) => typeof flag === "string").flatMap((flag) => {
|
|
57080
57562
|
const match = suggestFlag(flag, valid);
|
|
57081
|
-
return match ? [`${flag.split("=")[0]} is not a flag here; did you mean --${match}${match === "q" ? " (the free-text query)" : ""}?`] : [];
|
|
57563
|
+
return match ? [`${flag.split("=")[0]} is not a flag here; did you mean --${match}${match === "q" ? " (the free-text query)" : match === "expect-samples-file" ? " (one-off test samples)" : match === "samples-file" ? " (samples saved on the rule)" : ""}?`] : [];
|
|
57082
57564
|
});
|
|
57083
57565
|
if (hints.length === 0) return error;
|
|
57084
57566
|
const [first, ...rest] = error.message.split("\n");
|
|
@@ -57236,18 +57718,25 @@ const DOMAINS_TIMEOUT_MS = 5e3;
|
|
|
57236
57718
|
/**
|
|
57237
57719
|
* The verified domains this credential can read mail on, from GET /domains,
|
|
57238
57720
|
* which lists only the domains a credential confined to some mailboxes
|
|
57239
|
-
* reaches
|
|
57721
|
+
* reaches, or why the server refused to list them for good. Neither when they
|
|
57722
|
+
* could not be read this time.
|
|
57240
57723
|
*/
|
|
57241
|
-
async function
|
|
57724
|
+
async function readDomainsOrRefusal(client, timeoutMs = DOMAINS_TIMEOUT_MS) {
|
|
57242
57725
|
try {
|
|
57243
57726
|
const result = await listDomains({
|
|
57244
57727
|
client,
|
|
57245
57728
|
responseStyle: "fields",
|
|
57246
57729
|
signal: AbortSignal.timeout(timeoutMs)
|
|
57247
57730
|
});
|
|
57248
|
-
if (result.error) return
|
|
57731
|
+
if (result.error) return {
|
|
57732
|
+
readable: null,
|
|
57733
|
+
refusal: refusalOf(result.error, result.response?.status)
|
|
57734
|
+
};
|
|
57249
57735
|
const rows = result.data?.data;
|
|
57250
|
-
if (!Array.isArray(rows)) return
|
|
57736
|
+
if (!Array.isArray(rows)) return {
|
|
57737
|
+
readable: null,
|
|
57738
|
+
refusal: null
|
|
57739
|
+
};
|
|
57251
57740
|
let orgId = null;
|
|
57252
57741
|
const domains = [];
|
|
57253
57742
|
for (const row of rows) {
|
|
@@ -57261,13 +57750,37 @@ async function readReadableDomains(client, timeoutMs = DOMAINS_TIMEOUT_MS) {
|
|
|
57261
57750
|
}
|
|
57262
57751
|
domains.sort((a, b) => a.name.localeCompare(b.name));
|
|
57263
57752
|
return {
|
|
57264
|
-
|
|
57265
|
-
|
|
57753
|
+
readable: {
|
|
57754
|
+
orgId,
|
|
57755
|
+
domains
|
|
57756
|
+
},
|
|
57757
|
+
refusal: null
|
|
57266
57758
|
};
|
|
57267
57759
|
} catch {
|
|
57268
|
-
return
|
|
57760
|
+
return {
|
|
57761
|
+
readable: null,
|
|
57762
|
+
refusal: null
|
|
57763
|
+
};
|
|
57269
57764
|
}
|
|
57270
57765
|
}
|
|
57766
|
+
/** The most characters of the server's refusal shown. */
|
|
57767
|
+
const REFUSAL_MAX = 400;
|
|
57768
|
+
/**
|
|
57769
|
+
* A refusal asking again will not change, from an error answer: a 403 with a
|
|
57770
|
+
* code and message. Null for anything else, which may pass next time or has
|
|
57771
|
+
* its own hint (a 401), or that cannot be read.
|
|
57772
|
+
*/
|
|
57773
|
+
function refusalOf(error, status) {
|
|
57774
|
+
if (status !== 403) return null;
|
|
57775
|
+
const body = error?.error;
|
|
57776
|
+
const code = typeof body?.code === "string" && /^[a-z0-9_]{1,80}$/.test(body.code) ? body.code : null;
|
|
57777
|
+
const shown = typeof body?.message === "string" ? shownLine(body.message).trim() : "";
|
|
57778
|
+
const message = shown.length > REFUSAL_MAX ? `${shown.slice(0, 397)}...` : shown;
|
|
57779
|
+
return code && message ? {
|
|
57780
|
+
code,
|
|
57781
|
+
message
|
|
57782
|
+
} : null;
|
|
57783
|
+
}
|
|
57271
57784
|
function focusError(message, code, exit, details) {
|
|
57272
57785
|
const error = new Errors.CLIError(message, {
|
|
57273
57786
|
exit,
|
|
@@ -57381,7 +57894,10 @@ async function resolveFocus(params) {
|
|
|
57381
57894
|
}
|
|
57382
57895
|
};
|
|
57383
57896
|
const profile = focusProfile(params.configDir, params.auth);
|
|
57384
|
-
const readable =
|
|
57897
|
+
const { readable, refusal } = params.readDomains ? {
|
|
57898
|
+
readable: await params.readDomains(params.client),
|
|
57899
|
+
refusal: null
|
|
57900
|
+
} : await readDomainsOrRefusal(params.client);
|
|
57385
57901
|
const orgId = readable?.orgId ?? params.auth.connectedAgent?.orgId ?? params.auth.credentials?.org_id ?? null;
|
|
57386
57902
|
if (asked?.source === "env" && readable && readable.domains.length <= 1) return NO_FOCUS;
|
|
57387
57903
|
if (asked && "all" in asked) return {
|
|
@@ -57395,6 +57911,10 @@ async function resolveFocus(params) {
|
|
|
57395
57911
|
}
|
|
57396
57912
|
};
|
|
57397
57913
|
if (asked) {
|
|
57914
|
+
if (!readable && refusal) {
|
|
57915
|
+
const fromEnv = asked.source === "env" ? ` The names come from ${FOCUS_ENV}: unset it, or pass --all-domains.` : "";
|
|
57916
|
+
throw focusError(`Cannot look up ${joinNames(asked.names)}: ${refusal.message.replace(/\.?$/, ".")}${fromEnv}`, refusal.code, 1);
|
|
57917
|
+
}
|
|
57398
57918
|
if (!readable) throw focusError(`Could not read this credential's domains to look up ${joinNames(asked.names)}; retry, or pass --all-domains.`, "focus_lookup_failed", 1);
|
|
57399
57919
|
const domains = resolveDomainNames(asked.names, readable.domains, asked.source === "flag" ? "--domain" : FOCUS_ENV);
|
|
57400
57920
|
return focusedOutcome(params.surface, domains, asked.source, readable);
|
|
@@ -57716,7 +58236,7 @@ const MEMBER_INVITE_READS_ALL_MAIL = "In this organization every Member reads al
|
|
|
57716
58236
|
/** The same refusal for any role above Member, which is assigning a role: the same advice, without the mail clause. */
|
|
57717
58237
|
const ROLE_INVITE_NEEDS_DASHBOARD = "Inviting someone with a role other than Member or none is assigning that role, and only an invitation sent from the dashboard itself, by someone who can assign roles, can do it; a CLI request cannot, even with a step-up token. From the CLI you can invite them with --role none, where the organization can give limited roles, and once they have joined give them the role with `primitive roles-and-members set-member-role`, which needs roles:assign and an approval in the browser. Or invite them from the dashboard's Roles settings.";
|
|
57718
58238
|
/**
|
|
57719
|
-
* The hint for a refused invite-
|
|
58239
|
+
* The hint for a refused invite-member, or undefined when it is
|
|
57720
58240
|
* not that refusal. That one carries no details; a refusal for a grant that
|
|
57721
58241
|
* lacks a permission names it in its details, and is left to its own hint.
|
|
57722
58242
|
*/
|
|
@@ -59321,7 +59841,7 @@ function savedConnectedProfiles(configDir, exclude) {
|
|
|
59321
59841
|
*/
|
|
59322
59842
|
async function otherProfiles(configDir, session, current) {
|
|
59323
59843
|
if (session) try {
|
|
59324
|
-
const { connectedProfilesForSession } = await import("./machine-session-
|
|
59844
|
+
const { connectedProfilesForSession } = await import("./machine-session-DPLiLNot.js").then((n) => n.s);
|
|
59325
59845
|
return {
|
|
59326
59846
|
inSession: true,
|
|
59327
59847
|
profiles: connectedProfilesForSession(configDir, session, current)
|
|
@@ -59445,7 +59965,7 @@ function sentListTable(rows) {
|
|
|
59445
59965
|
const line = (row) => row.map((cell, i) => i === row.length - 1 ? cell : cell.padEnd(widths[i] ?? 0)).join(" ");
|
|
59446
59966
|
return [line(header), ...cells.map(line)];
|
|
59447
59967
|
}
|
|
59448
|
-
/** What `sent list` prints on
|
|
59968
|
+
/** What `sent list` prints on stdout without --json. */
|
|
59449
59969
|
function sentListLines(envelope) {
|
|
59450
59970
|
const body = isRecord(envelope) ? envelope : {};
|
|
59451
59971
|
const above = mineLine(body.meta);
|
|
@@ -60207,7 +60727,7 @@ const RESERVED_FLAG_NAMES = /* @__PURE__ */ new Set([
|
|
|
60207
60727
|
]);
|
|
60208
60728
|
function bodyFieldFlag(field, aliases, generatedRetryId = false) {
|
|
60209
60729
|
const common = {
|
|
60210
|
-
description: generatedRetryId ? `Retry ID, generated when omitted. ${field.description || field.name}` : field.description || field.name,
|
|
60730
|
+
description: generatedRetryId ? `Retry ID, generated when omitted. ${field.description || field.name}` : canonicalCliText(field.description || field.name),
|
|
60211
60731
|
...aliases && aliases.length > 0 ? { aliases } : {}
|
|
60212
60732
|
};
|
|
60213
60733
|
if (field.kind === "boolean") return Flags.boolean({
|
|
@@ -60229,7 +60749,7 @@ function bodyFieldFlag(field, aliases, generatedRetryId = false) {
|
|
|
60229
60749
|
});
|
|
60230
60750
|
return Flags.string({
|
|
60231
60751
|
...common,
|
|
60232
|
-
description: withLengthLimit(generatedRetryId ? common.description : field.description, field.maxLength) || field.name
|
|
60752
|
+
description: withLengthLimit(generatedRetryId ? common.description : canonicalCliText(field.description), field.maxLength) || field.name
|
|
60233
60753
|
});
|
|
60234
60754
|
}
|
|
60235
60755
|
/**
|
|
@@ -60258,7 +60778,7 @@ function buildFlags(operation) {
|
|
|
60258
60778
|
}),
|
|
60259
60779
|
time: Flags.boolean({ description: TIME_FLAG_DESCRIPTION })
|
|
60260
60780
|
};
|
|
60261
|
-
if (!operation.binaryResponse) flags.json = Flags.boolean({ description:
|
|
60781
|
+
if (!operation.binaryResponse) flags.json = Flags.boolean({ description: `Print exactly one JSON document on stdout, on success and on failure, and nothing on stderr: the API's response body (data, and meta with meta.cursor where the route sends it) plus the CLI's own summary, warnings, error and exit_code. Without --json, stdout is ${operation.sdkName === "listSentEmails" ? "a table" : "the data payload"}, and notes and the next cursor go to stderr.` });
|
|
60262
60782
|
const positional = positionalPathParameter(operation);
|
|
60263
60783
|
const pageMaximum = pagedLimitMaximum(operation);
|
|
60264
60784
|
for (const parameter of [...operation.pathParams, ...operation.queryParams]) {
|
|
@@ -60280,7 +60800,7 @@ function buildFlags(operation) {
|
|
|
60280
60800
|
const aliasesForOperation = OPERATION_FLAG_ALIASES[operation.sdkName];
|
|
60281
60801
|
for (const field of bodyFields) {
|
|
60282
60802
|
if (field.kind === "complex") continue;
|
|
60283
|
-
const name =
|
|
60803
|
+
const name = canonicalBodyFlagName(operation.sdkName, field.name);
|
|
60284
60804
|
if (RESERVED_FLAG_NAMES.has(name)) continue;
|
|
60285
60805
|
if (flags[name] !== void 0) continue;
|
|
60286
60806
|
flags[name] = bodyFieldFlag(field, aliasesForOperation?.[field.name], generatedRetryIds.has(field.name));
|
|
@@ -60449,7 +60969,7 @@ const OPERATION_HINTS = {
|
|
|
60449
60969
|
searchMemories: "Tip: prefer `primitive memories search [prefix] [--metadata-only] [--function <function-id>]` for the common search path.",
|
|
60450
60970
|
listEmails: "Tip: for a one-line-per-email table, `primitive emails latest --limit 100`.",
|
|
60451
60971
|
listEndpoints: "Tip: without --json, a table on stderr after the JSON shows each endpoint's ENABLED and DELIVERING. DELIVERING is read from delivery.delivering, whether a webhook is being sent mail at all, not from enabled: an endpoint can be enabled and still not be delivering (its owner's key revoked, say), shown as no with the reason codes in parentheses. A webhook whose delivery could not be checked shows unknown, and a Function or pull endpoint shows -.",
|
|
60452
|
-
startAgentSignup: "Tip: pass --terms-accepted. Capture the signup_token from the response and feed it to `primitive agent verify-
|
|
60972
|
+
startAgentSignup: "Tip: pass --terms-accepted. Capture the signup_token from the response and feed it to `primitive agent verify-signup --signup-token <token> --verification-code <6-digit-code>` (the verify flag accepts --code as an alias). The high-level `primitive signup <email>` command walks an interactive user through both steps with friendlier prompts.",
|
|
60453
60973
|
testEmailRule: "Tip: --expect-match and --expect-no-match (or --expect-file) set expect; without it, a saved rule's own expectations are judged. Exit 0 when every expectation passed, 1 when one failed or is undecided for good (or the request failed), and 3 when the only ones not passed can be decided by testing again later; with --json, error.code is expectations_failed or expectations_undecided, and exit_code and error, not the API's success, say whether the expectations passed.",
|
|
60454
60974
|
verifyAgentSignup: "Tip: pass --verification-code <code> (or --code; both work). The response carries OAuth tokens but not your assigned inbox domain; run `primitive domains list` (or `primitive whoami`) after success to see the managed *.primitive.email address that routes to this account."
|
|
60455
60975
|
};
|
|
@@ -60472,12 +60992,12 @@ function overLongBodyField(schema, body) {
|
|
|
60472
60992
|
}
|
|
60473
60993
|
}
|
|
60474
60994
|
/** What a write that takes a compile answer reads from --body-file, said beside the generic help. */
|
|
60475
|
-
const COMPILE_RULE = "the `rule` of a saved compile answer: `compile
|
|
60995
|
+
const COMPILE_RULE = "the `rule` of a saved compile answer: `compile ... --json | jq .data.rule > rule.json`";
|
|
60476
60996
|
const BODY_FILE_HELP = {
|
|
60477
60997
|
createEmailRule: `For this command, ${COMPILE_RULE}, with --name.`,
|
|
60478
60998
|
updateEmailRule: `For a new version, ${COMPILE_RULE}; --name only to rename it.`,
|
|
60479
|
-
createEmailRuleRequest: `For this command, ${COMPILE_RULE}, compiled without a scope (--
|
|
60480
|
-
acceptEmailRuleRequest: `To change the rule as you accept it, ${COMPILE_RULE}, compiled without a scope (--
|
|
60999
|
+
createEmailRuleRequest: `For this command, ${COMPILE_RULE}, compiled without a scope (--scope, --scope-address or --scope-domain), with --name and --target-email.`,
|
|
61000
|
+
acceptEmailRuleRequest: `To change the rule as you accept it, ${COMPILE_RULE}, compiled without a scope (--scope, --scope-address or --scope-domain).`
|
|
60481
61001
|
};
|
|
60482
61002
|
const OPERATION_FLAG_ALIASES = { verifyAgentSignup: { verification_code: ["code"] } };
|
|
60483
61003
|
const OPERATION_EXTRA_BODY_FLAGS = { addDomain: { "mail-relay": {
|
|
@@ -60487,6 +61007,7 @@ const OPERATION_EXTRA_BODY_FLAGS = { addDomain: { "mail-relay": {
|
|
|
60487
61007
|
const OPERATION_EXTENSIONS = {
|
|
60488
61008
|
...EMAIL_RULE_OPERATION_EXTENSIONS,
|
|
60489
61009
|
...EMAIL_RULE_LISTING_EXTENSIONS,
|
|
61010
|
+
...EMAIL_RULE_SHARE_EXTENSIONS,
|
|
60490
61011
|
...ENDPOINT_HEADER_EXTENSIONS,
|
|
60491
61012
|
...ANSWER_REPORT_EXTENSIONS
|
|
60492
61013
|
};
|
|
@@ -60564,7 +61085,7 @@ function createOperationCommand(operation) {
|
|
|
60564
61085
|
const positional = positionalPathParameter(operation);
|
|
60565
61086
|
const positionalFlag = positional ? parameterFlagName(operation.sdkName, positional.name) : void 0;
|
|
60566
61087
|
class OperationCommand extends Command {
|
|
60567
|
-
static description = fullDescription;
|
|
61088
|
+
static description = canonicalCliText(fullDescription);
|
|
60568
61089
|
static helpInputs = operationHelpInputs(operation, bodyFieldFlagToProperty, positionalFlag);
|
|
60569
61090
|
static flags = flags;
|
|
60570
61091
|
static args = positional && positionalFlag ? { [positionalFlag]: Args.string({
|
|
@@ -60607,7 +61128,7 @@ function createOperationCommand(operation) {
|
|
|
60607
61128
|
...explicit,
|
|
60608
61129
|
...overrides
|
|
60609
61130
|
};
|
|
60610
|
-
else throw cliError(`--raw-body must be a JSON object when also passing per-field flags (got ${explicit === null ? "null" : Array.isArray(explicit) ? "array" : typeof explicit}); supplied per-field flags: ${Object.keys(overrides).map((p) => extensionFlagFor.get(p) ?? `--${
|
|
61131
|
+
else throw cliError(`--raw-body must be a JSON object when also passing per-field flags (got ${explicit === null ? "null" : Array.isArray(explicit) ? "array" : typeof explicit}); supplied per-field flags: ${Object.keys(overrides).map((p) => extensionFlagFor.get(p) ?? `--${canonicalBodyFlagName(operation.sdkName, p)}`).join(", ")}. Either drop --raw-body and rely on the per-field flags, or move every field into the JSON --raw-body and drop the flags.`);
|
|
60611
61132
|
} else body = explicit;
|
|
60612
61133
|
}
|
|
60613
61134
|
const bodyBeforeEventTypes = body;
|
|
@@ -60712,41 +61233,21 @@ function createOperationCommand(operation) {
|
|
|
60712
61233
|
}
|
|
60713
61234
|
let pagingNote;
|
|
60714
61235
|
const callPaged = async () => {
|
|
60715
|
-
const
|
|
60716
|
-
|
|
60717
|
-
|
|
60718
|
-
|
|
60719
|
-
|
|
60720
|
-
limit: Math.min(max, wanted)
|
|
60721
|
-
});
|
|
60722
|
-
const budget = Math.ceil(wanted / max) + 20;
|
|
60723
|
-
for (let requests = 1;; requests += 1) {
|
|
60724
|
-
if (last.error) return last;
|
|
60725
|
-
const envelope = last.data;
|
|
60726
|
-
const page = Array.isArray(envelope?.data) ? envelope.data : [];
|
|
60727
|
-
rows.push(...page);
|
|
60728
|
-
const cursor = envelope?.meta?.cursor ?? void 0;
|
|
60729
|
-
const exhausted = Boolean(cursor) && cursor !== sentCursor && rows.length < wanted && requests >= budget;
|
|
60730
|
-
if (exhausted) pagingNote = `Stopped after ${requests} requests with ${rows.length} of ${wanted}; more may remain. Continue with --cursor ${cursor}.`;
|
|
60731
|
-
if (!cursor || cursor === sentCursor || rows.length >= wanted || exhausted) return {
|
|
60732
|
-
...last,
|
|
60733
|
-
data: {
|
|
60734
|
-
...envelope ?? {},
|
|
60735
|
-
data: rows,
|
|
60736
|
-
meta: {
|
|
60737
|
-
...envelope?.meta ?? {},
|
|
60738
|
-
limit: wanted,
|
|
60739
|
-
cursor: cursor ?? null
|
|
60740
|
-
}
|
|
60741
|
-
}
|
|
60742
|
-
};
|
|
60743
|
-
sentCursor = cursor;
|
|
60744
|
-
last = await callOperation(void 0, {
|
|
61236
|
+
const page = await fetchBoundedPages({
|
|
61237
|
+
wanted,
|
|
61238
|
+
maximum: pageMaximum ?? wanted,
|
|
61239
|
+
cursor: typeof query.cursor === "string" ? query.cursor : void 0,
|
|
61240
|
+
call: (limit, cursor) => callOperation(void 0, {
|
|
60745
61241
|
...query,
|
|
60746
|
-
|
|
60747
|
-
|
|
60748
|
-
})
|
|
60749
|
-
}
|
|
61242
|
+
limit,
|
|
61243
|
+
cursor
|
|
61244
|
+
})
|
|
61245
|
+
});
|
|
61246
|
+
pagingNote = page.note;
|
|
61247
|
+
return page.envelope ? {
|
|
61248
|
+
...page.result,
|
|
61249
|
+
data: page.envelope
|
|
61250
|
+
} : page.result;
|
|
60750
61251
|
};
|
|
60751
61252
|
if (operation.sdkName === "setMemberRole") {
|
|
60752
61253
|
const role = body && typeof body === "object" ? body.role : void 0;
|
|
@@ -60835,10 +61336,11 @@ function createOperationCommand(operation) {
|
|
|
60835
61336
|
return;
|
|
60836
61337
|
}
|
|
60837
61338
|
const jsonOutput = parsedFlags.json === true;
|
|
61339
|
+
if (jsonOutput && operation.sdkName === "listEndpoints" && envelope) envelope.meta ??= {};
|
|
60838
61340
|
writeFocusLine(focus, jsonOutput);
|
|
60839
61341
|
const cursor = envelope?.meta?.cursor;
|
|
60840
61342
|
if (cursor && !jsonOutput) process.stderr.write(`next cursor: ${cursor}\n`);
|
|
60841
|
-
if (pagingNote
|
|
61343
|
+
if (pagingNote) process.stderr.write(`${pagingNote}\n`);
|
|
60842
61344
|
const summary = [];
|
|
60843
61345
|
if (Array.isArray(envelope?.data) && envelope.data.length === 0 && (jsonOutput || !metaExplainsEmptyList(envelope?.meta))) {
|
|
60844
61346
|
const tail = query.since !== void 0;
|
|
@@ -60852,7 +61354,7 @@ function createOperationCommand(operation) {
|
|
|
60852
61354
|
if (hint && jsonOutput) summary.push(hint);
|
|
60853
61355
|
else if (hint) process.stderr.write(`${hint}\n`);
|
|
60854
61356
|
}
|
|
60855
|
-
if (Array.isArray(envelope?.data) && envelope.data.length === 0 && focus.focused && query.since === void 0 && query.cursor === void 0) {
|
|
61357
|
+
if (Array.isArray(envelope?.data) && envelope.data.length === 0 && focus.focused && query.since === void 0 && query.cursor === void 0 && !envelope?.meta?.cursor) {
|
|
60856
61358
|
const countParam = focusSpec?.countParam;
|
|
60857
61359
|
const note = await focusEmptyHint(focus, async () => {
|
|
60858
61360
|
const counted = await callOperation(void 0, {
|
|
@@ -60918,10 +61420,12 @@ function createOperationCommand(operation) {
|
|
|
60918
61420
|
...printed,
|
|
60919
61421
|
error: report.error
|
|
60920
61422
|
};
|
|
60921
|
-
|
|
61423
|
+
if (operation.sdkName === "listSentEmails" && !jsonOutput) {
|
|
61424
|
+
const lines = sentListLines(envelope);
|
|
61425
|
+
this.log(lines.length > 0 ? lines.join("\n") : "No sent emails to show.");
|
|
61426
|
+
} else this.log(JSON.stringify(printed, null, 2));
|
|
60922
61427
|
if (reportError !== void 0) process.stderr.write(`Warning: ${operation.sdkName} succeeded but its report could not be built (${reportError}). The JSON above is the full answer; read it rather than the exit code.\n`);
|
|
60923
61428
|
if (report && !jsonOutput) for (const line of report.lines) process.stderr.write(`${line}\n`);
|
|
60924
|
-
if (operation.sdkName === "listSentEmails" && !jsonOutput) for (const line of sentListLines(envelope)) process.stderr.write(`${line}\n`);
|
|
60925
61429
|
if (reportError !== void 0 && report?.exitCode && !jsonOutput) process.stderr.write(`The answer's expectations were not all shown to pass, so the command exits ${report.exitCode}.\n`);
|
|
60926
61430
|
if (report?.exitCode) process.exitCode = report.exitCode;
|
|
60927
61431
|
});
|
|
@@ -60932,7 +61436,7 @@ function createOperationCommand(operation) {
|
|
|
60932
61436
|
const EMPTY_RESULT_HINTS = {
|
|
60933
61437
|
listDeliveries: "(no results) No webhook deliveries logged yet. If you have an endpoint configured but expected to see test fires here: test deliveries from `primitive endpoints test` are NOT logged in this list, they're synchronous and visible only in the test-endpoint command's response. Real deliveries are logged when an event fans out to your endpoints: an inbound `email.received`, or a `sent_email.*` event for an endpoint that lists it in rules.event_types (they arrive within a few minutes of the result). If you have no endpoints, run `primitive endpoints list` to check.",
|
|
60934
61438
|
listEndpoints: "(no results) No webhook endpoints configured. Add one with `primitive endpoints create --url <your-url>`.",
|
|
60935
|
-
listDomains: "(no results) No domains on this account. Add one with `primitive domains
|
|
61439
|
+
listDomains: "(no results) No domains on this account. Add one with `primitive domains create --domain <yourdomain.example>`.",
|
|
60936
61440
|
listFilters: "(no results) No filter rules configured.",
|
|
60937
61441
|
listEmailRuleRequests: "(no results) No rule requests match. Without --box and --status only pending requests made to you are listed; `--box all --status any` lists every one you can see.",
|
|
60938
61442
|
listEmailRuleShares: "(no results) No shares match. Without --box and --live only live shares made with you are listed; `--box all --live any` lists every one you can see.",
|
|
@@ -60955,6 +61459,6 @@ function emptyDeliveriesHint(sdkName, query) {
|
|
|
60955
61459
|
return `(no results) No deliveries match ${flags.length === 1 ? flags[0] : `${flags.slice(0, -1).join(", ")} and ${flags[flags.length - 1]}`}. Test fires from \`primitive endpoints test\` are not logged here; real deliveries are, when an event fans out to the endpoint. Leave out ${flags.length === 1 ? flags[0] : "a filter"} to list more.`;
|
|
60956
61460
|
}
|
|
60957
61461
|
function canonicalizeCliReferences(description) {
|
|
60958
|
-
return description.replaceAll("`primitive emails:latest`", "`primitive emails latest`").replaceAll("`primitive describe emails:get-email | jq '.responseSchema.properties'`", "`primitive describe emails:get | jq '.responseSchema.properties'`");
|
|
61462
|
+
return canonicalCliText(description).replaceAll("`primitive emails:latest`", "`primitive emails latest`").replaceAll("`primitive describe emails:get-email | jq '.responseSchema.properties'`", "`primitive describe emails:get | jq '.responseSchema.properties'`");
|
|
60959
61463
|
}
|
|
60960
|
-
export {
|
|
61464
|
+
export { replyInteractionWarning as $, oneDomainAtATimeError as $t, describeWake as A, displayedRoleKey as An, connectNextSteps as At, wakeRecipientField as B, setKnownCommands as Bn, FOCUS_ENV as Bt, withApproval as C, refreshStoredCliCredentials as Cn, sendWaitClampNotice as Ct, openBrowser as D, CliOrgRefusedError as Dn, thrownErrorExitCode as Dt, listenForCopyHotkey as E, selectedOrgFromEnv as En, successfulSendOutcome as Et, sentInThread as F, roleKeyText as Fn, currentMailSessionKey as Ft, pendingMailPath as G, focusFlagValues as Gt, claimPendingMail as H, NO_FOCUS as Ht, serverMuted as I, switchCurrentOrg as In, detectAgentRuntime as It, removePendingMail as J, focusProfile as Jt, readPendingMail as K, focusFlags as Kt, serverRelationship as L, routeWarningLines as Ln, detectRuntimeSession as Lt, formatMailWakeLine as M, isBuiltInRoleKey as Mn, generatedAgentName as Mt, latestOwnOutbound as N, revokeUserLogin as Nn, identitySuggestions as Nt, explainPendingMailNotFound as O, RESTRICTED_ROLE_NOTE as On, DEFAULT_ENROLL_NAME as Ot, readThreadContext as P, roleKeyLabel as Pn, loadSkillLine as Pt, replyExpectation as Q, normalizeDomainNames as Qt, skillFirstLine as R, sanitizeForTerminal as Rn, runtimeSessionVariableList as Rt, terminalApprovalIo as S, createCliApiClient as Sn, sendOutcomeExitCode as St, formatBrowserLoginInstructions as T, resolveCliApiRequestConfig as Tn, serializeErrorPayload as Tt, clearConsumedPendingMail as U, countFromMeta as Ut, wakeRelationship as V, operationManifest as Vn, FOCUS_SERVER_SUPPORT as Vt, clearReadPendingMail as W, focusEmptyHint as Wt, interactionNextActions as X, loadSavedFocus as Xt, interactionHumanLine as Y, joinNames as Yt, readEmailInteraction as Z, manyDomainsSupported as Zt, BROWSER_FLAG_DESCRIPTION as _, ATTACHMENT_WAIT_MAX_MS as _n, formatSendRecordFailureSummary as _t, createOperationCommand as a, withFocusMeta as an, assertValidIdempotencyKey as at, approveThenRerunHint as b, SAVED_CLI_OAUTH_SESSION_EXPIRED_MESSAGE as bn, sendErrorMessage as bt, formatErrorPayload as c, withFlagSuggestion as cn, checkPriorReplies as ct, networkErrorHint as d, readCallerMailFor as dn, excludeSignalReplies as dt, queryScopesItself as en, wakeInteractionSentence as et, readTextFileFlag as f, formatFact as fn, followUpCommandPrefix as ft, writeErrorWithHints as g, ATTACHMENT_WAIT_FLAG_DESCRIPTION as gn, formatSendFailureSummary as gt, surfaceUnauthorizedHint as h, withBooleanFlagValues as hn, formatPriorRepliesWarning as ht, TIME_FLAG_DESCRIPTION as i, saveFocus as in, apiResultHttpStatus as it, displayAddress as j, fetchCliOrgs as jn, defaultConnectionName as jt, bareAddress as k, credentialsFromUserLogin as kn, cliInvocation as kt, hasControlCharacter as l, emptyEmailListHint as ln, classifySendError as lt, runWithTiming as m, fetchBoundedPages as mn, formatPriorRepliesCheckSkipped as mt, API_ERROR_CODES as n, resolveDomainNames as nn, MAX_SEND_WAIT_TIMEOUT_MS as nt, extractErrorCode as o, withoutFocus as on, buildFollowUpCommand as ot, refusesCredential as p, isEmailId as pn, formatDeletedEarlierSendNotice as pt, recordPendingMail as q, focusForCorpus as qt, PAGED_LIMIT_MAX as r, resolveFocus as rn, SEND_OUTCOME_HELP as rt, extractErrorPayload as s, writeFocusLine as sn, buildThrownSendFailureEnvelope as st, API_BASE_URL_FLAG_DESCRIPTION as t, readDomainsOrRefusal as tn, IDEMPOTENCY_KEY_FLAG_DESCRIPTION as tt, isGrantRefusal as u, mailReach as un, deriveSendIdempotencyKey as ut, STEP_UP_HEADER as v, withAttachmentWait as vn, priorRepliesThatWentOut as vt, canOfferCopyHotkey as w, refuseOrgSelectionForProfile as wn, sentHistoryWindowStart as wt, promptLine as x, createAuthenticatedCliApiClient as xn, sendIdentityFields as xt, STEP_UP_TOKEN_FLAG_DESCRIPTION as y, ConnectedAgentKeyRequiredError as yn, reportSendCommandResult as yt, wakeReadCommand as z, shownLine as zn, formatAlreadySentNotice as zt };
|