primcli 3.0.0-preview.3 → 3.0.0-preview.4
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 +4 -3
- package/dist/{api-command-DWjtyqH9.js → api-command-BFfgKPTp.js} +939 -31
- package/dist/{machine-session-BG4getHB.js → machine-session-DD35Pfgd.js} +4 -4
- package/dist/{notify-session-8Jv4jJzI.js → notify-session-aMGIFmeu.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 +62 -0
- package/dist/oclif/index.js +4710 -3759
- package/dist/oclif/receiver-heal.js +2 -2
- package/dist/{repeats-Dj_o6c-X-BKHiZsYv.js → repeats-Dj_o6c-X-BwGkVE7e.js} +346 -213
- package/dist/{scoped-chat-_AEpylPV.js → scoped-chat-B-J3sdNS.js} +1 -1
- package/dist/{signal-command-CBHAR7zj.js → signal-command-DEArW9g5.js} +4 -4
- package/package.json +9 -3
|
@@ -52,6 +52,7 @@ var sdk_gen_exports = /* @__PURE__ */ __exportAll({
|
|
|
52
52
|
cancelSentEmailByIdempotencyKey: () => cancelSentEmailByIdempotencyKey,
|
|
53
53
|
checkDefaultNetworkContactAdmission: () => checkDefaultNetworkContactAdmission,
|
|
54
54
|
checkDomainDns: () => checkDomainDns,
|
|
55
|
+
checkEmailRuleRequestTarget: () => checkEmailRuleRequestTarget,
|
|
55
56
|
checkSendability: () => checkSendability,
|
|
56
57
|
checkVanityInboxName: () => checkVanityInboxName,
|
|
57
58
|
claimAgentConnection: () => claimAgentConnection,
|
|
@@ -85,6 +86,7 @@ var sdk_gen_exports = /* @__PURE__ */ __exportAll({
|
|
|
85
86
|
deleteDomain: () => deleteDomain,
|
|
86
87
|
deleteEmail: () => deleteEmail,
|
|
87
88
|
deleteEmailRule: () => deleteEmailRule,
|
|
89
|
+
deleteEmailRuleRequest: () => deleteEmailRuleRequest,
|
|
88
90
|
deleteEndpoint: () => deleteEndpoint,
|
|
89
91
|
deleteFilter: () => deleteFilter,
|
|
90
92
|
deleteFunction: () => deleteFunction,
|
|
@@ -131,6 +133,9 @@ var sdk_gen_exports = /* @__PURE__ */ __exportAll({
|
|
|
131
133
|
getEmailRuleRequest: () => getEmailRuleRequest,
|
|
132
134
|
getEmailRuleScope: () => getEmailRuleScope,
|
|
133
135
|
getEmailRuleShare: () => getEmailRuleShare,
|
|
136
|
+
getEmailRuleVocabulary: () => getEmailRuleVocabulary,
|
|
137
|
+
getEndpoint: () => getEndpoint,
|
|
138
|
+
getEndpointSigningSecret: () => getEndpointSigningSecret,
|
|
134
139
|
getFunction: () => getFunction,
|
|
135
140
|
getFunctionDeployment: () => getFunctionDeployment,
|
|
136
141
|
getFunctionInvocation: () => getFunctionInvocation,
|
|
@@ -276,6 +281,7 @@ var sdk_gen_exports = /* @__PURE__ */ __exportAll({
|
|
|
276
281
|
revokeOAuthGrant: () => revokeOAuthGrant,
|
|
277
282
|
revokeOrganizationInvitation: () => revokeOrganizationInvitation,
|
|
278
283
|
revokeProjectInvitation: () => revokeProjectInvitation,
|
|
284
|
+
rotateEndpointSigningSecret: () => rotateEndpointSigningSecret,
|
|
279
285
|
rotateKey: () => rotateKey,
|
|
280
286
|
rotateWebhookSecret: () => rotateWebhookSecret,
|
|
281
287
|
runWakeSchedule: () => runWakeSchedule,
|
|
@@ -664,10 +670,7 @@ const getStorageStats = (options) => (options?.client ?? client).get({
|
|
|
664
670
|
* secret exists yet, one is generated automatically on first
|
|
665
671
|
* access.
|
|
666
672
|
*
|
|
667
|
-
*
|
|
668
|
-
* delivery from any of your registered endpoints is signed
|
|
669
|
-
* with this single secret. Rotate via
|
|
670
|
-
* `POST /account/webhook-secret/rotate`.
|
|
673
|
+
* Every webhook is signed with this secret unless it has its own. Rotate this secret via `POST /account/webhook-secret/rotate`. A webhook whose signed_with is own_secret is signed with its own secret instead; read it from GET /endpoints/{id}/signing-secret. A webhook's own secret rotates via `POST /endpoints/{id}/signing-secret/rotate`.
|
|
671
674
|
*
|
|
672
675
|
* **Secret format**: the returned string looks base64-shaped
|
|
673
676
|
* (e.g. `XNHBBW8VqoBjRfNs1tkZj11jTk...`) but is NOT base64.
|
|
@@ -1217,10 +1220,7 @@ const listEndpoints = (options) => (options?.client ?? client).get({
|
|
|
1217
1220
|
* instead. Subject to plan limits on the number of active
|
|
1218
1221
|
* endpoints.
|
|
1219
1222
|
*
|
|
1220
|
-
* **Signing is account-
|
|
1221
|
-
* does not return any signing material; every endpoint on the
|
|
1222
|
-
* account uses the same webhook secret, fetched via
|
|
1223
|
-
* `GET /account/webhook-secret`. See the API-level "Webhook
|
|
1223
|
+
* **Signing.** A webhook is signed with the organization's webhook secret (`GET /account/webhook-secret`) unless it has its own. A webhook made as a person's own, or by an API key limited to some mailboxes, a third-party app or an agent delegate for itself, is made with its own secret: the response carries it once as `signing_secret`, and `GET /endpoints/{id}/signing-secret` returns it afterwards. Other webhooks, those a person who can read every mailbox makes among them, sign with the organization's secret until given their own. `signed_with` on the endpoint says which secret signs it. See the API-level "Webhook
|
|
1224
1224
|
* signing" section for the full wire format (header name,
|
|
1225
1225
|
* signed string, hash algo, secret format, tolerance) and a
|
|
1226
1226
|
* language-agnostic verification recipe.
|
|
@@ -1264,11 +1264,22 @@ const deleteEndpoint = (options) => (options.client ?? client).delete({
|
|
|
1264
1264
|
...options
|
|
1265
1265
|
});
|
|
1266
1266
|
/**
|
|
1267
|
+
* Get an endpoint
|
|
1268
|
+
*
|
|
1269
|
+
* One endpoint, as GET /endpoints shows it, to a caller who would see it there. Any other id, a deleted endpoint's included, answers 404.
|
|
1270
|
+
*/
|
|
1271
|
+
const getEndpoint = (options) => (options.client ?? client).get({
|
|
1272
|
+
security: [{
|
|
1273
|
+
scheme: "bearer",
|
|
1274
|
+
type: "http"
|
|
1275
|
+
}],
|
|
1276
|
+
url: "/endpoints/{id}",
|
|
1277
|
+
...options
|
|
1278
|
+
});
|
|
1279
|
+
/**
|
|
1267
1280
|
* Update a webhook endpoint
|
|
1268
1281
|
*
|
|
1269
|
-
* Updates an active webhook endpoint.
|
|
1270
|
-
* endpoint is deactivated and a new one is created (or an existing
|
|
1271
|
-
* deactivated endpoint with the new URL is reactivated).
|
|
1282
|
+
* Updates an active webhook endpoint. Changing the URL keeps the endpoint: its id, recipient routes, signing secret, delivery history and any deliveries still owed to it stay with it, and owed deliveries go to the new URL. Another active endpoint at the new URL is refused.
|
|
1272
1283
|
*
|
|
1273
1284
|
*
|
|
1274
1285
|
* Pull destinations cannot be assigned a URL, function or recipient-routing domain. Existing endpoint deletion disconnects the destination; creating a new destination does not backfill historical events.
|
|
@@ -3579,9 +3590,22 @@ const getWebhookDeliveryStats = (options) => (options?.client ?? client).get({
|
|
|
3579
3590
|
...options
|
|
3580
3591
|
});
|
|
3581
3592
|
/**
|
|
3593
|
+
* Read the column catalog
|
|
3594
|
+
*
|
|
3595
|
+
* What a rule tree you write yourself can say: each column of the current vocabulary with its type, source, meaning, operators and the value each takes, options, and whether it takes min_confidence; and the tree's limits, its stored size included. Built from the checks a saved or tested tree must pass. A tree is {version: tree_version, vocabulary: version, when, questions}. Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature.
|
|
3596
|
+
*/
|
|
3597
|
+
const getEmailRuleVocabulary = (options) => (options?.client ?? client).get({
|
|
3598
|
+
security: [{
|
|
3599
|
+
scheme: "bearer",
|
|
3600
|
+
type: "http"
|
|
3601
|
+
}],
|
|
3602
|
+
url: "/email-rules/vocabulary",
|
|
3603
|
+
...options
|
|
3604
|
+
});
|
|
3605
|
+
/**
|
|
3582
3606
|
* Compile a rule description
|
|
3583
3607
|
*
|
|
3584
|
-
* Turns a plain-English description of which received emails to match into a rule tree over the published column contract, with a plain-English explanation of what it matches, the assumptions made, and warnings for anything the columns cannot express. Where the columns fall short the rule may carry up to three yes/no questions, asked about an email only after its conditions match. Nothing is saved. The SQL the rule renders to is returned only when include_sql is true.
|
|
3608
|
+
* Turns a plain-English description of which received emails to match into a rule tree over the published column contract, with a plain-English explanation of what it matches, the assumptions made, and warnings for anything the columns cannot express. Where the columns fall short the rule may carry up to three yes/no questions, asked about an email only after its conditions match. Nothing is saved. A rule with no questions has its conditions counted, read only, over the caller's recent classified mail (what a test of it covers by default), so a warning can say when it matches nearly all of it. The SQL the rule renders to is returned only when include_sql is true. kind do_not_share compiles a do-not-share rule for recall: conditions only as narrow as the description says, the judgement of what it describes put into questions, and with nothing a column decides for certain, conditions that hold for every email. Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature.
|
|
3585
3609
|
*/
|
|
3586
3610
|
const compileEmailRule = (options) => (options.client ?? client).post({
|
|
3587
3611
|
security: [{
|
|
@@ -3598,7 +3622,7 @@ const compileEmailRule = (options) => (options.client ?? client).post({
|
|
|
3598
3622
|
/**
|
|
3599
3623
|
* Test a rule against received mail
|
|
3600
3624
|
*
|
|
3601
|
-
* Runs a rule over received mail and reports what it would decide for each email
|
|
3625
|
+
* Runs a rule over received mail and reports what it would decide for each email (matched, near_miss, no_match, unclassified or not_found), with a summary: how each top-level condition and question decided and, when nothing matched, what stopped it. Test an unsaved tree from a compile response, or a saved rule by rule_id (its current version, run with its author's access). The rule reads only mail its author can read and its scope covers; an unsaved tree covers only your own mail unless evaluation_scope names more. Without email_ids, the newest emails it can read are tested, at most 200 and none older than 30 days; expected emails (expect, or a saved rule's saved expectations) are tested whatever their age. Unclassified emails more than 2 hours old are classified first and their classification saved, unless classify_missing is false; newer ones are reported unclassified, pending. The rule itself records and grants nothing. Classification and the rule's questions stop at about 90 seconds; a rerun continues the classification where it stopped. Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature.
|
|
3602
3626
|
*/
|
|
3603
3627
|
const testEmailRule = (options) => (options.client ?? client).post({
|
|
3604
3628
|
security: [{
|
|
@@ -3615,7 +3639,7 @@ const testEmailRule = (options) => (options.client ?? client).post({
|
|
|
3615
3639
|
/**
|
|
3616
3640
|
* Test a rule against a made-up email
|
|
3617
3641
|
*
|
|
3618
|
-
* Reports what a rule would decide for an email you describe
|
|
3642
|
+
* Reports what a rule would decide for an email you describe (sender, recipients, subject, plain text, attachment types; optionally whether it is automated or from a mailing list, and its spam score), received now: it is classified, and the conditions and questions decided, as received mail would be. By default it is not automated or from a list; a rule reading a spam score you gave none for decides on none (spam_score is then in unset_columns). Nothing is stored. Test an unsaved tree (covering only your own mail unless evaluation_scope names more) or a saved rule by rule_id. The answer includes what the classifier read. Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature.
|
|
3619
3643
|
*/
|
|
3620
3644
|
const testEmailRuleOnSample = (options) => (options.client ?? client).post({
|
|
3621
3645
|
security: [{
|
|
@@ -3632,7 +3656,7 @@ const testEmailRuleOnSample = (options) => (options.client ?? client).post({
|
|
|
3632
3656
|
/**
|
|
3633
3657
|
* List rules
|
|
3634
3658
|
*
|
|
3635
|
-
* The rules the caller can see, newest first: their own, or every member's rules for a caller who reads the whole organization's mail. Each carries its scope (evaluation_scope, and scope_selection for a selected rule). With matched_email_id, only the rules that matched that email. Needs mail:read, a
|
|
3659
|
+
* The rules the caller can see, newest first: their own, or every member's rules for a caller who reads the whole organization's mail. Each carries its scope (evaluation_scope, and scope_selection for a selected rule). With matched_email_id, only the rules that matched that email. Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature.
|
|
3636
3660
|
*/
|
|
3637
3661
|
const listEmailRules = (options) => (options?.client ?? client).get({
|
|
3638
3662
|
security: [{
|
|
@@ -3645,7 +3669,7 @@ const listEmailRules = (options) => (options?.client ?? client).get({
|
|
|
3645
3669
|
/**
|
|
3646
3670
|
* Create a rule
|
|
3647
3671
|
*
|
|
3648
|
-
* Saves a rule as version 1
|
|
3672
|
+
* Saves a rule as version 1 from a compile response or a tree you wrote, checked against the column contract; without an explanation the server writes one. It starts in observe (what it matches is recorded, nothing granted or blocked) unless state is draft (not evaluated). You are its author, and it never reaches mail you cannot read. evaluation_scope is own_mailboxes (your own mail) unless you name author (all you can read) or selected; scope_selection may name only what you can read. The answer carries the scope as stored. expectations saves emails it must match and must not; the answer judges them (expectations_check). kind do_not_share blocks sharing: it runs before every other rule, and while active no rule shares an email it matches or cannot decide; a key cannot list it (details.reason rule_blocks_sharing). Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature.
|
|
3649
3673
|
*/
|
|
3650
3674
|
const createEmailRule = (options) => (options.client ?? client).post({
|
|
3651
3675
|
security: [{
|
|
@@ -3662,7 +3686,7 @@ const createEmailRule = (options) => (options.client ?? client).post({
|
|
|
3662
3686
|
/**
|
|
3663
3687
|
* Delete a rule
|
|
3664
3688
|
*
|
|
3665
|
-
* Deletes a rule with its versions, its decisions and the access it granted. The author, or a caller who reads the whole organization's mail, may delete it; while it is shared with another member, only the author or someone who manages members from the dashboard. Needs mail:read, a
|
|
3689
|
+
* Deletes a rule with its versions, its decisions and the access it granted. The author, or a caller who reads the whole organization's mail, may delete it; while it is shared with another member, only the author or someone who manages members from the dashboard. Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature.
|
|
3666
3690
|
*/
|
|
3667
3691
|
const deleteEmailRule = (options) => (options.client ?? client).delete({
|
|
3668
3692
|
security: [{
|
|
@@ -3675,7 +3699,7 @@ const deleteEmailRule = (options) => (options.client ?? client).delete({
|
|
|
3675
3699
|
/**
|
|
3676
3700
|
* Read a rule
|
|
3677
3701
|
*
|
|
3678
|
-
* A rule, its scope (evaluation_scope, and scope_selection for a selected rule) and its
|
|
3702
|
+
* A rule, its scope (evaluation_scope, and scope_selection for a selected rule), its current version and its saved expectations. What the scope comes to for its author now is GET /email-rules/{id}/scope. The SQL the version renders to is included only when include_sql is true. Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature.
|
|
3679
3703
|
*/
|
|
3680
3704
|
const getEmailRule = (options) => (options.client ?? client).get({
|
|
3681
3705
|
security: [{
|
|
@@ -3688,7 +3712,7 @@ const getEmailRule = (options) => (options.client ?? client).get({
|
|
|
3688
3712
|
/**
|
|
3689
3713
|
* Change a rule
|
|
3690
3714
|
*
|
|
3691
|
-
* Renames the rule, saves a new version (english
|
|
3715
|
+
* Renames the rule, saves a new version (english and tree together, with an explanation or one the server writes; earlier versions stay), changes its state (draft is off; observe; active), whose mail it runs over (evaluation_scope, with scope_selection when selected) or its saved expectations (each saved version and new set is judged in expectations_check). Anyone but its author who sees it may only disable it (state draft), and while it is shared only if they manage members from the dashboard. Without evaluation_scope the scope stays; a scope change saves a new version with the same conditions, and what was granted stays. A shared rule keeps its scope; a kind never changes. Send if_version, the current_version you read, so a write never replaces a version saved since. Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature.
|
|
3692
3716
|
*/
|
|
3693
3717
|
const updateEmailRule = (options) => (options.client ?? client).patch({
|
|
3694
3718
|
security: [{
|
|
@@ -3705,7 +3729,7 @@ const updateEmailRule = (options) => (options.client ?? client).patch({
|
|
|
3705
3729
|
/**
|
|
3706
3730
|
* List a rule's decisions
|
|
3707
3731
|
*
|
|
3708
|
-
* What the rule decided for each email it was evaluated against, newest first: whether it matched, whether it nearly did, how each part decided and the answers to its questions. Only decisions on emails the caller can read are listed. With matched, only matches (true) or only the rest (false). Needs mail:read, a
|
|
3732
|
+
* What the rule decided for each email it was evaluated against, newest first: whether it matched, whether it nearly did, how each part decided and the answers to its questions, with which email it was (from_address, subject, received_at). Only decisions on emails the caller can read are listed. With matched, only matches (true) or only the rest (false). Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature.
|
|
3709
3733
|
*/
|
|
3710
3734
|
const listEmailRuleDecisions = (options) => (options.client ?? client).get({
|
|
3711
3735
|
security: [{
|
|
@@ -3718,7 +3742,7 @@ const listEmailRuleDecisions = (options) => (options.client ?? client).get({
|
|
|
3718
3742
|
/**
|
|
3719
3743
|
* List every rule's result on an email
|
|
3720
3744
|
*
|
|
3721
|
-
* Every rule
|
|
3745
|
+
* Every rule you can see and what it decided about this email (matched, not matched, or not run, with what is known), in the words of the version that decided. A matched do_not_share rule keeps rules from sharing the email while it is active; what was shared before then stays shared. Only a caller who can read the email gets an answer. classification is what the classifier read from the email, every fact as rule conditions read it, so you can see why a rule did or did not match. At most 50 rules are listed, those with a result first; hidden counts the rest. Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature.
|
|
3722
3746
|
*/
|
|
3723
3747
|
const listEmailRuleResults = (options) => (options.client ?? client).get({
|
|
3724
3748
|
security: [{
|
|
@@ -3731,7 +3755,7 @@ const listEmailRuleResults = (options) => (options.client ?? client).get({
|
|
|
3731
3755
|
/**
|
|
3732
3756
|
* Read versions of a rule
|
|
3733
3757
|
*
|
|
3734
|
-
*
|
|
3758
|
+
* A rule's versions as they were written: what each one's conditions and questions were, so a decision can be read against the version that made it. Without versions, every version newest first, a page at a time (meta.cursor). With versions, only those named, oldest first; numbers that are not versions of the rule are left out. Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature.
|
|
3735
3759
|
*/
|
|
3736
3760
|
const listEmailRuleVersions = (options) => (options.client ?? client).get({
|
|
3737
3761
|
security: [{
|
|
@@ -3744,7 +3768,7 @@ const listEmailRuleVersions = (options) => (options.client ?? client).get({
|
|
|
3744
3768
|
/**
|
|
3745
3769
|
* Read what a rule covers
|
|
3746
3770
|
*
|
|
3747
|
-
* Whose mail the rule runs over, and what that comes to now: a rule never reaches further than what its author can read when it runs, so what a selected rule names and its author can no longer read stops matching. Needs mail:read, a
|
|
3771
|
+
* Whose mail the rule runs over, and what that comes to now: a rule never reaches further than what its author can read when it runs, so what a selected rule names and its author can no longer read stops matching. Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature.
|
|
3748
3772
|
*/
|
|
3749
3773
|
const getEmailRuleScope = (options) => (options.client ?? client).get({
|
|
3750
3774
|
security: [{
|
|
@@ -3757,7 +3781,7 @@ const getEmailRuleScope = (options) => (options.client ?? client).get({
|
|
|
3757
3781
|
/**
|
|
3758
3782
|
* List what a rule can cover
|
|
3759
3783
|
*
|
|
3760
|
-
* How much the caller can read, and the inboxes and domains the caller can read, which is what they may name when a rule runs over selected inboxes and domains. For a caller who reads the whole organization, addresses lists the inboxes known as someone's (member addresses, members' verified work emails at the organization's domains, agents' addresses and inboxes with shared access), not every address that receives mail: may_name_unlisted says when an address that is not listed, such as an inbox nobody has claimed, may be named too. Needs mail:read, a
|
|
3784
|
+
* How much the caller can read, and the inboxes and domains the caller can read, which is what they may name when a rule runs over selected inboxes and domains. For a caller who reads the whole organization, addresses lists the inboxes known as someone's (member addresses, members' verified work emails at the organization's domains, agents' addresses and inboxes with shared access), not every address that receives mail: may_name_unlisted says when an address that is not listed, such as an inbox nobody has claimed, may be named too. Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature.
|
|
3761
3785
|
*/
|
|
3762
3786
|
const listEmailRuleScopeOptions = (options) => (options?.client ?? client).get({
|
|
3763
3787
|
security: [{
|
|
@@ -3770,7 +3794,7 @@ const listEmailRuleScopeOptions = (options) => (options?.client ?? client).get({
|
|
|
3770
3794
|
/**
|
|
3771
3795
|
* List rule requests
|
|
3772
3796
|
*
|
|
3773
|
-
* Rule requests, newest first: those made to you (box incoming, the default), those you made (outgoing), or every one you can see (all). Pending ones by default; status decided lists accepted, declined and withdrawn ones, and any lists both. A request is visible to the member who made it, the member it was made to, and the organization's owners and admins. Needs mail:read, a
|
|
3797
|
+
* Rule requests, newest first: those made to you (box incoming, the default), those you made (outgoing), or every one you can see (all). Pending ones by default; status decided lists accepted, declined and withdrawn ones, and any lists both. A request is visible to the member who made it, the member it was made to, and the organization's owners and admins. Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature.
|
|
3774
3798
|
*/
|
|
3775
3799
|
const listEmailRuleRequests = (options) => (options?.client ?? client).get({
|
|
3776
3800
|
security: [{
|
|
@@ -3783,7 +3807,7 @@ const listEmailRuleRequests = (options) => (options?.client ?? client).get({
|
|
|
3783
3807
|
/**
|
|
3784
3808
|
* Ask a member for a rule
|
|
3785
3809
|
*
|
|
3786
|
-
* Asks another member of the organization for a rule over their own mail, from a compile response or a tree you wrote. Name them by user id, or by their member mailbox address (at most 30 lookups by address an hour). Nothing is evaluated and nothing is shared until they accept, and they may change the rule first; they see the request and can preview what it matches in their own mail. You may have at most 5 pending requests to one member and 50 in all.
|
|
3810
|
+
* Asks another member of the organization for a rule over their own mail, from a compile response or a tree you wrote. Name them by user id, or by their member mailbox address (at most 30 lookups by address an hour). Nothing is evaluated and nothing is shared until they accept, and they may change the rule first; they see the request and can preview what it matches in their own mail. You may have at most 5 pending requests to one member and 50 in all. If you can list members (members:read), the answer also says whether they can accept it under their role (target_can_accept), and if not, why (target_warning); the request is sent either way. To find out before asking, use POST /v1/email-rule-requests/target-check. Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature.
|
|
3787
3811
|
*/
|
|
3788
3812
|
const createEmailRuleRequest = (options) => (options.client ?? client).post({
|
|
3789
3813
|
security: [{
|
|
@@ -3798,9 +3822,39 @@ const createEmailRuleRequest = (options) => (options.client ?? client).post({
|
|
|
3798
3822
|
}
|
|
3799
3823
|
});
|
|
3800
3824
|
/**
|
|
3825
|
+
* Check whether a member can accept a rule request
|
|
3826
|
+
*
|
|
3827
|
+
* Says, before you ask, whether a member could accept a rule request now under their role, and if not, which permission their role lacks. Nothing is sent and nothing is recorded. Needs members:read, as listing members and their roles does. At most 60 checks an hour. Name them by user id, or by their member mailbox address (counted with asking: at most 30 lookups by address an hour). Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature.
|
|
3828
|
+
*/
|
|
3829
|
+
const checkEmailRuleRequestTarget = (options) => (options.client ?? client).post({
|
|
3830
|
+
security: [{
|
|
3831
|
+
scheme: "bearer",
|
|
3832
|
+
type: "http"
|
|
3833
|
+
}],
|
|
3834
|
+
url: "/email-rule-requests/target-check",
|
|
3835
|
+
...options,
|
|
3836
|
+
headers: {
|
|
3837
|
+
...options.body !== void 0 && { "Content-Type": "application/json" },
|
|
3838
|
+
...options.headers
|
|
3839
|
+
}
|
|
3840
|
+
});
|
|
3841
|
+
/**
|
|
3842
|
+
* Delete a withdrawn rule request
|
|
3843
|
+
*
|
|
3844
|
+
* Deletes a request you withdrew, for everyone who could see it. Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature.
|
|
3845
|
+
*/
|
|
3846
|
+
const deleteEmailRuleRequest = (options) => (options.client ?? client).delete({
|
|
3847
|
+
security: [{
|
|
3848
|
+
scheme: "bearer",
|
|
3849
|
+
type: "http"
|
|
3850
|
+
}],
|
|
3851
|
+
url: "/email-rule-requests/{id}",
|
|
3852
|
+
...options
|
|
3853
|
+
});
|
|
3854
|
+
/**
|
|
3801
3855
|
* Read a rule request
|
|
3802
3856
|
*
|
|
3803
|
-
* A rule request: the rule as proposed, who made it and to whom, and whether each of them is still a member. A request is visible to the member who made it, the member it was made to, and the organization's owners and admins. Needs mail:read, a
|
|
3857
|
+
* A rule request: the rule as proposed, who made it and to whom, and whether each of them is still a member. A request is visible to the member who made it, the member it was made to, and the organization's owners and admins. Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature.
|
|
3804
3858
|
*/
|
|
3805
3859
|
const getEmailRuleRequest = (options) => (options.client ?? client).get({
|
|
3806
3860
|
security: [{
|
|
@@ -3813,7 +3867,7 @@ const getEmailRuleRequest = (options) => (options.client ?? client).get({
|
|
|
3813
3867
|
/**
|
|
3814
3868
|
* Decline a rule request
|
|
3815
3869
|
*
|
|
3816
|
-
* Declines a pending request made to you. Nothing is written but the decision. Needs mail:read, a
|
|
3870
|
+
* Declines a pending request made to you. Nothing is written but the decision. Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature.
|
|
3817
3871
|
*/
|
|
3818
3872
|
const declineEmailRuleRequest = (options) => (options.client ?? client).post({
|
|
3819
3873
|
security: [{
|
|
@@ -3826,7 +3880,7 @@ const declineEmailRuleRequest = (options) => (options.client ?? client).post({
|
|
|
3826
3880
|
/**
|
|
3827
3881
|
* Withdraw a rule request
|
|
3828
3882
|
*
|
|
3829
|
-
* Withdraws a pending request you made. Needs mail:read, a
|
|
3883
|
+
* Withdraws a pending request you made. Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature.
|
|
3830
3884
|
*/
|
|
3831
3885
|
const withdrawEmailRuleRequest = (options) => (options.client ?? client).post({
|
|
3832
3886
|
security: [{
|
|
@@ -3839,7 +3893,7 @@ const withdrawEmailRuleRequest = (options) => (options.client ?? client).post({
|
|
|
3839
3893
|
/**
|
|
3840
3894
|
* Accept a rule request
|
|
3841
3895
|
*
|
|
3842
|
-
* Writes the rule as yours, over your own mailboxes only, turns it on, and shares what it matches from now on with the member who asked. Send no body to accept it as asked, or change it first with english
|
|
3896
|
+
* Writes the rule as yours, over your own mailboxes only, turns it on, and shares what it matches from now on with the member who asked. Send no body to accept it as asked, or change it first with english and tree together (and an explanation, or the server writes one). Because this gives your mail to someone else, it is limited to the dashboard and the Primitive CLI: other OAuth apps and agent tokens are refused. Also needs mail:share_own (sharing your own mail through email rules, which only shows it and never sends): a role without it is refused, whether or not it can send. Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature.
|
|
3843
3897
|
*/
|
|
3844
3898
|
const acceptEmailRuleRequest = (options) => (options.client ?? client).post({
|
|
3845
3899
|
security: [{
|
|
@@ -3856,7 +3910,7 @@ const acceptEmailRuleRequest = (options) => (options.client ?? client).post({
|
|
|
3856
3910
|
/**
|
|
3857
3911
|
* List rule shares
|
|
3858
3912
|
*
|
|
3859
|
-
* Lists rules shared with you, rules you share, or every share you can see. A share is visible to its two people and the organization's owners and admins. Needs mail:read, a
|
|
3913
|
+
* Lists rules shared with you, rules you share, or every share you can see. A share is visible to its two people and the organization's owners and admins. Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature.
|
|
3860
3914
|
*/
|
|
3861
3915
|
const listEmailRuleShares = (options) => (options?.client ?? client).get({
|
|
3862
3916
|
security: [{
|
|
@@ -3895,7 +3949,7 @@ const endEmailRuleShare = (options) => (options.client ?? client).delete({
|
|
|
3895
3949
|
/**
|
|
3896
3950
|
* Get a rule share
|
|
3897
3951
|
*
|
|
3898
|
-
* One share. Needs mail:read, a
|
|
3952
|
+
* One share. Needs mail:read, a member's own credential with their full access (not an API key, agent key or narrowed token), and the email rules feature.
|
|
3899
3953
|
*/
|
|
3900
3954
|
const getEmailRuleShare = (options) => (options.client ?? client).get({
|
|
3901
3955
|
security: [{
|
|
@@ -3906,9 +3960,9 @@ const getEmailRuleShare = (options) => (options.client ?? client).get({
|
|
|
3906
3960
|
...options
|
|
3907
3961
|
});
|
|
3908
3962
|
/**
|
|
3909
|
-
* List the emails a rule share has given
|
|
3963
|
+
* List the emails a rule share has given
|
|
3910
3964
|
*
|
|
3911
|
-
* The emails a rule
|
|
3965
|
+
* The emails a rule share has given, newest first, as the email list shows them, each with shared_at: when the share's rule first matched it. For the person it was shared with: what they can read through it now, so an ended share lists nothing. For the person sharing their mail: everything it has handed over while it ran, including after it ended, so they can see what left their mailbox; while the share's rule is off this answers email_rule_not_active instead. Only those two people can list them, from the dashboard or the Primitive CLI. A page can be short or empty and still carry a cursor: keep reading until meta.cursor is null.
|
|
3912
3966
|
*/
|
|
3913
3967
|
const listEmailRuleShareEmails = (options) => (options.client ?? client).get({
|
|
3914
3968
|
security: [{
|
|
@@ -4475,7 +4529,7 @@ const checkSendability = (options) => (options.client ?? client).post({
|
|
|
4475
4529
|
/**
|
|
4476
4530
|
* Get a webhook delivery
|
|
4477
4531
|
*
|
|
4478
|
-
* One webhook delivery attempt record, by the id listDeliveries returns.
|
|
4532
|
+
* One webhook delivery attempt record, by the id listDeliveries returns, with every attempt of the same delivery (a retry is recorded as a new attempt with its own id).
|
|
4479
4533
|
*/
|
|
4480
4534
|
const getDelivery = (options) => (options.client ?? client).get({
|
|
4481
4535
|
security: [{
|
|
@@ -4726,7 +4780,7 @@ const updateGroup = (options) => (options.client ?? client).patch({
|
|
|
4726
4780
|
/**
|
|
4727
4781
|
* List every credential
|
|
4728
4782
|
*
|
|
4729
|
-
* Every credential that can act in the organization: API keys, Function keys, agent connection keys, connected apps (OAuth), agent delegates and, where enabled, CLI logins. Secrets are never returned. Filter with kind. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature.
|
|
4783
|
+
* Every credential that can act in the organization: API keys, Function keys, agent connection keys, connected apps (OAuth), agent delegates and, where enabled, CLI logins. Secrets are never returned. A key's grant.mail_scope.depth is raw only when it holds mail.raw:read and its scope lists an address or a domain, otherwise content. Filter with kind. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature. Contact Primitive to turn them on.
|
|
4730
4784
|
*
|
|
4731
4785
|
* Person only: a dashboard session. The person's role must hold credentials:read. API keys, agent connection keys and agents are refused.
|
|
4732
4786
|
*/
|
|
@@ -4741,9 +4795,9 @@ const listCredentials = (options) => (options?.client ?? client).get({
|
|
|
4741
4795
|
/**
|
|
4742
4796
|
* Revoke a credential
|
|
4743
4797
|
*
|
|
4744
|
-
* Revoke one credential by kind and id. A Function key is rotated, never revoked (409 rotate_instead). An API key is revoked only by a person whose own access covers the key's access (an owner covers every key); otherwise 403 grant_forbidden, details.reason target_not_covered. What the credential set up keeps working and is listed in standing_objects for review. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature.
|
|
4798
|
+
* Revoke one credential by kind and id. A Function key is rotated, never revoked (409 rotate_instead). An API key is revoked only by a person whose own access covers the key's access (an owner covers every key); otherwise 403 grant_forbidden, details.reason target_not_covered. What the credential set up keeps working and is listed in standing_objects for review. The person's own Primitive CLI login revokes an API key (kind org_key) as the person, with no step-up unless the organization's credential policy sets cli_writes_require_approval (then it takes a keys.create step-up); every other kind (a connected key named as org_key included, 403 grant_forbidden target_not_covered), and every other app even with a step-up, is refused outside the dashboard (403). Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature. Contact Primitive to turn them on.
|
|
4745
4799
|
*
|
|
4746
|
-
* Person only: a dashboard session. The person's role must hold keys:manage. API keys, agent connection keys and agents are refused.
|
|
4800
|
+
* Person only: a dashboard session or the person's own Primitive CLI token; no other OAuth app. The person's role must hold keys:manage. API keys, agent connection keys and agents are refused.
|
|
4747
4801
|
*/
|
|
4748
4802
|
const revokeCredential = (options) => (options.client ?? client).post({
|
|
4749
4803
|
security: [{
|
|
@@ -4760,7 +4814,7 @@ const revokeCredential = (options) => (options.client ?? client).post({
|
|
|
4760
4814
|
/**
|
|
4761
4815
|
* Revoke every credential (emergency)
|
|
4762
4816
|
*
|
|
4763
|
-
* The emergency response to a leak: revokes every API key, agent connection key and connected app created since a time, rotates the organization Function key and every running Function's own key, and optionally suspends Functions. Owners only, from a dashboard session, and the body must confirm with "revoke all". Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature.
|
|
4817
|
+
* The emergency response to a leak: revokes every API key, agent connection key and connected app created since a time, rotates the organization Function key and every running Function's own key, and optionally suspends Functions. Owners only, from a dashboard session, and the body must confirm with "revoke all". Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature. Contact Primitive to turn them on.
|
|
4764
4818
|
*
|
|
4765
4819
|
* Person only: a dashboard session. The person's role must hold credentials:revoke_all. API keys, agent connection keys and agents are refused.
|
|
4766
4820
|
*/
|
|
@@ -4779,7 +4833,7 @@ const revokeAllCredentials = (options) => (options.client ?? client).post({
|
|
|
4779
4833
|
/**
|
|
4780
4834
|
* Read the credential audit trail
|
|
4781
4835
|
*
|
|
4782
|
-
* Credential events (created, rotated, edited, revoked, used with a step-up, policy changes), newest first, with a cursor. format=csv returns the same page as CSV. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature.
|
|
4836
|
+
* Credential events (created, rotated, edited, revoked, used with a step-up, policy changes), newest first, with a cursor. format=csv returns the same page as CSV. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature. Contact Primitive to turn them on.
|
|
4783
4837
|
*
|
|
4784
4838
|
* Person only: a dashboard session. The person's role must hold credential_events:read. API keys, agent connection keys and agents are refused.
|
|
4785
4839
|
*/
|
|
@@ -4794,7 +4848,7 @@ const listCredentialEvents = (options) => (options?.client ?? client).get({
|
|
|
4794
4848
|
/**
|
|
4795
4849
|
* Read the credential policy
|
|
4796
4850
|
*
|
|
4797
|
-
* The organization credential policy: key lifetime and expiry rules, who may create super admin keys, whether members may create keys and the other rules every new key is held to. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature.
|
|
4851
|
+
* The organization credential policy: key lifetime and expiry rules, who may create super admin keys, whether members may create keys and the other rules every new key is held to. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature. Contact Primitive to turn them on.
|
|
4798
4852
|
*
|
|
4799
4853
|
* Person only: a dashboard session. The person's role must hold credentials:read. API keys, agent connection keys and agents are refused.
|
|
4800
4854
|
*/
|
|
@@ -4809,7 +4863,7 @@ const getCredentialPolicy = (options) => (options?.client ?? client).get({
|
|
|
4809
4863
|
/**
|
|
4810
4864
|
* Change the credential policy
|
|
4811
4865
|
*
|
|
4812
|
-
* Change one or more policy rules. Admins may only tighten the policy; loosening any rule needs an owner. Owners and admins are emailed about every change. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature.
|
|
4866
|
+
* Change one or more policy rules. Admins may only tighten the policy; loosening any rule needs an owner. Owners and admins are emailed about every change. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature. Contact Primitive to turn them on.
|
|
4813
4867
|
*
|
|
4814
4868
|
* Person only: a dashboard session. The person's role must hold credential_policy:manage. API keys, agent connection keys and agents are refused.
|
|
4815
4869
|
*/
|
|
@@ -4828,7 +4882,7 @@ const updateCredentialPolicy = (options) => (options.client ?? client).patch({
|
|
|
4828
4882
|
/**
|
|
4829
4883
|
* Read the key builder
|
|
4830
4884
|
*
|
|
4831
|
-
* The key presets the caller may use (each with whether it is available and why not), the permission matrix for custom keys and the policy in force. An area marked org_wide_only (Members) is listed only to a person who holds its permission, and only a custom key with no addresses or domains may hold it. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature.
|
|
4885
|
+
* The key presets the caller may use (each with whether it is available and why not), the permission matrix for custom keys and the policy in force. An area marked org_wide_only (Members) is listed only to a person who holds its permission, and only a custom key with no addresses or domains may hold it. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature. Contact Primitive to turn them on.
|
|
4832
4886
|
*
|
|
4833
4887
|
* Person only: a dashboard session. The person's role must hold keys:read. API keys, agent connection keys and agents are refused.
|
|
4834
4888
|
*/
|
|
@@ -4843,7 +4897,7 @@ const getKeyBuilder = (options) => (options?.client ?? client).get({
|
|
|
4843
4897
|
/**
|
|
4844
4898
|
* List API keys
|
|
4845
4899
|
*
|
|
4846
|
-
* Key metadata, never a secret: name, prefix, grant, creator, last use, expiry and
|
|
4900
|
+
* Key metadata, never a secret: name, prefix, grant, creator, last use, expiry, suspension and whether each key works now (status). A grant's mail_scope.depth is raw only when the key holds mail.raw:read and its scope lists an address or a domain, otherwise content. The person needs access to the whole organization's mail. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature. Contact Primitive to turn them on.
|
|
4847
4901
|
*
|
|
4848
4902
|
* Person only: a dashboard session or the person's own Primitive CLI token; no other OAuth app. The person's role must hold keys:read. API keys, agent connection keys and agents are refused.
|
|
4849
4903
|
*/
|
|
@@ -4858,9 +4912,9 @@ const listKeys = (options) => (options?.client ?? client).get({
|
|
|
4858
4912
|
/**
|
|
4859
4913
|
* Create an API key
|
|
4860
4914
|
*
|
|
4861
|
-
* Create an API key, super admin or narrowed to a preset or a custom permission set, optionally with an expiry and conditions. The secret is returned once. A key never holds more than the person creating it; the credential policy decides who may create which keys. grant is required: a request without it is refused (400 validation_error, details.reason grant_required), never treated as super admin. A custom key must say which mail it reaches: the addresses and domains it lists (grant.addresses, grant.domains), or every mailbox in the organization with grant.mail_scope "org", which cannot be combined with them; one that says neither is refused (400 validation_error, details.reason mail_scope_required). Super admin, Send only and Read only reach every mailbox by definition. members:read is only for an org-wide custom key: naming it with grant.addresses or grant.domains is refused (400). Owners and admins are emailed about every super admin key. Send an Idempotency-Key to retry safely: a second create by the same person under the same key makes no second key and is refused (409 idempotency_key_reused) with the first key's id in error.details.key_id, so a caller whose first answer was lost can revoke that key. The onboarding field is for the dashboard only. The person's own Primitive CLI login needs no step-up (it acts as the person, held to the same rules); the Primitive app's token is refused, even with one. While the organization's keys API is not enabled, this answers 404 feature_disabled (details.feature keys_api;
|
|
4915
|
+
* Create an API key, super admin or narrowed to a preset or a custom permission set, optionally with an expiry and conditions. The secret is returned once. A key never holds more than the person creating it; the credential policy decides who may create which keys. grant is required: a request without it is refused (400 validation_error, details.reason grant_required), never treated as super admin. A custom key must say which mail it reaches: the addresses and domains it lists (grant.addresses, grant.domains), or every mailbox in the organization with grant.mail_scope "org", which cannot be combined with them; one that says neither is refused (400 validation_error, details.reason mail_scope_required). Super admin, Send only and Read only reach every mailbox by definition. members:read is only for an org-wide custom key: naming it with grant.addresses or grant.domains is refused (400). Owners and admins are emailed about every super admin key. Send an Idempotency-Key to retry safely: a second create by the same person under the same key makes no second key and is refused (409 idempotency_key_reused) with the first key's id in error.details.key_id, so a caller whose first answer was lost can revoke that key. The onboarding field is for the dashboard only. The person's own Primitive CLI login needs no step-up (it acts as the person, held to the same rules) unless the organization's credential policy sets cli_writes_require_approval; the Primitive app's token is refused, even with one. While the organization's keys API is not enabled, this answers 404 feature_disabled (details.feature keys_api; contact Primitive to turn it on), except that a dashboard session may still create a super admin key (the dashboard's own create).
|
|
4862
4916
|
*
|
|
4863
|
-
* Person only: a dashboard session, the person's own Primitive CLI login with no step-up, or the person's own OAuth token with a step-up token for purpose `keys.create` in the Primitive-Step-Up header. Without one any other OAuth token is answered 403 step_up_required, whose details carry the dashboard URL that issues it (or 403 grant_forbidden when the person's role, or the client, could not do it anyway). The person's role must hold keys:manage. API keys and agent connection keys are refused. An agent acting for the person is refused unless it carries a step-up token the person issued in the dashboard.
|
|
4917
|
+
* Person only: a dashboard session, the person's own Primitive CLI login with no step-up (unless the organization's credential policy sets cli_writes_require_approval), or the person's own OAuth token with a step-up token for purpose `keys.create` in the Primitive-Step-Up header. Without one any other OAuth token is answered 403 step_up_required, whose details carry the dashboard URL that issues it (or 403 grant_forbidden when the person's role, or the client, could not do it anyway). The person's role must hold keys:manage. API keys and agent connection keys are refused. An agent acting for the person is refused unless it carries a step-up token the person issued in the dashboard.
|
|
4864
4918
|
*/
|
|
4865
4919
|
const createKey = (options) => (options.client ?? client).post({
|
|
4866
4920
|
security: [{
|
|
@@ -4877,9 +4931,9 @@ const createKey = (options) => (options.client ?? client).post({
|
|
|
4877
4931
|
/**
|
|
4878
4932
|
* Rotate an API key
|
|
4879
4933
|
*
|
|
4880
|
-
* Mint a successor with the same grant and return its secret once. The old key keeps working for overlap_seconds, then stops. The person rotating must cover the key's access (403 grant_forbidden, details.reason target_not_covered), and a key an owner
|
|
4934
|
+
* Mint a successor with a new id and the same name, grant, expiry and conditions, and return its secret once. The old key keeps working for overlap_seconds, then stops: 24 hours when overlap_seconds is omitted, at most 7 days, never past its own expires_at, and at once with 0 (which is how to rotate a key whose secret leaked). previous_key_expires_at says when the old key stops. The person rotating must cover the key's access (403 grant_forbidden, details.reason target_not_covered), and a key an owner holds is rotated by an owner only (403 forbidden, details.reason owner_key_rotation), since rotating hands over the new secret. The person's own Primitive CLI login needs no step-up (it acts as the person, held to the same rules) unless the organization's credential policy sets cli_writes_require_approval; the Primitive app's token is refused, even with one. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature. Contact Primitive to turn them on.
|
|
4881
4935
|
*
|
|
4882
|
-
* Person only: a dashboard session, the person's own Primitive CLI login with no step-up, or the person's own OAuth token with a step-up token for purpose `keys.create` in the Primitive-Step-Up header. Without one any other OAuth token is answered 403 step_up_required, whose details carry the dashboard URL that issues it (or 403 grant_forbidden when the person's role, or the client, could not do it anyway). The person's role must hold keys:manage. API keys and agent connection keys are refused. An agent acting for the person is refused unless it carries a step-up token the person issued in the dashboard.
|
|
4936
|
+
* Person only: a dashboard session, the person's own Primitive CLI login with no step-up (unless the organization's credential policy sets cli_writes_require_approval), or the person's own OAuth token with a step-up token for purpose `keys.create` in the Primitive-Step-Up header. Without one any other OAuth token is answered 403 step_up_required, whose details carry the dashboard URL that issues it (or 403 grant_forbidden when the person's role, or the client, could not do it anyway). The person's role must hold keys:manage. API keys and agent connection keys are refused. An agent acting for the person is refused unless it carries a step-up token the person issued in the dashboard.
|
|
4883
4937
|
*/
|
|
4884
4938
|
const rotateKey = (options) => (options.client ?? client).post({
|
|
4885
4939
|
security: [{
|
|
@@ -4896,7 +4950,7 @@ const rotateKey = (options) => (options.client ?? client).post({
|
|
|
4896
4950
|
/**
|
|
4897
4951
|
* Get an API key
|
|
4898
4952
|
*
|
|
4899
|
-
* One key's metadata, never its secret. The person needs access to the whole organization's mail. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature.
|
|
4953
|
+
* One key's metadata, never its secret, with whether it works now (status). Its grant's mail_scope.depth is raw only when the key holds mail.raw:read and its scope lists an address or a domain, otherwise content. The person needs access to the whole organization's mail. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature. Contact Primitive to turn them on.
|
|
4900
4954
|
*
|
|
4901
4955
|
* Person only: a dashboard session or the person's own Primitive CLI token; no other OAuth app. The person's role must hold keys:read. API keys, agent connection keys and agents are refused.
|
|
4902
4956
|
*/
|
|
@@ -4911,9 +4965,9 @@ const getKey = (options) => (options.client ?? client).get({
|
|
|
4911
4965
|
/**
|
|
4912
4966
|
* Change an API key
|
|
4913
4967
|
*
|
|
4914
|
-
* Rename a key, change its expiry, its grant or its conditions, or suspend it. Any change needs the person's own access to cover the key's access now (an owner covers every key); otherwise 403 grant_forbidden, details.reason target_not_covered. A grant change is a new version of the key and is held to the same rules as creating one (a custom grant that does not say which mail it reaches is refused with details.reason mail_scope_required), so it takes the same step-up. The person's own Primitive CLI login needs no step-up (it acts as the person, held to the same rules); the Primitive app's token is refused, even with one. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature.
|
|
4968
|
+
* Rename a key, change its expiry, its grant or its conditions, or suspend it. Any change needs the person's own access to cover the key's access now (an owner covers every key); otherwise 403 grant_forbidden, details.reason target_not_covered. A grant change is a new version of the key and is held to the same rules as creating one (a custom grant that does not say which mail it reaches is refused with details.reason mail_scope_required), so it takes the same step-up. The person's own Primitive CLI login needs no step-up (it acts as the person, held to the same rules) unless the organization's credential policy sets cli_writes_require_approval; the Primitive app's token is refused, even with one. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature. Contact Primitive to turn them on.
|
|
4915
4969
|
*
|
|
4916
|
-
* Person only: a dashboard session, the person's own Primitive CLI login with no step-up, or the person's own OAuth token with a step-up token for purpose `keys.create` in the Primitive-Step-Up header. Without one any other OAuth token is answered 403 step_up_required, whose details carry the dashboard URL that issues it (or 403 grant_forbidden when the person's role, or the client, could not do it anyway). The person's role must hold keys:manage. API keys and agent connection keys are refused. An agent acting for the person is refused unless it carries a step-up token the person issued in the dashboard.
|
|
4970
|
+
* Person only: a dashboard session, the person's own Primitive CLI login with no step-up (unless the organization's credential policy sets cli_writes_require_approval), or the person's own OAuth token with a step-up token for purpose `keys.create` in the Primitive-Step-Up header. Without one any other OAuth token is answered 403 step_up_required, whose details carry the dashboard URL that issues it (or 403 grant_forbidden when the person's role, or the client, could not do it anyway). The person's role must hold keys:manage. API keys and agent connection keys are refused. An agent acting for the person is refused unless it carries a step-up token the person issued in the dashboard.
|
|
4917
4971
|
*/
|
|
4918
4972
|
const updateKey = (options) => (options.client ?? client).patch({
|
|
4919
4973
|
security: [{
|
|
@@ -4930,7 +4984,7 @@ const updateKey = (options) => (options.client ?? client).patch({
|
|
|
4930
4984
|
/**
|
|
4931
4985
|
* Suggest a least-privilege grant for a key
|
|
4932
4986
|
*
|
|
4933
|
-
* The permissions a key used over the last 30 days, as a custom grant that would have served every successful call (also as builder areas), the narrowest mail scope its calls support (depth is deprecated: raw when it downloaded raw MIME, otherwise content) (the mailboxes of the messages it named and sent, with notes on what the request log cannot account for), and whether it is unused. Calls to routes only the super admin key can use (groups and mailbox access) derive no permission, since a custom key is refused there; super_admin_only_calls counts them. usage gives the same window anonymized: successful and failed requests per UTC day, the routes called by their declared template (never the called path) with the permission each needed, and how many mailboxes the key read and sent from (counts only, and only for a person with access to the whole organization's mail). Nothing is applied: narrowing is a change to the key (PATCH /v1/keys/:id). Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature.
|
|
4987
|
+
* The permissions a key used over the last 30 days, as a custom grant that would have served every successful call (also as builder areas), the narrowest mail scope its calls support (depth is deprecated: raw when it downloaded raw MIME, otherwise content) (the mailboxes of the messages it named and sent, with notes on what the request log cannot account for), and whether it is unused. Calls to routes only the super admin key can use (groups and mailbox access) derive no permission, since a custom key is refused there; super_admin_only_calls counts them. usage gives the same window anonymized: successful and failed requests per UTC day, the routes called by their declared template (never the called path) with the permission each needed, and how many mailboxes the key read and sent from (counts only, and only for a person with access to the whole organization's mail). Nothing is applied: narrowing is a change to the key (PATCH /v1/keys/:id). Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature. Contact Primitive to turn them on.
|
|
4934
4988
|
*
|
|
4935
4989
|
* Person only: a dashboard session. The person's role must hold credentials:read. API keys, agent connection keys and agents are refused.
|
|
4936
4990
|
*/
|
|
@@ -5124,7 +5178,7 @@ const listRoles = (options) => (options?.client ?? client).get({
|
|
|
5124
5178
|
/**
|
|
5125
5179
|
* Create a custom role
|
|
5126
5180
|
*
|
|
5127
|
-
* A role nobody can use to gain access they do not hold: its permissions and mail scope must be within the author's own. mail_scope is "org" (the default) or { addresses, domains }; any other value is refused with 400 `validation_error`. Every role that reaches mail reads it in full, and raw MIME follows the role's mail.raw:read; `depth` is deprecated and ignored. Its mail scope names no other member's personal mailbox: otherwise 403 `grant_forbidden` with `details.reason` `personal_mailbox_member_only`. Person only: a dashboard session, or the person's own OAuth or CLI token with a session step-up of purpose `roles.write` (the person confirms at the step_up_url a 403 step_up_required answer carries, which names this client, then send the token in the Primitive-Step-Up header; the token works only with the client it was confirmed for). Needs roles:assign. API keys are refused.
|
|
5181
|
+
* A role nobody can use to gain access they do not hold: its permissions and mail scope must be within the author's own. mail_scope is "org" (the default) or { addresses, domains }; any other value is refused with 400 `validation_error`. Every role that reaches mail reads it in full, and raw MIME follows the role's mail.raw:read; `depth` is deprecated and ignored. Its mail scope names no other member's personal mailbox: otherwise 403 `grant_forbidden` with `details.reason` `personal_mailbox_member_only`. Each permission must have what it requires in the same role: mail:read for mail.raw:read, mail.search:semantic, mail:share_own, changes:read and webhooks:read; mail:send for mail:send_batch and mail:send_as_member; functions:deploy for templates:install; agent_connections:manage for agent_connections:custom_domains. Otherwise 400 `validation_error` with `details.reason` `unmet_requirement`, `details.permission` and `details.requires`. Person only: a dashboard session, or the person's own OAuth or CLI token with a session step-up of purpose `roles.write` (the person confirms at the step_up_url a 403 step_up_required answer carries, which names this client, then send the token in the Primitive-Step-Up header; the token works only with the client it was confirmed for). Needs roles:assign. API keys are refused.
|
|
5128
5182
|
*/
|
|
5129
5183
|
const createRole = (options) => (options.client ?? client).post({
|
|
5130
5184
|
security: [{
|
|
@@ -5154,7 +5208,7 @@ const deleteRole = (options) => (options.client ?? client).delete({
|
|
|
5154
5208
|
/**
|
|
5155
5209
|
* Change a custom role
|
|
5156
5210
|
*
|
|
5157
|
-
* A new version of the role, with a new `id`: the version you edited is retired, the response is the new one (same `key`, `version` one higher), and every member and group holding the role moves to it. The old id answers 404 `not_found` from then on, so store the returned `id` (or look the role up by `key` in GET /roles) before editing or assigning it again. Every holder whose access shrinks goes through the reduction path. mail_scope follows the same rules as creating a role; a role whose stored scope cannot be read must be sent a new mail_scope, otherwise 400 `validation_error` with `details.reason` `invalid_mail_scope`. A personal mailbox the new version adds must be the author's own, and every holder must be the member of each personal mailbox it names: otherwise 403 `grant_forbidden` with `details.reason` `personal_mailbox_member_only`. Person only: a dashboard session, or the person's own OAuth or CLI token with a session step-up of purpose `roles.write` (the person confirms at the step_up_url a 403 step_up_required answer carries, which names this client, then send the token in the Primitive-Step-Up header; the token works only with the client it was confirmed for). Needs roles:assign. API keys are refused.
|
|
5211
|
+
* A new version of the role, with a new `id`: the version you edited is retired, the response is the new one (same `key`, `version` one higher), and every member and group holding the role moves to it. The old id answers 404 `not_found` from then on, so store the returned `id` (or look the role up by `key` in GET /roles) before editing or assigning it again. Every holder whose access shrinks goes through the reduction path. mail_scope follows the same rules as creating a role; a role whose stored scope cannot be read must be sent a new mail_scope, otherwise 400 `validation_error` with `details.reason` `invalid_mail_scope`. A personal mailbox the new version adds must be the author's own, and every holder must be the member of each personal mailbox it names: otherwise 403 `grant_forbidden` with `details.reason` `personal_mailbox_member_only`. Each permission in the new version must have what it requires in the same role, as when creating one, including permissions carried over unchanged. Person only: a dashboard session, or the person's own OAuth or CLI token with a session step-up of purpose `roles.write` (the person confirms at the step_up_url a 403 step_up_required answer carries, which names this client, then send the token in the Primitive-Step-Up header; the token works only with the client it was confirmed for). Needs roles:assign. API keys are refused.
|
|
5158
5212
|
*/
|
|
5159
5213
|
const updateRole = (options) => (options.client ?? client).patch({
|
|
5160
5214
|
security: [{
|
|
@@ -5377,7 +5431,7 @@ const listSuspensions = (options) => (options?.client ?? client).get({
|
|
|
5377
5431
|
/**
|
|
5378
5432
|
* Decide a suspension
|
|
5379
5433
|
*
|
|
5380
|
-
* Keep, narrow or revoke one suspended or flagged item. Keeping it, and revoking an API key, needs the decider to cover it (revoking an uncovered key is refused with `grant_forbidden`, `target_not_covered`). Keeping an API key rotated (`rotate: true`, other than the shared Function key) also revokes its older secrets still in a rotation overlap, and needs keys:manage on both the credential and the person: without it, or if the decider lost members:manage meanwhile, it is refused with `grant_forbidden` (`keys_manage_required` or `actor_access_changed`) and nothing is rotated. A rule share paused by a role change (`email_rule_share`) takes keep, which leaves it paused, or revoke, which ends the share and needs confirm: true (the person it was shared with loses the emails already shared; without it, 409 `confirmation_required
|
|
5434
|
+
* Keep, narrow or revoke one suspended or flagged item. Keeping it, and revoking an API key, needs the decider to cover it (revoking an uncovered key is refused with `grant_forbidden`, `target_not_covered`). Keeping an API key rotated (`rotate: true`, other than the shared Function key) also revokes its older secrets still in a rotation overlap, and needs keys:manage on both the credential and the person: without it, or if the decider lost members:manage meanwhile, it is refused with `grant_forbidden` (`keys_manage_required` or `actor_access_changed`) and nothing is rotated. A rule share paused by a role change (`email_rule_share`) takes keep, which leaves it paused, or revoke, which ends the share and needs confirm: true (the person it was shared with loses the emails already shared; without it, 409 `confirmation_required`, as for revoking a filter). Neither of the share's two people may keep it (`grant_forbidden`, `share_decision_forbidden`). Access a person gave on their own mailbox (`mailbox_access`) takes keep or revoke, and both need delegations:manage; revoke removes only what that person gave on that mailbox. Nobody the access reaches, nor the person who gave it, may keep it (`grant_forbidden`, `mailbox_access_decision_forbidden`). Person only: a dashboard session, or the person's own OAuth or CLI token with a session step-up of purpose `suspensions.decide` (the person confirms at the step_up_url a 403 step_up_required answer carries, which names this client, then send the token in the Primitive-Step-Up header; the token works only with the client it was confirmed for). Needs members:manage. API keys are refused.
|
|
5381
5435
|
*/
|
|
5382
5436
|
const decideSuspension = (options) => (options.client ?? client).post({
|
|
5383
5437
|
security: [{
|
|
@@ -5499,6 +5553,32 @@ const releaseSentEmail = (options) => (options.client ?? client).post({
|
|
|
5499
5553
|
}
|
|
5500
5554
|
});
|
|
5501
5555
|
/**
|
|
5556
|
+
* Get a webhook's own signing secret
|
|
5557
|
+
*
|
|
5558
|
+
* The secret deliveries to this webhook are signed with, when it signs with its own (signed_with is own_secret). Verify the Primitive-Signature header with it. A webhook a person owns is given its secret the first time it is asked for. A webhook that signs with the organization's secret answers 409 conflict: rotate its signing secret to give it its own. Answered to the person who owns the webhook; for a webhook an API key owns, to the key that acts for it and the person who holds that key; for one a third-party app or an agent delegate owns, to that app or delegate; and for a webhook the organization owns, to a caller who may change it and holds webhook_secret:read.
|
|
5559
|
+
*/
|
|
5560
|
+
const getEndpointSigningSecret = (options) => (options.client ?? client).get({
|
|
5561
|
+
security: [{
|
|
5562
|
+
scheme: "bearer",
|
|
5563
|
+
type: "http"
|
|
5564
|
+
}],
|
|
5565
|
+
url: "/endpoints/{id}/signing-secret",
|
|
5566
|
+
...options
|
|
5567
|
+
});
|
|
5568
|
+
/**
|
|
5569
|
+
* Rotate a webhook's signing secret, or give it its own
|
|
5570
|
+
*
|
|
5571
|
+
* Replaces the webhook's own signing secret, or gives a webhook that signs with the organization's secret one of its own, and returns it. Deliveries are signed with the new secret at once, so update the handler at the same time. Answered to the person who owns the webhook; for a webhook an API key owns, to the key that acts for it and the person who holds that key; for one a third-party app or an agent delegate owns, to that app or delegate; and for a webhook the organization owns, to a caller who may change it and holds webhook_secret:read.
|
|
5572
|
+
*/
|
|
5573
|
+
const rotateEndpointSigningSecret = (options) => (options.client ?? client).post({
|
|
5574
|
+
security: [{
|
|
5575
|
+
scheme: "bearer",
|
|
5576
|
+
type: "http"
|
|
5577
|
+
}],
|
|
5578
|
+
url: "/endpoints/{id}/signing-secret/rotate",
|
|
5579
|
+
...options
|
|
5580
|
+
});
|
|
5581
|
+
/**
|
|
5502
5582
|
* Send a batch of emails in one request
|
|
5503
5583
|
*
|
|
5504
5584
|
* Send up to 100 independent messages in a single call. Each message uses the same body schema and the same send path as `POST /send-mail`, so auth, validation, rate limiting, and idempotency apply per message. Messages are processed independently: one failing does not fail the others. Every message gets an entry in `results` carrying either `data` (on success) or `error` (on failure), with the original `index`.
|
|
@@ -6935,7 +7015,7 @@ function parseFromHeader(header) {
|
|
|
6935
7015
|
value: { address: address.toLowerCase() }
|
|
6936
7016
|
};
|
|
6937
7017
|
}
|
|
6938
|
-
// ../sdk-node/dist/
|
|
7018
|
+
// ../sdk-node/dist/understanding-CNZLYYam.js
|
|
6939
7019
|
/**
|
|
6940
7020
|
* AUTO-GENERATED - DO NOT EDIT
|
|
6941
7021
|
* Run `pnpm generate:validator` to regenerate.
|
|
@@ -7073,9 +7153,12 @@ const schema12 = {
|
|
|
7073
7153
|
},
|
|
7074
7154
|
"content": {
|
|
7075
7155
|
"type": "object",
|
|
7076
|
-
"if": { "
|
|
7077
|
-
"then": {
|
|
7078
|
-
|
|
7156
|
+
"if": { "required": ["raw"] },
|
|
7157
|
+
"then": {
|
|
7158
|
+
"if": { "properties": { "raw": { "type": "null" } } },
|
|
7159
|
+
"then": { "properties": { "download": { "type": "null" } } },
|
|
7160
|
+
"else": { "properties": { "download": { "type": "object" } } }
|
|
7161
|
+
},
|
|
7079
7162
|
"properties": {
|
|
7080
7163
|
"raw": {
|
|
7081
7164
|
"anyOf": [{ "$ref": "#/definitions/RawContent" }, { "type": "null" }],
|
|
@@ -15400,13 +15483,11 @@ function validate11$1(data, { instancePath = "", parentData, parentDataProperty,
|
|
|
15400
15483
|
let valid10 = true;
|
|
15401
15484
|
const _errs64 = errors;
|
|
15402
15485
|
if (data29 && typeof data29 == "object" && !Array.isArray(data29)) {
|
|
15403
|
-
if (data29.raw
|
|
15404
|
-
|
|
15405
|
-
|
|
15406
|
-
|
|
15407
|
-
|
|
15408
|
-
errors++;
|
|
15409
|
-
}
|
|
15486
|
+
if (data29.raw === void 0 && "raw") {
|
|
15487
|
+
const err65 = {};
|
|
15488
|
+
if (vErrors === null) vErrors = [err65];
|
|
15489
|
+
else vErrors.push(err65);
|
|
15490
|
+
errors++;
|
|
15410
15491
|
}
|
|
15411
15492
|
}
|
|
15412
15493
|
var _valid0 = _errs64 === errors;
|
|
@@ -15415,93 +15496,129 @@ function validate11$1(data, { instancePath = "", parentData, parentDataProperty,
|
|
|
15415
15496
|
if (_errs63) vErrors.length = _errs63;
|
|
15416
15497
|
else vErrors = null;
|
|
15417
15498
|
}
|
|
15418
|
-
let ifClause0;
|
|
15419
15499
|
if (_valid0) {
|
|
15500
|
+
const _errs65 = errors;
|
|
15501
|
+
const _errs66 = errors;
|
|
15502
|
+
let valid11 = true;
|
|
15420
15503
|
const _errs67 = errors;
|
|
15421
15504
|
if (data29 && typeof data29 == "object" && !Array.isArray(data29)) {
|
|
15422
|
-
if (data29.
|
|
15423
|
-
if (data29.
|
|
15424
|
-
const err66 = {
|
|
15425
|
-
instancePath: instancePath + "/email/content/download",
|
|
15426
|
-
schemaPath: "#/properties/email/properties/content/then/properties/download/type",
|
|
15427
|
-
keyword: "type",
|
|
15428
|
-
params: { type: "null" },
|
|
15429
|
-
message: "must be null"
|
|
15430
|
-
};
|
|
15505
|
+
if (data29.raw !== void 0) {
|
|
15506
|
+
if (data29.raw !== null) {
|
|
15507
|
+
const err66 = {};
|
|
15431
15508
|
if (vErrors === null) vErrors = [err66];
|
|
15432
15509
|
else vErrors.push(err66);
|
|
15433
15510
|
errors++;
|
|
15434
15511
|
}
|
|
15435
15512
|
}
|
|
15436
15513
|
}
|
|
15437
|
-
var
|
|
15438
|
-
|
|
15439
|
-
|
|
15440
|
-
|
|
15441
|
-
|
|
15442
|
-
|
|
15443
|
-
|
|
15444
|
-
|
|
15445
|
-
|
|
15446
|
-
|
|
15447
|
-
|
|
15448
|
-
|
|
15449
|
-
|
|
15450
|
-
|
|
15451
|
-
|
|
15452
|
-
|
|
15453
|
-
|
|
15454
|
-
|
|
15455
|
-
|
|
15514
|
+
var _valid1 = _errs67 === errors;
|
|
15515
|
+
errors = _errs66;
|
|
15516
|
+
if (vErrors !== null) {
|
|
15517
|
+
if (_errs66) vErrors.length = _errs66;
|
|
15518
|
+
else vErrors = null;
|
|
15519
|
+
}
|
|
15520
|
+
let ifClause0;
|
|
15521
|
+
if (_valid1) {
|
|
15522
|
+
const _errs70 = errors;
|
|
15523
|
+
if (data29 && typeof data29 == "object" && !Array.isArray(data29)) {
|
|
15524
|
+
if (data29.download !== void 0) {
|
|
15525
|
+
if (data29.download !== null) {
|
|
15526
|
+
const err67 = {
|
|
15527
|
+
instancePath: instancePath + "/email/content/download",
|
|
15528
|
+
schemaPath: "#/properties/email/properties/content/then/then/properties/download/type",
|
|
15529
|
+
keyword: "type",
|
|
15530
|
+
params: { type: "null" },
|
|
15531
|
+
message: "must be null"
|
|
15532
|
+
};
|
|
15533
|
+
if (vErrors === null) vErrors = [err67];
|
|
15534
|
+
else vErrors.push(err67);
|
|
15535
|
+
errors++;
|
|
15536
|
+
}
|
|
15456
15537
|
}
|
|
15457
15538
|
}
|
|
15539
|
+
var _valid1 = _errs70 === errors;
|
|
15540
|
+
valid11 = _valid1;
|
|
15541
|
+
ifClause0 = "then";
|
|
15542
|
+
} else {
|
|
15543
|
+
const _errs73 = errors;
|
|
15544
|
+
if (data29 && typeof data29 == "object" && !Array.isArray(data29)) {
|
|
15545
|
+
if (data29.download !== void 0) {
|
|
15546
|
+
let data32 = data29.download;
|
|
15547
|
+
if (!(data32 && typeof data32 == "object" && !Array.isArray(data32))) {
|
|
15548
|
+
const err68 = {
|
|
15549
|
+
instancePath: instancePath + "/email/content/download",
|
|
15550
|
+
schemaPath: "#/properties/email/properties/content/then/else/properties/download/type",
|
|
15551
|
+
keyword: "type",
|
|
15552
|
+
params: { type: "object" },
|
|
15553
|
+
message: "must be object"
|
|
15554
|
+
};
|
|
15555
|
+
if (vErrors === null) vErrors = [err68];
|
|
15556
|
+
else vErrors.push(err68);
|
|
15557
|
+
errors++;
|
|
15558
|
+
}
|
|
15559
|
+
}
|
|
15560
|
+
}
|
|
15561
|
+
var _valid1 = _errs73 === errors;
|
|
15562
|
+
valid11 = _valid1;
|
|
15563
|
+
ifClause0 = "else";
|
|
15458
15564
|
}
|
|
15459
|
-
|
|
15565
|
+
if (!valid11) {
|
|
15566
|
+
const err69 = {
|
|
15567
|
+
instancePath: instancePath + "/email/content",
|
|
15568
|
+
schemaPath: "#/properties/email/properties/content/then/if",
|
|
15569
|
+
keyword: "if",
|
|
15570
|
+
params: { failingKeyword: ifClause0 },
|
|
15571
|
+
message: "must match \"" + ifClause0 + "\" schema"
|
|
15572
|
+
};
|
|
15573
|
+
if (vErrors === null) vErrors = [err69];
|
|
15574
|
+
else vErrors.push(err69);
|
|
15575
|
+
errors++;
|
|
15576
|
+
}
|
|
15577
|
+
var _valid0 = _errs65 === errors;
|
|
15460
15578
|
valid10 = _valid0;
|
|
15461
|
-
ifClause0 = "else";
|
|
15462
15579
|
}
|
|
15463
15580
|
if (!valid10) {
|
|
15464
|
-
const
|
|
15581
|
+
const err70 = {
|
|
15465
15582
|
instancePath: instancePath + "/email/content",
|
|
15466
15583
|
schemaPath: "#/properties/email/properties/content/if",
|
|
15467
15584
|
keyword: "if",
|
|
15468
|
-
params: { failingKeyword:
|
|
15469
|
-
message: "must match \"
|
|
15585
|
+
params: { failingKeyword: "then" },
|
|
15586
|
+
message: "must match \"then\" schema"
|
|
15470
15587
|
};
|
|
15471
|
-
if (vErrors === null) vErrors = [
|
|
15472
|
-
else vErrors.push(
|
|
15588
|
+
if (vErrors === null) vErrors = [err70];
|
|
15589
|
+
else vErrors.push(err70);
|
|
15473
15590
|
errors++;
|
|
15474
15591
|
}
|
|
15475
15592
|
if (data29 && typeof data29 == "object" && !Array.isArray(data29)) {
|
|
15476
15593
|
if (data29.raw === void 0) {
|
|
15477
|
-
const
|
|
15594
|
+
const err71 = {
|
|
15478
15595
|
instancePath: instancePath + "/email/content",
|
|
15479
15596
|
schemaPath: "#/properties/email/properties/content/required",
|
|
15480
15597
|
keyword: "required",
|
|
15481
15598
|
params: { missingProperty: "raw" },
|
|
15482
15599
|
message: "must have required property 'raw'"
|
|
15483
15600
|
};
|
|
15484
|
-
if (vErrors === null) vErrors = [
|
|
15485
|
-
else vErrors.push(
|
|
15601
|
+
if (vErrors === null) vErrors = [err71];
|
|
15602
|
+
else vErrors.push(err71);
|
|
15486
15603
|
errors++;
|
|
15487
15604
|
}
|
|
15488
15605
|
if (data29.download === void 0) {
|
|
15489
|
-
const
|
|
15606
|
+
const err72 = {
|
|
15490
15607
|
instancePath: instancePath + "/email/content",
|
|
15491
15608
|
schemaPath: "#/properties/email/properties/content/required",
|
|
15492
15609
|
keyword: "required",
|
|
15493
15610
|
params: { missingProperty: "download" },
|
|
15494
15611
|
message: "must have required property 'download'"
|
|
15495
15612
|
};
|
|
15496
|
-
if (vErrors === null) vErrors = [
|
|
15497
|
-
else vErrors.push(
|
|
15613
|
+
if (vErrors === null) vErrors = [err72];
|
|
15614
|
+
else vErrors.push(err72);
|
|
15498
15615
|
errors++;
|
|
15499
15616
|
}
|
|
15500
15617
|
if (data29.raw !== void 0) {
|
|
15501
15618
|
let data33 = data29.raw;
|
|
15502
|
-
const
|
|
15503
|
-
let
|
|
15504
|
-
const
|
|
15619
|
+
const _errs77 = errors;
|
|
15620
|
+
let valid16 = false;
|
|
15621
|
+
const _errs78 = errors;
|
|
15505
15622
|
if (!validate12$1(data33, {
|
|
15506
15623
|
instancePath: instancePath + "/email/content/raw",
|
|
15507
15624
|
parentData: data29,
|
|
@@ -15511,40 +15628,40 @@ function validate11$1(data, { instancePath = "", parentData, parentDataProperty,
|
|
|
15511
15628
|
vErrors = vErrors === null ? validate12$1.errors : vErrors.concat(validate12$1.errors);
|
|
15512
15629
|
errors = vErrors.length;
|
|
15513
15630
|
}
|
|
15514
|
-
var
|
|
15515
|
-
|
|
15516
|
-
if (!
|
|
15517
|
-
const
|
|
15631
|
+
var _valid2 = _errs78 === errors;
|
|
15632
|
+
valid16 = valid16 || _valid2;
|
|
15633
|
+
if (!valid16) {
|
|
15634
|
+
const _errs79 = errors;
|
|
15518
15635
|
if (data33 !== null) {
|
|
15519
|
-
const
|
|
15636
|
+
const err73 = {
|
|
15520
15637
|
instancePath: instancePath + "/email/content/raw",
|
|
15521
15638
|
schemaPath: "#/properties/email/properties/content/properties/raw/anyOf/1/type",
|
|
15522
15639
|
keyword: "type",
|
|
15523
15640
|
params: { type: "null" },
|
|
15524
15641
|
message: "must be null"
|
|
15525
15642
|
};
|
|
15526
|
-
if (vErrors === null) vErrors = [
|
|
15527
|
-
else vErrors.push(
|
|
15643
|
+
if (vErrors === null) vErrors = [err73];
|
|
15644
|
+
else vErrors.push(err73);
|
|
15528
15645
|
errors++;
|
|
15529
15646
|
}
|
|
15530
|
-
var
|
|
15531
|
-
|
|
15647
|
+
var _valid2 = _errs79 === errors;
|
|
15648
|
+
valid16 = valid16 || _valid2;
|
|
15532
15649
|
}
|
|
15533
|
-
if (!
|
|
15534
|
-
const
|
|
15650
|
+
if (!valid16) {
|
|
15651
|
+
const err74 = {
|
|
15535
15652
|
instancePath: instancePath + "/email/content/raw",
|
|
15536
15653
|
schemaPath: "#/properties/email/properties/content/properties/raw/anyOf",
|
|
15537
15654
|
keyword: "anyOf",
|
|
15538
15655
|
params: {},
|
|
15539
15656
|
message: "must match a schema in anyOf"
|
|
15540
15657
|
};
|
|
15541
|
-
if (vErrors === null) vErrors = [
|
|
15542
|
-
else vErrors.push(
|
|
15658
|
+
if (vErrors === null) vErrors = [err74];
|
|
15659
|
+
else vErrors.push(err74);
|
|
15543
15660
|
errors++;
|
|
15544
15661
|
} else {
|
|
15545
|
-
errors =
|
|
15662
|
+
errors = _errs77;
|
|
15546
15663
|
if (vErrors !== null) {
|
|
15547
|
-
if (
|
|
15664
|
+
if (_errs77) vErrors.length = _errs77;
|
|
15548
15665
|
else vErrors = null;
|
|
15549
15666
|
}
|
|
15550
15667
|
}
|
|
@@ -15552,79 +15669,79 @@ function validate11$1(data, { instancePath = "", parentData, parentDataProperty,
|
|
|
15552
15669
|
if (data29.download !== void 0) {
|
|
15553
15670
|
let data34 = data29.download;
|
|
15554
15671
|
if (!(data34 && typeof data34 == "object" && !Array.isArray(data34)) && data34 !== null) {
|
|
15555
|
-
const
|
|
15672
|
+
const err75 = {
|
|
15556
15673
|
instancePath: instancePath + "/email/content/download",
|
|
15557
15674
|
schemaPath: "#/properties/email/properties/content/properties/download/type",
|
|
15558
15675
|
keyword: "type",
|
|
15559
15676
|
params: { type: schema12.properties.email.properties.content.properties.download.type },
|
|
15560
15677
|
message: "must be object,null"
|
|
15561
15678
|
};
|
|
15562
|
-
if (vErrors === null) vErrors = [
|
|
15563
|
-
else vErrors.push(
|
|
15679
|
+
if (vErrors === null) vErrors = [err75];
|
|
15680
|
+
else vErrors.push(err75);
|
|
15564
15681
|
errors++;
|
|
15565
15682
|
}
|
|
15566
15683
|
if (data34 && typeof data34 == "object" && !Array.isArray(data34)) {
|
|
15567
15684
|
if (data34.url === void 0) {
|
|
15568
|
-
const
|
|
15685
|
+
const err76 = {
|
|
15569
15686
|
instancePath: instancePath + "/email/content/download",
|
|
15570
15687
|
schemaPath: "#/properties/email/properties/content/properties/download/required",
|
|
15571
15688
|
keyword: "required",
|
|
15572
15689
|
params: { missingProperty: "url" },
|
|
15573
15690
|
message: "must have required property 'url'"
|
|
15574
15691
|
};
|
|
15575
|
-
if (vErrors === null) vErrors = [
|
|
15576
|
-
else vErrors.push(
|
|
15692
|
+
if (vErrors === null) vErrors = [err76];
|
|
15693
|
+
else vErrors.push(err76);
|
|
15577
15694
|
errors++;
|
|
15578
15695
|
}
|
|
15579
15696
|
if (data34.expires_at === void 0) {
|
|
15580
|
-
const
|
|
15697
|
+
const err77 = {
|
|
15581
15698
|
instancePath: instancePath + "/email/content/download",
|
|
15582
15699
|
schemaPath: "#/properties/email/properties/content/properties/download/required",
|
|
15583
15700
|
keyword: "required",
|
|
15584
15701
|
params: { missingProperty: "expires_at" },
|
|
15585
15702
|
message: "must have required property 'expires_at'"
|
|
15586
15703
|
};
|
|
15587
|
-
if (vErrors === null) vErrors = [
|
|
15588
|
-
else vErrors.push(
|
|
15704
|
+
if (vErrors === null) vErrors = [err77];
|
|
15705
|
+
else vErrors.push(err77);
|
|
15589
15706
|
errors++;
|
|
15590
15707
|
}
|
|
15591
15708
|
if (data34.url !== void 0) {
|
|
15592
15709
|
let data35 = data34.url;
|
|
15593
15710
|
if (typeof data35 === "string") {
|
|
15594
15711
|
if (!pattern4.test(data35)) {
|
|
15595
|
-
const
|
|
15712
|
+
const err78 = {
|
|
15596
15713
|
instancePath: instancePath + "/email/content/download/url",
|
|
15597
15714
|
schemaPath: "#/properties/email/properties/content/properties/download/properties/url/pattern",
|
|
15598
15715
|
keyword: "pattern",
|
|
15599
15716
|
params: { pattern: "^https?://" },
|
|
15600
15717
|
message: "must match pattern \"^https?://\""
|
|
15601
15718
|
};
|
|
15602
|
-
if (vErrors === null) vErrors = [
|
|
15603
|
-
else vErrors.push(
|
|
15719
|
+
if (vErrors === null) vErrors = [err78];
|
|
15720
|
+
else vErrors.push(err78);
|
|
15604
15721
|
errors++;
|
|
15605
15722
|
}
|
|
15606
15723
|
if (!formats4.test(data35)) {
|
|
15607
|
-
const
|
|
15724
|
+
const err79 = {
|
|
15608
15725
|
instancePath: instancePath + "/email/content/download/url",
|
|
15609
15726
|
schemaPath: "#/properties/email/properties/content/properties/download/properties/url/format",
|
|
15610
15727
|
keyword: "format",
|
|
15611
15728
|
params: { format: "uri" },
|
|
15612
15729
|
message: "must match format \"uri\""
|
|
15613
15730
|
};
|
|
15614
|
-
if (vErrors === null) vErrors = [
|
|
15615
|
-
else vErrors.push(
|
|
15731
|
+
if (vErrors === null) vErrors = [err79];
|
|
15732
|
+
else vErrors.push(err79);
|
|
15616
15733
|
errors++;
|
|
15617
15734
|
}
|
|
15618
15735
|
} else {
|
|
15619
|
-
const
|
|
15736
|
+
const err80 = {
|
|
15620
15737
|
instancePath: instancePath + "/email/content/download/url",
|
|
15621
15738
|
schemaPath: "#/properties/email/properties/content/properties/download/properties/url/type",
|
|
15622
15739
|
keyword: "type",
|
|
15623
15740
|
params: { type: "string" },
|
|
15624
15741
|
message: "must be string"
|
|
15625
15742
|
};
|
|
15626
|
-
if (vErrors === null) vErrors = [
|
|
15627
|
-
else vErrors.push(
|
|
15743
|
+
if (vErrors === null) vErrors = [err80];
|
|
15744
|
+
else vErrors.push(err80);
|
|
15628
15745
|
errors++;
|
|
15629
15746
|
}
|
|
15630
15747
|
}
|
|
@@ -15632,42 +15749,42 @@ function validate11$1(data, { instancePath = "", parentData, parentDataProperty,
|
|
|
15632
15749
|
let data36 = data34.expires_at;
|
|
15633
15750
|
if (typeof data36 === "string") {
|
|
15634
15751
|
if (!formats0$1.test(data36)) {
|
|
15635
|
-
const
|
|
15752
|
+
const err81 = {
|
|
15636
15753
|
instancePath: instancePath + "/email/content/download/expires_at",
|
|
15637
15754
|
schemaPath: "#/properties/email/properties/content/properties/download/properties/expires_at/format",
|
|
15638
15755
|
keyword: "format",
|
|
15639
15756
|
params: { format: "date-time" },
|
|
15640
15757
|
message: "must match format \"date-time\""
|
|
15641
15758
|
};
|
|
15642
|
-
if (vErrors === null) vErrors = [
|
|
15643
|
-
else vErrors.push(
|
|
15759
|
+
if (vErrors === null) vErrors = [err81];
|
|
15760
|
+
else vErrors.push(err81);
|
|
15644
15761
|
errors++;
|
|
15645
15762
|
}
|
|
15646
15763
|
} else {
|
|
15647
|
-
const
|
|
15764
|
+
const err82 = {
|
|
15648
15765
|
instancePath: instancePath + "/email/content/download/expires_at",
|
|
15649
15766
|
schemaPath: "#/properties/email/properties/content/properties/download/properties/expires_at/type",
|
|
15650
15767
|
keyword: "type",
|
|
15651
15768
|
params: { type: "string" },
|
|
15652
15769
|
message: "must be string"
|
|
15653
15770
|
};
|
|
15654
|
-
if (vErrors === null) vErrors = [
|
|
15655
|
-
else vErrors.push(
|
|
15771
|
+
if (vErrors === null) vErrors = [err82];
|
|
15772
|
+
else vErrors.push(err82);
|
|
15656
15773
|
errors++;
|
|
15657
15774
|
}
|
|
15658
15775
|
}
|
|
15659
15776
|
}
|
|
15660
15777
|
}
|
|
15661
15778
|
} else {
|
|
15662
|
-
const
|
|
15779
|
+
const err83 = {
|
|
15663
15780
|
instancePath: instancePath + "/email/content",
|
|
15664
15781
|
schemaPath: "#/properties/email/properties/content/type",
|
|
15665
15782
|
keyword: "type",
|
|
15666
15783
|
params: { type: "object" },
|
|
15667
15784
|
message: "must be object"
|
|
15668
15785
|
};
|
|
15669
|
-
if (vErrors === null) vErrors = [
|
|
15670
|
-
else vErrors.push(
|
|
15786
|
+
if (vErrors === null) vErrors = [err83];
|
|
15787
|
+
else vErrors.push(err83);
|
|
15671
15788
|
errors++;
|
|
15672
15789
|
}
|
|
15673
15790
|
}
|
|
@@ -15706,123 +15823,123 @@ function validate11$1(data, { instancePath = "", parentData, parentDataProperty,
|
|
|
15706
15823
|
}
|
|
15707
15824
|
if (data14.relay !== void 0) {
|
|
15708
15825
|
let data40 = data14.relay;
|
|
15709
|
-
const
|
|
15710
|
-
let
|
|
15711
|
-
const
|
|
15826
|
+
const _errs91 = errors;
|
|
15827
|
+
let valid18 = false;
|
|
15828
|
+
const _errs92 = errors;
|
|
15712
15829
|
if (data40 && typeof data40 == "object" && !Array.isArray(data40)) {
|
|
15713
15830
|
if (data40.hostname === void 0) {
|
|
15714
|
-
const
|
|
15831
|
+
const err84 = {
|
|
15715
15832
|
instancePath: instancePath + "/email/relay",
|
|
15716
15833
|
schemaPath: "#/definitions/EmailRelay/required",
|
|
15717
15834
|
keyword: "required",
|
|
15718
15835
|
params: { missingProperty: "hostname" },
|
|
15719
15836
|
message: "must have required property 'hostname'"
|
|
15720
15837
|
};
|
|
15721
|
-
if (vErrors === null) vErrors = [
|
|
15722
|
-
else vErrors.push(
|
|
15838
|
+
if (vErrors === null) vErrors = [err84];
|
|
15839
|
+
else vErrors.push(err84);
|
|
15723
15840
|
errors++;
|
|
15724
15841
|
}
|
|
15725
15842
|
if (data40.via === void 0) {
|
|
15726
|
-
const
|
|
15843
|
+
const err85 = {
|
|
15727
15844
|
instancePath: instancePath + "/email/relay",
|
|
15728
15845
|
schemaPath: "#/definitions/EmailRelay/required",
|
|
15729
15846
|
keyword: "required",
|
|
15730
15847
|
params: { missingProperty: "via" },
|
|
15731
15848
|
message: "must have required property 'via'"
|
|
15732
15849
|
};
|
|
15733
|
-
if (vErrors === null) vErrors = [
|
|
15734
|
-
else vErrors.push(
|
|
15850
|
+
if (vErrors === null) vErrors = [err85];
|
|
15851
|
+
else vErrors.push(err85);
|
|
15735
15852
|
errors++;
|
|
15736
15853
|
}
|
|
15737
15854
|
if (data40.hostname !== void 0) {
|
|
15738
15855
|
if (typeof data40.hostname !== "string") {
|
|
15739
|
-
const
|
|
15856
|
+
const err86 = {
|
|
15740
15857
|
instancePath: instancePath + "/email/relay/hostname",
|
|
15741
15858
|
schemaPath: "#/definitions/EmailRelay/properties/hostname/type",
|
|
15742
15859
|
keyword: "type",
|
|
15743
15860
|
params: { type: "string" },
|
|
15744
15861
|
message: "must be string"
|
|
15745
15862
|
};
|
|
15746
|
-
if (vErrors === null) vErrors = [
|
|
15747
|
-
else vErrors.push(
|
|
15863
|
+
if (vErrors === null) vErrors = [err86];
|
|
15864
|
+
else vErrors.push(err86);
|
|
15748
15865
|
errors++;
|
|
15749
15866
|
}
|
|
15750
15867
|
}
|
|
15751
15868
|
if (data40.via !== void 0) {
|
|
15752
15869
|
if (typeof data40.via !== "string") {
|
|
15753
|
-
const
|
|
15870
|
+
const err87 = {
|
|
15754
15871
|
instancePath: instancePath + "/email/relay/via",
|
|
15755
15872
|
schemaPath: "#/definitions/EmailRelay/properties/via/type",
|
|
15756
15873
|
keyword: "type",
|
|
15757
15874
|
params: { type: "string" },
|
|
15758
15875
|
message: "must be string"
|
|
15759
15876
|
};
|
|
15760
|
-
if (vErrors === null) vErrors = [
|
|
15761
|
-
else vErrors.push(
|
|
15877
|
+
if (vErrors === null) vErrors = [err87];
|
|
15878
|
+
else vErrors.push(err87);
|
|
15762
15879
|
errors++;
|
|
15763
15880
|
}
|
|
15764
15881
|
}
|
|
15765
15882
|
} else {
|
|
15766
|
-
const
|
|
15883
|
+
const err88 = {
|
|
15767
15884
|
instancePath: instancePath + "/email/relay",
|
|
15768
15885
|
schemaPath: "#/definitions/EmailRelay/type",
|
|
15769
15886
|
keyword: "type",
|
|
15770
15887
|
params: { type: "object" },
|
|
15771
15888
|
message: "must be object"
|
|
15772
15889
|
};
|
|
15773
|
-
if (vErrors === null) vErrors = [
|
|
15774
|
-
else vErrors.push(
|
|
15890
|
+
if (vErrors === null) vErrors = [err88];
|
|
15891
|
+
else vErrors.push(err88);
|
|
15775
15892
|
errors++;
|
|
15776
15893
|
}
|
|
15777
|
-
var
|
|
15778
|
-
|
|
15779
|
-
if (!
|
|
15780
|
-
const
|
|
15894
|
+
var _valid3 = _errs92 === errors;
|
|
15895
|
+
valid18 = valid18 || _valid3;
|
|
15896
|
+
if (!valid18) {
|
|
15897
|
+
const _errs99 = errors;
|
|
15781
15898
|
if (data40 !== null) {
|
|
15782
|
-
const
|
|
15899
|
+
const err89 = {
|
|
15783
15900
|
instancePath: instancePath + "/email/relay",
|
|
15784
15901
|
schemaPath: "#/properties/email/properties/relay/anyOf/1/type",
|
|
15785
15902
|
keyword: "type",
|
|
15786
15903
|
params: { type: "null" },
|
|
15787
15904
|
message: "must be null"
|
|
15788
15905
|
};
|
|
15789
|
-
if (vErrors === null) vErrors = [
|
|
15790
|
-
else vErrors.push(
|
|
15906
|
+
if (vErrors === null) vErrors = [err89];
|
|
15907
|
+
else vErrors.push(err89);
|
|
15791
15908
|
errors++;
|
|
15792
15909
|
}
|
|
15793
|
-
var
|
|
15794
|
-
|
|
15910
|
+
var _valid3 = _errs99 === errors;
|
|
15911
|
+
valid18 = valid18 || _valid3;
|
|
15795
15912
|
}
|
|
15796
|
-
if (!
|
|
15797
|
-
const
|
|
15913
|
+
if (!valid18) {
|
|
15914
|
+
const err90 = {
|
|
15798
15915
|
instancePath: instancePath + "/email/relay",
|
|
15799
15916
|
schemaPath: "#/properties/email/properties/relay/anyOf",
|
|
15800
15917
|
keyword: "anyOf",
|
|
15801
15918
|
params: {},
|
|
15802
15919
|
message: "must match a schema in anyOf"
|
|
15803
15920
|
};
|
|
15804
|
-
if (vErrors === null) vErrors = [
|
|
15805
|
-
else vErrors.push(
|
|
15921
|
+
if (vErrors === null) vErrors = [err90];
|
|
15922
|
+
else vErrors.push(err90);
|
|
15806
15923
|
errors++;
|
|
15807
15924
|
} else {
|
|
15808
|
-
errors =
|
|
15925
|
+
errors = _errs91;
|
|
15809
15926
|
if (vErrors !== null) {
|
|
15810
|
-
if (
|
|
15927
|
+
if (_errs91) vErrors.length = _errs91;
|
|
15811
15928
|
else vErrors = null;
|
|
15812
15929
|
}
|
|
15813
15930
|
}
|
|
15814
15931
|
}
|
|
15815
15932
|
if (data14.automated !== void 0) {
|
|
15816
15933
|
if (typeof data14.automated !== "boolean") {
|
|
15817
|
-
const
|
|
15934
|
+
const err91 = {
|
|
15818
15935
|
instancePath: instancePath + "/email/automated",
|
|
15819
15936
|
schemaPath: "#/properties/email/properties/automated/type",
|
|
15820
15937
|
keyword: "type",
|
|
15821
15938
|
params: { type: "boolean" },
|
|
15822
15939
|
message: "must be boolean"
|
|
15823
15940
|
};
|
|
15824
|
-
if (vErrors === null) vErrors = [
|
|
15825
|
-
else vErrors.push(
|
|
15941
|
+
if (vErrors === null) vErrors = [err91];
|
|
15942
|
+
else vErrors.push(err91);
|
|
15826
15943
|
errors++;
|
|
15827
15944
|
}
|
|
15828
15945
|
}
|
|
@@ -15831,53 +15948,53 @@ function validate11$1(data, { instancePath = "", parentData, parentDataProperty,
|
|
|
15831
15948
|
if (Array.isArray(data44)) {
|
|
15832
15949
|
const len1 = data44.length;
|
|
15833
15950
|
for (let i1 = 0; i1 < len1; i1++) if (typeof data44[i1] !== "string") {
|
|
15834
|
-
const
|
|
15951
|
+
const err92 = {
|
|
15835
15952
|
instancePath: instancePath + "/email/automated_reasons/" + i1,
|
|
15836
15953
|
schemaPath: "#/properties/email/properties/automated_reasons/items/type",
|
|
15837
15954
|
keyword: "type",
|
|
15838
15955
|
params: { type: "string" },
|
|
15839
15956
|
message: "must be string"
|
|
15840
15957
|
};
|
|
15841
|
-
if (vErrors === null) vErrors = [
|
|
15842
|
-
else vErrors.push(
|
|
15958
|
+
if (vErrors === null) vErrors = [err92];
|
|
15959
|
+
else vErrors.push(err92);
|
|
15843
15960
|
errors++;
|
|
15844
15961
|
}
|
|
15845
15962
|
} else {
|
|
15846
|
-
const
|
|
15963
|
+
const err93 = {
|
|
15847
15964
|
instancePath: instancePath + "/email/automated_reasons",
|
|
15848
15965
|
schemaPath: "#/properties/email/properties/automated_reasons/type",
|
|
15849
15966
|
keyword: "type",
|
|
15850
15967
|
params: { type: "array" },
|
|
15851
15968
|
message: "must be array"
|
|
15852
15969
|
};
|
|
15853
|
-
if (vErrors === null) vErrors = [
|
|
15854
|
-
else vErrors.push(
|
|
15970
|
+
if (vErrors === null) vErrors = [err93];
|
|
15971
|
+
else vErrors.push(err93);
|
|
15855
15972
|
errors++;
|
|
15856
15973
|
}
|
|
15857
15974
|
}
|
|
15858
15975
|
} else {
|
|
15859
|
-
const
|
|
15976
|
+
const err94 = {
|
|
15860
15977
|
instancePath: instancePath + "/email",
|
|
15861
15978
|
schemaPath: "#/properties/email/type",
|
|
15862
15979
|
keyword: "type",
|
|
15863
15980
|
params: { type: "object" },
|
|
15864
15981
|
message: "must be object"
|
|
15865
15982
|
};
|
|
15866
|
-
if (vErrors === null) vErrors = [
|
|
15867
|
-
else vErrors.push(
|
|
15983
|
+
if (vErrors === null) vErrors = [err94];
|
|
15984
|
+
else vErrors.push(err94);
|
|
15868
15985
|
errors++;
|
|
15869
15986
|
}
|
|
15870
15987
|
}
|
|
15871
15988
|
} else {
|
|
15872
|
-
const
|
|
15989
|
+
const err95 = {
|
|
15873
15990
|
instancePath,
|
|
15874
15991
|
schemaPath: "#/type",
|
|
15875
15992
|
keyword: "type",
|
|
15876
15993
|
params: { type: "object" },
|
|
15877
15994
|
message: "must be object"
|
|
15878
15995
|
};
|
|
15879
|
-
if (vErrors === null) vErrors = [
|
|
15880
|
-
else vErrors.push(
|
|
15996
|
+
if (vErrors === null) vErrors = [err95];
|
|
15997
|
+
else vErrors.push(err95);
|
|
15881
15998
|
errors++;
|
|
15882
15999
|
}
|
|
15883
16000
|
validate11$1.errors = vErrors;
|
|
@@ -16084,10 +16201,10 @@ function formatValidationIssue(error, input) {
|
|
|
16084
16201
|
switch (error.keyword) {
|
|
16085
16202
|
case "required": {
|
|
16086
16203
|
const missing = String(error.params.missingProperty ?? "unknown");
|
|
16087
|
-
const
|
|
16204
|
+
const missingField = field === "payload" ? missing : `${field}.${missing}`;
|
|
16088
16205
|
return {
|
|
16089
|
-
field:
|
|
16090
|
-
message: `Missing required field: ${
|
|
16206
|
+
field: missingField,
|
|
16207
|
+
message: `Missing required field: ${missingField}`,
|
|
16091
16208
|
suggestion: `Add the required field "${missing}" to the webhook payload.`
|
|
16092
16209
|
};
|
|
16093
16210
|
}
|
|
@@ -24289,11 +24406,6 @@ function combineQ(q, domain) {
|
|
|
24289
24406
|
const parts = [q?.trim(), domain ? `domain:${quoteDslValue(domain.trim())}` : void 0].filter((part) => Boolean(part));
|
|
24290
24407
|
return parts.length > 0 ? parts.join(" ") : void 0;
|
|
24291
24408
|
}
|
|
24292
|
-
function normalizeIsoDate(value, label) {
|
|
24293
|
-
const parsed = new Date(value);
|
|
24294
|
-
if (Number.isNaN(parsed.getTime())) throw new Error(`${label} must be a valid date or ISO-8601 timestamp.`);
|
|
24295
|
-
return parsed.toISOString();
|
|
24296
|
-
}
|
|
24297
24409
|
function filtersFromFlags(flags) {
|
|
24298
24410
|
if (flags.automated !== void 0 && !AUTOMATED_VALUES.includes(flags.automated)) throw new Error("--automated must be true or false.");
|
|
24299
24411
|
return {
|
|
@@ -24312,9 +24424,30 @@ function filtersFromFlags(flags) {
|
|
|
24312
24424
|
to: flags.to
|
|
24313
24425
|
};
|
|
24314
24426
|
}
|
|
24315
|
-
|
|
24316
|
-
|
|
24317
|
-
|
|
24427
|
+
const SINCE_DURATION = /^(\d+)\s*(s|m|h|d)$/i;
|
|
24428
|
+
const SINCE_UNIT_MS = {
|
|
24429
|
+
s: 1e3,
|
|
24430
|
+
m: 6e4,
|
|
24431
|
+
h: 36e5,
|
|
24432
|
+
d: 864e5
|
|
24433
|
+
};
|
|
24434
|
+
/** How --since reads: a date or timestamp, or a duration ago (`15m`). */
|
|
24435
|
+
const SINCE_VALUE_HELP = "an ISO-8601 timestamp or date, or a duration ago such as 30s, 15m, 2h or 1d";
|
|
24436
|
+
/**
|
|
24437
|
+
* Read --since: an ISO-8601 timestamp or date, or a duration before `now`
|
|
24438
|
+
* (`30s`, `15m`, `2h`, `1d`).
|
|
24439
|
+
*/
|
|
24440
|
+
function parseSince(value, now = Date.now()) {
|
|
24441
|
+
if (/^\s*\d+\s*$/.test(value)) throw new Error(`--since needs a unit on a duration, for example ${value.trim()}m; it takes ${SINCE_VALUE_HELP}.`);
|
|
24442
|
+
const duration = SINCE_DURATION.exec(value.trim());
|
|
24443
|
+
const unit = duration ? SINCE_UNIT_MS[duration[2].toLowerCase()] : void 0;
|
|
24444
|
+
const parsed = duration && unit !== void 0 ? new Date(now - Number(duration[1]) * unit) : new Date(value);
|
|
24445
|
+
if (Number.isNaN(parsed.getTime()) || parsed.getTime() < 0) throw new Error(`--since must be ${SINCE_VALUE_HELP}.`);
|
|
24446
|
+
return parsed.toISOString();
|
|
24447
|
+
}
|
|
24448
|
+
function sinceFromFlags(flags, now = Date.now()) {
|
|
24449
|
+
if (flags.since) return parseSince(flags.since, now);
|
|
24450
|
+
return flags["include-existing"] ? void 0 : new Date(now).toISOString();
|
|
24318
24451
|
}
|
|
24319
24452
|
function buildEmailSearchQuery(params) {
|
|
24320
24453
|
const query = {
|
|
@@ -25336,4 +25469,4 @@ function repeatStopCommand(emailId) {
|
|
|
25336
25469
|
if (!UUID.test(emailId)) throw new TypeError("emailId must be an email UUID");
|
|
25337
25470
|
return `primitive repeat stop --id ${emailId.toLowerCase()}`;
|
|
25338
25471
|
}
|
|
25339
|
-
export {
|
|
25472
|
+
export { AUTOMATED_VALUES as $, updateFunction as $n, listAgentConnections as $t, sinceFromFlags as A, removeDefaultNetworkMember as An, downloadSentAttachmentByFilename as At, formatRepliesCell as B, semanticSearch as Bn, getFunctionRouting as Bt, SINCE_VALUE_HELP as C, listWakeSchedules as Cn, deleteRoute as Ct, fetchEmailSearchPage as D, putAgentContactPolicy as Dn, downloadEmailAttachmentByFilename as Dt, encodeReceivedAtSearchCursor as E, putAgentContact as En, downloadEmailAttachmentArchiveMember as Et, ReplyStateUnsupportedError as F, rotateKey as Fn, getConversation as Ft, SENT_EMAIL_EVENT_TYPES as G, simulateRoute as Gn, getOrgRoutingTopology as Gt, isAwaitingRejectedError as H, setFunctionRoute as Hn, getInboxStatus as Ht, assertAwaitingFilterRows as I, runWakeSchedule as In, getCreditBalance as It, isTrustedSender as J, startCliLogin as Jn, getSentEmail as Jt, WEBHOOK_EVENT_TYPES as K, startAgentClaim as Kn, getOwnGrant as Kt, awaitingRejectedError as L, sdk_gen_exports as Ln, getDefaultNetworkAgent as Lt, AWAITING_FLAG_DESCRIPTION as M, replyToEmail as Mn, getAccount as Mt, AWAITING_VALUES as N, resendAgentSignupVerification as Nn, getAgentContactPolicy as Nt, filtersFromFlags as O, putContact as On, downloadEmailAttachmentPart as Ot, REPLY_STATE_UNSUPPORTED_CODE as P, revokeCredential as Pn, getContact as Pt, AUTOMATED_FLAG_DESCRIPTION as Q, updateDefaultNetworkMember as Qn, leaveOrganization as Qt, ensureSearchReportsReplyState as R, searchEmails as Rn, getEmail as Rt, transientFailure as S, listWakeDispatches as Sn, deleteMemory as St, cursorFromAcceptedRows as T, pullWebhookEvent as Tn, deleteWakeSchedule as Tt, queryUsesAwaiting as U, setFunctionSecret as Un, getKey as Ut, hasReplyState as V, sendEmail as Vn, getFunctionTestRunTrace as Vt, replyStateSurfaceForOperation as W, setMemory as Wn, getMemory as Wt, parseFromHeader as X, testFunction as Xn, getWakeSchedule as Xt, parseWebhookEvent as Y, stopRepeatFromEmail as Yn, getThread as Yt, AUTOMATED_FILTER_UNSUPPORTED_CODE as Z, unsetFunctionRoute as Zn, inviteAgentConnection as Zt, describeApiFailure as _, listRoles as _n, createRoute as _t, REPEAT_IDLE_MAX_MINUTES as a, listDomains as an, verifyAgentClaim as ar, expectedAutomatedVerdicts as at, retryTransient as b, listSentEmails as bn, deleteAgentContact as bt, classifySignalContent as c, listEmails as cn, addDefaultNetworkMember as ct, parseRepeatTick as d, listFunctions as dn, checkDefaultNetworkContactAdmission as dt, listAgentContacts as en, updateKey as er, AutomatedFilterUnsupportedError as et, preparePresenceAliveEmail as f, listGroups as fn, cliLogout as ft, WaitDeadlineReached as g, listRepeatingSends as gn, createKey as gt, sendPreparedSignal as h, listOrganizationPeople as hn, createFunction as ht, REPEAT_EVERY_MAX_MINUTES as i, listDefaultNetworkMembers as in, updateWakeSchedule as ir, ensureSearchReportsAutomated as it, sleep as j, reorderRoutes as jn, getAccessMode as jt, quoteDslValue as k, redeemCreditCode as kn, downloadSentAttachmentArchiveMember as kt, parseInteractionEnvelope as l, listEndpoints as ln, cancelSentEmail as lt, repeatStopCommand as m, listMailboxAccess as mn, createEndpoint as mt, MAX_PRESENCE_ENVELOPE_BYTES as n, listContacts as nn, updateRoute as nr, automatedRejectedError as nt, REPEAT_MAX_SENDS_MAX as o, listEmailAttachmentArchiveMembers as on, verifyAgentSignup as or, hasAutomatedVerdict as ot, prepareSignalEmail as p, listKeys as pn, completeWebhookEvent as pt, isEmailReceivedEvent as q, startAgentSignup as qn, getRepeatingSend as qt, PRESENCE_PROBE_TEXT as r, listDefaultNetworkAgents as rn, updateWakeAuthorization as rr, automatedSurfaceForOperation as rt, buildRepeatStopBody as s, listEmailRuleResults as sn, __exportAll as sr, isAutomatedRejectedError as st, MAX_INTERACTION_BYTES as t, listAgentNetworks as tn, updateRepeatingSend as tr, assertAutomatedVerdict as tt, parsePresenceEnvelope as u, listFunctionLogs as un, cancelSentEmailByIdempotencyKey as ut, parseRetryAfter as v, listRoutes as vn, createWakeAuthorization as vt, collectNewAcceptedEmails as w, pollCliLogin as wn, deleteWakeAuthorization as wt, retryingOperation as x, listWakeAuthorizations as xn, deleteContact as xt, pauseForTransientFailure as y, listSentAttachmentArchiveMembers as yn, createWakeSchedule as yt, formatAwaitingCell as z, searchMemories as zn, getFunction as zt };
|