primcli 3.0.0-preview.10 → 3.0.0-preview.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{api-command-D0KHkqhA.js → api-command-CNCsVNk0.js} +1066 -95
- package/dist/{machine-session-CI8tnGzz.js → machine-session-DkXYR62a.js} +4 -4
- package/dist/{notify-session-DN8tSfAi.js → notify-session-WKFsaFt3.js} +2 -2
- package/dist/oclif/auto-signal-worker.js +3 -3
- package/dist/oclif/auto-signals.js +1 -1
- package/dist/oclif/index.js +860 -175
- package/dist/oclif/receiver-heal.js +2 -2
- package/dist/{repeats-Dj_o6c-X-CDaE-kdZ.js → repeats-Dj_o6c-X-wjmw2Jbx.js} +57 -42
- package/dist/{scoped-chat-C4TDfZND.js → scoped-chat-B1Fi6_qM.js} +1 -1
- package/dist/{signal-command-f5QeK45s.js → signal-command-BdJVZXGl.js} +4 -4
- package/package.json +3 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { N as agentProfileDirectory, P as agentProfileName, R as loadConnectedAgentProfile, j as AGENT_PROFILE_ENV } from "../cli-config-Ms_0vNjq.js";
|
|
2
2
|
import { a as backgroundListenStatus, i as backgroundListenRestartable, s as claimBackgroundListenRestart, t as BACKGROUND_LISTEN_RELAUNCH_ENV } from "../listen-background-DyBYca28.js";
|
|
3
|
-
import { d as SESSION_UUID, t as notificationScope } from "../notify-session-
|
|
4
|
-
import { Lt as detectAgentRuntime } from "../api-command-
|
|
3
|
+
import { d as SESSION_UUID, t as notificationScope } from "../notify-session-WKFsaFt3.js";
|
|
4
|
+
import { Lt as detectAgentRuntime } from "../api-command-CNCsVNk0.js";
|
|
5
5
|
import { d as readMailJson } from "../shared-mail-files-BAQSGxxz.js";
|
|
6
6
|
import { join } from "node:path";
|
|
7
7
|
import { spawn } from "node:child_process";
|
|
@@ -3609,7 +3609,7 @@ const getWebhookDeliveryStats = (options) => (options?.client ?? client).get({
|
|
|
3609
3609
|
/**
|
|
3610
3610
|
* List what you created, or what you were asked
|
|
3611
3611
|
*
|
|
3612
|
-
* The objects the caller created, newest first, each with where it stands now, including ones since disabled, deleted or revoked where the object keeps a row: Functions, endpoints, Function triggers, pull subscriptions, recipient routes, filters, wake schedules, repeating sends and scheduled sends. An API key, an app or an agent sees what it created itself; a webhook given to an API key lists under that key. A person (a dashboard session, or their own Primitive CLI or app login) sees what they created through any credential of theirs, each item naming it, and also their API keys, personal agents, email rules, rule requests and objections to rules over their mail (objections only on the dashboard or the Primitive CLI). Each kind is listed only if the caller could list it through that kind's own route; a kind it could not is named in withheld, with no count. Ids, names and states only: never a webhook URL or mail content. Needs activity:read_self. With relation=asked it lists instead what other members asked of the person, open or answered: the rule requests made to them, and the objections to rules they wrote, under their current membership, each naming the member who asked or objected in created_through. A key, an app or an agent has none, and gets both kinds in withheld.
|
|
3612
|
+
* The objects the caller created, newest first, each with where it stands now, including ones since disabled, deleted or revoked where the object keeps a row: Functions, endpoints, Function triggers, pull subscriptions, recipient routes, filters, wake schedules, repeating sends and scheduled sends. An API key, an app or an agent sees what it created itself; a webhook given to an API key lists under that key. A person (a dashboard session, or their own Primitive CLI or app login) sees what they created through any credential of theirs, each item naming it, and also their API keys, personal agents, email rules, rule requests and objections to rules over their mail (objections only on the dashboard or the Primitive CLI). Each kind is listed only if the caller could list it through that kind's own route; a kind it could not is named in withheld, with no count. Ids, names and states only: never a webhook URL or mail content. Needs activity:read_self. With relation=asked it lists instead what other members asked of the person, open or answered: the rule requests made to them, and the objections to rules they wrote, under their current membership, each naming the member who asked or objected in created_through. A key, an app or an agent has none, and gets both kinds in withheld. With relation=concerning it lists instead what other members did that concerns the person's own mail: each time a rule started covering one of their mailboxes or saved a new version while covering it, named as the rule was then, naming its author in created_through, under their current membership; only on the dashboard or the Primitive CLI. A key, an app or an agent has none, and gets email_rule_coverage in withheld. A notice never reads as ended. Notices are written by a periodic job and can lag: until the notices record a rule starting to cover you, the first page lists that rule as pending (pending_complete says whether that check finished), and as_of says about when the notices last looked. For what covers you now, read GET /email-rules/covering-me.
|
|
3613
3613
|
*/
|
|
3614
3614
|
const listActivityObjects = (options) => (options?.client ?? client).get({
|
|
3615
3615
|
security: [{
|
|
@@ -3622,7 +3622,7 @@ const listActivityObjects = (options) => (options?.client ?? client).get({
|
|
|
3622
3622
|
/**
|
|
3623
3623
|
* Read the column catalog
|
|
3624
3624
|
*
|
|
3625
|
-
* 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
|
|
3625
|
+
* What a rule tree you write yourself can say: each column of the current vocabulary with its type, source, meaning, operators and the value each takes, options, and whether it takes min_confidence; and the tree's limits, its stored size included. Built from the checks a saved or tested tree must pass. A tree is {version: tree_version, vocabulary: version, when, questions}. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).
|
|
3626
3626
|
*/
|
|
3627
3627
|
const getEmailRuleVocabulary = (options) => (options?.client ?? client).get({
|
|
3628
3628
|
security: [{
|
|
@@ -3635,7 +3635,7 @@ const getEmailRuleVocabulary = (options) => (options?.client ?? client).get({
|
|
|
3635
3635
|
/**
|
|
3636
3636
|
* Compile a rule description
|
|
3637
3637
|
*
|
|
3638
|
-
* Turns a plain-English description of which received emails to match into a rule tree over the column contract, with an explanation of what it matches, the assumptions made, and warnings for what the columns cannot express. Where the columns fall short it adds up to five yes/no questions, asked only after the conditions match; they read the subject, the new text and attachment file names, never attachment contents. Nothing is saved. For a rule with no questions, breadth counts, read only, how much of your recent classified mail its conditions match. include_sql returns the SQL it renders to. kind do_not_share compiles for recall. Needs mail:read, a member's own
|
|
3638
|
+
* Turns a plain-English description of which received emails to match into a rule tree over the column contract, with an explanation of what it matches, the assumptions made, and warnings for what the columns cannot express. Where the columns fall short it adds up to five yes/no questions, asked only after the conditions match; they read the subject, the new text and attachment file names, never attachment contents. Nothing is saved. For a rule with no questions, breadth counts, read only, how much of your recent classified mail its conditions match; for a grant rule with questions, conditions_breadth counts its conditions alone. include_sql returns the SQL it renders to. kind do_not_share compiles for recall. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).
|
|
3639
3639
|
*/
|
|
3640
3640
|
const compileEmailRule = (options) => (options.client ?? client).post({
|
|
3641
3641
|
security: [{
|
|
@@ -3652,7 +3652,7 @@ const compileEmailRule = (options) => (options.client ?? client).post({
|
|
|
3652
3652
|
/**
|
|
3653
3653
|
* Test a rule against received mail
|
|
3654
3654
|
*
|
|
3655
|
-
* Runs a rule over received mail and reports what it would decide for each email (matched, near_miss, no_match, unclassified, skipped or not_found), with a summary of how each top-level condition and question decided. Test an unsaved tree, or a saved rule by rule_id (its current version, as its author). It reads only mail its author can read and its scope covers. Without email_ids it tests the newest emails, at most 200 and none older than 30 days, plus any expected ones. Unclassified emails over 2 hours old are classified first unless classify_missing is false. It records no decision and grants nothing, and stops at about 90 seconds. Needs mail:read, a member's own
|
|
3655
|
+
* Runs a rule over received mail and reports what it would decide for each email (matched, near_miss, no_match, unclassified, skipped or not_found), with a summary of how each top-level condition and question decided. Test an unsaved tree, or a saved rule by rule_id (its current version, as its author). It reads only mail its author can read and its scope covers. A rule you see only because it covers your own mailboxes runs as you, over only those, from the dashboard or the Primitive CLI. Without email_ids it tests the newest emails, at most 200 and none older than 30 days, plus any expected ones. Unclassified emails over 2 hours old are classified first unless classify_missing is false. It records no decision and grants nothing, and stops at about 90 seconds. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).
|
|
3656
3656
|
*/
|
|
3657
3657
|
const testEmailRule = (options) => (options.client ?? client).post({
|
|
3658
3658
|
security: [{
|
|
@@ -3669,7 +3669,7 @@ const testEmailRule = (options) => (options.client ?? client).post({
|
|
|
3669
3669
|
/**
|
|
3670
3670
|
* Write look-alike emails a rule should or should not match
|
|
3671
3671
|
*
|
|
3672
|
-
* Writes made-up emails that come close to what a grant rule describes, and reports what the rule decides for each, as test-sample would. Most should not match (expected no_match): business near misses from its senders and topic (kind other: an all-clear, a reply with nothing new, a related document, another subject) and private mail (a personal medical bill, pay for named people, a personal purchase, personal banking or tax). By default a third, rounded down, are near cases it should match (expected match, kind other). failed means the rule decided one against expected. Nothing is stored and no mail is read. Keep them, with their expected, with add_expectation_samples, or for a request with the accept's expectation_samples. Limited to 20 an hour per member. Needs mail:read, a member's own
|
|
3672
|
+
* Writes made-up emails that come close to what a grant rule describes, and reports what the rule decides for each, as test-sample would. Most should not match (expected no_match): business near misses from its senders and topic (kind other: an all-clear, a reply with nothing new, a related document, another subject) and private mail (a personal medical bill, pay for named people, a personal purchase, personal banking or tax). By default a third, rounded down, are near cases it should match (expected match, kind other). failed means the rule decided one against expected. Nothing is stored and no mail is read. Keep them, with their expected, with add_expectation_samples, or for a request with the accept's expectation_samples. Limited to 20 an hour per member. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).
|
|
3673
3673
|
*/
|
|
3674
3674
|
const generateLookAlikes = (options) => (options.client ?? client).post({
|
|
3675
3675
|
security: [{
|
|
@@ -3686,7 +3686,7 @@ const generateLookAlikes = (options) => (options.client ?? client).post({
|
|
|
3686
3686
|
/**
|
|
3687
3687
|
* Test a rule against a made-up email
|
|
3688
3688
|
*
|
|
3689
|
-
* Reports what a rule would decide for an email you describe (sender, recipients, subject, plain text, attachment types; optionally automated, from a mailing list, and a spam score), classified and decided as received mail would be. A rule reading a spam score you gave none for decides on none (unset_columns). Nothing is stored. Test an unsaved tree or a saved rule by rule_id. The answer includes what the classifier read. Needs mail:read, a member's own
|
|
3689
|
+
* Reports what a rule would decide for an email you describe (sender, recipients, subject, plain text, attachment types; optionally automated, from a mailing list, and a spam score), classified and decided as received mail would be. A rule reading a spam score you gave none for decides on none (unset_columns). Nothing is stored. Test an unsaved tree or a saved rule by rule_id. The answer includes what the classifier read. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).
|
|
3690
3690
|
*/
|
|
3691
3691
|
const testEmailRuleOnSample = (options) => (options.client ?? client).post({
|
|
3692
3692
|
security: [{
|
|
@@ -3703,7 +3703,7 @@ const testEmailRuleOnSample = (options) => (options.client ?? client).post({
|
|
|
3703
3703
|
/**
|
|
3704
3704
|
* List rules
|
|
3705
3705
|
*
|
|
3706
|
-
* The rules the caller can see, newest first: their own, or every member's rules for a caller who reads the whole organization's mail. Each carries its scope (evaluation_scope, and scope_selection for a selected rule) and current_version, but not the version's text: read that under current from GET /email-rules/{id}. With matched_email_id, only the rules that matched that email. Needs mail:read, a member's own
|
|
3706
|
+
* The rules the caller can see, newest first: their own, or every member's rules for a caller who reads the whole organization's mail. Each carries its scope (evaluation_scope, and scope_selection for a selected rule) and current_version, but not the version's text: read that under current from GET /email-rules/{id}. With matched_email_id, only the rules that matched that email. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).
|
|
3707
3707
|
*/
|
|
3708
3708
|
const listEmailRules = (options) => (options?.client ?? client).get({
|
|
3709
3709
|
security: [{
|
|
@@ -3716,7 +3716,7 @@ const listEmailRules = (options) => (options?.client ?? client).get({
|
|
|
3716
3716
|
/**
|
|
3717
3717
|
* Create a rule
|
|
3718
3718
|
*
|
|
3719
|
-
* Saves a rule as version 1 from a compile response or a tree you wrote, checked against the column contract. It starts in observe (recorded, nothing granted or blocked) unless state is draft, or active for a do_not_share rule. You are its author, and it never reaches mail you cannot read. evaluation_scope is own_mailboxes unless you name author or selected (scope_selection names only what you can read). expectations are judged in expectations_check. kind do_not_share blocks sharing what it matches; a key cannot list it (details.reason rule_blocks_sharing). Needs mail:read, a member's own
|
|
3719
|
+
* Saves a rule as version 1 from a compile response or a tree you wrote, checked against the column contract. It starts in observe (recorded, nothing granted or blocked) unless state is draft, or active for a do_not_share rule. You are its author, and it never reaches mail you cannot read. evaluation_scope is own_mailboxes unless you name author or selected (scope_selection names only what you can read). expectations are judged in expectations_check. kind do_not_share blocks sharing what it matches; a key cannot list it (details.reason rule_blocks_sharing). Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).
|
|
3720
3720
|
*/
|
|
3721
3721
|
const createEmailRule = (options) => (options.client ?? client).post({
|
|
3722
3722
|
security: [{
|
|
@@ -3733,7 +3733,7 @@ const createEmailRule = (options) => (options.client ?? client).post({
|
|
|
3733
3733
|
/**
|
|
3734
3734
|
* Delete a rule
|
|
3735
3735
|
*
|
|
3736
|
-
* Deletes a rule with its versions, its decisions and the access it granted. A share of it ends (end_reason rule_deleted), and the member who shared can still list what it handed over. The answer lists the shares it ended (ended_shares) and the unrevoked keys that still list it, which now read nothing through it (keys, other_keys; left out when they could not be read). The author or a reader of all the organization's mail may delete it; while it is shared, only the author or someone who manages members from the dashboard. Needs mail:read, a member's own
|
|
3736
|
+
* Deletes a rule with its versions, its decisions and the access it granted. A share of it ends (end_reason rule_deleted), and the member who shared can still list what it handed over. The answer lists the shares it ended (ended_shares) and the unrevoked keys that still list it, which now read nothing through it (keys, other_keys; left out when they could not be read). The author or a reader of all the organization's mail may delete it; while it is shared, only the author or someone who manages members from the dashboard. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).
|
|
3737
3737
|
*/
|
|
3738
3738
|
const deleteEmailRule = (options) => (options.client ?? client).delete({
|
|
3739
3739
|
security: [{
|
|
@@ -3746,7 +3746,7 @@ const deleteEmailRule = (options) => (options.client ?? client).delete({
|
|
|
3746
3746
|
/**
|
|
3747
3747
|
* Read a rule
|
|
3748
3748
|
*
|
|
3749
|
-
* A rule, its scope (evaluation_scope, and scope_selection for a selected rule), its current version and its saved expectations. The current version's text (english, tree, explanation, assumptions, warnings) is under current, and current_version is its number. What the scope comes to for its author now is GET /email-rules/{id}/scope. The SQL the version renders to is included only when include_sql is true. Needs mail:read, a member's own
|
|
3749
|
+
* A rule, its scope (evaluation_scope, and scope_selection for a selected rule), its current version and its saved expectations. The current version's text (english, tree, explanation, assumptions, warnings) is under current, and current_version is its number. What the scope comes to for its author now is GET /email-rules/{id}/scope. The SQL the version renders to is included only when include_sql is true. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).
|
|
3750
3750
|
*/
|
|
3751
3751
|
const getEmailRule = (options) => (options.client ?? client).get({
|
|
3752
3752
|
security: [{
|
|
@@ -3759,7 +3759,7 @@ const getEmailRule = (options) => (options.client ?? client).get({
|
|
|
3759
3759
|
/**
|
|
3760
3760
|
* Change a rule
|
|
3761
3761
|
*
|
|
3762
|
-
* Renames the rule, saves a new version (english and tree together; earlier versions stay) or restores one (restore_version), changes its state (draft is off; observe; active), its scope (evaluation_scope, with scope_selection when selected) or its saved expectations (judged in expectations_check). Anyone but its author who sees it may only set state draft, and while it is shared only if they manage members from the dashboard. A scope change saves a new version; a shared rule keeps its scope, and a kind never changes. A saved version takes effect at once. if_version refuses a write once a version was saved since you read it; if_revision, once anything changed. Without if_expectations_pass a version is saved even when its expectations fail. Needs mail:read, a member's own
|
|
3762
|
+
* Renames the rule, saves a new version (english and tree together; earlier versions stay) or restores one (restore_version), changes its state (draft is off; observe; active), its scope (evaluation_scope, with scope_selection when selected) or its saved expectations (judged in expectations_check). Anyone but its author who sees it may only set state draft, and while it is shared only if they manage members from the dashboard. A scope change saves a new version; a shared rule keeps its scope, and a kind never changes. A saved version takes effect at once. if_version refuses a write once a version was saved since you read it; if_revision, once anything changed. Without if_expectations_pass a version is saved even when its expectations fail, except on an active rule keys or webhooks read: that write is checked first unless if_expectations_pass is false. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).
|
|
3763
3763
|
*/
|
|
3764
3764
|
const updateEmailRule = (options) => (options.client ?? client).patch({
|
|
3765
3765
|
security: [{
|
|
@@ -3776,7 +3776,7 @@ const updateEmailRule = (options) => (options.client ?? client).patch({
|
|
|
3776
3776
|
/**
|
|
3777
3777
|
* List a rule's decisions
|
|
3778
3778
|
*
|
|
3779
|
-
* 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
|
|
3779
|
+
* What the rule decided for each email it was evaluated against, newest first: whether it matched, whether it nearly did, how each part decided and the answers to its questions, with which email it was (from_address, subject, received_at). Only decisions on emails the caller can read are listed. With matched, only matches (true) or only the rest (false). Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).
|
|
3780
3780
|
*/
|
|
3781
3781
|
const listEmailRuleDecisions = (options) => (options.client ?? client).get({
|
|
3782
3782
|
security: [{
|
|
@@ -3789,7 +3789,7 @@ const listEmailRuleDecisions = (options) => (options.client ?? client).get({
|
|
|
3789
3789
|
/**
|
|
3790
3790
|
* List every rule's result on an email
|
|
3791
3791
|
*
|
|
3792
|
-
* What each rule you can see decided about this email (matched, not matched, or not run), in the words of the deciding version. A do_not_share rule that matched it blocks sharing while active; earlier shares stay. Only a caller who can read the email gets an answer. classification is every fact the classifier read, as rule conditions read it. At most 50 rules are listed, results first; not_listed counts the rest. Another member's rule that decided on your own mail is listed read_only (dashboard and CLI only); hidden counts deciding rules you cannot see. Needs mail:read, a member's own
|
|
3792
|
+
* What each rule you can see decided about this email (matched, not matched, or not run), in the words of the deciding version. A do_not_share rule that matched it blocks sharing while active; earlier shares stay. Only a caller who can read the email gets an answer. classification is every fact the classifier read, as rule conditions read it. At most 50 rules are listed, results first; not_listed counts the rest. Another member's rule that decided on your own mail is listed read_only (dashboard and CLI only), with who receives what it shares (receivers) while it covers you; hidden counts deciding rules you cannot see. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).
|
|
3793
3793
|
*/
|
|
3794
3794
|
const listEmailRuleResults = (options) => (options.client ?? client).get({
|
|
3795
3795
|
security: [{
|
|
@@ -3802,7 +3802,7 @@ const listEmailRuleResults = (options) => (options.client ?? client).get({
|
|
|
3802
3802
|
/**
|
|
3803
3803
|
* Read versions of a rule
|
|
3804
3804
|
*
|
|
3805
|
-
* 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
|
|
3805
|
+
* A rule's versions as they were written: what each one's conditions and questions were, so a decision can be read against the version that made it. Without versions, every version newest first, a page at a time (meta.cursor). With versions, only those named, oldest first; numbers that are not versions of the rule are left out. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).
|
|
3806
3806
|
*/
|
|
3807
3807
|
const listEmailRuleVersions = (options) => (options.client ?? client).get({
|
|
3808
3808
|
security: [{
|
|
@@ -3815,7 +3815,7 @@ const listEmailRuleVersions = (options) => (options.client ?? client).get({
|
|
|
3815
3815
|
/**
|
|
3816
3816
|
* Read what a rule covers
|
|
3817
3817
|
*
|
|
3818
|
-
* 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
|
|
3818
|
+
* Whose mail the rule runs over, and what that comes to now: a rule never reaches further than what its author can read when it runs, so what a selected rule names and its author can no longer read stops matching. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).
|
|
3819
3819
|
*/
|
|
3820
3820
|
const getEmailRuleScope = (options) => (options.client ?? client).get({
|
|
3821
3821
|
security: [{
|
|
@@ -3828,7 +3828,7 @@ const getEmailRuleScope = (options) => (options.client ?? client).get({
|
|
|
3828
3828
|
/**
|
|
3829
3829
|
* List what a rule can cover
|
|
3830
3830
|
*
|
|
3831
|
-
* 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
|
|
3831
|
+
* How much the caller can read, and the inboxes and domains the caller can read, which is what they may name when a rule runs over selected inboxes and domains. For a caller who reads the whole organization, addresses lists the inboxes known as someone's (member addresses, members' verified work emails at the organization's domains, agents' addresses and inboxes with shared access), not every address that receives mail: may_name_unlisted says when an address that is not listed, such as an inbox nobody has claimed, may be named too. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).
|
|
3832
3832
|
*/
|
|
3833
3833
|
const listEmailRuleScopeOptions = (options) => (options?.client ?? client).get({
|
|
3834
3834
|
security: [{
|
|
@@ -3841,7 +3841,7 @@ const listEmailRuleScopeOptions = (options) => (options?.client ?? client).get({
|
|
|
3841
3841
|
/**
|
|
3842
3842
|
* List rule requests
|
|
3843
3843
|
*
|
|
3844
|
-
* 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
|
|
3844
|
+
* Rule requests, newest first: those made to you (box incoming, the default), those you made (outgoing), or every one you can see (all). Pending ones by default; status decided lists accepted, declined and withdrawn ones, and any lists both. A request is visible to the member who made it, the member it was made to, and the organization's owners and admins. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).
|
|
3845
3845
|
*/
|
|
3846
3846
|
const listEmailRuleRequests = (options) => (options?.client ?? client).get({
|
|
3847
3847
|
security: [{
|
|
@@ -3854,7 +3854,7 @@ const listEmailRuleRequests = (options) => (options?.client ?? client).get({
|
|
|
3854
3854
|
/**
|
|
3855
3855
|
* Ask a member for a rule
|
|
3856
3856
|
*
|
|
3857
|
-
* Asks another member of the organization for a rule over their own mail, from a compile response or a tree you wrote. Name them by user id, or by their member mailbox address, or by their verified work email if you can list members (at most 30 lookups by address an hour). Nothing is evaluated or shared until they accept, and they may change the rule first. A message (up to 500 characters, fixed once sent) tells them why you ask. At most 5 pending requests to one member and 50 in all. With members:read the answer says whether they can accept it under their role (target_can_accept, target_warning); POST /v1/email-rule-requests/target-check checks first. Needs mail:read, a member's own
|
|
3857
|
+
* Asks another member of the organization for a rule over their own mail, from a compile response or a tree you wrote. Name them by user id, or by their member mailbox address, or by their verified work email if you can list members (at most 30 lookups by address an hour). Nothing is evaluated or shared until they accept, and they may change the rule first. A message (up to 500 characters, fixed once sent) tells them why you ask. At most 5 pending requests to one member and 50 in all. With members:read the answer says whether they can accept it under their role (target_can_accept, target_warning); POST /v1/email-rule-requests/target-check checks first. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).
|
|
3858
3858
|
*/
|
|
3859
3859
|
const createEmailRuleRequest = (options) => (options.client ?? client).post({
|
|
3860
3860
|
security: [{
|
|
@@ -3871,7 +3871,7 @@ const createEmailRuleRequest = (options) => (options.client ?? client).post({
|
|
|
3871
3871
|
/**
|
|
3872
3872
|
* Check whether a member can accept a rule request
|
|
3873
3873
|
*
|
|
3874
|
-
* Says, before you ask, whether a member could accept a rule request now under their role, and if not, which permission their role lacks. Nothing is sent and nothing is recorded. Needs members:read, as listing members and their roles does. At most 60 checks an hour. Name them by user id, or by their member mailbox address or verified work email (counted with asking: at most 30 lookups by address an hour). Needs mail:read, a member's own
|
|
3874
|
+
* Says, before you ask, whether a member could accept a rule request now under their role, and if not, which permission their role lacks. Nothing is sent and nothing is recorded. Needs members:read, as listing members and their roles does. At most 60 checks an hour. Name them by user id, or by their member mailbox address or verified work email (counted with asking: at most 30 lookups by address an hour). Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).
|
|
3875
3875
|
*/
|
|
3876
3876
|
const checkEmailRuleRequestTarget = (options) => (options.client ?? client).post({
|
|
3877
3877
|
security: [{
|
|
@@ -3888,7 +3888,7 @@ const checkEmailRuleRequestTarget = (options) => (options.client ?? client).post
|
|
|
3888
3888
|
/**
|
|
3889
3889
|
* Delete a withdrawn rule request
|
|
3890
3890
|
*
|
|
3891
|
-
* Deletes a request you withdrew, for everyone who could see it. Needs mail:read, a member's own
|
|
3891
|
+
* Deletes a request you withdrew, for everyone who could see it. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).
|
|
3892
3892
|
*/
|
|
3893
3893
|
const deleteEmailRuleRequest = (options) => (options.client ?? client).delete({
|
|
3894
3894
|
security: [{
|
|
@@ -3901,7 +3901,7 @@ const deleteEmailRuleRequest = (options) => (options.client ?? client).delete({
|
|
|
3901
3901
|
/**
|
|
3902
3902
|
* Read a rule request
|
|
3903
3903
|
*
|
|
3904
|
-
* A rule request: the rule as proposed, who made it and to whom, and whether each of them is still a member. A request is visible to the member who made it, the member it was made to, and the organization's owners and admins. If you are the member asked, you can try the rule as proposed before answering: pass the request's tree to POST /v1/email-rules/test to test it on mail you have received. To try it on an email that has not arrived, pass the request's tree to POST /v1/email-rules/test-sample with one you make up, or have look-alikes written (POST /v1/email-rules/look-alikes with request_id); neither stores anything. Needs mail:read, a member's own
|
|
3904
|
+
* A rule request: the rule as proposed, who made it and to whom, and whether each of them is still a member. A request is visible to the member who made it, the member it was made to, and the organization's owners and admins. If you are the member asked, you can try the rule as proposed before answering: pass the request's tree to POST /v1/email-rules/test to test it on mail you have received. To try it on an email that has not arrived, pass the request's tree to POST /v1/email-rules/test-sample with one you make up, or have look-alikes written (POST /v1/email-rules/look-alikes with request_id); neither stores anything. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).
|
|
3905
3905
|
*/
|
|
3906
3906
|
const getEmailRuleRequest = (options) => (options.client ?? client).get({
|
|
3907
3907
|
security: [{
|
|
@@ -3914,7 +3914,7 @@ const getEmailRuleRequest = (options) => (options.client ?? client).get({
|
|
|
3914
3914
|
/**
|
|
3915
3915
|
* Decline a rule request
|
|
3916
3916
|
*
|
|
3917
|
-
* Declines a pending request made to you. Nothing is written but the decision and, if you give one, its reason (reason, up to 500 characters), which the member who asked sees with the request. Needs mail:read, a member's own
|
|
3917
|
+
* Declines a pending request made to you. Nothing is written but the decision and, if you give one, its reason (reason, up to 500 characters), which the member who asked sees with the request. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).
|
|
3918
3918
|
*/
|
|
3919
3919
|
const declineEmailRuleRequest = (options) => (options.client ?? client).post({
|
|
3920
3920
|
security: [{
|
|
@@ -3931,7 +3931,7 @@ const declineEmailRuleRequest = (options) => (options.client ?? client).post({
|
|
|
3931
3931
|
/**
|
|
3932
3932
|
* Withdraw a rule request
|
|
3933
3933
|
*
|
|
3934
|
-
* Withdraws a pending request you made. Needs mail:read, a member's own
|
|
3934
|
+
* Withdraws a pending request you made. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).
|
|
3935
3935
|
*/
|
|
3936
3936
|
const withdrawEmailRuleRequest = (options) => (options.client ?? client).post({
|
|
3937
3937
|
security: [{
|
|
@@ -3944,7 +3944,7 @@ const withdrawEmailRuleRequest = (options) => (options.client ?? client).post({
|
|
|
3944
3944
|
/**
|
|
3945
3945
|
* Accept a rule request
|
|
3946
3946
|
*
|
|
3947
|
-
* Writes the rule as yours, over your own mailboxes only, turns it on, and shares what it matches from now on with the member who asked: each email in full with its attachments, but never raw. It does not go back through mail already received. Send no body to accept it as asked, or change it first with english and tree together (and an explanation, or the server writes one). Because this gives your mail to someone else, it is limited to the dashboard and the Primitive CLI: other OAuth apps and agent tokens are refused. Before accepting, test it on your mail: pass the request's tree to POST /v1/email-rules/test. To try it on an email that has not arrived, pass the request's tree to POST /v1/email-rules/test-sample with one you make up, or have look-alikes written (POST /v1/email-rules/look-alikes with request_id); neither stores anything. expectation_samples are kept on the rule it writes. Accepting also needs mail:share_own. Needs mail:read, a member's own
|
|
3947
|
+
* Writes the rule as yours, over your own mailboxes only, turns it on, and shares what it matches from now on with the member who asked: each email in full with its attachments, but never raw. It does not go back through mail already received. Send no body to accept it as asked, or change it first with english and tree together (and an explanation, or the server writes one). Because this gives your mail to someone else, it is limited to the dashboard and the Primitive CLI: other OAuth apps and agent tokens are refused. Before accepting, test it on your mail: pass the request's tree to POST /v1/email-rules/test. To try it on an email that has not arrived, pass the request's tree to POST /v1/email-rules/test-sample with one you make up, or have look-alikes written (POST /v1/email-rules/look-alikes with request_id); neither stores anything. expectation_samples are kept on the rule it writes. Accepting also needs mail:share_own. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).
|
|
3948
3948
|
*/
|
|
3949
3949
|
const acceptEmailRuleRequest = (options) => (options.client ?? client).post({
|
|
3950
3950
|
security: [{
|
|
@@ -3961,7 +3961,7 @@ const acceptEmailRuleRequest = (options) => (options.client ?? client).post({
|
|
|
3961
3961
|
/**
|
|
3962
3962
|
* List rule shares
|
|
3963
3963
|
*
|
|
3964
|
-
* 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
|
|
3964
|
+
* Lists rules shared with you, rules you share, or every share you can see. A share is visible to its two people and the organization's owners and admins. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).
|
|
3965
3965
|
*/
|
|
3966
3966
|
const listEmailRuleShares = (options) => (options?.client ?? client).get({
|
|
3967
3967
|
security: [{
|
|
@@ -4000,7 +4000,7 @@ const endEmailRuleShare = (options) => (options.client ?? client).delete({
|
|
|
4000
4000
|
/**
|
|
4001
4001
|
* Get a rule share
|
|
4002
4002
|
*
|
|
4003
|
-
* One share. Needs mail:read, a member's own
|
|
4003
|
+
* One share. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).
|
|
4004
4004
|
*/
|
|
4005
4005
|
const getEmailRuleShare = (options) => (options.client ?? client).get({
|
|
4006
4006
|
security: [{
|
|
@@ -4026,7 +4026,7 @@ const listEmailRuleShareEmails = (options) => (options.client ?? client).get({
|
|
|
4026
4026
|
/**
|
|
4027
4027
|
* List the rules over your mail
|
|
4028
4028
|
*
|
|
4029
|
-
* Every email rule that covers one of your own mailboxes now, yours included, newest first, in any state. A rule covers you when the scope it runs with now reaches one of your own mailboxes (your member mailbox, or a personal agent's address): one whose author reads all your mail (author scope, for an author who reads the organization's mail or holds an access entry for your mailbox), or one that names your mailbox or its domain (selected). Another member's own_mailboxes rule never covers you. You see its name, wording, current tree, state, kind and author, and which of your own mailboxes it reaches. Its wording and tree are shown as written, so they can name other addresses (a condition on who an email is from or to).
|
|
4029
|
+
* Every email rule that covers one of your own mailboxes now, yours included, newest first, in any state. A rule covers you when the scope it runs with now reaches one of your own mailboxes (your member mailbox, or a personal agent's address): one whose author reads all your mail (author scope, for an author who reads the organization's mail or holds an access entry for your mailbox), or one that names your mailbox or its domain (selected). Another member's own_mailboxes rule never covers you. You see its name, wording, current tree, state, kind and author, and which of your own mailboxes it reaches. Its wording and tree are shown as written, so they can name other addresses (a condition on who an email is from or to). While it covers you, you also see who receives what it matches (receivers): how many API keys, webhooks and shares, the member each belongs to (or the organization), and the sites the webhooks deliver to. You do not see which keys, webhooks or shares they are (no ids, names, prefixes, or URLs beyond the site), the other inboxes and domains its scope names, or its saved expectations. A page can hold fewer rules than limit, or none, and still carry a cursor (one request reads a bounded number of rules): keep reading until meta.cursor is null. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token). Only on your own dashboard session or the Primitive CLI.
|
|
4030
4030
|
*/
|
|
4031
4031
|
const listEmailRulesCoveringMe = (options) => (options?.client ?? client).get({
|
|
4032
4032
|
security: [{
|
|
@@ -4039,7 +4039,7 @@ const listEmailRulesCoveringMe = (options) => (options?.client ?? client).get({
|
|
|
4039
4039
|
/**
|
|
4040
4040
|
* Get a rule over your mail
|
|
4041
4041
|
*
|
|
4042
|
-
* One rule that covers one of your own mailboxes, read-only, with its current version; or one that no longer does but decided on mail at your own mailbox (covers_now false), shown as the version that last decided on your mail, without its current name. You see its name, wording, current tree, state, kind and author, and which of your own mailboxes it reaches. Its wording and tree are shown as written, so they can name other addresses (a condition on who an email is from or to).
|
|
4042
|
+
* One rule that covers one of your own mailboxes, read-only, with its current version; or one that no longer does but decided on mail at your own mailbox (covers_now false), shown as the version that last decided on your mail, without its current name. You see its name, wording, current tree, state, kind and author, and which of your own mailboxes it reaches. Its wording and tree are shown as written, so they can name other addresses (a condition on who an email is from or to). While it covers you, you also see who receives what it matches (receivers): how many API keys, webhooks and shares, the member each belongs to (or the organization), and the sites the webhooks deliver to. You do not see which keys, webhooks or shares they are (no ids, names, prefixes, or URLs beyond the site), the other inboxes and domains its scope names, or its saved expectations. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token). Only on your own dashboard session or the Primitive CLI.
|
|
4043
4043
|
*/
|
|
4044
4044
|
const getEmailRuleCoveringMe = (options) => (options.client ?? client).get({
|
|
4045
4045
|
security: [{
|
|
@@ -4052,7 +4052,7 @@ const getEmailRuleCoveringMe = (options) => (options.client ?? client).get({
|
|
|
4052
4052
|
/**
|
|
4053
4053
|
* List what a rule decided about your mail
|
|
4054
4054
|
*
|
|
4055
|
-
* What a rule that covers your mailboxes, or decided on your mail, decided about mail at your own mailboxes, newest first: never about anyone else's mail. Each decision is in the words of the version that made it, which can be earlier than the current one: the questions it asked about that email (question_answers) and the columns its conditions read (parts). Needs mail:read, a member's own
|
|
4055
|
+
* What a rule that covers your mailboxes, or decided on your mail, decided about mail at your own mailboxes, newest first: never about anyone else's mail. Each decision is in the words of the version that made it, which can be earlier than the current one: the questions it asked about that email (question_answers) and the columns its conditions read (parts). Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token). Only on your own dashboard session or the Primitive CLI.
|
|
4056
4056
|
*/
|
|
4057
4057
|
const listEmailRuleDecisionsOnMyMail = (options) => (options.client ?? client).get({
|
|
4058
4058
|
security: [{
|
|
@@ -4065,7 +4065,7 @@ const listEmailRuleDecisionsOnMyMail = (options) => (options.client ?? client).g
|
|
|
4065
4065
|
/**
|
|
4066
4066
|
* List objections
|
|
4067
4067
|
*
|
|
4068
|
-
* Objections you made, objections to rules you wrote, or every objection you can see, newest first. An objection is seen by the member who made it, the rule's author and the organization's owners and admins. It stays pending until the rule's author accepts it, turning the rule off, or declines it, or the member who made it withdraws it, which clears its message. It never changes after that. Needs mail:read, a member's own
|
|
4068
|
+
* Objections you made, objections to rules you wrote, or every objection you can see, newest first. An objection is seen by the member who made it, the rule's author and the organization's owners and admins. It stays pending until the rule's author accepts it, turning the rule off, or declines it, or the member who made it withdraws it, which clears its message. It never changes after that. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token). Only on your own dashboard session or the Primitive CLI.
|
|
4069
4069
|
*/
|
|
4070
4070
|
const listEmailRuleObjections = (options) => (options?.client ?? client).get({
|
|
4071
4071
|
security: [{
|
|
@@ -4078,7 +4078,7 @@ const listEmailRuleObjections = (options) => (options?.client ?? client).get({
|
|
|
4078
4078
|
/**
|
|
4079
4079
|
* Object to a rule over your mail
|
|
4080
4080
|
*
|
|
4081
|
-
* Asks the author of a rule that covers one of your own mailboxes now to turn it off. Only a rule that covers you now: one you see only because it once decided on your mail cannot be objected to. An objection is seen by the member who made it, the rule's author and the organization's owners and admins. It stays pending until the rule's author accepts it, turning the rule off, or declines it, or the member who made it withdraws it, which clears its message. It never changes after that. You may have one pending objection per rule and 50 in all, and object to the same rule again only 10 minutes after you last did, whatever became of it. Needs mail:read, a member's own
|
|
4081
|
+
* Asks the author of a rule that covers one of your own mailboxes now to turn it off. Only a rule that covers you now: one you see only because it once decided on your mail cannot be objected to. An objection is seen by the member who made it, the rule's author and the organization's owners and admins. It stays pending until the rule's author accepts it, turning the rule off, or declines it, or the member who made it withdraws it, which clears its message. It never changes after that. You may have one pending objection per rule and 50 in all, and object to the same rule again only 10 minutes after you last did, whatever became of it. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token). Only on your own dashboard session or the Primitive CLI.
|
|
4082
4082
|
*/
|
|
4083
4083
|
const createEmailRuleObjection = (options) => (options.client ?? client).post({
|
|
4084
4084
|
security: [{
|
|
@@ -4095,7 +4095,7 @@ const createEmailRuleObjection = (options) => (options.client ?? client).post({
|
|
|
4095
4095
|
/**
|
|
4096
4096
|
* Get an objection
|
|
4097
4097
|
*
|
|
4098
|
-
* One objection you can see. An objection is seen by the member who made it, the rule's author and the organization's owners and admins. It stays pending until the rule's author accepts it, turning the rule off, or declines it, or the member who made it withdraws it, which clears its message. It never changes after that. Needs mail:read, a member's own
|
|
4098
|
+
* One objection you can see. An objection is seen by the member who made it, the rule's author and the organization's owners and admins. It stays pending until the rule's author accepts it, turning the rule off, or declines it, or the member who made it withdraws it, which clears its message. It never changes after that. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token). Only on your own dashboard session or the Primitive CLI.
|
|
4099
4099
|
*/
|
|
4100
4100
|
const getEmailRuleObjection = (options) => (options.client ?? client).get({
|
|
4101
4101
|
security: [{
|
|
@@ -4108,7 +4108,7 @@ const getEmailRuleObjection = (options) => (options.client ?? client).get({
|
|
|
4108
4108
|
/**
|
|
4109
4109
|
* Withdraw an objection
|
|
4110
4110
|
*
|
|
4111
|
-
* Withdraws a pending objection you made, and clears its message. Needs mail:read, a member's own
|
|
4111
|
+
* Withdraws a pending objection you made, and clears its message. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token). Only on your own dashboard session or the Primitive CLI.
|
|
4112
4112
|
*/
|
|
4113
4113
|
const withdrawEmailRuleObjection = (options) => (options.client ?? client).post({
|
|
4114
4114
|
security: [{
|
|
@@ -4121,7 +4121,7 @@ const withdrawEmailRuleObjection = (options) => (options.client ?? client).post(
|
|
|
4121
4121
|
/**
|
|
4122
4122
|
* Decline an objection to your rule
|
|
4123
4123
|
*
|
|
4124
|
-
* Declines a pending objection to a rule you wrote, optionally saying why; the rule stays as it is. Needs mail:read, a member's own
|
|
4124
|
+
* Declines a pending objection to a rule you wrote, optionally saying why; the rule stays as it is. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token). Only on your own dashboard session or the Primitive CLI.
|
|
4125
4125
|
*/
|
|
4126
4126
|
const declineEmailRuleObjection = (options) => (options.client ?? client).post({
|
|
4127
4127
|
security: [{
|
|
@@ -4138,7 +4138,7 @@ const declineEmailRuleObjection = (options) => (options.client ?? client).post({
|
|
|
4138
4138
|
/**
|
|
4139
4139
|
* Accept an objection to your rule
|
|
4140
4140
|
*
|
|
4141
|
-
* Accepts a pending objection to a rule you wrote: turns the rule off (state draft), as updating it would, and records the objection accepted, together. You can turn the rule on again later. Needs mail:read, a member's own
|
|
4141
|
+
* Accepts a pending objection to a rule you wrote: turns the rule off (state draft), as updating it would, and records the objection accepted, together. You can turn the rule on again later. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token). Only on your own dashboard session or the Primitive CLI.
|
|
4142
4142
|
*/
|
|
4143
4143
|
const acceptEmailRuleObjection = (options) => (options.client ?? client).post({
|
|
4144
4144
|
security: [{
|
|
@@ -5086,7 +5086,7 @@ const getKeyBuilder = (options) => (options?.client ?? client).get({
|
|
|
5086
5086
|
/**
|
|
5087
5087
|
* List API keys
|
|
5088
5088
|
*
|
|
5089
|
-
* Key metadata, never a secret: name, prefix, grant, creator, last use, expiry, suspension and whether each key works now (status). Revoked keys are left out unless include_revoked is true, which lists them too with status revoked, revoked_at and revoked_by, under the same access rules as keys that work. A grant's mail_scope.depth is raw only when the key holds mail.raw:read and its scope lists an address or a domain, otherwise content. A rule the key lists that reads nothing any more (a deleted rule, or a share that ended) is listed under grant.mail_scope.ended_rules, each with its id and reason (rule_deleted or share_ended), and not under rules. The person needs access to the whole organization's mail. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature. Contact Primitive to turn them on.
|
|
5089
|
+
* Key metadata, never a secret: name, prefix, grant, creator, last use, expiry, suspension and whether each key works now (status). Revoked keys are left out unless include_revoked is true, which lists them too with status revoked, revoked_at and revoked_by, under the same access rules as keys that work. A grant's mail_scope.depth is raw only when the key holds mail.raw:read and its scope lists an address or a domain, otherwise content. A rule the key lists that reads nothing any more (a deleted rule, or a share that ended) is listed under grant.mail_scope.ended_rules, each with its id and reason (rule_deleted or share_ended), and not under rules. grant.mail_scope.rule_versions gives each rule it lists directly its current_version, state and version_saved_at. The person needs access to the whole organization's mail. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature. Contact Primitive to turn them on.
|
|
5090
5090
|
*
|
|
5091
5091
|
* 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.
|
|
5092
5092
|
*/
|
|
@@ -5139,7 +5139,7 @@ const rotateKey = (options) => (options.client ?? client).post({
|
|
|
5139
5139
|
/**
|
|
5140
5140
|
* Get an API key
|
|
5141
5141
|
*
|
|
5142
|
-
* One key's metadata, never its secret, with whether it works now (status). A revoked key whose record is kept is answered too, with status revoked, revoked_at and revoked_by, under the same access rules as a key that works: one the caller may not read is 404, revoked or not. Its grant's mail_scope.depth is raw only when the key holds mail.raw:read and its scope lists an address or a domain, otherwise content. A rule the key lists that reads nothing any more (a deleted rule, or a share that ended) is listed under grant.mail_scope.ended_rules, each with its id and reason (rule_deleted or share_ended), and not under rules. The person needs access to the whole organization's mail. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature. Contact Primitive to turn them on.
|
|
5142
|
+
* One key's metadata, never its secret, with whether it works now (status). A revoked key whose record is kept is answered too, with status revoked, revoked_at and revoked_by, under the same access rules as a key that works: one the caller may not read is 404, revoked or not. Its grant's mail_scope.depth is raw only when the key holds mail.raw:read and its scope lists an address or a domain, otherwise content. A rule the key lists that reads nothing any more (a deleted rule, or a share that ended) is listed under grant.mail_scope.ended_rules, each with its id and reason (rule_deleted or share_ended), and not under rules. grant.mail_scope.rule_versions gives each rule it lists directly its current_version, state and version_saved_at. The person needs access to the whole organization's mail. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature. Contact Primitive to turn them on.
|
|
5143
5143
|
*
|
|
5144
5144
|
* 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.
|
|
5145
5145
|
*/
|
|
@@ -5504,7 +5504,7 @@ const decideAccessMode = (options) => (options.client ?? client).post({
|
|
|
5504
5504
|
/**
|
|
5505
5505
|
* Get the auto-join setting
|
|
5506
5506
|
*
|
|
5507
|
-
* Whether someone who proves an address on the organization's mail relay domain with Google Workspace joins automatically
|
|
5507
|
+
* Whether someone who proves an address on the organization's mail relay domain with Google Workspace joins automatically. Auto-joined people have no mail access until an owner or admin assigns a role. `option` is null when auto-join is off and an invitation is required; legacy mail-grant settings read as `no_access`. `options` lists the choices. Answers 404 `feature_disabled` unless the organization has mail relay.
|
|
5508
5508
|
*/
|
|
5509
5509
|
const getRelayAutoJoin = (options) => (options?.client ?? client).get({
|
|
5510
5510
|
security: [{
|
|
@@ -5517,7 +5517,7 @@ const getRelayAutoJoin = (options) => (options?.client ?? client).get({
|
|
|
5517
5517
|
/**
|
|
5518
5518
|
* Change the auto-join setting
|
|
5519
5519
|
*
|
|
5520
|
-
* `option` is a choice's id from the GET, or null to require an invitation (turning it off needs only members:manage). Choosing an option answers 404 `feature_disabled` unless the organization has mail relay, 400 `validation_error` for an id
|
|
5520
|
+
* `option` is a choice's id from the GET, or null to require an invitation (turning it off needs only members:manage). Auto-joined people have no mail access until an owner or admin assigns a role; legacy mail-grant choices cannot be selected. Choosing an option answers 404 `feature_disabled` unless the organization has mail relay, 400 `validation_error` for an id outside the current catalog, 403 `grant_forbidden` without owner or admin assignment authority, and 409 `role_assignment_unavailable` when the restricted role cannot be assigned yet. Person only: a dashboard session, or the person's own OAuth or CLI token with a session step-up of purpose `relay_auto_join.write` (the person confirms at the step_up_url a 403 step_up_required answer carries, which names this client, then send the token in the Primitive-Step-Up header; the token works only with the client it was confirmed for). Needs members:manage, and roles:assign to turn it on. API keys are refused.
|
|
5521
5521
|
*/
|
|
5522
5522
|
const setRelayAutoJoin = (options) => (options.client ?? client).put({
|
|
5523
5523
|
security: [{
|
|
@@ -7204,7 +7204,7 @@ function parseFromHeader(header) {
|
|
|
7204
7204
|
value: { address: address.toLowerCase() }
|
|
7205
7205
|
};
|
|
7206
7206
|
}
|
|
7207
|
-
// ../sdk-node/dist/understanding-
|
|
7207
|
+
// ../sdk-node/dist/understanding-DHr3v7Qh.js
|
|
7208
7208
|
/**
|
|
7209
7209
|
* AUTO-GENERATED - DO NOT EDIT
|
|
7210
7210
|
* Run `pnpm generate:validator` to regenerate.
|
|
@@ -24054,14 +24054,29 @@ const EMAIL_RULE_REQUEST_EVENT_TYPES = [
|
|
|
24054
24054
|
"email_rule_request.withdrawn"
|
|
24055
24055
|
];
|
|
24056
24056
|
/**
|
|
24057
|
+
* The rule objection events (subject = an objection: a member asked the
|
|
24058
|
+
* author of a rule over their own mail to turn it off). Each goes to the
|
|
24059
|
+
* person who did not act: `created` and `withdrawn` to the rule's author,
|
|
24060
|
+
* `accepted` and `declined` to the member who objected. They are opt-in, and
|
|
24061
|
+
* only a webhook that person made for them receives them.
|
|
24062
|
+
*/
|
|
24063
|
+
const EMAIL_RULE_OBJECTION_EVENT_TYPES = [
|
|
24064
|
+
"email_rule_objection.created",
|
|
24065
|
+
"email_rule_objection.accepted",
|
|
24066
|
+
"email_rule_objection.declined",
|
|
24067
|
+
"email_rule_objection.withdrawn"
|
|
24068
|
+
];
|
|
24069
|
+
/**
|
|
24057
24070
|
* The full enumerated catalog of every current webhook event type: the five
|
|
24058
24071
|
* email.*, the four opt-in sent_email.*, the four opt-in
|
|
24059
|
-
* email_rule_request.*, and every
|
|
24072
|
+
* email_rule_request.*, the four opt-in email_rule_objection.*, and every
|
|
24073
|
+
* interaction.<protocol>.<suffix>.
|
|
24060
24074
|
*/
|
|
24061
24075
|
const WEBHOOK_EVENT_TYPES = [
|
|
24062
24076
|
...EMAIL_EVENT_TYPES,
|
|
24063
24077
|
...SENT_EMAIL_EVENT_TYPES,
|
|
24064
24078
|
...EMAIL_RULE_REQUEST_EVENT_TYPES,
|
|
24079
|
+
...EMAIL_RULE_OBJECTION_EVENT_TYPES,
|
|
24065
24080
|
...INTERACTION_EVENT_TYPES
|
|
24066
24081
|
];
|
|
24067
24082
|
const WEBHOOK_EVENT_TYPE_SET = new Set(WEBHOOK_EVENT_TYPES);
|
|
@@ -25797,4 +25812,4 @@ function repeatStopCommand(emailId) {
|
|
|
25797
25812
|
if (!UUID.test(emailId)) throw new TypeError("emailId must be an email UUID");
|
|
25798
25813
|
return `primitive repeat stop --id ${emailId.toLowerCase()}`;
|
|
25799
25814
|
}
|
|
25800
|
-
export {
|
|
25815
|
+
export { parseWebhookEvent as $, simulateRoute as $n, getRepeatingSend as $t, lateMailReread as A, listWakeDispatches as An, deleteWakeSchedule as At, ensureSearchReportsReplyState as B, replyToEmail as Bn, getConversation as Bt, waitOutRetryAfter as C, listOrganizationPeople as Cn, createWakeAuthorization as Ct, encodeReceivedAtSearchCursor as D, listSentAttachmentArchiveMembers as Dn, deleteMemory as Dt, cursorFromAcceptedRows as E, listRoutes as En, deleteContact as Et, AWAITING_VALUES as F, putAgentContactPolicy as Fn, downloadSentAttachmentByFilename as Ft, queryUsesAwaiting as G, sdk_gen_exports as Gn, getFunctionRouting as Gt, formatRepliesCell as H, revokeCredential as Hn, getDefaultNetworkAgent as Ht, REPLY_STATE_UNSUPPORTED_CODE as I, putContact as In, getAccessMode as It, EMAIL_RULE_REQUEST_EVENT_TYPES as J, semanticSearch as Jn, getKey as Jt, replyStateSurfaceForOperation as K, searchEmails as Kn, getFunctionTestRunTrace as Kt, ReplyStateUnsupportedError as L, redeemCreditCode as Ln, getAccount as Lt, sinceFromFlags as M, pollCliLogin as Mn, downloadEmailAttachmentByFilename as Mt, sleep as N, pullWebhookEvent as Nn, downloadEmailAttachmentPart as Nt, fetchEmailSearchPage as O, listSentEmails as On, deleteRoute as Ot, AWAITING_FLAG_DESCRIPTION as P, putAgentContact as Pn, downloadSentAttachmentArchiveMember as Pt, isTrustedSender as Q, setMemory as Qn, getOwnGrant as Qt, assertAwaitingFilterRows as R, removeDefaultNetworkMember as Rn, getAgentContactPolicy as Rt, transientFailure as S, listMailboxAccess as Sn, createRoute as St, collectNewAcceptedEmails as T, listRoles as Tn, deleteAgentContact as Tt, hasReplyState as U, rotateKey as Un, getEmail as Ut, formatAwaitingCell as V, resendAgentSignupVerification as Vn, getCreditBalance as Vt, isAwaitingRejectedError as W, runWakeSchedule as Wn, getFunction as Wt, WEBHOOK_EVENT_TYPES as X, setFunctionRoute as Xn, getOrgRoutingTopology as Xt, SENT_EMAIL_EVENT_TYPES as Y, sendEmail as Yn, getMemory as Yt, isEmailReceivedEvent as Z, setFunctionSecret as Zn, getOutboundStatus as Zt, describeApiFailure as _, listEndpoints as _n, cliLogout as _t, REPEAT_IDLE_MAX_MINUTES as a, leaveOrganization as an, unsetFunctionRoute as ar, assertAutomatedVerdict as at, retryTransient as b, listGroups as bn, createFunction as bt, classifySignalContent as c, listAgentContacts as cn, updateKey as cr, ensureSearchReportsAutomated as ct, parseRepeatTick as d, listDefaultNetworkAgents as dn, updateWakeAuthorization as dr, isAutomatedRejectedError as dt, getSendFrom as en, startAgentClaim as er, parseFromHeader as et, preparePresenceAliveEmail as f, listDefaultNetworkMembers as fn, updateWakeSchedule as fr, addDefaultNetworkMember as ft, WaitDeadlineReached as g, listEmails as gn, __exportAll as gr, checkSendability as gt, sendPreparedSignal as h, listEmailRuleResults as hn, whoami as hr, checkDefaultNetworkContactAdmission as ht, REPEAT_EVERY_MAX_MINUTES as i, inviteAgentConnection as in, testFunction as ir, AutomatedFilterUnsupportedError as it, quoteDslValue as j, listWakeSchedules as jn, downloadEmailAttachmentArchiveMember as jt, filtersFromFlags as k, listWakeAuthorizations as kn, deleteWakeAuthorization as kt, parseInteractionEnvelope as l, listAgentNetworks as ln, updateRepeatingSend as lr, expectedAutomatedVerdicts as lt, repeatStopCommand as m, listEmailAttachmentArchiveMembers as mn, verifyAgentSignup as mr, cancelSentEmailByIdempotencyKey as mt, MAX_PRESENCE_ENVELOPE_BYTES as n, getThread as nn, startCliLogin as nr, AUTOMATED_FLAG_DESCRIPTION as nt, REPEAT_MAX_SENDS_MAX as o, listActivityObjects as on, updateDefaultNetworkMember as or, automatedRejectedError as ot, prepareSignalEmail as p, listDomains as pn, verifyAgentClaim as pr, cancelSentEmail as pt, EMAIL_RULE_OBJECTION_EVENT_TYPES as q, searchMemories as qn, getInboxStatus as qt, PRESENCE_PROBE_TEXT as r, getWakeSchedule as rn, stopRepeatFromEmail as rr, AUTOMATED_VALUES as rt, buildRepeatStopBody as s, listAgentConnections as sn, updateFunction as sr, automatedSurfaceForOperation as st, MAX_INTERACTION_BYTES as t, getSentEmail as tn, startAgentSignup as tr, AUTOMATED_FILTER_UNSUPPORTED_CODE as tt, parsePresenceEnvelope as u, listContacts as un, updateRoute as ur, hasAutomatedVerdict as ut, parseRetryAfter as v, listFunctionLogs as vn, completeWebhookEvent as vt, SINCE_VALUE_HELP as w, listRepeatingSends as wn, createWakeSchedule as wt, retryingOperation as x, listKeys as xn, createKey as xt, pauseForTransientFailure as y, listFunctions as yn, createEndpoint as yt, awaitingRejectedError as z, reorderRoutes as zn, getContact as zt };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Q as isTrustedSender, b as retryTransient, c as classifySignalContent } from "./repeats-Dj_o6c-X-wjmw2Jbx.js";
|
|
2
2
|
// src/oclif/presence-provenance.ts
|
|
3
3
|
function readPresenceProjection(detail) {
|
|
4
4
|
if (!detail || typeof detail !== "object") return null;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Dt as successfulSendOutcome, dt as classifySendError, j as bareAddress, s as extractErrorPayload } from "./api-command-
|
|
1
|
+
import { On as listSentEmails, Ut as getEmail, Yn as sendEmail, _ as describeApiFailure, h as sendPreparedSignal, p as prepareSignalEmail, yt as createEndpoint } from "./repeats-Dj_o6c-X-wjmw2Jbx.js";
|
|
2
|
+
import { Dt as successfulSendOutcome, dt as classifySendError, j as bareAddress, s as extractErrorPayload } from "./api-command-CNCsVNk0.js";
|
|
3
3
|
import { recordSentSignal } from "./oclif/auto-signals.js";
|
|
4
4
|
import { _ as acquireListenLock, c as mailTime, d as readMailJson, f as removeMailFile, h as writeMailJson, i as mailId, l as privateMailDirectory, m as withMailLock, n as invalidSharedMail, o as mailObject, p as syncMailDirectory, r as mailAddress, s as mailString, t as SharedMailStateError, v as compareListenProcessIdentity, x as listenProcessIdentity, y as listenIdentity } from "./shared-mail-files-BAQSGxxz.js";
|
|
5
|
-
import { i as readApiBeforeDeadline, n as isPlainChatReply, o as scopedChatSenderTrust } from "./scoped-chat-
|
|
5
|
+
import { i as readApiBeforeDeadline, n as isPlainChatReply, o as scopedChatSenderTrust } from "./scoped-chat-B1Fi6_qM.js";
|
|
6
6
|
import { n as tryOwnSharedMail, r as waitForSharedMailChange, t as readSharedMailOwner } from "./shared-mail-watch-BAPMsFNv.js";
|
|
7
7
|
import { Errors } from "@oclif/core";
|
|
8
8
|
import { opendirSync } from "node:fs";
|
|
9
9
|
import { createHash, randomUUID, scryptSync } from "node:crypto";
|
|
10
10
|
import { dirname, join } from "node:path";
|
|
11
11
|
import { setTimeout as setTimeout$1 } from "node:timers/promises";
|
|
12
|
-
// ../sdk-node/dist/api-
|
|
12
|
+
// ../sdk-node/dist/api-BOt1IwNR.js
|
|
13
13
|
const jsonBodySerializer = { bodySerializer: (body) => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value) };
|
|
14
14
|
function createSseClient({ onRequest, onSseError, onSseEvent, responseTransformer, responseValidator, sseDefaultRetryDelay, sseMaxRetryAttempts, sseMaxRetryDelay, sseSleepFn, url, ...options }) {
|
|
15
15
|
let lastEventId;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "primcli",
|
|
3
|
-
"version": "3.0.0-preview.
|
|
3
|
+
"version": "3.0.0-preview.12",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"tag": "preview"
|
|
6
6
|
},
|
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
"description": "Received and sent mail per hour, and how webhook deliveries ended"
|
|
187
187
|
},
|
|
188
188
|
"activity": {
|
|
189
|
-
"description": "What you created,
|
|
189
|
+
"description": "What you created, what other members asked of you, and what their rules did to your mail, with where each stands now (ids, names and states only)"
|
|
190
190
|
},
|
|
191
191
|
"email-rules": {
|
|
192
192
|
"description": "Rules written in plain English that pick out received mail"
|
|
@@ -204,7 +204,7 @@
|
|
|
204
204
|
"description": "Manage repeating sends you created with `primitive send` or `primitive reply` and --repeat-every. Use `primitive repeats list|get|pause|resume|cancel`."
|
|
205
205
|
},
|
|
206
206
|
"changes": {
|
|
207
|
-
"description": "Long-poll
|
|
207
|
+
"description": "Long-poll a replayable feed of mail, send, thread mute and read-state, agent and access changes, for a login or key with changes:read. Use `primitive changes list --since start` for a baseline, then `--since <next_cursor> --wait 20`; add `--expand message` to inline each message and `--address a@x,b@y` to keep only mail to or from those addresses. Rule requests and rules over your mail are in `primitive activity asked` and `primitive activity concerning`."
|
|
208
208
|
},
|
|
209
209
|
"repeating-sends": {
|
|
210
210
|
"description": "Generated API operations for repeating sends. Prefer `primitive repeats ...` (sender) and `primitive repeat stop` (recipient)."
|