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
package/dist/oclif/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { $ as readEmailInteraction, A as explainPendingMailNotFound, At as cliInvocation, Bt as formatAlreadySentNotice, C as promptLine$2, Ct as sendOutcomeExitCode, D as formatBrowserLoginInstructions, Dt as successfulSendOutcome, E as canOfferCopyHotkey, Et as serializeErrorPayload, F as latestOwnOutbound, Ft as loadSkillLine, G as clearConsumedPendingMail, Gt as classificationFactLines, H as wakeRecipientField, Ht as emptyEmailListHint, I as readThreadContext, It as currentMailSessionKey, J as readPendingMail, Jt as noFactsMessage, K as clearReadPendingMail, Kt as classificationOf, L as sentInThread, Lt as detectAgentRuntime, M as describeWake, N as displayAddress, Nt as generatedAgentName, O as listenForCopyHotkey, Ot as thrownErrorExitCode, P as formatMailWakeLine, Pt as identitySuggestions, Q as interactionNextActions, Qt as ConnectedAgentKeyRequiredError, R as serverMuted, Rt as detectRuntimeSession, S as approveThenRerunHint, St as sendIdentityFields, T as withApproval, Tt as sentHistoryWindowStart, U as wakeRelationship, Ut as mailReach, V as wakeReadCommand, Vt as withFlagSuggestion, W as claimPendingMail, Wt as readCallerMailFor, X as removePendingMail, Xt as ATTACHMENT_WAIT_MAX_MS, Y as recordPendingMail, Yt as ATTACHMENT_WAIT_FLAG_DESCRIPTION, Z as interactionHumanLine, Zt as withAttachmentWait, _ as takesStepUp, _n as setKnownCommands, _t as formatPriorRepliesWarning, a as createOperationCommand, an as selectedOrgFromEnv, at as SEND_OUTCOME_HELP, b as STEP_UP_HEADER$1, bt as priorRepliesThatWentOut, c as formatErrorPayload, cn as credentialsFromUserLogin, ct as buildFollowUpCommand, d as isGrantRefusal, dn as revokeUserLogin, dt as classifySendError, en as createAuthenticatedCliApiClient, et as replyExpectation, f as parameterFlagName, fn as roleKeyLabel, ft as deriveSendIdempotencyKey, g as surfaceUnauthorizedHint, gn as sanitizeForTerminal, gt as formatPriorRepliesCheckSkipped, h as runWithTiming, hn as routeWarningLines, ht as formatDeletedEarlierSendNotice, i as TIME_FLAG_DESCRIPTION, in as resolveCliApiRequestConfig, it as MAX_SEND_WAIT_TIMEOUT_MS, j as bareAddress, jt as connectNextSteps, k as openBrowser, l as hasControlCharacter$1, ln as fetchCliOrgs, lt as buildThrownSendFailureEnvelope, m as refusalDetails, mn as switchCurrentOrg, mt as followUpCommandPrefix, n as API_ERROR_CODES, nn as refreshStoredCliCredentials, o as extractErrorCode, on as CliOrgRefusedError, ot as apiResultHttpStatus, p as readTextFileFlag, pn as roleKeyText, pt as excludeSignalReplies, q as pendingMailPath, qt as isEmailId, r as OPERATION_PATH_FLAGS, rn as refuseOrgSelectionForProfile, rt as IDEMPOTENCY_KEY_FLAG_DESCRIPTION, s as extractErrorPayload, sn as RESTRICTED_ROLE_NOTE, st as assertValidIdempotencyKey, t as API_BASE_URL_FLAG_DESCRIPTION, tn as createCliApiClient, tt as replyInteractionWarning, u as headerFlagName, un as isBuiltInRoleKey, ut as checkPriorReplies, v as writeErrorWithHints, vn as operationManifest, vt as formatSendFailureSummary, w as terminalApprovalIo, wt as sendWaitClampNotice, x as STEP_UP_TOKEN_FLAG_DESCRIPTION, xt as reportSendCommandResult, y as BROWSER_FLAG_DESCRIPTION, yt as formatSendRecordFailureSummary, z as serverRelationship, zt as runtimeSessionVariableList } from "../api-command-
|
|
2
|
-
import { $ as
|
|
3
|
-
import { S as readBundledConnectSkill, _ as NotificationOutcomeUnknownError, a as NotificationRetryError, b as installedConnectSkillFile, c as readConversationStatusContent, d as SESSION_UUID$1, g as NativeSessionNotLoadedError, h as NativeSessionError, i as notificationReceiptPage, l as createListenHandler, m as NativeSessionDisconnectedError, n as notificationSenders, o as isRoutineNotificationContent, p as defaultSessionSocket, r as openSessionNotifications, s as notificationPartReader, t as notificationScope, u as readableDelivery, v as connectSkillTarget, x as installedVersion, y as installConnectSkill } from "../notify-session-
|
|
1
|
+
import { $ as readEmailInteraction, A as explainPendingMailNotFound, At as cliInvocation, Bt as formatAlreadySentNotice, C as promptLine$2, Ct as sendOutcomeExitCode, D as formatBrowserLoginInstructions, Dt as successfulSendOutcome, E as canOfferCopyHotkey, Et as serializeErrorPayload, F as latestOwnOutbound, Ft as loadSkillLine, G as clearConsumedPendingMail, Gt as classificationFactLines, H as wakeRecipientField, Ht as emptyEmailListHint, I as readThreadContext, It as currentMailSessionKey, J as readPendingMail, Jt as noFactsMessage, K as clearReadPendingMail, Kt as classificationOf, L as sentInThread, Lt as detectAgentRuntime, M as describeWake, N as displayAddress, Nt as generatedAgentName, O as listenForCopyHotkey, Ot as thrownErrorExitCode, P as formatMailWakeLine, Pt as identitySuggestions, Q as interactionNextActions, Qt as ConnectedAgentKeyRequiredError, R as serverMuted, Rt as detectRuntimeSession, S as approveThenRerunHint, St as sendIdentityFields, T as withApproval, Tt as sentHistoryWindowStart, U as wakeRelationship, Ut as mailReach, V as wakeReadCommand, Vt as withFlagSuggestion, W as claimPendingMail, Wt as readCallerMailFor, X as removePendingMail, Xt as ATTACHMENT_WAIT_MAX_MS, Y as recordPendingMail, Yt as ATTACHMENT_WAIT_FLAG_DESCRIPTION, Z as interactionHumanLine, Zt as withAttachmentWait, _ as takesStepUp, _n as setKnownCommands, _t as formatPriorRepliesWarning, a as createOperationCommand, an as selectedOrgFromEnv, at as SEND_OUTCOME_HELP, b as STEP_UP_HEADER$1, bt as priorRepliesThatWentOut, c as formatErrorPayload, cn as credentialsFromUserLogin, ct as buildFollowUpCommand, d as isGrantRefusal, dn as revokeUserLogin, dt as classifySendError, en as createAuthenticatedCliApiClient, et as replyExpectation, f as parameterFlagName, fn as roleKeyLabel, ft as deriveSendIdempotencyKey, g as surfaceUnauthorizedHint, gn as sanitizeForTerminal, gt as formatPriorRepliesCheckSkipped, h as runWithTiming, hn as routeWarningLines, ht as formatDeletedEarlierSendNotice, i as TIME_FLAG_DESCRIPTION, in as resolveCliApiRequestConfig, it as MAX_SEND_WAIT_TIMEOUT_MS, j as bareAddress, jt as connectNextSteps, k as openBrowser, l as hasControlCharacter$1, ln as fetchCliOrgs, lt as buildThrownSendFailureEnvelope, m as refusalDetails, mn as switchCurrentOrg, mt as followUpCommandPrefix, n as API_ERROR_CODES, nn as refreshStoredCliCredentials, o as extractErrorCode, on as CliOrgRefusedError, ot as apiResultHttpStatus, p as readTextFileFlag, pn as roleKeyText, pt as excludeSignalReplies, q as pendingMailPath, qt as isEmailId, r as OPERATION_PATH_FLAGS, rn as refuseOrgSelectionForProfile, rt as IDEMPOTENCY_KEY_FLAG_DESCRIPTION, s as extractErrorPayload, sn as RESTRICTED_ROLE_NOTE, st as assertValidIdempotencyKey, t as API_BASE_URL_FLAG_DESCRIPTION, tn as createCliApiClient, tt as replyInteractionWarning, u as headerFlagName, un as isBuiltInRoleKey, ut as checkPriorReplies, v as writeErrorWithHints, vn as operationManifest, vt as formatSendFailureSummary, w as terminalApprovalIo, wt as sendWaitClampNotice, x as STEP_UP_TOKEN_FLAG_DESCRIPTION, xt as reportSendCommandResult, y as BROWSER_FLAG_DESCRIPTION, yt as formatSendRecordFailureSummary, z as serverRelationship, zt as runtimeSessionVariableList } from "../api-command-CNCsVNk0.js";
|
|
2
|
+
import { $ as parseWebhookEvent, $n as simulateRoute, $t as getRepeatingSend, A as lateMailReread, An as listWakeDispatches, At as deleteWakeSchedule, B as ensureSearchReportsReplyState, Bn as replyToEmail, Bt as getConversation, C as waitOutRetryAfter, Cn as listOrganizationPeople, Ct as createWakeAuthorization, D as encodeReceivedAtSearchCursor, Dn as listSentAttachmentArchiveMembers, Dt as deleteMemory, E as cursorFromAcceptedRows, En as listRoutes, F as AWAITING_VALUES, Ft as downloadSentAttachmentByFilename, G as queryUsesAwaiting, Gt as getFunctionRouting, H as formatRepliesCell, Hn as revokeCredential, Ht as getDefaultNetworkAgent, I as REPLY_STATE_UNSUPPORTED_CODE, It as getAccessMode, Jn as semanticSearch, Jt as getKey, Kn as searchEmails, Kt as getFunctionTestRunTrace, L as ReplyStateUnsupportedError, Ln as redeemCreditCode, Lt as getAccount, M as sinceFromFlags, Mn as pollCliLogin, Mt as downloadEmailAttachmentByFilename, N as sleep$3, Nn as pullWebhookEvent, O as fetchEmailSearchPage, On as listSentEmails, Ot as deleteRoute, P as AWAITING_FLAG_DESCRIPTION, Pt as downloadSentAttachmentArchiveMember, Qn as setMemory, Qt as getOwnGrant, R as assertAwaitingFilterRows, Rn as removeDefaultNetworkMember, Rt as getAgentContactPolicy, S as transientFailure, Sn as listMailboxAccess, St as createRoute, T as collectNewAcceptedEmails, Tn as listRoles, U as hasReplyState, Un as rotateKey, Ut as getEmail, V as formatAwaitingCell, Vn as resendAgentSignupVerification, Vt as getCreditBalance, W as isAwaitingRejectedError, Wn as runWakeSchedule, Wt as getFunction, Xn as setFunctionRoute, Xt as getOrgRoutingTopology, Yn as sendEmail, Yt as getMemory, Z as isEmailReceivedEvent, Zn as setFunctionSecret, Zt as getOutboundStatus, _ as describeApiFailure, _n as listEndpoints, _t as cliLogout, a as REPEAT_IDLE_MAX_MINUTES, an as leaveOrganization, ar as unsetFunctionRoute, at as assertAutomatedVerdict, b as retryTransient, bn as listGroups, bt as createFunction, cn as listAgentContacts, cr as updateKey, d as parseRepeatTick, dn as listDefaultNetworkAgents, dr as updateWakeAuthorization, dt as isAutomatedRejectedError, en as getSendFrom, er as startAgentClaim, et as parseFromHeader, f as preparePresenceAliveEmail, fn as listDefaultNetworkMembers, fr as updateWakeSchedule, ft as addDefaultNetworkMember, g as WaitDeadlineReached, gn as listEmails, gt as checkSendability, hn as listEmailRuleResults, hr as whoami, ht as checkDefaultNetworkContactAdmission, i as REPEAT_EVERY_MAX_MINUTES, ir as testFunction, it as AutomatedFilterUnsupportedError, j as quoteDslValue, jn as listWakeSchedules, jt as downloadEmailAttachmentArchiveMember, k as filtersFromFlags, kn as listWakeAuthorizations, kt as deleteWakeAuthorization, l as parseInteractionEnvelope, ln as listAgentNetworks, lr as updateRepeatingSend, m as repeatStopCommand, mn as listEmailAttachmentArchiveMembers, mr as verifyAgentSignup, mt as cancelSentEmailByIdempotencyKey, nn as getThread, nr as startCliLogin, nt as AUTOMATED_FLAG_DESCRIPTION, o as REPEAT_MAX_SENDS_MAX, on as listActivityObjects, or as updateDefaultNetworkMember, ot as automatedRejectedError, p as prepareSignalEmail, pn as listDomains, pr as verifyAgentClaim, pt as cancelSentEmail, qn as searchMemories, qt as getInboxStatus, rn as getWakeSchedule, rr as stopRepeatFromEmail, rt as AUTOMATED_VALUES, s as buildRepeatStopBody, sr as updateFunction, tn as getSentEmail, tr as startAgentSignup, tt as AUTOMATED_FILTER_UNSUPPORTED_CODE, u as parsePresenceEnvelope, ur as updateRoute, ut as hasAutomatedVerdict, vn as listFunctionLogs, vt as completeWebhookEvent, w as SINCE_VALUE_HELP, wn as listRepeatingSends, wt as createWakeSchedule, x as retryingOperation, xn as listKeys, xt as createKey, y as pauseForTransientFailure, yn as listFunctions, yt as createEndpoint, z as awaitingRejectedError, zn as reorderRoutes } from "../repeats-Dj_o6c-X-wjmw2Jbx.js";
|
|
3
|
+
import { S as readBundledConnectSkill, _ as NotificationOutcomeUnknownError, a as NotificationRetryError, b as installedConnectSkillFile, c as readConversationStatusContent, d as SESSION_UUID$1, g as NativeSessionNotLoadedError, h as NativeSessionError, i as notificationReceiptPage, l as createListenHandler, m as NativeSessionDisconnectedError, n as notificationSenders, o as isRoutineNotificationContent, p as defaultSessionSocket, r as openSessionNotifications, s as notificationPartReader, t as notificationScope, u as readableDelivery, v as connectSkillTarget, x as installedVersion, y as installConnectSkill } from "../notify-session-WKFsaFt3.js";
|
|
4
4
|
import { A as AGENT_ADDRESS_ENV, C as saveCliCredentials, D as loadActiveChatState, E as deleteChatState, F as agentProfilesDirectory, H as requireDefaultLoginProfile, M as AgentConnectionSetupError, N as agentProfileDirectory, O as loadChatConversationByLocalId, P as agentProfileName, R as loadConnectedAgentProfile, S as resolveCliAuth, T as chatStatePath, W as PrimitiveApiClient, _ as deleteCliCredentials, a as normalizeCliEnvironmentName, b as loadCliCredentials, c as resolveConfigEnvironment, g as credentialsPath, h as credentialsLockPath, i as loadCliConfig, j as AGENT_PROFILE_ENV, k as saveActiveChatState, l as saveCliConfig, m as cliAccessTokenExpiresAt, n as deleteCliConfig, o as redactCliEnvironment, p as acquireCliCredentialsLock, r as emptyCliConfig, s as removeCliEnvironment, u as upsertCliEnvironment, v as deleteCliCredentialsLock, w as saveSignupCredentials, y as detectPrimitiveKeyEnvMisname } from "../cli-config-Ms_0vNjq.js";
|
|
5
5
|
import { C as resolveListenSubscription, S as normalizeListenOrigin, _ as acquireListenLock, a as mailLockBusy, c as mailTime, d as readMailJson, f as removeMailFile, g as ListenStateError, h as writeMailJson, i as mailId, l as privateMailDirectory, m as withMailLock, o as mailObject, u as privateMailPermissions, y as listenIdentity } from "../shared-mail-files-BAQSGxxz.js";
|
|
6
|
-
import { $ as saveConnectionName, A as ContactPolicyReadRetryError, B as AddressNotesApiError, C as RECEIVER_MODES, Ct as upsertManagedBlock, D as registrationSummary, Dt as refreshOwnerMemberAddressPeriodically, E as failedSessionRegistration, Et as addSessionReceiver, F as canonicalContactSelector, G as contactAgentAddress, H as runAddressNotesRequest, I as AgentDisconnectError, J as agentInvitationHash, K as runContactRequest, L as claimOverRevokedSetup, M as NetworkAdmissionPendingError, N as createNotificationContactPolicy, O as registrationSummaryLine, Ot as withOwnerMemberAddress, P as evaluateContactPolicy, Q as refusalAfterReplacement, R as clearRevokedAddresses, S as runAgentConnect, St as readManagedFile, T as verificationReplySubmitted, Tt as readHookLauncherWarning, U as ContactsApiError, V as addressNoteTarget, W as contactAddress, X as readAgentInvitation, Y as connectAgent, Z as receiverStatusCommand, _ as enrollmentResumes, _t as samePath, a as endSession, at as boundSessionProfiles, b as invitationProfileName, bt as inspectManagedBlock, c as pendingSessionDisconnects, ct as describeSessionHookChange, d as registerSession, dt as ephemeralCliReason, et as savedReceiver, f as retryPendingDisconnects, ft as findOnPath, g as enrollAgent, gt as repairClaudeHooks, h as staleSessionAgents, ht as readClaudeSettings, i as connectedProfilesForSession, it as recordHookMailCheck, j as NETWORK_ADMISSION_PENDING_RETRY_MS, k as waitForRegistrations, l as psProcessInfo, lt as describeSessionHookItem, m as runDetached, mt as inspectClaudeHooks, n as OMP_MAIN, nt as releaseRegistrationsForProfile, o as headlessClaudeRun, ot as claudeConfigDir, p as revokeStaleSessionAgents, pt as hasMachineSessionHooks, q as agentConnectionStatus, r as agentConnectionState, rt as installClaudeWakeHook, st as currentCliLocation, t as HOOK_END_GRACE_MS, tt as MACHINE_RUNTIMES, u as readClaudeHookInput, ut as ensureHookLauncher, v as connectWarnings, vt as writeClaudeSettings, w as externalReceivingState, wt as writeManagedFile, x as pollCheckCommand, xt as jsonIndentation, y as defaultAgentProfileName, yt as MachineFileError, z as disconnectAgent } from "../machine-session-
|
|
7
|
-
import { a as readBeforeDeadline, c as readPresenceProjection, i as readApiBeforeDeadline, n as isPlainChatReply, o as scopedChatSenderTrust, r as isScopedChatReply, s as presenceDisposition, t as isConnectedChatCredential } from "../scoped-chat-
|
|
6
|
+
import { $ as saveConnectionName, A as ContactPolicyReadRetryError, B as AddressNotesApiError, C as RECEIVER_MODES, Ct as upsertManagedBlock, D as registrationSummary, Dt as refreshOwnerMemberAddressPeriodically, E as failedSessionRegistration, Et as addSessionReceiver, F as canonicalContactSelector, G as contactAgentAddress, H as runAddressNotesRequest, I as AgentDisconnectError, J as agentInvitationHash, K as runContactRequest, L as claimOverRevokedSetup, M as NetworkAdmissionPendingError, N as createNotificationContactPolicy, O as registrationSummaryLine, Ot as withOwnerMemberAddress, P as evaluateContactPolicy, Q as refusalAfterReplacement, R as clearRevokedAddresses, S as runAgentConnect, St as readManagedFile, T as verificationReplySubmitted, Tt as readHookLauncherWarning, U as ContactsApiError, V as addressNoteTarget, W as contactAddress, X as readAgentInvitation, Y as connectAgent, Z as receiverStatusCommand, _ as enrollmentResumes, _t as samePath, a as endSession, at as boundSessionProfiles, b as invitationProfileName, bt as inspectManagedBlock, c as pendingSessionDisconnects, ct as describeSessionHookChange, d as registerSession, dt as ephemeralCliReason, et as savedReceiver, f as retryPendingDisconnects, ft as findOnPath, g as enrollAgent, gt as repairClaudeHooks, h as staleSessionAgents, ht as readClaudeSettings, i as connectedProfilesForSession, it as recordHookMailCheck, j as NETWORK_ADMISSION_PENDING_RETRY_MS, k as waitForRegistrations, l as psProcessInfo, lt as describeSessionHookItem, m as runDetached, mt as inspectClaudeHooks, n as OMP_MAIN, nt as releaseRegistrationsForProfile, o as headlessClaudeRun, ot as claudeConfigDir, p as revokeStaleSessionAgents, pt as hasMachineSessionHooks, q as agentConnectionStatus, r as agentConnectionState, rt as installClaudeWakeHook, st as currentCliLocation, t as HOOK_END_GRACE_MS, tt as MACHINE_RUNTIMES, u as readClaudeHookInput, ut as ensureHookLauncher, v as connectWarnings, vt as writeClaudeSettings, w as externalReceivingState, wt as writeManagedFile, x as pollCheckCommand, xt as jsonIndentation, y as defaultAgentProfileName, yt as MachineFileError, z as disconnectAgent } from "../machine-session-DkXYR62a.js";
|
|
7
|
+
import { a as readBeforeDeadline, c as readPresenceProjection, i as readApiBeforeDeadline, n as isPlainChatReply, o as scopedChatSenderTrust, r as isScopedChatReply, s as presenceDisposition, t as isConnectedChatCredential } from "../scoped-chat-B1Fi6_qM.js";
|
|
8
8
|
import { autoSignalEligible, dispatchAutoRead, dispatchAutoWorking, haltAutoWorking, isSentSignal, readWorkingLease, restoreAutoWorking } from "./auto-signals.js";
|
|
9
|
-
import { a as ensureSharedMailSubscription, c as isConnectedAgentKey, d as reserveSharedMailSubscription, f as followEmailConversation, g as EventReceiverError, h as EventConnection, i as sharedMailScope, l as createSharedMailWaiter, m as otherParticipants, n as reconcileChatSend, p as readConversationFollow, r as openSharedMailReceiver, s as AGENT_CONNECTION_REQUIRED_MESSAGE, t as sendSignal, u as openSharedMailStore } from "../signal-command-
|
|
9
|
+
import { a as ensureSharedMailSubscription, c as isConnectedAgentKey, d as reserveSharedMailSubscription, f as followEmailConversation, g as EventReceiverError, h as EventConnection, i as sharedMailScope, l as createSharedMailWaiter, m as otherParticipants, n as reconcileChatSend, p as readConversationFollow, r as openSharedMailReceiver, s as AGENT_CONNECTION_REQUIRED_MESSAGE, t as sendSignal, u as openSharedMailStore } from "../signal-command-BdJVZXGl.js";
|
|
10
10
|
import { a as thrownErrorBody, i as runStreamingJson, n as guardJsonOutputCommands, r as jsonOutputRequested, t as JSON_OUTPUT_FLAG } from "../json-output-ch756TXV.js";
|
|
11
11
|
import { a as backgroundListenStatus, c as runBackgroundListen, d as stopBackgroundListen, f as verifyBackgroundListenTarget, o as backgroundListenToken, r as backgroundListenConfiguration, u as startBackgroundListen } from "../listen-background-DyBYca28.js";
|
|
12
12
|
import { ORG_SELECTION_ENV } from "./global-org-flag.js";
|
|
@@ -4782,7 +4782,7 @@ const openapiDocument = {
|
|
|
4782
4782
|
"description": "Existing named pull destination resumed",
|
|
4783
4783
|
"content": { "application/json": { "schema": { "allOf": [{ "$ref": "#/components/schemas/SuccessEnvelope" }, {
|
|
4784
4784
|
"type": "object",
|
|
4785
|
-
"properties": { "data": { "$ref": "#/components/schemas/
|
|
4785
|
+
"properties": { "data": { "$ref": "#/components/schemas/CreatedEndpoint" } }
|
|
4786
4786
|
}] } } },
|
|
4787
4787
|
"headers": {
|
|
4788
4788
|
"ratelimit-limit": { "$ref": "#/components/headers/ratelimit-limit" },
|
|
@@ -4795,7 +4795,7 @@ const openapiDocument = {
|
|
|
4795
4795
|
"description": "Endpoint created (or reactivated)",
|
|
4796
4796
|
"content": { "application/json": { "schema": { "allOf": [{ "$ref": "#/components/schemas/SuccessEnvelope" }, {
|
|
4797
4797
|
"type": "object",
|
|
4798
|
-
"properties": { "data": { "$ref": "#/components/schemas/
|
|
4798
|
+
"properties": { "data": { "$ref": "#/components/schemas/CreatedEndpoint" } }
|
|
4799
4799
|
}] } } }
|
|
4800
4800
|
},
|
|
4801
4801
|
"400": {
|
|
@@ -21769,7 +21769,7 @@ const openapiDocument = {
|
|
|
21769
21769
|
"/activity/objects": { "get": {
|
|
21770
21770
|
"operationId": "listActivityObjects",
|
|
21771
21771
|
"summary": "List what you created, or what you were asked",
|
|
21772
|
-
"description": "The objects the caller created, newest first, each with where it stands now, including ones since disabled, deleted or revoked where the object keeps a row: Functions, endpoints, Function triggers, pull subscriptions, recipient routes, filters, wake schedules, repeating sends and scheduled sends. An API key, an app or an agent sees what it created itself; a webhook given to an API key lists under that key. A person (a dashboard session, or their own Primitive CLI or app login) sees what they created through any credential of theirs, each item naming it, and also their API keys, personal agents, email rules, rule requests and objections to rules over their mail (objections only on the dashboard or the Primitive CLI). Each kind is listed only if the caller could list it through that kind's own route; a kind it could not is named in withheld, with no count. Ids, names and states only: never a webhook URL or mail content. Needs activity:read_self. With relation=asked it lists instead what other members asked of the person, open or answered: the rule requests made to them, and the objections to rules they wrote, under their current membership, each naming the member who asked or objected in created_through. A key, an app or an agent has none, and gets both kinds in withheld.",
|
|
21772
|
+
"description": "The objects the caller created, newest first, each with where it stands now, including ones since disabled, deleted or revoked where the object keeps a row: Functions, endpoints, Function triggers, pull subscriptions, recipient routes, filters, wake schedules, repeating sends and scheduled sends. An API key, an app or an agent sees what it created itself; a webhook given to an API key lists under that key. A person (a dashboard session, or their own Primitive CLI or app login) sees what they created through any credential of theirs, each item naming it, and also their API keys, personal agents, email rules, rule requests and objections to rules over their mail (objections only on the dashboard or the Primitive CLI). Each kind is listed only if the caller could list it through that kind's own route; a kind it could not is named in withheld, with no count. Ids, names and states only: never a webhook URL or mail content. Needs activity:read_self. With relation=asked it lists instead what other members asked of the person, open or answered: the rule requests made to them, and the objections to rules they wrote, under their current membership, each naming the member who asked or objected in created_through. A key, an app or an agent has none, and gets both kinds in withheld. With relation=concerning it lists instead what other members did that concerns the person's own mail: each time a rule started covering one of their mailboxes or saved a new version while covering it, named as the rule was then, naming its author in created_through, under their current membership; only on the dashboard or the Primitive CLI. A key, an app or an agent has none, and gets email_rule_coverage in withheld. A notice never reads as ended. Notices are written by a periodic job and can lag: until the notices record a rule starting to cover you, the first page lists that rule as pending (pending_complete says whether that check finished), and as_of says about when the notices last looked. For what covers you now, read GET /email-rules/covering-me.",
|
|
21773
21773
|
"tags": ["Activity"],
|
|
21774
21774
|
"security": [{ "BearerAuth": [] }],
|
|
21775
21775
|
"parameters": [
|
|
@@ -21777,19 +21777,23 @@ const openapiDocument = {
|
|
|
21777
21777
|
"name": "relation",
|
|
21778
21778
|
"in": "query",
|
|
21779
21779
|
"required": false,
|
|
21780
|
-
"description": "created (the default) or
|
|
21780
|
+
"description": "created (the default), asked or concerning.",
|
|
21781
21781
|
"schema": {
|
|
21782
21782
|
"default": "created",
|
|
21783
|
-
"description": "created (the default): what you created. asked: what other members asked of you, open or answered: rule requests made to you, and objections to rules you wrote.
|
|
21783
|
+
"description": "created (the default): what you created. asked: what other members asked of you, open or answered: rule requests made to you, and objections to rules you wrote; kind may then name only email_rule_request and email_rule_objection. concerning: what other members did that concerns your own mail: a rule that started covering one of your mailboxes, or saved a new version while covering it (email_rule_coverage, the only kind it takes). asked and concerning are for a person's own view only.",
|
|
21784
21784
|
"type": "string",
|
|
21785
|
-
"enum": [
|
|
21785
|
+
"enum": [
|
|
21786
|
+
"created",
|
|
21787
|
+
"asked",
|
|
21788
|
+
"concerning"
|
|
21789
|
+
]
|
|
21786
21790
|
}
|
|
21787
21791
|
},
|
|
21788
21792
|
{
|
|
21789
21793
|
"name": "kind",
|
|
21790
21794
|
"in": "query",
|
|
21791
21795
|
"required": false,
|
|
21792
|
-
"description": "Only these kinds, comma-separated: function, endpoint, function_trigger, pull_subscription, recipient_route, filter_rule, wake_schedule, repeating_send, scheduled_send, api_key, agent_connection, email_rule, email_rule_request, email_rule_objection. Defaults to every kind the caller can have created (a person's own kinds only for a person). With relation=asked, only email_rule_request and email_rule_objection, which are also the default.",
|
|
21796
|
+
"description": "Only these kinds, comma-separated: function, endpoint, function_trigger, pull_subscription, recipient_route, filter_rule, wake_schedule, repeating_send, scheduled_send, api_key, agent_connection, email_rule, email_rule_request, email_rule_objection, email_rule_coverage. Defaults to every kind the caller can have created (a person's own kinds only for a person). With relation=asked, only email_rule_request and email_rule_objection, which are also the default; with relation=concerning, only email_rule_coverage, the default. email_rule_coverage is listed only with relation=concerning.",
|
|
21793
21797
|
"schema": {
|
|
21794
21798
|
"type": "string",
|
|
21795
21799
|
"minLength": 1,
|
|
@@ -21815,7 +21819,7 @@ const openapiDocument = {
|
|
|
21815
21819
|
"name": "limit",
|
|
21816
21820
|
"in": "query",
|
|
21817
21821
|
"required": false,
|
|
21818
|
-
"description": "Objects per page, from 1 to 200; defaults to 50.",
|
|
21822
|
+
"description": "Objects per page, from 1 to 200; defaults to 50. With relation=concerning the first page may also hold pending items beyond it.",
|
|
21819
21823
|
"schema": {
|
|
21820
21824
|
"default": 50,
|
|
21821
21825
|
"type": "integer",
|
|
@@ -21923,7 +21927,7 @@ const openapiDocument = {
|
|
|
21923
21927
|
"/email-rules/vocabulary": { "get": {
|
|
21924
21928
|
"operationId": "getEmailRuleVocabulary",
|
|
21925
21929
|
"summary": "Read the column catalog",
|
|
21926
|
-
"description": "What a rule tree you write yourself can say: each column of the current vocabulary with its type, source, meaning, operators and the value each takes, options, and whether it takes min_confidence; and the tree's limits, its stored size included. Built from the checks a saved or tested tree must pass. A tree is {version: tree_version, vocabulary: version, when, questions}. Needs mail:read, a member's own
|
|
21930
|
+
"description": "What a rule tree you write yourself can say: each column of the current vocabulary with its type, source, meaning, operators and the value each takes, options, and whether it takes min_confidence; and the tree's limits, its stored size included. Built from the checks a saved or tested tree must pass. A tree is {version: tree_version, vocabulary: version, when, questions}. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
|
|
21927
21931
|
"tags": ["Email Rules"],
|
|
21928
21932
|
"security": [{ "BearerAuth": [] }],
|
|
21929
21933
|
"responses": {
|
|
@@ -21961,7 +21965,7 @@ const openapiDocument = {
|
|
|
21961
21965
|
}
|
|
21962
21966
|
},
|
|
21963
21967
|
"403": {
|
|
21964
|
-
"description": "feature_not_enabled: the email rules feature
|
|
21968
|
+
"description": "feature_not_enabled: this organization lacks the email rules feature; permission refusals answer forbidden or grant_forbidden.",
|
|
21965
21969
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
21966
21970
|
},
|
|
21967
21971
|
"429": {
|
|
@@ -21993,7 +21997,7 @@ const openapiDocument = {
|
|
|
21993
21997
|
"/email-rules/compile": { "post": {
|
|
21994
21998
|
"operationId": "compileEmailRule",
|
|
21995
21999
|
"summary": "Compile a rule description",
|
|
21996
|
-
"description": "Turns a plain-English description of which received emails to match into a rule tree over the column contract, with an explanation of what it matches, the assumptions made, and warnings for what the columns cannot express. Where the columns fall short it adds up to five yes/no questions, asked only after the conditions match; they read the subject, the new text and attachment file names, never attachment contents. Nothing is saved. For a rule with no questions, breadth counts, read only, how much of 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
|
|
22000
|
+
"description": "Turns a plain-English description of which received emails to match into a rule tree over the column contract, with an explanation of what it matches, the assumptions made, and warnings for what the columns cannot express. Where the columns fall short it adds up to five yes/no questions, asked only after the conditions match; they read the subject, the new text and attachment file names, never attachment contents. Nothing is saved. For a rule with no questions, breadth counts, read only, how much of 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).",
|
|
21997
22001
|
"tags": ["Email Rules"],
|
|
21998
22002
|
"security": [{ "BearerAuth": [] }],
|
|
21999
22003
|
"requestBody": {
|
|
@@ -22048,7 +22052,7 @@ const openapiDocument = {
|
|
|
22048
22052
|
}
|
|
22049
22053
|
},
|
|
22050
22054
|
"403": {
|
|
22051
|
-
"description": "feature_not_enabled: the email rules feature
|
|
22055
|
+
"description": "feature_not_enabled: this organization lacks the email rules feature; permission refusals answer forbidden or grant_forbidden.",
|
|
22052
22056
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
22053
22057
|
},
|
|
22054
22058
|
"422": {
|
|
@@ -22099,7 +22103,7 @@ const openapiDocument = {
|
|
|
22099
22103
|
"/email-rules/test": { "post": {
|
|
22100
22104
|
"operationId": "testEmailRule",
|
|
22101
22105
|
"summary": "Test a rule against received mail",
|
|
22102
|
-
"description": "Runs a rule over received mail and reports what it would decide for each email (matched, near_miss, no_match, unclassified, skipped or not_found), with a summary of how each top-level condition and question decided. Test an unsaved tree, or a saved rule by rule_id (its current version, as its author). It reads only mail its author can read and its scope covers. Without email_ids it tests the newest emails, at most 200 and none older than 30 days, plus any expected ones. Unclassified emails over 2 hours old are classified first unless classify_missing is false. It records no decision and grants nothing, and stops at about 90 seconds. Needs mail:read, a member's own
|
|
22106
|
+
"description": "Runs a rule over received mail and reports what it would decide for each email (matched, near_miss, no_match, unclassified, skipped or not_found), with a summary of how each top-level condition and question decided. Test an unsaved tree, or a saved rule by rule_id (its current version, as its author). It reads only mail its author can read and its scope covers. A rule you see only because it covers your own mailboxes runs as you, over only those, from the dashboard or the Primitive CLI. Without email_ids it tests the newest emails, at most 200 and none older than 30 days, plus any expected ones. Unclassified emails over 2 hours old are classified first unless classify_missing is false. It records no decision and grants nothing, and stops at about 90 seconds. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
|
|
22103
22107
|
"tags": ["Email Rules"],
|
|
22104
22108
|
"security": [{ "BearerAuth": [] }],
|
|
22105
22109
|
"requestBody": {
|
|
@@ -22145,15 +22149,15 @@ const openapiDocument = {
|
|
|
22145
22149
|
}
|
|
22146
22150
|
},
|
|
22147
22151
|
"403": {
|
|
22148
|
-
"description": "feature_not_enabled: the email rules feature
|
|
22152
|
+
"description": "feature_not_enabled: this organization lacks the email rules feature; permission refusals answer forbidden or grant_forbidden. grant_forbidden with details.reason mail_depth: your access to mail shows headers only, and a rule decides on what emails say. email_rule_scope_not_readable: scope_selection names something you cannot read.",
|
|
22149
22153
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
22150
22154
|
},
|
|
22151
22155
|
"404": {
|
|
22152
|
-
"description": "not_found: rule_id names no rule you can see (details.reason rule_not_found).",
|
|
22156
|
+
"description": "not_found: rule_id names no rule you can see or that covers your mailboxes (details.reason rule_not_found).",
|
|
22153
22157
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
22154
22158
|
},
|
|
22155
22159
|
"409": {
|
|
22156
|
-
"description": "email_rule_author_unresolvable: the rule cannot run as its author (for an unsaved tree, the caller). details.reason is left, revoked, suspended, membership_ended, no_mail_read, no_own_mailbox, no_shareable_mailbox or no_selected_mailbox.",
|
|
22160
|
+
"description": "email_rule_author_unresolvable: the rule cannot run as its author (for an unsaved tree or a rule covering you, the caller). details.reason is left, revoked, suspended, membership_ended, no_mail_read, no_own_mailbox, no_shareable_mailbox or no_selected_mailbox.",
|
|
22157
22161
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
22158
22162
|
},
|
|
22159
22163
|
"429": {
|
|
@@ -22196,7 +22200,7 @@ const openapiDocument = {
|
|
|
22196
22200
|
"/email-rules/look-alikes": { "post": {
|
|
22197
22201
|
"operationId": "generateLookAlikes",
|
|
22198
22202
|
"summary": "Write look-alike emails a rule should or should not match",
|
|
22199
|
-
"description": "Writes made-up emails that come close to what a grant rule describes, and reports what the rule decides for each, as test-sample would. Most should not match (expected no_match): business near misses from its senders and topic (kind other: an all-clear, a reply with nothing new, a related document, another subject) and private mail (a personal medical bill, pay for named people, a personal purchase, personal banking or tax). By default a third, rounded down, are near cases it should match (expected match, kind other). failed means the rule decided one against expected. Nothing is stored and no mail is read. Keep them, with their expected, with add_expectation_samples, or for a request with the accept's expectation_samples. Limited to 20 an hour per member. Needs mail:read, a member's own
|
|
22203
|
+
"description": "Writes made-up emails that come close to what a grant rule describes, and reports what the rule decides for each, as test-sample would. Most should not match (expected no_match): business near misses from its senders and topic (kind other: an all-clear, a reply with nothing new, a related document, another subject) and private mail (a personal medical bill, pay for named people, a personal purchase, personal banking or tax). By default a third, rounded down, are near cases it should match (expected match, kind other). failed means the rule decided one against expected. Nothing is stored and no mail is read. Keep them, with their expected, with add_expectation_samples, or for a request with the accept's expectation_samples. Limited to 20 an hour per member. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
|
|
22200
22204
|
"tags": ["Email Rules"],
|
|
22201
22205
|
"security": [{ "BearerAuth": [] }],
|
|
22202
22206
|
"requestBody": {
|
|
@@ -22242,7 +22246,7 @@ const openapiDocument = {
|
|
|
22242
22246
|
}
|
|
22243
22247
|
},
|
|
22244
22248
|
"403": {
|
|
22245
|
-
"description": "feature_not_enabled: the email rules feature
|
|
22249
|
+
"description": "feature_not_enabled: this organization lacks the email rules feature; permission refusals answer forbidden or grant_forbidden. email_rule_scope_not_readable: scope_selection names something you cannot read.",
|
|
22246
22250
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
22247
22251
|
},
|
|
22248
22252
|
"404": {
|
|
@@ -22301,7 +22305,7 @@ const openapiDocument = {
|
|
|
22301
22305
|
"/email-rules/test-sample": { "post": {
|
|
22302
22306
|
"operationId": "testEmailRuleOnSample",
|
|
22303
22307
|
"summary": "Test a rule against a made-up email",
|
|
22304
|
-
"description": "Reports what a rule would decide for an email you describe (sender, recipients, subject, plain text, attachment types; optionally automated, from a mailing list, and a spam score), classified and decided as received mail would be. A rule reading a spam score you gave none for decides on none (unset_columns). Nothing is stored. Test an unsaved tree or a saved rule by rule_id. The answer includes what the classifier read. Needs mail:read, a member's own
|
|
22308
|
+
"description": "Reports what a rule would decide for an email you describe (sender, recipients, subject, plain text, attachment types; optionally automated, from a mailing list, and a spam score), classified and decided as received mail would be. A rule reading a spam score you gave none for decides on none (unset_columns). Nothing is stored. Test an unsaved tree or a saved rule by rule_id. The answer includes what the classifier read. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
|
|
22305
22309
|
"tags": ["Email Rules"],
|
|
22306
22310
|
"security": [{ "BearerAuth": [] }],
|
|
22307
22311
|
"requestBody": {
|
|
@@ -22347,7 +22351,7 @@ const openapiDocument = {
|
|
|
22347
22351
|
}
|
|
22348
22352
|
},
|
|
22349
22353
|
"403": {
|
|
22350
|
-
"description": "feature_not_enabled: the email rules feature
|
|
22354
|
+
"description": "feature_not_enabled: this organization lacks the email rules feature; permission refusals answer forbidden or grant_forbidden. email_rule_scope_not_readable: scope_selection names something you cannot read.",
|
|
22351
22355
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
22352
22356
|
},
|
|
22353
22357
|
"404": {
|
|
@@ -22399,7 +22403,7 @@ const openapiDocument = {
|
|
|
22399
22403
|
"post": {
|
|
22400
22404
|
"operationId": "createEmailRule",
|
|
22401
22405
|
"summary": "Create a rule",
|
|
22402
|
-
"description": "Saves a rule as version 1 from a compile response or a tree you wrote, checked against the column contract. It starts in observe (recorded, nothing granted or blocked) unless state is draft, or active for a do_not_share rule. You are its author, and it never reaches mail you cannot read. evaluation_scope is own_mailboxes unless you name author or selected (scope_selection names only what you can read). expectations are judged in expectations_check. kind do_not_share blocks sharing what it matches; a key cannot list it (details.reason rule_blocks_sharing). Needs mail:read, a member's own
|
|
22406
|
+
"description": "Saves a rule as version 1 from a compile response or a tree you wrote, checked against the column contract. It starts in observe (recorded, nothing granted or blocked) unless state is draft, or active for a do_not_share rule. You are its author, and it never reaches mail you cannot read. evaluation_scope is own_mailboxes unless you name author or selected (scope_selection names only what you can read). expectations are judged in expectations_check. kind do_not_share blocks sharing what it matches; a key cannot list it (details.reason rule_blocks_sharing). Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
|
|
22403
22407
|
"tags": ["Email Rules"],
|
|
22404
22408
|
"security": [{ "BearerAuth": [] }],
|
|
22405
22409
|
"requestBody": {
|
|
@@ -22448,7 +22452,7 @@ const openapiDocument = {
|
|
|
22448
22452
|
}
|
|
22449
22453
|
},
|
|
22450
22454
|
"403": {
|
|
22451
|
-
"description": "feature_not_enabled: the email rules feature
|
|
22455
|
+
"description": "feature_not_enabled: this organization lacks the email rules feature; permission refusals answer forbidden or grant_forbidden. email_rule_scope_not_readable: scope_selection names something you cannot read (details.addresses, details.domains).",
|
|
22452
22456
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
22453
22457
|
},
|
|
22454
22458
|
"409": {
|
|
@@ -22495,7 +22499,7 @@ const openapiDocument = {
|
|
|
22495
22499
|
"get": {
|
|
22496
22500
|
"operationId": "listEmailRules",
|
|
22497
22501
|
"summary": "List rules",
|
|
22498
|
-
"description": "The rules the caller can see, newest first: their own, or every member's rules for a caller who reads the whole organization's mail. Each carries its scope (evaluation_scope, and scope_selection for a selected rule) and current_version, but not the version's text: read that under current from GET /email-rules/{id}. With matched_email_id, only the rules that matched that email. Needs mail:read, a member's own
|
|
22502
|
+
"description": "The rules the caller can see, newest first: their own, or every member's rules for a caller who reads the whole organization's mail. Each carries its scope (evaluation_scope, and scope_selection for a selected rule) and current_version, but not the version's text: read that under current from GET /email-rules/{id}. With matched_email_id, only the rules that matched that email. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
|
|
22499
22503
|
"tags": ["Email Rules"],
|
|
22500
22504
|
"security": [{ "BearerAuth": [] }],
|
|
22501
22505
|
"parameters": [
|
|
@@ -22584,7 +22588,7 @@ const openapiDocument = {
|
|
|
22584
22588
|
}
|
|
22585
22589
|
},
|
|
22586
22590
|
"403": {
|
|
22587
|
-
"description": "feature_not_enabled: the email rules feature
|
|
22591
|
+
"description": "feature_not_enabled: this organization lacks the email rules feature; permission refusals answer forbidden or grant_forbidden. grant_forbidden with details.reason mail_depth: matched_email_id with access to mail that shows headers only, since which rules matched an email is read from what it says.",
|
|
22588
22592
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
22589
22593
|
},
|
|
22590
22594
|
"429": {
|
|
@@ -22618,7 +22622,7 @@ const openapiDocument = {
|
|
|
22618
22622
|
"get": {
|
|
22619
22623
|
"operationId": "getEmailRule",
|
|
22620
22624
|
"summary": "Read a rule",
|
|
22621
|
-
"description": "A rule, its scope (evaluation_scope, and scope_selection for a selected rule), its current version and its saved expectations. The current version's text (english, tree, explanation, assumptions, warnings) is under current, and current_version is its number. What the scope comes to for its author now is GET /email-rules/{id}/scope. The SQL the version renders to is included only when include_sql is true. Needs mail:read, a member's own
|
|
22625
|
+
"description": "A rule, its scope (evaluation_scope, and scope_selection for a selected rule), its current version and its saved expectations. The current version's text (english, tree, explanation, assumptions, warnings) is under current, and current_version is its number. What the scope comes to for its author now is GET /email-rules/{id}/scope. The SQL the version renders to is included only when include_sql is true. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
|
|
22622
22626
|
"tags": ["Email Rules"],
|
|
22623
22627
|
"security": [{ "BearerAuth": [] }],
|
|
22624
22628
|
"parameters": [{
|
|
@@ -22688,7 +22692,7 @@ const openapiDocument = {
|
|
|
22688
22692
|
}
|
|
22689
22693
|
},
|
|
22690
22694
|
"403": {
|
|
22691
|
-
"description": "feature_not_enabled: the email rules feature
|
|
22695
|
+
"description": "feature_not_enabled: this organization lacks the email rules feature; permission refusals answer forbidden or grant_forbidden. forbidden with details.reason covering_view_only (your dashboard session or the Primitive CLI only): you may read this rule only because it covers your mailbox; details.covering_view is where (getEmailRuleCoveringMe).",
|
|
22692
22696
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
22693
22697
|
},
|
|
22694
22698
|
"404": {
|
|
@@ -22733,7 +22737,7 @@ const openapiDocument = {
|
|
|
22733
22737
|
"patch": {
|
|
22734
22738
|
"operationId": "updateEmailRule",
|
|
22735
22739
|
"summary": "Change a rule",
|
|
22736
|
-
"description": "Renames the rule, saves a new version (english and tree together; earlier versions stay) or restores one (restore_version), changes its state (draft is off; observe; active), its scope (evaluation_scope, with scope_selection when selected) or its saved expectations (judged in expectations_check). Anyone but its author who sees it may only set state draft, and while it is shared only if they manage members from the dashboard. A scope change saves a new version; a shared rule keeps its scope, and a kind never changes. A saved version takes effect at once. if_version refuses a write once a version was saved since you read it; if_revision, once anything changed. Without if_expectations_pass a version is saved even when its expectations fail. Needs mail:read, a member's own
|
|
22740
|
+
"description": "Renames the rule, saves a new version (english and tree together; earlier versions stay) or restores one (restore_version), changes its state (draft is off; observe; active), its scope (evaluation_scope, with scope_selection when selected) or its saved expectations (judged in expectations_check). Anyone but its author who sees it may only set state draft, and while it is shared only if they manage members from the dashboard. A scope change saves a new version; a shared rule keeps its scope, and a kind never changes. A saved version takes effect at once. if_version refuses a write once a version was saved since you read it; if_revision, once anything changed. Without if_expectations_pass a version is saved even when its expectations fail, except on an active rule keys or webhooks read: that write is checked first unless if_expectations_pass is false. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
|
|
22737
22741
|
"tags": ["Email Rules"],
|
|
22738
22742
|
"security": [{ "BearerAuth": [] }],
|
|
22739
22743
|
"parameters": [{
|
|
@@ -22766,7 +22770,7 @@ const openapiDocument = {
|
|
|
22766
22770
|
}
|
|
22767
22771
|
},
|
|
22768
22772
|
"400": {
|
|
22769
|
-
"description": "validation_error: invalid body or tree (details.errors), too large (too_large), a version that no longer renders (version_not_renderable), restore_version names the current version (already_current),
|
|
22773
|
+
"description": "validation_error: invalid body or tree (details.errors), too large (too_large), a version that no longer renders (version_not_renderable), restore_version names the current version (already_current), over 20 made-up emails (too_many_expectation_samples), or a kind other than the rule's own (kind_mismatch). no_expectations: if_expectations_pass with no expectations to judge, or a write that removes them from an active rule keys or webhooks read; nothing was saved.",
|
|
22770
22774
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
22771
22775
|
},
|
|
22772
22776
|
"401": {
|
|
@@ -22789,7 +22793,7 @@ const openapiDocument = {
|
|
|
22789
22793
|
}
|
|
22790
22794
|
},
|
|
22791
22795
|
"403": {
|
|
22792
|
-
"description": "feature_not_enabled: the email rules feature
|
|
22796
|
+
"description": "feature_not_enabled: this organization lacks the email rules feature; permission refusals answer forbidden or grant_forbidden. email_rule_author_only: only the rule's author may make this change. forbidden (rule_shared): the rule is shared, so only its author or a member manager can turn it off. email_rule_scope_not_readable: scope_selection names something you cannot read. grant_forbidden (mail_depth): judging a write (if_expectations_pass, or by default) needs content access to mail when it judges emails by id.",
|
|
22793
22797
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
22794
22798
|
},
|
|
22795
22799
|
"404": {
|
|
@@ -22797,7 +22801,7 @@ const openapiDocument = {
|
|
|
22797
22801
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
22798
22802
|
},
|
|
22799
22803
|
"409": {
|
|
22800
|
-
"description": "email_rule_conflict: the rule changed (details.reason version_moved with current_version, revision_moved with current_revision, expectations_moved or
|
|
22804
|
+
"description": "email_rule_conflict: the rule changed (details.reason version_moved with current_version, revision_moved with current_revision, expectations_moved, rule_changed or readers_changed); read it again and retry. email_rule_scope_locked: the rule is shared. email_rule_author_unresolvable: the rule could not run as you over the chosen scope. expectations_failed, expectations_unreadable (details.unreadable) or expectations_undecided, with if_expectations_pass or by default on an active rule keys or webhooks read (details.read_by): nothing was saved; details carries current_version, state and expectations_check.",
|
|
22801
22805
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
22802
22806
|
},
|
|
22803
22807
|
"429": {
|
|
@@ -22822,6 +22826,10 @@ const openapiDocument = {
|
|
|
22822
22826
|
}
|
|
22823
22827
|
}
|
|
22824
22828
|
} }
|
|
22829
|
+
},
|
|
22830
|
+
"503": {
|
|
22831
|
+
"description": "service_unavailable (rule_keys_unread or rule_readers_unread): the keys or readers of an active rule could not be read in time; nothing was saved.",
|
|
22832
|
+
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
22825
22833
|
}
|
|
22826
22834
|
},
|
|
22827
22835
|
"x-primitive-permission": ["mail:read"]
|
|
@@ -22829,7 +22837,7 @@ const openapiDocument = {
|
|
|
22829
22837
|
"delete": {
|
|
22830
22838
|
"operationId": "deleteEmailRule",
|
|
22831
22839
|
"summary": "Delete a rule",
|
|
22832
|
-
"description": "Deletes a rule with its versions, its decisions and the access it granted. A share of it ends (end_reason rule_deleted), and the member who shared can still list what it handed over. The answer lists the shares it ended (ended_shares) and the unrevoked keys that still list it, which now read nothing through it (keys, other_keys; left out when they could not be read). The author or a reader of all the organization's mail may delete it; while it is shared, only the author or someone who manages members from the dashboard. Needs mail:read, a member's own
|
|
22840
|
+
"description": "Deletes a rule with its versions, its decisions and the access it granted. A share of it ends (end_reason rule_deleted), and the member who shared can still list what it handed over. The answer lists the shares it ended (ended_shares) and the unrevoked keys that still list it, which now read nothing through it (keys, other_keys; left out when they could not be read). The author or a reader of all the organization's mail may delete it; while it is shared, only the author or someone who manages members from the dashboard. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
|
|
22833
22841
|
"tags": ["Email Rules"],
|
|
22834
22842
|
"security": [{ "BearerAuth": [] }],
|
|
22835
22843
|
"parameters": [{
|
|
@@ -22877,7 +22885,7 @@ const openapiDocument = {
|
|
|
22877
22885
|
}
|
|
22878
22886
|
},
|
|
22879
22887
|
"403": {
|
|
22880
|
-
"description": "feature_not_enabled: the email rules feature
|
|
22888
|
+
"description": "feature_not_enabled: this organization lacks the email rules feature; permission refusals answer forbidden or grant_forbidden. forbidden with details.reason rule_shared: the rule is shared with another member.",
|
|
22881
22889
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
22882
22890
|
},
|
|
22883
22891
|
"404": {
|
|
@@ -22923,7 +22931,7 @@ const openapiDocument = {
|
|
|
22923
22931
|
"/email-rules/{id}/decisions": { "get": {
|
|
22924
22932
|
"operationId": "listEmailRuleDecisions",
|
|
22925
22933
|
"summary": "List a rule's decisions",
|
|
22926
|
-
"description": "What the rule decided for each email it was evaluated against, newest first: whether it matched, whether it nearly did, how each part decided and the answers to its questions, with which email it was (from_address, subject, received_at). Only decisions on emails the caller can read are listed. With matched, only matches (true) or only the rest (false). Needs mail:read, a member's own
|
|
22934
|
+
"description": "What the rule decided for each email it was evaluated against, newest first: whether it matched, whether it nearly did, how each part decided and the answers to its questions, with which email it was (from_address, subject, received_at). Only decisions on emails the caller can read are listed. With matched, only matches (true) or only the rest (false). Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
|
|
22927
22935
|
"tags": ["Email Rules"],
|
|
22928
22936
|
"security": [{ "BearerAuth": [] }],
|
|
22929
22937
|
"parameters": [
|
|
@@ -23022,7 +23030,7 @@ const openapiDocument = {
|
|
|
23022
23030
|
}
|
|
23023
23031
|
},
|
|
23024
23032
|
"403": {
|
|
23025
|
-
"description": "feature_not_enabled: the email rules feature
|
|
23033
|
+
"description": "feature_not_enabled: this organization lacks the email rules feature; permission refusals answer forbidden or grant_forbidden. grant_forbidden with details.reason mail_depth: your access to mail shows headers only, and what a rule decided is read from what emails say.",
|
|
23026
23034
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
23027
23035
|
},
|
|
23028
23036
|
"404": {
|
|
@@ -23067,7 +23075,7 @@ const openapiDocument = {
|
|
|
23067
23075
|
"/emails/{id}/rule-results": { "get": {
|
|
23068
23076
|
"operationId": "listEmailRuleResults",
|
|
23069
23077
|
"summary": "List every rule's result on an email",
|
|
23070
|
-
"description": "What each rule you can see decided about this email (matched, not matched, or not run), in the words of the deciding version. A do_not_share rule that matched it blocks sharing while active; earlier shares stay. Only a caller who can read the email gets an answer. classification is every fact the classifier read, as rule conditions read it. At most 50 rules are listed, results first; not_listed counts the rest. Another member's rule that decided on your own mail is listed read_only (dashboard and CLI only); hidden counts deciding rules you cannot see. Needs mail:read, a member's own
|
|
23078
|
+
"description": "What each rule you can see decided about this email (matched, not matched, or not run), in the words of the deciding version. A do_not_share rule that matched it blocks sharing while active; earlier shares stay. Only a caller who can read the email gets an answer. classification is every fact the classifier read, as rule conditions read it. At most 50 rules are listed, results first; not_listed counts the rest. Another member's rule that decided on your own mail is listed read_only (dashboard and CLI only), with who receives what it shares (receivers) while it covers you; hidden counts deciding rules you cannot see. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
|
|
23071
23079
|
"tags": ["Email Rules"],
|
|
23072
23080
|
"security": [{ "BearerAuth": [] }],
|
|
23073
23081
|
"parameters": [{
|
|
@@ -23115,7 +23123,7 @@ const openapiDocument = {
|
|
|
23115
23123
|
}
|
|
23116
23124
|
},
|
|
23117
23125
|
"403": {
|
|
23118
|
-
"description": "feature_not_enabled: the email rules feature
|
|
23126
|
+
"description": "feature_not_enabled: this organization lacks the email rules feature; permission refusals answer forbidden or grant_forbidden. grant_forbidden with details.reason mail_depth: your access to mail shows headers only, and what a rule decided is read from what the email says.",
|
|
23119
23127
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
23120
23128
|
},
|
|
23121
23129
|
"404": {
|
|
@@ -23151,7 +23159,7 @@ const openapiDocument = {
|
|
|
23151
23159
|
"/email-rules/{id}/versions": { "get": {
|
|
23152
23160
|
"operationId": "listEmailRuleVersions",
|
|
23153
23161
|
"summary": "Read versions of a rule",
|
|
23154
|
-
"description": "A rule's versions as they were written: what each one's conditions and questions were, so a decision can be read against the version that made it. Without versions, every version newest first, a page at a time (meta.cursor). With versions, only those named, oldest first; numbers that are not versions of the rule are left out. Needs mail:read, a member's own
|
|
23162
|
+
"description": "A rule's versions as they were written: what each one's conditions and questions were, so a decision can be read against the version that made it. Without versions, every version newest first, a page at a time (meta.cursor). With versions, only those named, oldest first; numbers that are not versions of the rule are left out. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
|
|
23155
23163
|
"tags": ["Email Rules"],
|
|
23156
23164
|
"security": [{ "BearerAuth": [] }],
|
|
23157
23165
|
"parameters": [
|
|
@@ -23252,7 +23260,7 @@ const openapiDocument = {
|
|
|
23252
23260
|
}
|
|
23253
23261
|
},
|
|
23254
23262
|
"403": {
|
|
23255
|
-
"description": "feature_not_enabled: the email rules feature
|
|
23263
|
+
"description": "feature_not_enabled: this organization lacks the email rules feature; permission refusals answer forbidden or grant_forbidden.",
|
|
23256
23264
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
23257
23265
|
},
|
|
23258
23266
|
"404": {
|
|
@@ -23297,7 +23305,7 @@ const openapiDocument = {
|
|
|
23297
23305
|
"/email-rules/{id}/scope": { "get": {
|
|
23298
23306
|
"operationId": "getEmailRuleScope",
|
|
23299
23307
|
"summary": "Read what a rule covers",
|
|
23300
|
-
"description": "Whose mail the rule runs over, and what that comes to now: a rule never reaches further than what its author can read when it runs, so what a selected rule names and its author can no longer read stops matching. Needs mail:read, a member's own
|
|
23308
|
+
"description": "Whose mail the rule runs over, and what that comes to now: a rule never reaches further than what its author can read when it runs, so what a selected rule names and its author can no longer read stops matching. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
|
|
23301
23309
|
"tags": ["Email Rules"],
|
|
23302
23310
|
"security": [{ "BearerAuth": [] }],
|
|
23303
23311
|
"parameters": [{
|
|
@@ -23345,7 +23353,7 @@ const openapiDocument = {
|
|
|
23345
23353
|
}
|
|
23346
23354
|
},
|
|
23347
23355
|
"403": {
|
|
23348
|
-
"description": "feature_not_enabled: the email rules feature
|
|
23356
|
+
"description": "feature_not_enabled: this organization lacks the email rules feature; permission refusals answer forbidden or grant_forbidden.",
|
|
23349
23357
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
23350
23358
|
},
|
|
23351
23359
|
"404": {
|
|
@@ -23381,7 +23389,7 @@ const openapiDocument = {
|
|
|
23381
23389
|
"/email-rule-scope-options": { "get": {
|
|
23382
23390
|
"operationId": "listEmailRuleScopeOptions",
|
|
23383
23391
|
"summary": "List what a rule can cover",
|
|
23384
|
-
"description": "How much the caller can read, and the inboxes and domains the caller can read, which is what they may name when a rule runs over selected inboxes and domains. For a caller who reads the whole organization, addresses lists the inboxes known as someone's (member addresses, members' verified work emails at the organization's domains, agents' addresses and inboxes with shared access), not every address that receives mail: may_name_unlisted says when an address that is not listed, such as an inbox nobody has claimed, may be named too. Needs mail:read, a member's own
|
|
23392
|
+
"description": "How much the caller can read, and the inboxes and domains the caller can read, which is what they may name when a rule runs over selected inboxes and domains. For a caller who reads the whole organization, addresses lists the inboxes known as someone's (member addresses, members' verified work emails at the organization's domains, agents' addresses and inboxes with shared access), not every address that receives mail: may_name_unlisted says when an address that is not listed, such as an inbox nobody has claimed, may be named too. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
|
|
23385
23393
|
"tags": ["Email Rules"],
|
|
23386
23394
|
"security": [{ "BearerAuth": [] }],
|
|
23387
23395
|
"parameters": [{
|
|
@@ -23443,7 +23451,7 @@ const openapiDocument = {
|
|
|
23443
23451
|
}
|
|
23444
23452
|
},
|
|
23445
23453
|
"403": {
|
|
23446
|
-
"description": "feature_not_enabled: the email rules feature
|
|
23454
|
+
"description": "feature_not_enabled: this organization lacks the email rules feature; permission refusals answer forbidden or grant_forbidden.",
|
|
23447
23455
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
23448
23456
|
},
|
|
23449
23457
|
"409": {
|
|
@@ -23480,7 +23488,7 @@ const openapiDocument = {
|
|
|
23480
23488
|
"post": {
|
|
23481
23489
|
"operationId": "createEmailRuleRequest",
|
|
23482
23490
|
"summary": "Ask a member for a rule",
|
|
23483
|
-
"description": "Asks another member of the organization for a rule over their own mail, from a compile response or a tree you wrote. Name them by user id, or by their member mailbox address, or by their verified work email if you can list members (at most 30 lookups by address an hour). Nothing is evaluated or shared until they accept, and they may change the rule first. A message (up to 500 characters, fixed once sent) tells them why you ask. At most 5 pending requests to one member and 50 in all. With members:read the answer says whether they can accept it under their role (target_can_accept, target_warning); POST /v1/email-rule-requests/target-check checks first. Needs mail:read, a member's own
|
|
23491
|
+
"description": "Asks another member of the organization for a rule over their own mail, from a compile response or a tree you wrote. Name them by user id, or by their member mailbox address, or by their verified work email if you can list members (at most 30 lookups by address an hour). Nothing is evaluated or shared until they accept, and they may change the rule first. A message (up to 500 characters, fixed once sent) tells them why you ask. At most 5 pending requests to one member and 50 in all. With members:read the answer says whether they can accept it under their role (target_can_accept, target_warning); POST /v1/email-rule-requests/target-check checks first. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
|
|
23484
23492
|
"tags": ["Email Rules"],
|
|
23485
23493
|
"security": [{ "BearerAuth": [] }],
|
|
23486
23494
|
"requestBody": {
|
|
@@ -23520,7 +23528,7 @@ const openapiDocument = {
|
|
|
23520
23528
|
}
|
|
23521
23529
|
},
|
|
23522
23530
|
"403": {
|
|
23523
|
-
"description": "feature_not_enabled: the email rules feature
|
|
23531
|
+
"description": "feature_not_enabled: this organization lacks the email rules feature; permission refusals answer forbidden or grant_forbidden.",
|
|
23524
23532
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
23525
23533
|
},
|
|
23526
23534
|
"404": {
|
|
@@ -23575,7 +23583,7 @@ const openapiDocument = {
|
|
|
23575
23583
|
"get": {
|
|
23576
23584
|
"operationId": "listEmailRuleRequests",
|
|
23577
23585
|
"summary": "List rule requests",
|
|
23578
|
-
"description": "Rule requests, newest first: those made to you (box incoming, the default), those you made (outgoing), or every one you can see (all). Pending ones by default; status decided lists accepted, declined and withdrawn ones, and any lists both. A request is visible to the member who made it, the member it was made to, and the organization's owners and admins. Needs mail:read, a member's own
|
|
23586
|
+
"description": "Rule requests, newest first: those made to you (box incoming, the default), those you made (outgoing), or every one you can see (all). Pending ones by default; status decided lists accepted, declined and withdrawn ones, and any lists both. A request is visible to the member who made it, the member it was made to, and the organization's owners and admins. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
|
|
23579
23587
|
"tags": ["Email Rules"],
|
|
23580
23588
|
"security": [{ "BearerAuth": [] }],
|
|
23581
23589
|
"parameters": [
|
|
@@ -23684,7 +23692,7 @@ const openapiDocument = {
|
|
|
23684
23692
|
}
|
|
23685
23693
|
},
|
|
23686
23694
|
"403": {
|
|
23687
|
-
"description": "feature_not_enabled: the email rules feature
|
|
23695
|
+
"description": "feature_not_enabled: this organization lacks the email rules feature; permission refusals answer forbidden or grant_forbidden.",
|
|
23688
23696
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
23689
23697
|
},
|
|
23690
23698
|
"429": {
|
|
@@ -23717,7 +23725,7 @@ const openapiDocument = {
|
|
|
23717
23725
|
"/email-rule-requests/target-check": { "post": {
|
|
23718
23726
|
"operationId": "checkEmailRuleRequestTarget",
|
|
23719
23727
|
"summary": "Check whether a member can accept a rule request",
|
|
23720
|
-
"description": "Says, before you ask, whether a member could accept a rule request now under their role, and if not, which permission their role lacks. Nothing is sent and nothing is recorded. Needs members:read, as listing members and their roles does. At most 60 checks an hour. Name them by user id, or by their member mailbox address or verified work email (counted with asking: at most 30 lookups by address an hour). Needs mail:read, a member's own
|
|
23728
|
+
"description": "Says, before you ask, whether a member could accept a rule request now under their role, and if not, which permission their role lacks. Nothing is sent and nothing is recorded. Needs members:read, as listing members and their roles does. At most 60 checks an hour. Name them by user id, or by their member mailbox address or verified work email (counted with asking: at most 30 lookups by address an hour). Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
|
|
23721
23729
|
"tags": ["Email Rules"],
|
|
23722
23730
|
"security": [{ "BearerAuth": [] }],
|
|
23723
23731
|
"requestBody": {
|
|
@@ -23763,7 +23771,7 @@ const openapiDocument = {
|
|
|
23763
23771
|
}
|
|
23764
23772
|
},
|
|
23765
23773
|
"403": {
|
|
23766
|
-
"description": "feature_not_enabled: the email rules feature
|
|
23774
|
+
"description": "feature_not_enabled: this organization lacks the email rules feature; permission refusals answer forbidden or grant_forbidden. grant_forbidden with details.permission members:read: you cannot list members and their roles.",
|
|
23767
23775
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
23768
23776
|
},
|
|
23769
23777
|
"404": {
|
|
@@ -23815,7 +23823,7 @@ const openapiDocument = {
|
|
|
23815
23823
|
"get": {
|
|
23816
23824
|
"operationId": "getEmailRuleRequest",
|
|
23817
23825
|
"summary": "Read a rule request",
|
|
23818
|
-
"description": "A rule request: the rule as proposed, who made it and to whom, and whether each of them is still a member. A request is visible to the member who made it, the member it was made to, and the organization's owners and admins. If you are the member asked, you can try the rule as proposed before answering: pass the request's tree to POST /v1/email-rules/test to test it on mail you have received. To try it on an email that has not arrived, pass the request's tree to POST /v1/email-rules/test-sample with one you make up, or have look-alikes written (POST /v1/email-rules/look-alikes with request_id); neither stores anything. Needs mail:read, a member's own
|
|
23826
|
+
"description": "A rule request: the rule as proposed, who made it and to whom, and whether each of them is still a member. A request is visible to the member who made it, the member it was made to, and the organization's owners and admins. If you are the member asked, you can try the rule as proposed before answering: pass the request's tree to POST /v1/email-rules/test to test it on mail you have received. To try it on an email that has not arrived, pass the request's tree to POST /v1/email-rules/test-sample with one you make up, or have look-alikes written (POST /v1/email-rules/look-alikes with request_id); neither stores anything. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
|
|
23819
23827
|
"tags": ["Email Rules"],
|
|
23820
23828
|
"security": [{ "BearerAuth": [] }],
|
|
23821
23829
|
"parameters": [{
|
|
@@ -23863,7 +23871,7 @@ const openapiDocument = {
|
|
|
23863
23871
|
}
|
|
23864
23872
|
},
|
|
23865
23873
|
"403": {
|
|
23866
|
-
"description": "feature_not_enabled: the email rules feature
|
|
23874
|
+
"description": "feature_not_enabled: this organization lacks the email rules feature; permission refusals answer forbidden or grant_forbidden.",
|
|
23867
23875
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
23868
23876
|
},
|
|
23869
23877
|
"404": {
|
|
@@ -23899,7 +23907,7 @@ const openapiDocument = {
|
|
|
23899
23907
|
"delete": {
|
|
23900
23908
|
"operationId": "deleteEmailRuleRequest",
|
|
23901
23909
|
"summary": "Delete a withdrawn rule request",
|
|
23902
|
-
"description": "Deletes a request you withdrew, for everyone who could see it. Needs mail:read, a member's own
|
|
23910
|
+
"description": "Deletes a request you withdrew, for everyone who could see it. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
|
|
23903
23911
|
"tags": ["Email Rules"],
|
|
23904
23912
|
"security": [{ "BearerAuth": [] }],
|
|
23905
23913
|
"parameters": [{
|
|
@@ -23947,7 +23955,7 @@ const openapiDocument = {
|
|
|
23947
23955
|
}
|
|
23948
23956
|
},
|
|
23949
23957
|
"403": {
|
|
23950
|
-
"description": "feature_not_enabled: the email rules feature
|
|
23958
|
+
"description": "feature_not_enabled: this organization lacks the email rules feature; permission refusals answer forbidden or grant_forbidden. email_rule_request_proposer_only: only the member who made the request may delete it.",
|
|
23951
23959
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
23952
23960
|
},
|
|
23953
23961
|
"404": {
|
|
@@ -23988,7 +23996,7 @@ const openapiDocument = {
|
|
|
23988
23996
|
"/email-rule-requests/{id}/decline": { "post": {
|
|
23989
23997
|
"operationId": "declineEmailRuleRequest",
|
|
23990
23998
|
"summary": "Decline a rule request",
|
|
23991
|
-
"description": "Declines a pending request made to you. Nothing is written but the decision and, if you give one, its reason (reason, up to 500 characters), which the member who asked sees with the request. Needs mail:read, a member's own
|
|
23999
|
+
"description": "Declines a pending request made to you. Nothing is written but the decision and, if you give one, its reason (reason, up to 500 characters), which the member who asked sees with the request. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
|
|
23992
24000
|
"tags": ["Email Rules"],
|
|
23993
24001
|
"security": [{ "BearerAuth": [] }],
|
|
23994
24002
|
"parameters": [{
|
|
@@ -24054,7 +24062,7 @@ const openapiDocument = {
|
|
|
24054
24062
|
}
|
|
24055
24063
|
},
|
|
24056
24064
|
"403": {
|
|
24057
|
-
"description": "feature_not_enabled: the email rules feature
|
|
24065
|
+
"description": "feature_not_enabled: this organization lacks the email rules feature; permission refusals answer forbidden or grant_forbidden. email_rule_request_target_only: only the member the request was made to may decline it.",
|
|
24058
24066
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
24059
24067
|
},
|
|
24060
24068
|
"404": {
|
|
@@ -24094,7 +24102,7 @@ const openapiDocument = {
|
|
|
24094
24102
|
"/email-rule-requests/{id}/withdraw": { "post": {
|
|
24095
24103
|
"operationId": "withdrawEmailRuleRequest",
|
|
24096
24104
|
"summary": "Withdraw a rule request",
|
|
24097
|
-
"description": "Withdraws a pending request you made. Needs mail:read, a member's own
|
|
24105
|
+
"description": "Withdraws a pending request you made. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
|
|
24098
24106
|
"tags": ["Email Rules"],
|
|
24099
24107
|
"security": [{ "BearerAuth": [] }],
|
|
24100
24108
|
"parameters": [{
|
|
@@ -24152,7 +24160,7 @@ const openapiDocument = {
|
|
|
24152
24160
|
}
|
|
24153
24161
|
},
|
|
24154
24162
|
"403": {
|
|
24155
|
-
"description": "feature_not_enabled: the email rules feature
|
|
24163
|
+
"description": "feature_not_enabled: this organization lacks the email rules feature; permission refusals answer forbidden or grant_forbidden. email_rule_request_proposer_only: only the member who made the request may withdraw it.",
|
|
24156
24164
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
24157
24165
|
},
|
|
24158
24166
|
"404": {
|
|
@@ -24192,7 +24200,7 @@ const openapiDocument = {
|
|
|
24192
24200
|
"/email-rule-requests/{id}/accept": { "post": {
|
|
24193
24201
|
"operationId": "acceptEmailRuleRequest",
|
|
24194
24202
|
"summary": "Accept a rule request",
|
|
24195
|
-
"description": "Writes the rule as yours, over your own mailboxes only, turns it on, and shares what it matches from now on with the member who asked: each email in full with its attachments, but never raw. It does not go back through mail already received. Send no body to accept it as asked, or change it first with english and tree together (and an explanation, or the server writes one). Because this gives your mail to someone else, it is limited to the dashboard and the Primitive CLI: other OAuth apps and agent tokens are refused. Before accepting, test it on your mail: pass the request's tree to POST /v1/email-rules/test. To try it on an email that has not arrived, pass the request's tree to POST /v1/email-rules/test-sample with one you make up, or have look-alikes written (POST /v1/email-rules/look-alikes with request_id); neither stores anything. expectation_samples are kept on the rule it writes. Accepting also needs mail:share_own. Needs mail:read, a member's own
|
|
24203
|
+
"description": "Writes the rule as yours, over your own mailboxes only, turns it on, and shares what it matches from now on with the member who asked: each email in full with its attachments, but never raw. It does not go back through mail already received. Send no body to accept it as asked, or change it first with english and tree together (and an explanation, or the server writes one). Because this gives your mail to someone else, it is limited to the dashboard and the Primitive CLI: other OAuth apps and agent tokens are refused. Before accepting, test it on your mail: pass the request's tree to POST /v1/email-rules/test. To try it on an email that has not arrived, pass the request's tree to POST /v1/email-rules/test-sample with one you make up, or have look-alikes written (POST /v1/email-rules/look-alikes with request_id); neither stores anything. expectation_samples are kept on the rule it writes. Accepting also needs mail:share_own. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
|
|
24196
24204
|
"tags": ["Email Rules"],
|
|
24197
24205
|
"security": [{ "BearerAuth": [] }],
|
|
24198
24206
|
"parameters": [{
|
|
@@ -24252,7 +24260,7 @@ const openapiDocument = {
|
|
|
24252
24260
|
}
|
|
24253
24261
|
},
|
|
24254
24262
|
"403": {
|
|
24255
|
-
"description": "feature_not_enabled: the email rules feature
|
|
24263
|
+
"description": "feature_not_enabled: this organization lacks the email rules feature; permission refusals answer forbidden or grant_forbidden. email_rule_request_target_only: only the member the request was made to may accept it. forbidden with details.reason first_party_required: accepted from another OAuth app or with an agent token. grant_forbidden with details.permission mail:share_own: the caller's role does not let them share their own mail through email rules.",
|
|
24256
24264
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
24257
24265
|
},
|
|
24258
24266
|
"404": {
|
|
@@ -24296,7 +24304,7 @@ const openapiDocument = {
|
|
|
24296
24304
|
"/email-rule-shares": { "get": {
|
|
24297
24305
|
"operationId": "listEmailRuleShares",
|
|
24298
24306
|
"summary": "List rule shares",
|
|
24299
|
-
"description": "Lists rules shared with you, rules you share, or every share you can see. A share is visible to its two people and the organization's owners and admins. Needs mail:read, a member's own
|
|
24307
|
+
"description": "Lists rules shared with you, rules you share, or every share you can see. A share is visible to its two people and the organization's owners and admins. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
|
|
24300
24308
|
"tags": ["Email Rules"],
|
|
24301
24309
|
"security": [{ "BearerAuth": [] }],
|
|
24302
24310
|
"parameters": [
|
|
@@ -24397,7 +24405,7 @@ const openapiDocument = {
|
|
|
24397
24405
|
}
|
|
24398
24406
|
},
|
|
24399
24407
|
"403": {
|
|
24400
|
-
"description": "feature_not_enabled: the email rules feature
|
|
24408
|
+
"description": "feature_not_enabled: this organization lacks the email rules feature; permission refusals answer forbidden or grant_forbidden.",
|
|
24401
24409
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
24402
24410
|
},
|
|
24403
24411
|
"429": {
|
|
@@ -24546,7 +24554,7 @@ const openapiDocument = {
|
|
|
24546
24554
|
"get": {
|
|
24547
24555
|
"operationId": "getEmailRuleShare",
|
|
24548
24556
|
"summary": "Get a rule share",
|
|
24549
|
-
"description": "One share. Needs mail:read, a member's own
|
|
24557
|
+
"description": "One share. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).",
|
|
24550
24558
|
"tags": ["Email Rules"],
|
|
24551
24559
|
"security": [{ "BearerAuth": [] }],
|
|
24552
24560
|
"parameters": [{
|
|
@@ -24594,7 +24602,7 @@ const openapiDocument = {
|
|
|
24594
24602
|
}
|
|
24595
24603
|
},
|
|
24596
24604
|
"403": {
|
|
24597
|
-
"description": "feature_not_enabled: the email rules feature
|
|
24605
|
+
"description": "feature_not_enabled: this organization lacks the email rules feature; permission refusals answer forbidden or grant_forbidden.",
|
|
24598
24606
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
24599
24607
|
},
|
|
24600
24608
|
"404": {
|
|
@@ -24841,7 +24849,7 @@ const openapiDocument = {
|
|
|
24841
24849
|
"/email-rules/covering-me": { "get": {
|
|
24842
24850
|
"operationId": "listEmailRulesCoveringMe",
|
|
24843
24851
|
"summary": "List the rules over your mail",
|
|
24844
|
-
"description": "Every email rule that covers one of your own mailboxes now, yours included, newest first, in any state. A rule covers you when the scope it runs with now reaches one of your own mailboxes (your member mailbox, or a personal agent's address): one whose author reads all your mail (author scope, for an author who reads the organization's mail or holds an access entry for your mailbox), or one that names your mailbox or its domain (selected). Another member's own_mailboxes rule never covers you. You see its name, wording, current tree, state, kind and author, and which of your own mailboxes it reaches. Its wording and tree are shown as written, so they can name other addresses (a condition on who an email is from or to).
|
|
24852
|
+
"description": "Every email rule that covers one of your own mailboxes now, yours included, newest first, in any state. A rule covers you when the scope it runs with now reaches one of your own mailboxes (your member mailbox, or a personal agent's address): one whose author reads all your mail (author scope, for an author who reads the organization's mail or holds an access entry for your mailbox), or one that names your mailbox or its domain (selected). Another member's own_mailboxes rule never covers you. You see its name, wording, current tree, state, kind and author, and which of your own mailboxes it reaches. Its wording and tree are shown as written, so they can name other addresses (a condition on who an email is from or to). While it covers you, you also see who receives what it matches (receivers): how many API keys, webhooks and shares, the member each belongs to (or the organization), and the sites the webhooks deliver to. You do not see which keys, webhooks or shares they are (no ids, names, prefixes, or URLs beyond the site), the other inboxes and domains its scope names, or its saved expectations. A page can hold fewer rules than limit, or none, and still carry a cursor (one request reads a bounded number of rules): keep reading until meta.cursor is null. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token). Only on your own dashboard session or the Primitive CLI.",
|
|
24845
24853
|
"tags": ["Email Rule Oversight"],
|
|
24846
24854
|
"security": [{ "BearerAuth": [] }],
|
|
24847
24855
|
"parameters": [{
|
|
@@ -24907,7 +24915,7 @@ const openapiDocument = {
|
|
|
24907
24915
|
}
|
|
24908
24916
|
},
|
|
24909
24917
|
"403": {
|
|
24910
|
-
"description": "feature_not_enabled: the email rules feature
|
|
24918
|
+
"description": "feature_not_enabled: this organization lacks the email rules feature; permission refusals answer forbidden or grant_forbidden; details.reason first_party_required means this credential is not your dashboard session or the Primitive CLI.",
|
|
24911
24919
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
24912
24920
|
},
|
|
24913
24921
|
"429": {
|
|
@@ -24939,7 +24947,7 @@ const openapiDocument = {
|
|
|
24939
24947
|
"/email-rules/covering-me/{id}": { "get": {
|
|
24940
24948
|
"operationId": "getEmailRuleCoveringMe",
|
|
24941
24949
|
"summary": "Get a rule over your mail",
|
|
24942
|
-
"description": "One rule that covers one of your own mailboxes, read-only, with its current version; or one that no longer does but decided on mail at your own mailbox (covers_now false), shown as the version that last decided on your mail, without its current name. You see its name, wording, current tree, state, kind and author, and which of your own mailboxes it reaches. Its wording and tree are shown as written, so they can name other addresses (a condition on who an email is from or to).
|
|
24950
|
+
"description": "One rule that covers one of your own mailboxes, read-only, with its current version; or one that no longer does but decided on mail at your own mailbox (covers_now false), shown as the version that last decided on your mail, without its current name. You see its name, wording, current tree, state, kind and author, and which of your own mailboxes it reaches. Its wording and tree are shown as written, so they can name other addresses (a condition on who an email is from or to). While it covers you, you also see who receives what it matches (receivers): how many API keys, webhooks and shares, the member each belongs to (or the organization), and the sites the webhooks deliver to. You do not see which keys, webhooks or shares they are (no ids, names, prefixes, or URLs beyond the site), the other inboxes and domains its scope names, or its saved expectations. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token). Only on your own dashboard session or the Primitive CLI.",
|
|
24943
24951
|
"tags": ["Email Rule Oversight"],
|
|
24944
24952
|
"security": [{ "BearerAuth": [] }],
|
|
24945
24953
|
"parameters": [{
|
|
@@ -24987,7 +24995,7 @@ const openapiDocument = {
|
|
|
24987
24995
|
}
|
|
24988
24996
|
},
|
|
24989
24997
|
"403": {
|
|
24990
|
-
"description": "feature_not_enabled: the email rules feature
|
|
24998
|
+
"description": "feature_not_enabled: this organization lacks the email rules feature; permission refusals answer forbidden or grant_forbidden; details.reason first_party_required means this credential is not your dashboard session or the Primitive CLI.",
|
|
24991
24999
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
24992
25000
|
},
|
|
24993
25001
|
"404": {
|
|
@@ -25023,7 +25031,7 @@ const openapiDocument = {
|
|
|
25023
25031
|
"/email-rules/covering-me/{id}/decisions": { "get": {
|
|
25024
25032
|
"operationId": "listEmailRuleDecisionsOnMyMail",
|
|
25025
25033
|
"summary": "List what a rule decided about your mail",
|
|
25026
|
-
"description": "What a rule that covers your mailboxes, or decided on your mail, decided about mail at your own mailboxes, newest first: never about anyone else's mail. Each decision is in the words of the version that made it, which can be earlier than the current one: the questions it asked about that email (question_answers) and the columns its conditions read (parts). Needs mail:read, a member's own
|
|
25034
|
+
"description": "What a rule that covers your mailboxes, or decided on your mail, decided about mail at your own mailboxes, newest first: never about anyone else's mail. Each decision is in the words of the version that made it, which can be earlier than the current one: the questions it asked about that email (question_answers) and the columns its conditions read (parts). Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token). Only on your own dashboard session or the Primitive CLI.",
|
|
25027
25035
|
"tags": ["Email Rule Oversight"],
|
|
25028
25036
|
"security": [{ "BearerAuth": [] }],
|
|
25029
25037
|
"parameters": [
|
|
@@ -25113,7 +25121,7 @@ const openapiDocument = {
|
|
|
25113
25121
|
}
|
|
25114
25122
|
},
|
|
25115
25123
|
"403": {
|
|
25116
|
-
"description": "feature_not_enabled: the email rules feature
|
|
25124
|
+
"description": "feature_not_enabled: this organization lacks the email rules feature; permission refusals answer forbidden or grant_forbidden; details.reason first_party_required means this credential is not your dashboard session or the Primitive CLI. grant_forbidden with details.reason mail_depth: your access to mail shows headers only, and what a rule decided is read from what emails say.",
|
|
25117
25125
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
25118
25126
|
},
|
|
25119
25127
|
"404": {
|
|
@@ -25150,7 +25158,7 @@ const openapiDocument = {
|
|
|
25150
25158
|
"post": {
|
|
25151
25159
|
"operationId": "createEmailRuleObjection",
|
|
25152
25160
|
"summary": "Object to a rule over your mail",
|
|
25153
|
-
"description": "Asks the author of a rule that covers one of your own mailboxes now to turn it off. Only a rule that covers you now: one you see only because it once decided on your mail cannot be objected to. An objection is seen by the member who made it, the rule's author and the organization's owners and admins. It stays pending until the rule's author accepts it, turning the rule off, or declines it, or the member who made it withdraws it, which clears its message. It never changes after that. You may have one pending objection per rule and 50 in all, and object to the same rule again only 10 minutes after you last did, whatever became of it. Needs mail:read, a member's own
|
|
25161
|
+
"description": "Asks the author of a rule that covers one of your own mailboxes now to turn it off. Only a rule that covers you now: one you see only because it once decided on your mail cannot be objected to. An objection is seen by the member who made it, the rule's author and the organization's owners and admins. It stays pending until the rule's author accepts it, turning the rule off, or declines it, or the member who made it withdraws it, which clears its message. It never changes after that. You may have one pending objection per rule and 50 in all, and object to the same rule again only 10 minutes after you last did, whatever became of it. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token). Only on your own dashboard session or the Primitive CLI.",
|
|
25154
25162
|
"tags": ["Email Rule Oversight"],
|
|
25155
25163
|
"security": [{ "BearerAuth": [] }],
|
|
25156
25164
|
"requestBody": {
|
|
@@ -25196,7 +25204,7 @@ const openapiDocument = {
|
|
|
25196
25204
|
}
|
|
25197
25205
|
},
|
|
25198
25206
|
"403": {
|
|
25199
|
-
"description": "feature_not_enabled: the email rules feature
|
|
25207
|
+
"description": "feature_not_enabled: this organization lacks the email rules feature; permission refusals answer forbidden or grant_forbidden; details.reason first_party_required means this credential is not your dashboard session or the Primitive CLI.",
|
|
25200
25208
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
25201
25209
|
},
|
|
25202
25210
|
"404": {
|
|
@@ -25251,7 +25259,7 @@ const openapiDocument = {
|
|
|
25251
25259
|
"get": {
|
|
25252
25260
|
"operationId": "listEmailRuleObjections",
|
|
25253
25261
|
"summary": "List objections",
|
|
25254
|
-
"description": "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
|
|
25262
|
+
"description": "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.",
|
|
25255
25263
|
"tags": ["Email Rule Oversight"],
|
|
25256
25264
|
"security": [{ "BearerAuth": [] }],
|
|
25257
25265
|
"parameters": [
|
|
@@ -25351,7 +25359,7 @@ const openapiDocument = {
|
|
|
25351
25359
|
}
|
|
25352
25360
|
},
|
|
25353
25361
|
"403": {
|
|
25354
|
-
"description": "feature_not_enabled: the email rules feature
|
|
25362
|
+
"description": "feature_not_enabled: this organization lacks the email rules feature; permission refusals answer forbidden or grant_forbidden; details.reason first_party_required means this credential is not your dashboard session or the Primitive CLI.",
|
|
25355
25363
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
25356
25364
|
},
|
|
25357
25365
|
"429": {
|
|
@@ -25384,7 +25392,7 @@ const openapiDocument = {
|
|
|
25384
25392
|
"/email-rule-objections/{id}": { "get": {
|
|
25385
25393
|
"operationId": "getEmailRuleObjection",
|
|
25386
25394
|
"summary": "Get an objection",
|
|
25387
|
-
"description": "One objection you can see. An objection is seen by the member who made it, the rule's author and the organization's owners and admins. It stays pending until the rule's author accepts it, turning the rule off, or declines it, or the member who made it withdraws it, which clears its message. It never changes after that. Needs mail:read, a member's own
|
|
25395
|
+
"description": "One objection you can see. An objection is seen by the member who made it, the rule's author and the organization's owners and admins. It stays pending until the rule's author accepts it, turning the rule off, or declines it, or the member who made it withdraws it, which clears its message. It never changes after that. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token). Only on your own dashboard session or the Primitive CLI.",
|
|
25388
25396
|
"tags": ["Email Rule Oversight"],
|
|
25389
25397
|
"security": [{ "BearerAuth": [] }],
|
|
25390
25398
|
"parameters": [{
|
|
@@ -25432,7 +25440,7 @@ const openapiDocument = {
|
|
|
25432
25440
|
}
|
|
25433
25441
|
},
|
|
25434
25442
|
"403": {
|
|
25435
|
-
"description": "feature_not_enabled: the email rules feature
|
|
25443
|
+
"description": "feature_not_enabled: this organization lacks the email rules feature; permission refusals answer forbidden or grant_forbidden; details.reason first_party_required means this credential is not your dashboard session or the Primitive CLI.",
|
|
25436
25444
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
25437
25445
|
},
|
|
25438
25446
|
"404": {
|
|
@@ -25468,7 +25476,7 @@ const openapiDocument = {
|
|
|
25468
25476
|
"/email-rule-objections/{id}/withdraw": { "post": {
|
|
25469
25477
|
"operationId": "withdrawEmailRuleObjection",
|
|
25470
25478
|
"summary": "Withdraw an objection",
|
|
25471
|
-
"description": "Withdraws a pending objection you made, and clears its message. Needs mail:read, a member's own
|
|
25479
|
+
"description": "Withdraws a pending objection you made, and clears its message. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token). Only on your own dashboard session or the Primitive CLI.",
|
|
25472
25480
|
"tags": ["Email Rule Oversight"],
|
|
25473
25481
|
"security": [{ "BearerAuth": [] }],
|
|
25474
25482
|
"parameters": [{
|
|
@@ -25526,7 +25534,7 @@ const openapiDocument = {
|
|
|
25526
25534
|
}
|
|
25527
25535
|
},
|
|
25528
25536
|
"403": {
|
|
25529
|
-
"description": "feature_not_enabled: the email rules feature
|
|
25537
|
+
"description": "feature_not_enabled: this organization lacks the email rules feature; permission refusals answer forbidden or grant_forbidden; details.reason first_party_required means this credential is not your dashboard session or the Primitive CLI. forbidden with details.reason objector_only: only the member who made it can withdraw it.",
|
|
25530
25538
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
25531
25539
|
},
|
|
25532
25540
|
"404": {
|
|
@@ -25566,7 +25574,7 @@ const openapiDocument = {
|
|
|
25566
25574
|
"/email-rule-objections/{id}/decline": { "post": {
|
|
25567
25575
|
"operationId": "declineEmailRuleObjection",
|
|
25568
25576
|
"summary": "Decline an objection to your rule",
|
|
25569
|
-
"description": "Declines a pending objection to a rule you wrote, optionally saying why; the rule stays as it is. Needs mail:read, a member's own
|
|
25577
|
+
"description": "Declines a pending objection to a rule you wrote, optionally saying why; the rule stays as it is. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token). Only on your own dashboard session or the Primitive CLI.",
|
|
25570
25578
|
"tags": ["Email Rule Oversight"],
|
|
25571
25579
|
"security": [{ "BearerAuth": [] }],
|
|
25572
25580
|
"parameters": [{
|
|
@@ -25641,7 +25649,7 @@ const openapiDocument = {
|
|
|
25641
25649
|
}
|
|
25642
25650
|
},
|
|
25643
25651
|
"403": {
|
|
25644
|
-
"description": "feature_not_enabled: the email rules feature
|
|
25652
|
+
"description": "feature_not_enabled: this organization lacks the email rules feature; permission refusals answer forbidden or grant_forbidden; details.reason first_party_required means this credential is not your dashboard session or the Primitive CLI. forbidden with details.reason author_only: only the rule's author can decline it.",
|
|
25645
25653
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
25646
25654
|
},
|
|
25647
25655
|
"404": {
|
|
@@ -25681,7 +25689,7 @@ const openapiDocument = {
|
|
|
25681
25689
|
"/email-rule-objections/{id}/accept": { "post": {
|
|
25682
25690
|
"operationId": "acceptEmailRuleObjection",
|
|
25683
25691
|
"summary": "Accept an objection to your rule",
|
|
25684
|
-
"description": "Accepts a pending objection to a rule you wrote: turns the rule off (state draft), as updating it would, and records the objection accepted, together. You can turn the rule on again later. Needs mail:read, a member's own
|
|
25692
|
+
"description": "Accepts a pending objection to a rule you wrote: turns the rule off (state draft), as updating it would, and records the objection accepted, together. You can turn the rule on again later. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token). Only on your own dashboard session or the Primitive CLI.",
|
|
25685
25693
|
"tags": ["Email Rule Oversight"],
|
|
25686
25694
|
"security": [{ "BearerAuth": [] }],
|
|
25687
25695
|
"parameters": [{
|
|
@@ -25739,7 +25747,7 @@ const openapiDocument = {
|
|
|
25739
25747
|
}
|
|
25740
25748
|
},
|
|
25741
25749
|
"403": {
|
|
25742
|
-
"description": "feature_not_enabled: the email rules feature
|
|
25750
|
+
"description": "feature_not_enabled: this organization lacks the email rules feature; permission refusals answer forbidden or grant_forbidden; details.reason first_party_required means this credential is not your dashboard session or the Primitive CLI. forbidden with details.reason author_only: only the rule's author can accept it.",
|
|
25743
25751
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
25744
25752
|
},
|
|
25745
25753
|
"404": {
|
|
@@ -34308,7 +34316,7 @@ const openapiDocument = {
|
|
|
34308
34316
|
"summary": "List API keys",
|
|
34309
34317
|
"tags": ["Credentials"],
|
|
34310
34318
|
"security": [{ "BearerAuth": [] }],
|
|
34311
|
-
"description": "Key metadata, never a secret: name, prefix, grant, creator, last use, expiry, suspension and whether each key works now (status). Revoked keys are left out unless include_revoked is true, which lists them too with status revoked, revoked_at and revoked_by, under the same access rules as keys that work. A grant's mail_scope.depth is raw only when the key holds mail.raw:read and its scope lists an address or a domain, otherwise content. A rule the key lists that reads nothing any more (a deleted rule, or a share that ended) is listed under grant.mail_scope.ended_rules, each with its id and reason (rule_deleted or share_ended), and not under rules. The person needs access to the whole organization's mail. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature. Contact Primitive to turn them on.\n\nPerson only: a dashboard session or the person's own Primitive CLI token; no other OAuth app. The person's role must hold keys:read. API keys, agent connection keys and agents are refused.",
|
|
34319
|
+
"description": "Key metadata, never a secret: name, prefix, grant, creator, last use, expiry, suspension and whether each key works now (status). Revoked keys are left out unless include_revoked is true, which lists them too with status revoked, revoked_at and revoked_by, under the same access rules as keys that work. A grant's mail_scope.depth is raw only when the key holds mail.raw:read and its scope lists an address or a domain, otherwise content. A rule the key lists that reads nothing any more (a deleted rule, or a share that ended) is listed under grant.mail_scope.ended_rules, each with its id and reason (rule_deleted or share_ended), and not under rules. grant.mail_scope.rule_versions gives each rule it lists directly its current_version, state and version_saved_at. The person needs access to the whole organization's mail. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature. Contact Primitive to turn them on.\n\nPerson only: a dashboard session or the person's own Primitive CLI token; no other OAuth app. The person's role must hold keys:read. API keys, agent connection keys and agents are refused.",
|
|
34312
34320
|
"x-primitive-person-only": { "access": "session_or_cli" },
|
|
34313
34321
|
"parameters": [{
|
|
34314
34322
|
"name": "cursor",
|
|
@@ -34759,7 +34767,7 @@ const openapiDocument = {
|
|
|
34759
34767
|
"summary": "Get an API key",
|
|
34760
34768
|
"tags": ["Credentials"],
|
|
34761
34769
|
"security": [{ "BearerAuth": [] }],
|
|
34762
|
-
"description": "One key's metadata, never its secret, with whether it works now (status). A revoked key whose record is kept is answered too, with status revoked, revoked_at and revoked_by, under the same access rules as a key that works: one the caller may not read is 404, revoked or not. Its grant's mail_scope.depth is raw only when the key holds mail.raw:read and its scope lists an address or a domain, otherwise content. A rule the key lists that reads nothing any more (a deleted rule, or a share that ended) is listed under grant.mail_scope.ended_rules, each with its id and reason (rule_deleted or share_ended), and not under rules. The person needs access to the whole organization's mail. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature. Contact Primitive to turn them on.\n\nPerson only: a dashboard session or the person's own Primitive CLI token; no other OAuth app. The person's role must hold keys:read. API keys, agent connection keys and agents are refused.",
|
|
34770
|
+
"description": "One key's metadata, never its secret, with whether it works now (status). A revoked key whose record is kept is answered too, with status revoked, revoked_at and revoked_by, under the same access rules as a key that works: one the caller may not read is 404, revoked or not. Its grant's mail_scope.depth is raw only when the key holds mail.raw:read and its scope lists an address or a domain, otherwise content. A rule the key lists that reads nothing any more (a deleted rule, or a share that ended) is listed under grant.mail_scope.ended_rules, each with its id and reason (rule_deleted or share_ended), and not under rules. grant.mail_scope.rule_versions gives each rule it lists directly its current_version, state and version_saved_at. The person needs access to the whole organization's mail. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature. Contact Primitive to turn them on.\n\nPerson only: a dashboard session or the person's own Primitive CLI token; no other OAuth app. The person's role must hold keys:read. API keys, agent connection keys and agents are refused.",
|
|
34763
34771
|
"x-primitive-person-only": { "access": "session_or_cli" },
|
|
34764
34772
|
"parameters": [{
|
|
34765
34773
|
"name": "id",
|
|
@@ -37496,7 +37504,7 @@ const openapiDocument = {
|
|
|
37496
37504
|
"get": {
|
|
37497
37505
|
"operationId": "getRelayAutoJoin",
|
|
37498
37506
|
"summary": "Get the auto-join setting",
|
|
37499
|
-
"description": "Whether someone who proves an address on the organization's mail relay domain with Google Workspace joins automatically
|
|
37507
|
+
"description": "Whether someone who proves an address on the organization's mail relay domain with Google Workspace joins automatically. Auto-joined people have no mail access until an owner or admin assigns a role. `option` is null when auto-join is off and an invitation is required; legacy mail-grant settings read as `no_access`. `options` lists the choices. Answers 404 `feature_disabled` unless the organization has mail relay.",
|
|
37500
37508
|
"tags": ["Roles and members"],
|
|
37501
37509
|
"security": [{ "BearerAuth": [] }],
|
|
37502
37510
|
"responses": {
|
|
@@ -37583,7 +37591,7 @@ const openapiDocument = {
|
|
|
37583
37591
|
"put": {
|
|
37584
37592
|
"operationId": "setRelayAutoJoin",
|
|
37585
37593
|
"summary": "Change the auto-join setting",
|
|
37586
|
-
"description": "`option` is a choice's id from the GET, or null to require an invitation (turning it off needs only members:manage). Choosing an option answers 404 `feature_disabled` unless the organization has mail relay, 400 `validation_error` for an id
|
|
37594
|
+
"description": "`option` is a choice's id from the GET, or null to require an invitation (turning it off needs only members:manage). Auto-joined people have no mail access until an owner or admin assigns a role; legacy mail-grant choices cannot be selected. Choosing an option answers 404 `feature_disabled` unless the organization has mail relay, 400 `validation_error` for an id outside the current catalog, 403 `grant_forbidden` without owner or admin assignment authority, and 409 `role_assignment_unavailable` when the restricted role cannot be assigned yet. Person only: a dashboard session, or the person's own OAuth or CLI token with a session step-up of purpose `relay_auto_join.write` (the person confirms at the step_up_url a 403 step_up_required answer carries, which names this client, then send the token in the Primitive-Step-Up header; the token works only with the client it was confirmed for). Needs members:manage, and roles:assign to turn it on. API keys are refused.",
|
|
37587
37595
|
"tags": ["Roles and members"],
|
|
37588
37596
|
"security": [{ "BearerAuth": [] }],
|
|
37589
37597
|
"requestBody": {
|
|
@@ -40309,6 +40317,7 @@ const openapiDocument = {
|
|
|
40309
40317
|
"build_failed",
|
|
40310
40318
|
"builder_unavailable",
|
|
40311
40319
|
"builtin_role",
|
|
40320
|
+
"chunk_size_mismatch",
|
|
40312
40321
|
"chunk_too_large",
|
|
40313
40322
|
"chunks_missing",
|
|
40314
40323
|
"claim_failed",
|
|
@@ -40393,6 +40402,7 @@ const openapiDocument = {
|
|
|
40393
40402
|
"invalid_code",
|
|
40394
40403
|
"invalid_cursor",
|
|
40395
40404
|
"invalid_email",
|
|
40405
|
+
"invalid_manifest",
|
|
40396
40406
|
"invalid_payload_reference",
|
|
40397
40407
|
"invalid_request",
|
|
40398
40408
|
"invalid_signature",
|
|
@@ -42603,6 +42613,35 @@ const openapiDocument = {
|
|
|
42603
42613
|
"format": "uuid",
|
|
42604
42614
|
"description": "With `group=message`: the send of this message, when you can read it (under a connected agent key, only its own sends)."
|
|
42605
42615
|
},
|
|
42616
|
+
"imported": {
|
|
42617
|
+
"type": ["object", "null"],
|
|
42618
|
+
"description": "Historical acquisition; never sender or SMTP delivery proof. Null for live mail. Excluded from live tails and deltas.",
|
|
42619
|
+
"required": [
|
|
42620
|
+
"from",
|
|
42621
|
+
"method",
|
|
42622
|
+
"verification",
|
|
42623
|
+
"at"
|
|
42624
|
+
],
|
|
42625
|
+
"properties": {
|
|
42626
|
+
"from": {
|
|
42627
|
+
"type": "string",
|
|
42628
|
+
"enum": ["google_workspace"]
|
|
42629
|
+
},
|
|
42630
|
+
"method": {
|
|
42631
|
+
"type": "string",
|
|
42632
|
+
"enum": ["primitive_direct"]
|
|
42633
|
+
},
|
|
42634
|
+
"verification": {
|
|
42635
|
+
"type": "string",
|
|
42636
|
+
"enum": ["provider_fetched"]
|
|
42637
|
+
},
|
|
42638
|
+
"at": {
|
|
42639
|
+
"type": "string",
|
|
42640
|
+
"format": "date-time",
|
|
42641
|
+
"description": "When Primitive acquired this historical message."
|
|
42642
|
+
}
|
|
42643
|
+
}
|
|
42644
|
+
},
|
|
42606
42645
|
"snippet": {
|
|
42607
42646
|
"type": ["string", "null"],
|
|
42608
42647
|
"maxLength": 200,
|
|
@@ -42625,6 +42664,7 @@ const openapiDocument = {
|
|
|
42625
42664
|
"automated_reasons",
|
|
42626
42665
|
"from_verified",
|
|
42627
42666
|
"from_header_email",
|
|
42667
|
+
"imported",
|
|
42628
42668
|
"snippet"
|
|
42629
42669
|
]
|
|
42630
42670
|
},
|
|
@@ -43248,6 +43288,35 @@ const openapiDocument = {
|
|
|
43248
43288
|
}
|
|
43249
43289
|
}
|
|
43250
43290
|
},
|
|
43291
|
+
"imported": {
|
|
43292
|
+
"type": ["object", "null"],
|
|
43293
|
+
"description": "Historical acquisition; never sender or SMTP delivery proof. Null for live mail. Excluded from live tails and deltas.",
|
|
43294
|
+
"required": [
|
|
43295
|
+
"from",
|
|
43296
|
+
"method",
|
|
43297
|
+
"verification",
|
|
43298
|
+
"at"
|
|
43299
|
+
],
|
|
43300
|
+
"properties": {
|
|
43301
|
+
"from": {
|
|
43302
|
+
"type": "string",
|
|
43303
|
+
"enum": ["google_workspace"]
|
|
43304
|
+
},
|
|
43305
|
+
"method": {
|
|
43306
|
+
"type": "string",
|
|
43307
|
+
"enum": ["primitive_direct"]
|
|
43308
|
+
},
|
|
43309
|
+
"verification": {
|
|
43310
|
+
"type": "string",
|
|
43311
|
+
"enum": ["provider_fetched"]
|
|
43312
|
+
},
|
|
43313
|
+
"at": {
|
|
43314
|
+
"type": "string",
|
|
43315
|
+
"format": "date-time",
|
|
43316
|
+
"description": "When Primitive acquired this historical message."
|
|
43317
|
+
}
|
|
43318
|
+
}
|
|
43319
|
+
},
|
|
43251
43320
|
"snippet": {
|
|
43252
43321
|
"type": ["string", "null"],
|
|
43253
43322
|
"maxLength": 200,
|
|
@@ -43277,6 +43346,7 @@ const openapiDocument = {
|
|
|
43277
43346
|
"from_verified",
|
|
43278
43347
|
"from_header_email",
|
|
43279
43348
|
"from_name",
|
|
43349
|
+
"imported",
|
|
43280
43350
|
"snippet"
|
|
43281
43351
|
]
|
|
43282
43352
|
},
|
|
@@ -43798,6 +43868,35 @@ const openapiDocument = {
|
|
|
43798
43868
|
"items": { "$ref": "#/components/schemas/EmailAttachment" },
|
|
43799
43869
|
"description": "Attachment metadata for this message, each item as its own detail read reports it: `parsed.attachments` on `/emails/{id}` for inbound, `attachments` on `/sent-emails/{id}` for outbound, in the same order. Empty when there are none or an inbound message has no parsed content. No bytes or download URLs; download a part with `/emails/{id}/attachments/{part_index}` or `/sent-emails/{id}/attachments/{part_index}`."
|
|
43800
43870
|
},
|
|
43871
|
+
"imported": {
|
|
43872
|
+
"type": ["object", "null"],
|
|
43873
|
+
"description": "Historical acquisition; never sender or SMTP delivery proof. Null for live mail. Excluded from live tails and deltas.",
|
|
43874
|
+
"required": [
|
|
43875
|
+
"from",
|
|
43876
|
+
"method",
|
|
43877
|
+
"verification",
|
|
43878
|
+
"at"
|
|
43879
|
+
],
|
|
43880
|
+
"properties": {
|
|
43881
|
+
"from": {
|
|
43882
|
+
"type": "string",
|
|
43883
|
+
"enum": ["google_workspace"]
|
|
43884
|
+
},
|
|
43885
|
+
"method": {
|
|
43886
|
+
"type": "string",
|
|
43887
|
+
"enum": ["primitive_direct"]
|
|
43888
|
+
},
|
|
43889
|
+
"verification": {
|
|
43890
|
+
"type": "string",
|
|
43891
|
+
"enum": ["provider_fetched"]
|
|
43892
|
+
},
|
|
43893
|
+
"at": {
|
|
43894
|
+
"type": "string",
|
|
43895
|
+
"format": "date-time",
|
|
43896
|
+
"description": "When Primitive acquired this historical message."
|
|
43897
|
+
}
|
|
43898
|
+
}
|
|
43899
|
+
},
|
|
43801
43900
|
"copies": {
|
|
43802
43901
|
"type": "array",
|
|
43803
43902
|
"items": {
|
|
@@ -46444,8 +46543,8 @@ const openapiDocument = {
|
|
|
46444
46543
|
"description": "HTTP status code returned by the endpoint"
|
|
46445
46544
|
},
|
|
46446
46545
|
"body": {
|
|
46447
|
-
"
|
|
46448
|
-
"
|
|
46546
|
+
"description": "The receiver response text, only with organization-wide mail.raw:read. Null without that access because a receiver can echo a raw download link.",
|
|
46547
|
+
"type": ["string", "null"]
|
|
46449
46548
|
},
|
|
46450
46549
|
"signature": {
|
|
46451
46550
|
"type": "string",
|
|
@@ -50223,16 +50322,16 @@ const openapiDocument = {
|
|
|
50223
50322
|
"properties": {
|
|
50224
50323
|
"kind": {
|
|
50225
50324
|
"type": "string",
|
|
50226
|
-
"description": "One of: function, endpoint, function_trigger, pull_subscription, recipient_route, filter_rule, wake_schedule, repeating_send, scheduled_send, api_key, agent_connection, email_rule, email_rule_request, email_rule_objection."
|
|
50325
|
+
"description": "One of: function, endpoint, function_trigger, pull_subscription, recipient_route, filter_rule, wake_schedule, repeating_send, scheduled_send, api_key, agent_connection, email_rule, email_rule_request, email_rule_objection, email_rule_coverage."
|
|
50227
50326
|
},
|
|
50228
50327
|
"id": { "type": "string" },
|
|
50229
50328
|
"name": {
|
|
50230
|
-
"description": "The name the object is known by: an endpoint's display name, a route's or filter's pattern, a Function's name, a send's From address, a wake schedule's command and the address it wakes, an API key's name, an agent's address, a rule's or rule request's name, and for an objection the name its rule had
|
|
50329
|
+
"description": "The name the object is known by: an endpoint's display name, a route's or filter's pattern, a Function's name, a send's From address, a wake schedule's command and the address it wakes, an API key's name, an agent's address, a rule's or rule request's name, and for an objection or a coverage notice the name its rule had then. Never a webhook URL and never mail content.",
|
|
50231
50330
|
"type": ["string", "null"]
|
|
50232
50331
|
},
|
|
50233
50332
|
"state": {
|
|
50234
50333
|
"type": "string",
|
|
50235
|
-
"description": "Where it stands now: enabled, disabled, deleted or replaced (endpoints and routes), enabled or disabled (filters, wake schedules), live, suspended or deleted (Functions), active, paused or ended (repeating sends), scheduled (scheduled sends), active, suspended, expired or revoked (API keys), pending, claimed, connected or revoked (agents), draft, observe or active (email rules), pending, accepted, declined or withdrawn (rule requests and objections)."
|
|
50334
|
+
"description": "Where it stands now: enabled, disabled, deleted or replaced (endpoints and routes), enabled or disabled (filters, wake schedules), live, suspended or deleted (Functions), active, paused or ended (repeating sends), scheduled (scheduled sends), active, suspended, expired or revoked (API keys), pending, claimed, connected or revoked (agents), draft, observe or active (email rules), pending, accepted, declined or withdrawn (rule requests and objections), and for a coverage notice what it told: started (a rule began covering your mailbox), new_version, or baseline (it already covered you when notices began). pending: a rule started covering your mailbox and the notices have not recorded that start yet (a restart within an hour of the last start notice is recorded without a new one); its id is then the rule's, and created_at when the rule last changed."
|
|
50236
50335
|
},
|
|
50237
50336
|
"created_at": {
|
|
50238
50337
|
"type": "string",
|
|
@@ -50246,21 +50345,21 @@ const openapiDocument = {
|
|
|
50246
50345
|
"owned_now": {
|
|
50247
50346
|
"type": "string",
|
|
50248
50347
|
"enum": ["you", "someone_else"],
|
|
50249
|
-
"description": "you: it is still yours: never transferred, or transferred back to you. someone_else: it was transferred and another person holds it now, or, with relation=asked, another member made it."
|
|
50348
|
+
"description": "you: it is still yours: never transferred, or transferred back to you. someone_else: it was transferred and another person holds it now, or, with relation=asked or concerning, another member made it."
|
|
50250
50349
|
},
|
|
50251
50350
|
"created_through": {
|
|
50252
50351
|
"type": "object",
|
|
50253
50352
|
"properties": {
|
|
50254
50353
|
"kind": {
|
|
50255
50354
|
"type": "string",
|
|
50256
|
-
"description": "The kind of credential it was created through: org_key, function_key, connected_key, oauth, agent_delegate or member (the person themselves). With relation=asked, member: the member who asked or objected."
|
|
50355
|
+
"description": "The kind of credential it was created through: org_key, function_key, connected_key, oauth, agent_delegate or member (the person themselves). With relation=asked, member: the member who asked or objected; with relation=concerning, member: the rule's author."
|
|
50257
50356
|
},
|
|
50258
50357
|
"id": {
|
|
50259
|
-
"description": "In a person's view, the person's own user id for member, and an API key's id where they may read their keys (for a person limited to their own keys, only a key they still hold). Null otherwise, and always null in one credential's view, where it is the calling credential itself. With relation=asked, the user id of the member who asked or objected.",
|
|
50358
|
+
"description": "In a person's view, the person's own user id for member, and an API key's id where they may read their keys (for a person limited to their own keys, only a key they still hold). Null otherwise, and always null in one credential's view, where it is the calling credential itself. With relation=asked, the user id of the member who asked or objected; with relation=concerning, of the rule's author.",
|
|
50260
50359
|
"type": ["string", "null"]
|
|
50261
50360
|
},
|
|
50262
50361
|
"name": {
|
|
50263
|
-
"description": "In a person's view, what that credential of theirs is called: an app login by its app, an API key by its name, an agent's key by its address. Null otherwise, and for the person themselves. With relation=asked, the name of the member who asked or objected.",
|
|
50362
|
+
"description": "In a person's view, what that credential of theirs is called: an app login by its app, an API key by its name, an agent's key by its address. Null otherwise, and for the person themselves. With relation=asked, the name of the member who asked or objected; with relation=concerning, of the rule's author.",
|
|
50264
50363
|
"type": ["string", "null"]
|
|
50265
50364
|
}
|
|
50266
50365
|
},
|
|
@@ -50311,6 +50410,15 @@ const openapiDocument = {
|
|
|
50311
50410
|
"next_cursor": {
|
|
50312
50411
|
"description": "Pass as cursor to read the next page; null on the last page. A page can hold fewer items than limit, or none, while next_cursor is set.",
|
|
50313
50412
|
"type": ["string", "null"]
|
|
50413
|
+
},
|
|
50414
|
+
"as_of": {
|
|
50415
|
+
"type": ["string", "null"],
|
|
50416
|
+
"format": "date-time",
|
|
50417
|
+
"description": "With relation=concerning only: about when the notices last looked at your organization; null if never or unread. Coverage since may have no notice yet."
|
|
50418
|
+
},
|
|
50419
|
+
"pending_complete": {
|
|
50420
|
+
"description": "With relation=concerning, on the first page only: whether the check for rules that started covering you without their start notice (state pending, listed ahead of the notices and beyond limit) was finished. false: some may be missing. Absent where there is nothing to check.",
|
|
50421
|
+
"type": "boolean"
|
|
50314
50422
|
}
|
|
50315
50423
|
},
|
|
50316
50424
|
"required": [
|
|
@@ -50558,16 +50666,25 @@ const openapiDocument = {
|
|
|
50558
50666
|
"warnings": {
|
|
50559
50667
|
"type": "array",
|
|
50560
50668
|
"items": { "type": "string" },
|
|
50561
|
-
"description": "Parts of the description the column contract cannot express,
|
|
50669
|
+
"description": "Parts of the description the column contract cannot express, how the rule handles them, and the compiler's own notes on the rule (the Email Rules docs list them). When the rule has no questions and its conditions hold for nearly all of your recent mail (see breadth), or it is a grant rule whose conditions alone hold for over 20% of at least 20 emails (see conditions_breadth), the first warning says so."
|
|
50562
50670
|
},
|
|
50563
50671
|
"compiled_by": {
|
|
50564
50672
|
"type": "string",
|
|
50565
50673
|
"description": "An opaque name for the version of the rule compiler that produced the rule, such as rule-compiler-v1. Send it back as compiled_by when you save the rule."
|
|
50566
50674
|
},
|
|
50675
|
+
"kind": {
|
|
50676
|
+
"description": "The kind it was compiled for. Send it with the tree to a test.",
|
|
50677
|
+
"type": "string",
|
|
50678
|
+
"enum": ["grant", "do_not_share"]
|
|
50679
|
+
},
|
|
50567
50680
|
"breadth": {
|
|
50568
50681
|
"description": "How many of your recent emails its conditions hold for, counted over your own mailboxes whatever scope you save it with, warning or not. Null when not counted in full: a rule with questions, headers-only access, no test of it possible as you, or a count that failed or ran out of time. Writes ignore it, so a compile answer (without include_sql) can be sent back unchanged.",
|
|
50569
50682
|
"anyOf": [{ "$ref": "#/components/schemas/EmailRuleBreadth" }, { "type": "null" }]
|
|
50570
50683
|
},
|
|
50684
|
+
"conditions_breadth": {
|
|
50685
|
+
"description": "For a grant rule with questions, breadth counted on its conditions alone: the emails its questions are asked about. Null for any other rule, or when not counted in full (as breadth).",
|
|
50686
|
+
"anyOf": [{ "$ref": "#/components/schemas/EmailRuleBreadth" }, { "type": "null" }]
|
|
50687
|
+
},
|
|
50571
50688
|
"sql": {
|
|
50572
50689
|
"description": "Present only when include_sql was true.",
|
|
50573
50690
|
"type": "object",
|
|
@@ -50593,6 +50710,34 @@ const openapiDocument = {
|
|
|
50593
50710
|
"compiled_by"
|
|
50594
50711
|
]
|
|
50595
50712
|
},
|
|
50713
|
+
"EmailRuleTested": {
|
|
50714
|
+
"type": "object",
|
|
50715
|
+
"properties": {
|
|
50716
|
+
"id": {
|
|
50717
|
+
"type": ["string", "null"],
|
|
50718
|
+
"format": "uuid"
|
|
50719
|
+
},
|
|
50720
|
+
"version": {
|
|
50721
|
+
"type": ["integer", "null"],
|
|
50722
|
+
"exclusiveMinimum": 0
|
|
50723
|
+
},
|
|
50724
|
+
"vocabulary": { "type": "string" },
|
|
50725
|
+
"kind": {
|
|
50726
|
+
"description": "The kind it was tested as.",
|
|
50727
|
+
"type": "string",
|
|
50728
|
+
"enum": ["grant", "do_not_share"]
|
|
50729
|
+
},
|
|
50730
|
+
"note": {
|
|
50731
|
+
"description": "Present when a tree was sent without kind, so it was tested as grant.",
|
|
50732
|
+
"type": "string"
|
|
50733
|
+
}
|
|
50734
|
+
},
|
|
50735
|
+
"required": [
|
|
50736
|
+
"id",
|
|
50737
|
+
"version",
|
|
50738
|
+
"vocabulary"
|
|
50739
|
+
]
|
|
50740
|
+
},
|
|
50596
50741
|
"EmailRuleScopeWarning": {
|
|
50597
50742
|
"type": "object",
|
|
50598
50743
|
"properties": {
|
|
@@ -50856,7 +51001,7 @@ const openapiDocument = {
|
|
|
50856
51001
|
},
|
|
50857
51002
|
"scope_selection": { "$ref": "#/components/schemas/EmailRuleScopeSelection" },
|
|
50858
51003
|
"rule_id": {
|
|
50859
|
-
"description": "A saved rule you can see. Its current version is tested, with its author's access.",
|
|
51004
|
+
"description": "A saved rule you can see. Its current version is tested, with its author's access; one you see only because it covers your mailboxes, with yours, over only those (dashboard or Primitive CLI only).",
|
|
50860
51005
|
"type": "string",
|
|
50861
51006
|
"format": "uuid"
|
|
50862
51007
|
},
|
|
@@ -50913,25 +51058,7 @@ const openapiDocument = {
|
|
|
50913
51058
|
"TestEmailRuleResult": {
|
|
50914
51059
|
"type": "object",
|
|
50915
51060
|
"properties": {
|
|
50916
|
-
"rule": {
|
|
50917
|
-
"type": "object",
|
|
50918
|
-
"properties": {
|
|
50919
|
-
"id": {
|
|
50920
|
-
"type": ["string", "null"],
|
|
50921
|
-
"format": "uuid"
|
|
50922
|
-
},
|
|
50923
|
-
"version": {
|
|
50924
|
-
"type": ["integer", "null"],
|
|
50925
|
-
"exclusiveMinimum": 0
|
|
50926
|
-
},
|
|
50927
|
-
"vocabulary": { "type": "string" }
|
|
50928
|
-
},
|
|
50929
|
-
"required": [
|
|
50930
|
-
"id",
|
|
50931
|
-
"version",
|
|
50932
|
-
"vocabulary"
|
|
50933
|
-
]
|
|
50934
|
-
},
|
|
51061
|
+
"rule": { "$ref": "#/components/schemas/EmailRuleTested" },
|
|
50935
51062
|
"window": {
|
|
50936
51063
|
"type": "object",
|
|
50937
51064
|
"properties": {
|
|
@@ -51536,25 +51663,7 @@ const openapiDocument = {
|
|
|
51536
51663
|
"GenerateLookAlikesResult": {
|
|
51537
51664
|
"type": "object",
|
|
51538
51665
|
"properties": {
|
|
51539
|
-
"rule": {
|
|
51540
|
-
"type": "object",
|
|
51541
|
-
"properties": {
|
|
51542
|
-
"id": {
|
|
51543
|
-
"type": ["string", "null"],
|
|
51544
|
-
"format": "uuid"
|
|
51545
|
-
},
|
|
51546
|
-
"version": {
|
|
51547
|
-
"type": ["integer", "null"],
|
|
51548
|
-
"exclusiveMinimum": 0
|
|
51549
|
-
},
|
|
51550
|
-
"vocabulary": { "type": "string" }
|
|
51551
|
-
},
|
|
51552
|
-
"required": [
|
|
51553
|
-
"id",
|
|
51554
|
-
"version",
|
|
51555
|
-
"vocabulary"
|
|
51556
|
-
]
|
|
51557
|
-
},
|
|
51666
|
+
"rule": { "$ref": "#/components/schemas/EmailRuleTested" },
|
|
51558
51667
|
"look_alikes": {
|
|
51559
51668
|
"type": "array",
|
|
51560
51669
|
"items": { "$ref": "#/components/schemas/EmailRuleLookAlike" }
|
|
@@ -51718,25 +51827,7 @@ const openapiDocument = {
|
|
|
51718
51827
|
"TestEmailRuleOnSampleResult": {
|
|
51719
51828
|
"type": "object",
|
|
51720
51829
|
"properties": {
|
|
51721
|
-
"rule": {
|
|
51722
|
-
"type": "object",
|
|
51723
|
-
"properties": {
|
|
51724
|
-
"id": {
|
|
51725
|
-
"type": ["string", "null"],
|
|
51726
|
-
"format": "uuid"
|
|
51727
|
-
},
|
|
51728
|
-
"version": {
|
|
51729
|
-
"type": ["integer", "null"],
|
|
51730
|
-
"exclusiveMinimum": 0
|
|
51731
|
-
},
|
|
51732
|
-
"vocabulary": { "type": "string" }
|
|
51733
|
-
},
|
|
51734
|
-
"required": [
|
|
51735
|
-
"id",
|
|
51736
|
-
"version",
|
|
51737
|
-
"vocabulary"
|
|
51738
|
-
]
|
|
51739
|
-
},
|
|
51830
|
+
"rule": { "$ref": "#/components/schemas/EmailRuleTested" },
|
|
51740
51831
|
"received_at": {
|
|
51741
51832
|
"type": "string",
|
|
51742
51833
|
"format": "date-time",
|
|
@@ -52042,6 +52133,10 @@ const openapiDocument = {
|
|
|
52042
52133
|
"endpoints",
|
|
52043
52134
|
"shares_ended"
|
|
52044
52135
|
]
|
|
52136
|
+
},
|
|
52137
|
+
"notice": {
|
|
52138
|
+
"description": "After a write that saved a version of an active rule keys or webhooks read without checking it first: what it changes, and how to have the next one checked.",
|
|
52139
|
+
"type": "string"
|
|
52045
52140
|
}
|
|
52046
52141
|
},
|
|
52047
52142
|
"required": [
|
|
@@ -52264,7 +52359,7 @@ const openapiDocument = {
|
|
|
52264
52359
|
}
|
|
52265
52360
|
},
|
|
52266
52361
|
"warnings": {
|
|
52267
|
-
"description": "The compile response's warnings. Stored as sent.",
|
|
52362
|
+
"description": "The compile response's warnings. Stored as sent, then any server note they lack on an address or domain the description names that the rule does not test (on a rule request, every compiler note on the rule).",
|
|
52268
52363
|
"maxItems": 10,
|
|
52269
52364
|
"type": "array",
|
|
52270
52365
|
"items": {
|
|
@@ -52282,6 +52377,10 @@ const openapiDocument = {
|
|
|
52282
52377
|
"breadth": {
|
|
52283
52378
|
"description": "Ignored (the compile answer's breadth).",
|
|
52284
52379
|
"anyOf": [{ "$ref": "#/components/schemas/EmailRuleBreadth" }, { "type": "null" }]
|
|
52380
|
+
},
|
|
52381
|
+
"conditions_breadth": {
|
|
52382
|
+
"description": "Ignored.",
|
|
52383
|
+
"anyOf": [{ "$ref": "#/components/schemas/EmailRuleBreadth" }, { "type": "null" }]
|
|
52285
52384
|
}
|
|
52286
52385
|
},
|
|
52287
52386
|
"required": [
|
|
@@ -52546,7 +52645,7 @@ const openapiDocument = {
|
|
|
52546
52645
|
}
|
|
52547
52646
|
},
|
|
52548
52647
|
"warnings": {
|
|
52549
|
-
"description": "The compile response's warnings. Stored as sent.",
|
|
52648
|
+
"description": "The compile response's warnings. Stored as sent, then any server note they lack on an address or domain the description names that the rule does not test (on a rule request, every compiler note on the rule).",
|
|
52550
52649
|
"maxItems": 10,
|
|
52551
52650
|
"type": "array",
|
|
52552
52651
|
"items": {
|
|
@@ -52565,6 +52664,15 @@ const openapiDocument = {
|
|
|
52565
52664
|
"description": "Ignored (the compile answer's breadth).",
|
|
52566
52665
|
"anyOf": [{ "$ref": "#/components/schemas/EmailRuleBreadth" }, { "type": "null" }]
|
|
52567
52666
|
},
|
|
52667
|
+
"conditions_breadth": {
|
|
52668
|
+
"description": "Ignored.",
|
|
52669
|
+
"anyOf": [{ "$ref": "#/components/schemas/EmailRuleBreadth" }, { "type": "null" }]
|
|
52670
|
+
},
|
|
52671
|
+
"kind": {
|
|
52672
|
+
"description": "Must be the rule's own (400 kind_mismatch).",
|
|
52673
|
+
"type": "string",
|
|
52674
|
+
"enum": ["grant", "do_not_share"]
|
|
52675
|
+
},
|
|
52568
52676
|
"evaluation_scope": {
|
|
52569
52677
|
"type": "string",
|
|
52570
52678
|
"enum": [
|
|
@@ -52623,7 +52731,7 @@ const openapiDocument = {
|
|
|
52623
52731
|
"maximum": 2147483647
|
|
52624
52732
|
},
|
|
52625
52733
|
"if_expectations_pass": {
|
|
52626
|
-
"description": "true: judge the rule as this write leaves it (new tree, restored version, new scope, or the version it activates) against the expectations it leaves, as POST /email-rules/test would, before saving; it can take as long as a test. Failed: 409 expectations_failed; on emails the rule cannot read: 409 expectations_unreadable; undecided: 409 expectations_undecided (each with details.expectations_check); none to judge: 400 no_expectations. Refused writes save nothing; a pass saves unless the rule moved meanwhile (409 email_rule_conflict). Only writes that save a version or activate the rule are judged.",
|
|
52734
|
+
"description": "true: judge the rule as this write leaves it (new tree, restored version, new scope, or the version it activates) against the expectations it leaves, as POST /email-rules/test would, before saving; it can take as long as a test. Failed: 409 expectations_failed; on emails the rule cannot read: 409 expectations_unreadable; undecided: 409 expectations_undecided (each with details.expectations_check); none to judge: 400 no_expectations. Refused writes save nothing; a pass saves unless the rule moved meanwhile (409 email_rule_conflict). Only writes that save a version or activate the rule are judged. Omitted: judged as with true when the write saves a version or changes the scope of an active rule that API keys or webhooks read and that has expectations. false: never judged first.",
|
|
52627
52735
|
"type": "boolean"
|
|
52628
52736
|
},
|
|
52629
52737
|
"restore_version": {
|
|
@@ -52803,6 +52911,154 @@ const openapiDocument = {
|
|
|
52803
52911
|
"email"
|
|
52804
52912
|
]
|
|
52805
52913
|
},
|
|
52914
|
+
"EmailRuleReceivers": {
|
|
52915
|
+
"type": "object",
|
|
52916
|
+
"properties": {
|
|
52917
|
+
"keys": {
|
|
52918
|
+
"type": "array",
|
|
52919
|
+
"items": {
|
|
52920
|
+
"type": "object",
|
|
52921
|
+
"properties": {
|
|
52922
|
+
"owner": { "anyOf": [{
|
|
52923
|
+
"type": "object",
|
|
52924
|
+
"properties": {
|
|
52925
|
+
"kind": {
|
|
52926
|
+
"type": "string",
|
|
52927
|
+
"const": "member"
|
|
52928
|
+
},
|
|
52929
|
+
"user_id": {
|
|
52930
|
+
"type": "string",
|
|
52931
|
+
"description": "The member's user id.",
|
|
52932
|
+
"format": "uuid"
|
|
52933
|
+
},
|
|
52934
|
+
"name": {
|
|
52935
|
+
"description": "Their name; null when they have none set.",
|
|
52936
|
+
"type": ["string", "null"]
|
|
52937
|
+
}
|
|
52938
|
+
},
|
|
52939
|
+
"required": [
|
|
52940
|
+
"kind",
|
|
52941
|
+
"user_id",
|
|
52942
|
+
"name"
|
|
52943
|
+
]
|
|
52944
|
+
}, {
|
|
52945
|
+
"type": "object",
|
|
52946
|
+
"properties": { "kind": {
|
|
52947
|
+
"type": "string",
|
|
52948
|
+
"const": "organization",
|
|
52949
|
+
"description": "Held by no member: an organization key, or one whose holder has left."
|
|
52950
|
+
} },
|
|
52951
|
+
"required": ["kind"]
|
|
52952
|
+
}] },
|
|
52953
|
+
"count": {
|
|
52954
|
+
"type": "integer",
|
|
52955
|
+
"exclusiveMinimum": 0
|
|
52956
|
+
}
|
|
52957
|
+
},
|
|
52958
|
+
"required": ["owner", "count"]
|
|
52959
|
+
},
|
|
52960
|
+
"description": "API keys that work now (not revoked, expired or suspended) and hold mail:read, whose access lists the rule or its live share. Owner: who holds each, or the organization."
|
|
52961
|
+
},
|
|
52962
|
+
"webhooks": {
|
|
52963
|
+
"type": "array",
|
|
52964
|
+
"items": {
|
|
52965
|
+
"type": "object",
|
|
52966
|
+
"properties": {
|
|
52967
|
+
"owner": { "anyOf": [{
|
|
52968
|
+
"type": "object",
|
|
52969
|
+
"properties": {
|
|
52970
|
+
"kind": {
|
|
52971
|
+
"type": "string",
|
|
52972
|
+
"const": "member"
|
|
52973
|
+
},
|
|
52974
|
+
"user_id": {
|
|
52975
|
+
"type": "string",
|
|
52976
|
+
"description": "The member's user id.",
|
|
52977
|
+
"format": "uuid"
|
|
52978
|
+
},
|
|
52979
|
+
"name": {
|
|
52980
|
+
"description": "Their name; null when they have none set.",
|
|
52981
|
+
"type": ["string", "null"]
|
|
52982
|
+
}
|
|
52983
|
+
},
|
|
52984
|
+
"required": [
|
|
52985
|
+
"kind",
|
|
52986
|
+
"user_id",
|
|
52987
|
+
"name"
|
|
52988
|
+
]
|
|
52989
|
+
}, {
|
|
52990
|
+
"type": "object",
|
|
52991
|
+
"properties": { "kind": {
|
|
52992
|
+
"type": "string",
|
|
52993
|
+
"const": "organization",
|
|
52994
|
+
"description": "Held by no member: an organization key, or one whose holder has left."
|
|
52995
|
+
} },
|
|
52996
|
+
"required": ["kind"]
|
|
52997
|
+
}] },
|
|
52998
|
+
"count": {
|
|
52999
|
+
"type": "integer",
|
|
53000
|
+
"exclusiveMinimum": 0
|
|
53001
|
+
},
|
|
53002
|
+
"hosts": {
|
|
53003
|
+
"description": "Distinct sites they deliver to (a host's registrable domain, or a tunnel, preview or function service alone), sorted, at most 10; \"unknown host\" (last) for any that cannot be named.",
|
|
53004
|
+
"type": "array",
|
|
53005
|
+
"items": { "type": "string" }
|
|
53006
|
+
},
|
|
53007
|
+
"hosts_not_listed": {
|
|
53008
|
+
"description": "Hosts past those listed.",
|
|
53009
|
+
"type": "integer",
|
|
53010
|
+
"minimum": 0
|
|
53011
|
+
}
|
|
53012
|
+
},
|
|
53013
|
+
"required": ["owner", "count"]
|
|
53014
|
+
},
|
|
53015
|
+
"description": "Webhooks taking received mail, bounces or reports that are sent what it matches: those of the key delivery acts as, when it lists the rule or its live share (owner: its holder, or the organization), and those of the member it is shared with (owner: that member)."
|
|
53016
|
+
},
|
|
53017
|
+
"shares": {
|
|
53018
|
+
"type": "array",
|
|
53019
|
+
"items": {
|
|
53020
|
+
"type": "object",
|
|
53021
|
+
"properties": {
|
|
53022
|
+
"beneficiary": {
|
|
53023
|
+
"type": "object",
|
|
53024
|
+
"properties": {
|
|
53025
|
+
"kind": {
|
|
53026
|
+
"type": "string",
|
|
53027
|
+
"const": "member"
|
|
53028
|
+
},
|
|
53029
|
+
"user_id": {
|
|
53030
|
+
"type": "string",
|
|
53031
|
+
"description": "The member's user id.",
|
|
53032
|
+
"format": "uuid"
|
|
53033
|
+
},
|
|
53034
|
+
"name": {
|
|
53035
|
+
"description": "Their name; null when they have none set.",
|
|
53036
|
+
"type": ["string", "null"]
|
|
53037
|
+
}
|
|
53038
|
+
},
|
|
53039
|
+
"required": [
|
|
53040
|
+
"kind",
|
|
53041
|
+
"user_id",
|
|
53042
|
+
"name"
|
|
53043
|
+
]
|
|
53044
|
+
},
|
|
53045
|
+
"count": {
|
|
53046
|
+
"type": "integer",
|
|
53047
|
+
"exclusiveMinimum": 0
|
|
53048
|
+
}
|
|
53049
|
+
},
|
|
53050
|
+
"required": ["beneficiary", "count"]
|
|
53051
|
+
},
|
|
53052
|
+
"description": "The rule's live share (at most one), by its member, if they can read it and it is among their newest 20 shares."
|
|
53053
|
+
}
|
|
53054
|
+
},
|
|
53055
|
+
"required": [
|
|
53056
|
+
"keys",
|
|
53057
|
+
"webhooks",
|
|
53058
|
+
"shares"
|
|
53059
|
+
],
|
|
53060
|
+
"description": "Who receives what the rule shares now, by person and count; empty unless it is an active grant rule."
|
|
53061
|
+
},
|
|
52806
53062
|
"ListEmailRuleResultsResult": {
|
|
52807
53063
|
"type": "object",
|
|
52808
53064
|
"properties": {
|
|
@@ -52969,6 +53225,10 @@ const openapiDocument = {
|
|
|
52969
53225
|
"author": {
|
|
52970
53226
|
"description": "With read_only: who wrote it.",
|
|
52971
53227
|
"$ref": "#/components/schemas/EmailRuleCoveringAuthor"
|
|
53228
|
+
},
|
|
53229
|
+
"receivers": {
|
|
53230
|
+
"description": "With read_only: who receives what it shares; null unless it covers you now.",
|
|
53231
|
+
"anyOf": [{ "$ref": "#/components/schemas/EmailRuleReceivers" }, { "type": "null" }]
|
|
52972
53232
|
}
|
|
52973
53233
|
},
|
|
52974
53234
|
"required": [
|
|
@@ -53259,7 +53519,7 @@ const openapiDocument = {
|
|
|
53259
53519
|
}
|
|
53260
53520
|
},
|
|
53261
53521
|
"warnings": {
|
|
53262
|
-
"description": "The compile response's warnings. Stored as sent.",
|
|
53522
|
+
"description": "The compile response's warnings. Stored as sent, then any server note they lack on an address or domain the description names that the rule does not test (on a rule request, every compiler note on the rule).",
|
|
53263
53523
|
"maxItems": 10,
|
|
53264
53524
|
"type": "array",
|
|
53265
53525
|
"items": {
|
|
@@ -53277,6 +53537,15 @@ const openapiDocument = {
|
|
|
53277
53537
|
"breadth": {
|
|
53278
53538
|
"description": "Ignored (the compile answer's breadth).",
|
|
53279
53539
|
"anyOf": [{ "$ref": "#/components/schemas/EmailRuleBreadth" }, { "type": "null" }]
|
|
53540
|
+
},
|
|
53541
|
+
"conditions_breadth": {
|
|
53542
|
+
"description": "Ignored.",
|
|
53543
|
+
"anyOf": [{ "$ref": "#/components/schemas/EmailRuleBreadth" }, { "type": "null" }]
|
|
53544
|
+
},
|
|
53545
|
+
"kind": {
|
|
53546
|
+
"description": "Only grant.",
|
|
53547
|
+
"type": "string",
|
|
53548
|
+
"const": "grant"
|
|
53280
53549
|
}
|
|
53281
53550
|
},
|
|
53282
53551
|
"required": [
|
|
@@ -53313,7 +53582,16 @@ const openapiDocument = {
|
|
|
53313
53582
|
"warnings": {
|
|
53314
53583
|
"type": "array",
|
|
53315
53584
|
"items": { "type": "string" },
|
|
53316
|
-
"description": "As the member who asked sent them, normally from their compile. The compiler's note that the rule matches nearly everything, in its own wording, counted that member's recent mail: anyone else reads it naming them."
|
|
53585
|
+
"description": "As the member who asked sent them, normally from their compile, then every compiler note on the rule's tree and words they lack. The compiler's note that the rule matches nearly everything, in its own wording, counted that member's recent mail: anyone else reads it naming them."
|
|
53586
|
+
},
|
|
53587
|
+
"server_explanation": {
|
|
53588
|
+
"description": "What the rule as asked actually does: Primitive's own reading of the request's tree, never the words of the member who asked or of a model. Null when the tree no longer reads as one.",
|
|
53589
|
+
"type": ["string", "null"]
|
|
53590
|
+
},
|
|
53591
|
+
"server_notes": {
|
|
53592
|
+
"description": "Primitive's own notes on the rule as asked, worked out from its tree and description each time the request is read, and to the member asked while pending, how to test it on look-alikes. Unlike warnings, never written by the member who asked, though a note can quote their words or tree values.",
|
|
53593
|
+
"type": "array",
|
|
53594
|
+
"items": { "type": "string" }
|
|
53317
53595
|
},
|
|
53318
53596
|
"compiled_by": { "type": "string" },
|
|
53319
53597
|
"vocabulary": { "type": "string" },
|
|
@@ -53360,7 +53638,7 @@ const openapiDocument = {
|
|
|
53360
53638
|
"type": ["boolean", "null"]
|
|
53361
53639
|
},
|
|
53362
53640
|
"notice": {
|
|
53363
|
-
"description": "For the member asked, while pending: what accepting would share. For the member who asked, once accepted with changes: that the request is not what is shared. Else null.",
|
|
53641
|
+
"description": "For the member asked, while pending: what the rule actually does (server_explanation), Primitive's warnings, then what accepting would share. For the member who asked, once accepted with changes: that the request is not what is shared. Else null.",
|
|
53364
53642
|
"type": ["string", "null"]
|
|
53365
53643
|
},
|
|
53366
53644
|
"target_can_accept": {
|
|
@@ -53479,7 +53757,16 @@ const openapiDocument = {
|
|
|
53479
53757
|
"warnings": {
|
|
53480
53758
|
"type": "array",
|
|
53481
53759
|
"items": { "type": "string" },
|
|
53482
|
-
"description": "As the member who asked sent them, normally from their compile. The compiler's note that the rule matches nearly everything, in its own wording, counted that member's recent mail: anyone else reads it naming them."
|
|
53760
|
+
"description": "As the member who asked sent them, normally from their compile, then every compiler note on the rule's tree and words they lack. The compiler's note that the rule matches nearly everything, in its own wording, counted that member's recent mail: anyone else reads it naming them."
|
|
53761
|
+
},
|
|
53762
|
+
"server_explanation": {
|
|
53763
|
+
"description": "What the rule as asked actually does: Primitive's own reading of the request's tree, never the words of the member who asked or of a model. Null when the tree no longer reads as one.",
|
|
53764
|
+
"type": ["string", "null"]
|
|
53765
|
+
},
|
|
53766
|
+
"server_notes": {
|
|
53767
|
+
"description": "Primitive's own notes on the rule as asked, worked out from its tree and description each time the request is read, and to the member asked while pending, how to test it on look-alikes. Unlike warnings, never written by the member who asked, though a note can quote their words or tree values.",
|
|
53768
|
+
"type": "array",
|
|
53769
|
+
"items": { "type": "string" }
|
|
53483
53770
|
},
|
|
53484
53771
|
"compiled_by": { "type": "string" },
|
|
53485
53772
|
"vocabulary": { "type": "string" },
|
|
@@ -53526,7 +53813,7 @@ const openapiDocument = {
|
|
|
53526
53813
|
"type": ["boolean", "null"]
|
|
53527
53814
|
},
|
|
53528
53815
|
"notice": {
|
|
53529
|
-
"description": "For the member asked, while pending: what accepting would share. For the member who asked, once accepted with changes: that the request is not what is shared. Else null.",
|
|
53816
|
+
"description": "For the member asked, while pending: what the rule actually does (server_explanation), Primitive's warnings, then what accepting would share. For the member who asked, once accepted with changes: that the request is not what is shared. Else null.",
|
|
53530
53817
|
"type": ["string", "null"]
|
|
53531
53818
|
}
|
|
53532
53819
|
},
|
|
@@ -53854,7 +54141,7 @@ const openapiDocument = {
|
|
|
53854
54141
|
}
|
|
53855
54142
|
},
|
|
53856
54143
|
"warnings": {
|
|
53857
|
-
"description": "The compile response's warnings. Stored as sent.",
|
|
54144
|
+
"description": "The compile response's warnings. Stored as sent, then any server note they lack on an address or domain the description names that the rule does not test (on a rule request, every compiler note on the rule).",
|
|
53858
54145
|
"maxItems": 10,
|
|
53859
54146
|
"type": "array",
|
|
53860
54147
|
"items": {
|
|
@@ -53873,6 +54160,15 @@ const openapiDocument = {
|
|
|
53873
54160
|
"description": "Ignored (the compile answer's breadth).",
|
|
53874
54161
|
"anyOf": [{ "$ref": "#/components/schemas/EmailRuleBreadth" }, { "type": "null" }]
|
|
53875
54162
|
},
|
|
54163
|
+
"conditions_breadth": {
|
|
54164
|
+
"description": "Ignored.",
|
|
54165
|
+
"anyOf": [{ "$ref": "#/components/schemas/EmailRuleBreadth" }, { "type": "null" }]
|
|
54166
|
+
},
|
|
54167
|
+
"kind": {
|
|
54168
|
+
"description": "Only grant.",
|
|
54169
|
+
"type": "string",
|
|
54170
|
+
"const": "grant"
|
|
54171
|
+
},
|
|
53876
54172
|
"expectation_samples": {
|
|
53877
54173
|
"description": "Made-up emails the rule must match or not, such as look-alikes it must never match, kept on the rule this accept writes.",
|
|
53878
54174
|
"minItems": 1,
|
|
@@ -53914,6 +54210,34 @@ const openapiDocument = {
|
|
|
53914
54210
|
"items": {
|
|
53915
54211
|
"type": "object",
|
|
53916
54212
|
"properties": {
|
|
54213
|
+
"imported": {
|
|
54214
|
+
"type": ["object", "null"],
|
|
54215
|
+
"properties": {
|
|
54216
|
+
"from": {
|
|
54217
|
+
"type": "string",
|
|
54218
|
+
"const": "google_workspace"
|
|
54219
|
+
},
|
|
54220
|
+
"method": {
|
|
54221
|
+
"type": "string",
|
|
54222
|
+
"const": "primitive_direct"
|
|
54223
|
+
},
|
|
54224
|
+
"verification": {
|
|
54225
|
+
"type": "string",
|
|
54226
|
+
"const": "provider_fetched"
|
|
54227
|
+
},
|
|
54228
|
+
"at": {
|
|
54229
|
+
"type": "string",
|
|
54230
|
+
"format": "date-time"
|
|
54231
|
+
}
|
|
54232
|
+
},
|
|
54233
|
+
"required": [
|
|
54234
|
+
"from",
|
|
54235
|
+
"method",
|
|
54236
|
+
"verification",
|
|
54237
|
+
"at"
|
|
54238
|
+
],
|
|
54239
|
+
"default": null
|
|
54240
|
+
},
|
|
53917
54241
|
"delivery_report": {
|
|
53918
54242
|
"type": ["object", "null"],
|
|
53919
54243
|
"properties": {
|
|
@@ -54151,6 +54475,7 @@ const openapiDocument = {
|
|
|
54151
54475
|
}
|
|
54152
54476
|
},
|
|
54153
54477
|
"required": [
|
|
54478
|
+
"imported",
|
|
54154
54479
|
"id",
|
|
54155
54480
|
"message_id",
|
|
54156
54481
|
"domain_id",
|
|
@@ -54225,6 +54550,10 @@ const openapiDocument = {
|
|
|
54225
54550
|
"type": ["integer", "null"],
|
|
54226
54551
|
"exclusiveMinimum": 0
|
|
54227
54552
|
},
|
|
54553
|
+
"receivers": {
|
|
54554
|
+
"description": "Null when it could not be read in time; try again.",
|
|
54555
|
+
"anyOf": [{ "$ref": "#/components/schemas/EmailRuleReceivers" }, { "type": "null" }]
|
|
54556
|
+
},
|
|
54228
54557
|
"created_at": {
|
|
54229
54558
|
"type": "string",
|
|
54230
54559
|
"format": "date-time"
|
|
@@ -54239,6 +54568,7 @@ const openapiDocument = {
|
|
|
54239
54568
|
"is_author",
|
|
54240
54569
|
"covers",
|
|
54241
54570
|
"current_version",
|
|
54571
|
+
"receivers",
|
|
54242
54572
|
"created_at"
|
|
54243
54573
|
]
|
|
54244
54574
|
},
|
|
@@ -54308,6 +54638,10 @@ const openapiDocument = {
|
|
|
54308
54638
|
"exclusiveMinimum": 0,
|
|
54309
54639
|
"description": "Null when covers_now is false."
|
|
54310
54640
|
},
|
|
54641
|
+
"receivers": {
|
|
54642
|
+
"description": "Null when covers_now is false (who receives it now is not about your mail), or when it could not be read in time.",
|
|
54643
|
+
"anyOf": [{ "$ref": "#/components/schemas/EmailRuleReceivers" }, { "type": "null" }]
|
|
54644
|
+
},
|
|
54311
54645
|
"created_at": {
|
|
54312
54646
|
"type": "string",
|
|
54313
54647
|
"format": "date-time"
|
|
@@ -54334,6 +54668,7 @@ const openapiDocument = {
|
|
|
54334
54668
|
"is_author",
|
|
54335
54669
|
"covers",
|
|
54336
54670
|
"current_version",
|
|
54671
|
+
"receivers",
|
|
54337
54672
|
"created_at",
|
|
54338
54673
|
"covers_now",
|
|
54339
54674
|
"current"
|
|
@@ -54904,6 +55239,7 @@ const openapiDocument = {
|
|
|
54904
55239
|
"type": "object",
|
|
54905
55240
|
"description": "What an inbound email says, as plain text, with the fields that identify it.",
|
|
54906
55241
|
"required": [
|
|
55242
|
+
"imported",
|
|
54907
55243
|
"id",
|
|
54908
55244
|
"thread_id",
|
|
54909
55245
|
"received_at",
|
|
@@ -54924,6 +55260,35 @@ const openapiDocument = {
|
|
|
54924
55260
|
"attachments"
|
|
54925
55261
|
],
|
|
54926
55262
|
"properties": {
|
|
55263
|
+
"imported": {
|
|
55264
|
+
"type": ["object", "null"],
|
|
55265
|
+
"description": "Historical acquisition; never sender or SMTP delivery proof. Null for live mail. Excluded from live tails and deltas.",
|
|
55266
|
+
"required": [
|
|
55267
|
+
"from",
|
|
55268
|
+
"method",
|
|
55269
|
+
"verification",
|
|
55270
|
+
"at"
|
|
55271
|
+
],
|
|
55272
|
+
"properties": {
|
|
55273
|
+
"from": {
|
|
55274
|
+
"type": "string",
|
|
55275
|
+
"enum": ["google_workspace"]
|
|
55276
|
+
},
|
|
55277
|
+
"method": {
|
|
55278
|
+
"type": "string",
|
|
55279
|
+
"enum": ["primitive_direct"]
|
|
55280
|
+
},
|
|
55281
|
+
"verification": {
|
|
55282
|
+
"type": "string",
|
|
55283
|
+
"enum": ["provider_fetched"]
|
|
55284
|
+
},
|
|
55285
|
+
"at": {
|
|
55286
|
+
"type": "string",
|
|
55287
|
+
"format": "date-time",
|
|
55288
|
+
"description": "When Primitive acquired this historical message."
|
|
55289
|
+
}
|
|
55290
|
+
}
|
|
55291
|
+
},
|
|
54927
55292
|
"id": {
|
|
54928
55293
|
"type": "string",
|
|
54929
55294
|
"format": "uuid",
|
|
@@ -58416,6 +58781,24 @@ const openapiDocument = {
|
|
|
58416
58781
|
"agent_address",
|
|
58417
58782
|
"person"
|
|
58418
58783
|
]
|
|
58784
|
+
},
|
|
58785
|
+
"address_warnings": {
|
|
58786
|
+
"type": "array",
|
|
58787
|
+
"items": {
|
|
58788
|
+
"type": "object",
|
|
58789
|
+
"properties": {
|
|
58790
|
+
"address": { "type": "string" },
|
|
58791
|
+
"reason": { "type": "string" },
|
|
58792
|
+
"description": { "type": "string" }
|
|
58793
|
+
},
|
|
58794
|
+
"required": [
|
|
58795
|
+
"address",
|
|
58796
|
+
"reason",
|
|
58797
|
+
"description"
|
|
58798
|
+
],
|
|
58799
|
+
"additionalProperties": {}
|
|
58800
|
+
},
|
|
58801
|
+
"description": "Notes on the key's grant, worked out from it on every read: whole_mailbox, an address or domain listed beside email rules, which the key reads in full; no_send_address, with address empty, a key that can send but lists only email rules. The notes that need the organization's mailboxes and domains (member_address, unowned_domain) are given only when the grant is written. Only rules not deleted and shares not ended count. Empty, or absent, for a key on a template, and empty for a revoked key."
|
|
58419
58802
|
}
|
|
58420
58803
|
},
|
|
58421
58804
|
"required": [
|
|
@@ -59703,6 +60086,24 @@ const openapiDocument = {
|
|
|
59703
60086
|
"rotated_to": {
|
|
59704
60087
|
"description": "The id of the newest key rotated from this key that the caller may read; null until it is rotated, or when the caller may read no key rotated from it. A revoked one is still named: GET /v1/keys/{id} answers it.",
|
|
59705
60088
|
"type": ["string", "null"]
|
|
60089
|
+
},
|
|
60090
|
+
"address_warnings": {
|
|
60091
|
+
"type": "array",
|
|
60092
|
+
"items": {
|
|
60093
|
+
"type": "object",
|
|
60094
|
+
"properties": {
|
|
60095
|
+
"address": { "type": "string" },
|
|
60096
|
+
"reason": { "type": "string" },
|
|
60097
|
+
"description": { "type": "string" }
|
|
60098
|
+
},
|
|
60099
|
+
"required": [
|
|
60100
|
+
"address",
|
|
60101
|
+
"reason",
|
|
60102
|
+
"description"
|
|
60103
|
+
],
|
|
60104
|
+
"additionalProperties": {}
|
|
60105
|
+
},
|
|
60106
|
+
"description": "Notes on the key's grant, worked out from it on every read: whole_mailbox, an address or domain listed beside email rules, which the key reads in full; no_send_address, with address empty, a key that can send but lists only email rules. The notes that need the organization's mailboxes and domains (member_address, unowned_domain) are given only when the grant is written. Only rules not deleted and shares not ended count. Empty, or absent, for a key on a template, and empty for a revoked key."
|
|
59706
60107
|
}
|
|
59707
60108
|
},
|
|
59708
60109
|
"required": [
|
|
@@ -59802,6 +60203,24 @@ const openapiDocument = {
|
|
|
59802
60203
|
"rotated_to": {
|
|
59803
60204
|
"description": "The id of the newest key rotated from this key that the caller may read; null until it is rotated, or when the caller may read no key rotated from it. A revoked one is still named: GET /v1/keys/{id} answers it.",
|
|
59804
60205
|
"type": ["string", "null"]
|
|
60206
|
+
},
|
|
60207
|
+
"address_warnings": {
|
|
60208
|
+
"type": "array",
|
|
60209
|
+
"items": {
|
|
60210
|
+
"type": "object",
|
|
60211
|
+
"properties": {
|
|
60212
|
+
"address": { "type": "string" },
|
|
60213
|
+
"reason": { "type": "string" },
|
|
60214
|
+
"description": { "type": "string" }
|
|
60215
|
+
},
|
|
60216
|
+
"required": [
|
|
60217
|
+
"address",
|
|
60218
|
+
"reason",
|
|
60219
|
+
"description"
|
|
60220
|
+
],
|
|
60221
|
+
"additionalProperties": {}
|
|
60222
|
+
},
|
|
60223
|
+
"description": "Notes on the key's grant, worked out from it on every read: whole_mailbox, an address or domain listed beside email rules, which the key reads in full; no_send_address, with address empty, a key that can send but lists only email rules. The notes that need the organization's mailboxes and domains (member_address, unowned_domain) are given only when the grant is written. Only rules not deleted and shares not ended count. Empty, or absent, for a key on a template, and empty for a revoked key."
|
|
59805
60224
|
}
|
|
59806
60225
|
},
|
|
59807
60226
|
"required": [
|
|
@@ -62572,6 +62991,29 @@ const openapiDocument = {
|
|
|
62572
62991
|
],
|
|
62573
62992
|
"description": "A default wake schedule the install creates for the function: the command it sends, a 5-field cron expression and timezone, and the scheduler sender localpart on the installed address's domain. The owner can change or delete it after install."
|
|
62574
62993
|
},
|
|
62994
|
+
"EndpointCreateWarning": {
|
|
62995
|
+
"type": "object",
|
|
62996
|
+
"properties": {
|
|
62997
|
+
"code": { "type": "string" },
|
|
62998
|
+
"message": { "type": "string" },
|
|
62999
|
+
"endpoint_id": {
|
|
63000
|
+
"description": "The other webhook a same_path_as_another_endpoint warning names.",
|
|
63001
|
+
"type": "string",
|
|
63002
|
+
"format": "uuid",
|
|
63003
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
63004
|
+
}
|
|
63005
|
+
},
|
|
63006
|
+
"required": ["code", "message"],
|
|
63007
|
+
"additionalProperties": {}
|
|
63008
|
+
},
|
|
63009
|
+
"CreatedEndpoint": { "allOf": [{ "$ref": "#/components/schemas/Endpoint" }, {
|
|
63010
|
+
"type": "object",
|
|
63011
|
+
"properties": { "warnings": {
|
|
63012
|
+
"description": "For a webhook (kind http). same_path_as_another_endpoint: another webhook you can see, on and not deleted, sends to the same scheme, host and path with any query string, so each email both receive is delivered twice; endpoint_id names it (at most 5, newest first). The URL is never echoed. Empty when none; absent when it could not be checked (a caller who may not read endpoints, or a failed read). Other codes may be added.",
|
|
63013
|
+
"type": "array",
|
|
63014
|
+
"items": { "$ref": "#/components/schemas/EndpointCreateWarning" }
|
|
63015
|
+
} }
|
|
63016
|
+
}] },
|
|
62575
63017
|
"EndpointUpdateWarning": {
|
|
62576
63018
|
"type": "object",
|
|
62577
63019
|
"properties": {
|
|
@@ -63009,6 +63451,7 @@ async function call$1(request) {
|
|
|
63009
63451
|
};
|
|
63010
63452
|
}
|
|
63011
63453
|
}
|
|
63454
|
+
/** A time as "YYYY-MM-DD HH:MM" in UTC; anything that is not a time, as given. */
|
|
63012
63455
|
function minute(value) {
|
|
63013
63456
|
if (!value) return "";
|
|
63014
63457
|
const date = new Date(value);
|
|
@@ -63070,6 +63513,42 @@ function formatAskedRows(items, complete = false) {
|
|
|
63070
63513
|
const line = (cells) => cells.map((cell, i) => i === cells.length - 1 ? cell : cell.padEnd(widths[i] ?? 0)).join(" ");
|
|
63071
63514
|
return [line(header), ...rows.map(line)].join("\n");
|
|
63072
63515
|
}
|
|
63516
|
+
/** Where to see what covers you now, whatever the notices have caught up with. */
|
|
63517
|
+
const COVERING_NOW = `\`primitive email-rule-oversight list-email-rules-covering-me\` shows what covers you now.`;
|
|
63518
|
+
/**
|
|
63519
|
+
* One line per coverage notice: what it told (started, new_version, or
|
|
63520
|
+
* baseline for a rule that already covered you when notices began), when, the
|
|
63521
|
+
* rule's name then, and its author; and, first, each rule that covers you now
|
|
63522
|
+
* whose notice is not written yet (pending, dated when the rule last
|
|
63523
|
+
* changed). No id: a notice's id is not a rule's, and no command takes it.
|
|
63524
|
+
* `complete` says the listing is the whole of it (from the first page to the
|
|
63525
|
+
* last, nothing withheld). Even then an empty one is no promise that nothing
|
|
63526
|
+
* covers you: notices are written by a periodic job and can lag, so it
|
|
63527
|
+
* says how far they go (`asOf`, when the server says) and where to look now.
|
|
63528
|
+
*/
|
|
63529
|
+
function formatConcerningRows(items, complete = false, asOf) {
|
|
63530
|
+
if (items.length === 0) return complete ? `${asOf ? `Nothing recorded for you as of ${minute(asOf)} UTC.` : "Nothing recorded for you yet."} A rule that starts covering your mail can take a few minutes to appear here. ${COVERING_NOW}` : "Nothing to show.";
|
|
63531
|
+
const rows = items.map((item) => [
|
|
63532
|
+
item.state,
|
|
63533
|
+
minute(item.created_at),
|
|
63534
|
+
item.name ?? "(unnamed)",
|
|
63535
|
+
item.created_through.name ?? item.created_through.id ?? ""
|
|
63536
|
+
]);
|
|
63537
|
+
const header = [
|
|
63538
|
+
"NOTICE",
|
|
63539
|
+
"WHEN (UTC)",
|
|
63540
|
+
"RULE",
|
|
63541
|
+
"AUTHOR"
|
|
63542
|
+
];
|
|
63543
|
+
const widths = header.map((h, i) => Math.max(h.length, ...rows.map((row) => (row[i] ?? "").length)));
|
|
63544
|
+
const line = (cells) => cells.map((cell, i) => i === cells.length - 1 ? cell : cell.padEnd(widths[i] ?? 0)).join(" ");
|
|
63545
|
+
const pending = items.some((item) => item.state === "pending") ? ["", `pending: the rule covers you now and its notice is not written yet. ${COVERING_NOW}`] : [];
|
|
63546
|
+
return [
|
|
63547
|
+
line(header),
|
|
63548
|
+
...rows.map(line),
|
|
63549
|
+
...pending
|
|
63550
|
+
].join("\n");
|
|
63551
|
+
}
|
|
63073
63552
|
/** What was left out, and why: no counts, only the kinds and what would show them. */
|
|
63074
63553
|
function formatWithheld(withheld) {
|
|
63075
63554
|
if (withheld.length === 0) return null;
|
|
@@ -63090,7 +63569,7 @@ function resumeCommand(bin, flags, cursor, subcommand = "created") {
|
|
|
63090
63569
|
`--cursor ${shellWord(cursor)}`
|
|
63091
63570
|
].join(" ");
|
|
63092
63571
|
}
|
|
63093
|
-
/** List one page, or every page with --all, of what the caller created or
|
|
63572
|
+
/** List one page, or every page with --all, of what the caller created, was asked, or what concerns their mail. */
|
|
63094
63573
|
async function runActivityList(command, flags, relation) {
|
|
63095
63574
|
const auth = await createAuthenticatedCliApiClient({
|
|
63096
63575
|
apiKey: flags["api-key"],
|
|
@@ -63100,12 +63579,13 @@ async function runActivityList(command, flags, relation) {
|
|
|
63100
63579
|
const items = [];
|
|
63101
63580
|
let covers = "";
|
|
63102
63581
|
let withheld = [];
|
|
63582
|
+
let asOf;
|
|
63103
63583
|
let cursor = flags.cursor;
|
|
63104
63584
|
for (let page = 0; page < (flags.all ? 50 : 1); page += 1) {
|
|
63105
63585
|
const result = await call$1(listActivityObjects({
|
|
63106
63586
|
client: auth.apiClient.client,
|
|
63107
63587
|
query: {
|
|
63108
|
-
...relation
|
|
63588
|
+
...relation !== "created" ? { relation } : {},
|
|
63109
63589
|
state: flags.state,
|
|
63110
63590
|
limit: flags.limit,
|
|
63111
63591
|
...flags.kind ? { kind: flags.kind } : {},
|
|
@@ -63126,6 +63606,7 @@ async function runActivityList(command, flags, relation) {
|
|
|
63126
63606
|
}
|
|
63127
63607
|
covers = result.data.covers;
|
|
63128
63608
|
withheld = result.data.withheld;
|
|
63609
|
+
if (page === 0) asOf = result.data.as_of;
|
|
63129
63610
|
items.push(...result.data.items);
|
|
63130
63611
|
cursor = result.data.next_cursor ?? void 0;
|
|
63131
63612
|
if (!cursor) break;
|
|
@@ -63135,11 +63616,13 @@ async function runActivityList(command, flags, relation) {
|
|
|
63135
63616
|
covers,
|
|
63136
63617
|
items,
|
|
63137
63618
|
withheld,
|
|
63138
|
-
next_cursor: cursor ?? null
|
|
63619
|
+
next_cursor: cursor ?? null,
|
|
63620
|
+
...asOf !== void 0 ? { as_of: asOf } : {}
|
|
63139
63621
|
}, null, 2));
|
|
63140
63622
|
return;
|
|
63141
63623
|
}
|
|
63142
|
-
|
|
63624
|
+
const complete = flags.state === "all" && !flags.cursor && !cursor && withheld.length === 0;
|
|
63625
|
+
command.log(relation === "asked" ? formatAskedRows(items, complete) : relation === "concerning" ? formatConcerningRows(items, complete, asOf) : formatActivityRows(covers, items));
|
|
63143
63626
|
const notShown = formatWithheld(withheld);
|
|
63144
63627
|
if (notShown) command.log(`\n${notShown}`);
|
|
63145
63628
|
if (cursor) command.log(`\nMore: ${resumeCommand(command.config.bin, flags, cursor, relation)}`);
|
|
@@ -63221,6 +63704,35 @@ var ActivityAskedCommand = class ActivityAskedCommand extends Command {
|
|
|
63221
63704
|
await runActivityList(this, flags, "asked");
|
|
63222
63705
|
}
|
|
63223
63706
|
};
|
|
63707
|
+
var ActivityConcerningCommand = class ActivityConcerningCommand extends Command {
|
|
63708
|
+
static description = `List what other members did that concerns your own mail, newest first: each time another member's rule started covering one of your mailboxes (started), or saved a new version while covering it (new_version), named as the rule was then, with its author. A rule that already covered you when these notices began is listed once as baseline.
|
|
63709
|
+
|
|
63710
|
+
Notices are written by a job that runs every minute or so and can lag. Until a rule's notice is written, a rule that covers you now is listed first as pending, dated when the rule last changed, and with --json its id is the rule's.
|
|
63711
|
+
|
|
63712
|
+
Signed in with \`primitive login\`, you see the notices about your own mail under your current membership. A key, an app or an agent has none. The rules that cover you now, with their ids, are listed by \`primitive email-rule-oversight list-email-rules-covering-me\`; ask a rule's author to turn it off with \`primitive email-rule-oversight create-email-rule-objection --rule-id <rule-id>\`. With --json each notice's id is the notice's, not the rule's.`;
|
|
63713
|
+
static summary = "List rules that started covering your mail or changed";
|
|
63714
|
+
static examples = ["<%= config.bin %> activity concerning", "<%= config.bin %> activity concerning --all --json"];
|
|
63715
|
+
static flags = {
|
|
63716
|
+
"api-key": API_KEY_FLAG$3,
|
|
63717
|
+
"api-base-url": API_BASE_URL_FLAG$4,
|
|
63718
|
+
limit: Flags.integer({
|
|
63719
|
+
description: "Notices per page, 1 to 200.",
|
|
63720
|
+
min: 1,
|
|
63721
|
+
max: 200,
|
|
63722
|
+
default: DEFAULT_LIMIT$3
|
|
63723
|
+
}),
|
|
63724
|
+
cursor: Flags.string({ description: "Resume from a next_cursor an earlier page printed." }),
|
|
63725
|
+
all: Flags.boolean({ description: `Follow every page (at most 50).` }),
|
|
63726
|
+
json: Flags.boolean({ description: "Print the answer as JSON." })
|
|
63727
|
+
};
|
|
63728
|
+
async run() {
|
|
63729
|
+
const { flags } = await this.parse(ActivityConcerningCommand);
|
|
63730
|
+
await runActivityList(this, {
|
|
63731
|
+
...flags,
|
|
63732
|
+
state: "all"
|
|
63733
|
+
}, "concerning");
|
|
63734
|
+
}
|
|
63735
|
+
};
|
|
63224
63736
|
// src/oclif/agent-mail-check.ts
|
|
63225
63737
|
/**
|
|
63226
63738
|
* One check for mail that arrived since this profile's previous check. It is
|
|
@@ -70265,6 +70777,130 @@ async function checkDomains(client) {
|
|
|
70265
70777
|
};
|
|
70266
70778
|
}
|
|
70267
70779
|
}
|
|
70780
|
+
const ASKED_PAGE = 50;
|
|
70781
|
+
const ASKED_KINDS = ["email_rule_request", "email_rule_objection"];
|
|
70782
|
+
/**
|
|
70783
|
+
* One page of the caller's activity list; "refused" when the credential may
|
|
70784
|
+
* not list activity at all (401 or 403), null when it could not be read.
|
|
70785
|
+
*/
|
|
70786
|
+
async function activityPage(client, query) {
|
|
70787
|
+
try {
|
|
70788
|
+
const result = await listActivityObjects({
|
|
70789
|
+
client: client.client,
|
|
70790
|
+
query,
|
|
70791
|
+
responseStyle: "fields"
|
|
70792
|
+
});
|
|
70793
|
+
const status = result.response?.status;
|
|
70794
|
+
if (status === 401 || status === 403) return "refused";
|
|
70795
|
+
if (result.error) return null;
|
|
70796
|
+
return result.data?.data ?? null;
|
|
70797
|
+
} catch {
|
|
70798
|
+
return null;
|
|
70799
|
+
}
|
|
70800
|
+
}
|
|
70801
|
+
/**
|
|
70802
|
+
* Up to ASKED_PAGES pages of a list, stopping early once `enough` says the
|
|
70803
|
+
* rest cannot matter: the first page (which alone carries what a list says
|
|
70804
|
+
* beyond its items), every item read, and whether a page was left unread.
|
|
70805
|
+
* "refused" or null as the first page is; a later page that fails to read is
|
|
70806
|
+
* a page left unread.
|
|
70807
|
+
*/
|
|
70808
|
+
async function activityPages(client, query, enough = () => false) {
|
|
70809
|
+
const first = await activityPage(client, query);
|
|
70810
|
+
if (first === "refused" || first === null) return first;
|
|
70811
|
+
const items = [...first.items];
|
|
70812
|
+
let page = first;
|
|
70813
|
+
for (let read = 1;; read += 1) {
|
|
70814
|
+
const cursor = page.next_cursor;
|
|
70815
|
+
if (cursor == null || enough(page)) return {
|
|
70816
|
+
first,
|
|
70817
|
+
items,
|
|
70818
|
+
more: false
|
|
70819
|
+
};
|
|
70820
|
+
if (read >= 5) return {
|
|
70821
|
+
first,
|
|
70822
|
+
items,
|
|
70823
|
+
more: true
|
|
70824
|
+
};
|
|
70825
|
+
const next = await activityPage(client, {
|
|
70826
|
+
...query,
|
|
70827
|
+
cursor
|
|
70828
|
+
});
|
|
70829
|
+
if (next === "refused" || next === null) return {
|
|
70830
|
+
first,
|
|
70831
|
+
items,
|
|
70832
|
+
more: true
|
|
70833
|
+
};
|
|
70834
|
+
items.push(...next.items);
|
|
70835
|
+
page = next;
|
|
70836
|
+
}
|
|
70837
|
+
}
|
|
70838
|
+
const plural$1 = (n, word) => `${n} ${word}${n === 1 ? "" : "s"}`;
|
|
70839
|
+
/**
|
|
70840
|
+
* What is waiting on a person, read from the activity lists (notification
|
|
70841
|
+
* emails can be off, so this is where they are told): rule requests made to
|
|
70842
|
+
* them and objections to rules they wrote that are still open, rules that
|
|
70843
|
+
* cover their mail now with no notice written yet, and coverage notices from
|
|
70844
|
+
* the last RECENT_COVERAGE_DAYS days. Null for a credential that is asked
|
|
70845
|
+
* nothing: one the list refuses, one whose list is not a person's own, or one
|
|
70846
|
+
* from which every asked kind is withheld. Whatever it could not see (a kind
|
|
70847
|
+
* withheld from it, a page it did not read, a pending check the API did not
|
|
70848
|
+
* finish) is said, so the row is never OK for it, and counts read past are
|
|
70849
|
+
* lower bounds. WARN when anything is waiting or unchecked; never a FAIL.
|
|
70850
|
+
*/
|
|
70851
|
+
async function checkAskedOfYou(client, now = Date.now()) {
|
|
70852
|
+
const asked = await activityPages(client, {
|
|
70853
|
+
relation: "asked",
|
|
70854
|
+
state: "live",
|
|
70855
|
+
limit: ASKED_PAGE
|
|
70856
|
+
});
|
|
70857
|
+
if (asked === "refused") return null;
|
|
70858
|
+
if (!asked) return {
|
|
70859
|
+
status: "warn",
|
|
70860
|
+
message: "could not check what is waiting for you",
|
|
70861
|
+
hint: "Run `primitive activity asked --state live` and `primitive activity concerning`."
|
|
70862
|
+
};
|
|
70863
|
+
const hidden = new Set(asked.first.withheld.map((entry) => entry.kind));
|
|
70864
|
+
if (asked.first.covers !== "you" || ASKED_KINDS.every((kind) => hidden.has(kind))) return null;
|
|
70865
|
+
const since = now - 6048e5;
|
|
70866
|
+
const read = await activityPages(client, {
|
|
70867
|
+
relation: "concerning",
|
|
70868
|
+
state: "all",
|
|
70869
|
+
limit: ASKED_PAGE
|
|
70870
|
+
}, (page) => {
|
|
70871
|
+
const last = page.items.at(-1);
|
|
70872
|
+
return last !== void 0 && Date.parse(last.created_at) < since;
|
|
70873
|
+
});
|
|
70874
|
+
const concerning = read === "refused" ? null : read;
|
|
70875
|
+
const coverageHidden = concerning?.first.withheld.some((entry) => entry.kind === "email_rule_coverage") ?? false;
|
|
70876
|
+
const coverageUnfinished = concerning !== null && (concerning.more || concerning.first.pending_complete === false);
|
|
70877
|
+
const requests = asked.items.filter((item) => item.kind === "email_rule_request").length;
|
|
70878
|
+
const objections = asked.items.filter((item) => item.kind === "email_rule_objection").length;
|
|
70879
|
+
const waiting = asked.more ? [`at least ${requests + objections} rule requests and objections`] : [...requests > 0 ? [plural$1(requests, "rule request")] : [], ...objections > 0 ? [plural$1(objections, "objection")] : []];
|
|
70880
|
+
const items = concerning?.items ?? [];
|
|
70881
|
+
const pending = items.filter((item) => item.state === "pending").length;
|
|
70882
|
+
const notices = items.filter((item) => (item.state === "started" || item.state === "new_version") && Date.parse(item.created_at) >= since).length;
|
|
70883
|
+
const parts = [
|
|
70884
|
+
...waiting.length > 0 ? [`${waiting.join(" and ")} waiting for you`] : [],
|
|
70885
|
+
...ASKED_KINDS.filter((kind) => hidden.has(kind)).map((kind) => `${kind === "email_rule_request" ? "rule requests" : "objections"} not shown to this credential`),
|
|
70886
|
+
...pending > 0 ? [`${concerning?.first.pending_complete === false ? "at least " : ""}${plural$1(pending, "rule")} ${pending === 1 ? "covers" : "cover"} your mail with no notice written yet`] : [],
|
|
70887
|
+
...notices > 0 ? [`${concerning?.more ? "at least " : ""}${plural$1(notices, "coverage notice")} in the last 7 days`] : [],
|
|
70888
|
+
...coverageHidden ? ["rules over your mail not shown to this credential"] : !concerning ? ["could not check the rules over your mail"] : coverageUnfinished ? ["the check of the rules over your mail did not finish"] : []
|
|
70889
|
+
];
|
|
70890
|
+
if (parts.length === 0) {
|
|
70891
|
+
const asOf = concerning?.first.as_of;
|
|
70892
|
+
return {
|
|
70893
|
+
status: "ok",
|
|
70894
|
+
message: `nothing waiting for you; ${asOf ? `coverage notices as of ${minute(asOf)} UTC` : "coverage notices can take a few minutes to appear"}`
|
|
70895
|
+
};
|
|
70896
|
+
}
|
|
70897
|
+
const commands = [...waiting.length > 0 ? ["`primitive activity asked --state live`"] : [], ...pending > 0 || notices > 0 || !concerning || coverageUnfinished ? ["`primitive activity concerning`"] : []];
|
|
70898
|
+
return {
|
|
70899
|
+
status: "warn",
|
|
70900
|
+
message: parts.join("; "),
|
|
70901
|
+
...commands.length > 0 ? { hint: `Run ${commands.join(" and ")}.` } : {}
|
|
70902
|
+
};
|
|
70903
|
+
}
|
|
70268
70904
|
/**
|
|
70269
70905
|
* A background start that gave up, such as a receiver replacing its lost
|
|
70270
70906
|
* supervisor, has no terminal to report to. Its saved reason is read
|
|
@@ -70293,7 +70929,7 @@ function checkReceiverStart(configDir, profileName) {
|
|
|
70293
70929
|
}
|
|
70294
70930
|
}
|
|
70295
70931
|
var DoctorCommand = class DoctorCommand extends Command {
|
|
70296
|
-
static description = `Run a one-shot environment health check: Node version, proxy env, CLI auth resolution, /account reachability,
|
|
70932
|
+
static description = `Run a one-shot environment health check: Node version, proxy env, CLI auth resolution, /account reachability, verified-domain status, and, signed in as yourself, the rule requests and objections waiting for you and the rules that recently started covering your mail. With PRIMITIVE_AGENT_PROFILE selected, reports saved identity offline and points to whoami and exact listener status instead of account-only checks. Prints actionable hints for each warning or failure.`;
|
|
70297
70933
|
static summary = "Check the local environment and live API for common problems";
|
|
70298
70934
|
static examples = ["<%= config.bin %> doctor", "<%= config.bin %> doctor --api-key prim_..."];
|
|
70299
70935
|
static flags = {
|
|
@@ -70359,6 +70995,11 @@ var DoctorCommand = class DoctorCommand extends Command {
|
|
|
70359
70995
|
label: "Domains",
|
|
70360
70996
|
outcome: domainsOutcome
|
|
70361
70997
|
});
|
|
70998
|
+
const asked = await checkAskedOfYou(apiClient);
|
|
70999
|
+
if (asked) rows.push({
|
|
71000
|
+
label: "Asked of you",
|
|
71001
|
+
outcome: asked
|
|
71002
|
+
});
|
|
70362
71003
|
}
|
|
70363
71004
|
}
|
|
70364
71005
|
}
|
|
@@ -73379,8 +74020,8 @@ const PRIMITIVE_TEAM_AUTHOR = {
|
|
|
73379
74020
|
name: "Primitive Team",
|
|
73380
74021
|
url: "https://primitive.dev"
|
|
73381
74022
|
};
|
|
73382
|
-
const SDK_VERSION_RANGE = "^3.0.0-preview.
|
|
73383
|
-
const CLI_VERSION_RANGE = "^3.0.0-preview.
|
|
74023
|
+
const SDK_VERSION_RANGE = "^3.0.0-preview.12";
|
|
74024
|
+
const CLI_VERSION_RANGE = "^3.0.0-preview.12";
|
|
73384
74025
|
const ESBUILD_VERSION_RANGE = "^0.27.0";
|
|
73385
74026
|
function renderHandler() {
|
|
73386
74027
|
return `// env.PRIMITIVE_API_KEY, env.PRIMITIVE_WEBHOOK_SECRET, and
|
|
@@ -76755,12 +77396,27 @@ function describePermissions(grant) {
|
|
|
76755
77396
|
const permissions = grant.permissions ?? [];
|
|
76756
77397
|
return permissions.length > 0 ? permissions.join(", ") : "none";
|
|
76757
77398
|
}
|
|
77399
|
+
/**
|
|
77400
|
+
* The notes the server gives on a key's grant on every read (address_warnings),
|
|
77401
|
+
* such as an address it reads in full beside its email rules. Read loosely:
|
|
77402
|
+
* an older server sends none.
|
|
77403
|
+
*/
|
|
77404
|
+
function keyNotes(key) {
|
|
77405
|
+
const notes = key.address_warnings;
|
|
77406
|
+
if (!Array.isArray(notes)) return [];
|
|
77407
|
+
return notes.flatMap((note) => {
|
|
77408
|
+
const description = note?.description;
|
|
77409
|
+
return typeof description === "string" ? [description] : [];
|
|
77410
|
+
});
|
|
77411
|
+
}
|
|
76758
77412
|
function formatKeyRows(rows, options = {}) {
|
|
76759
77413
|
if (rows.length === 0) return options.includeRevoked ? "No API keys, revoked or not." : "No API keys. Revoked keys are left out; pass --include-revoked to list them too.";
|
|
76760
77414
|
return rows.map((row) => {
|
|
76761
77415
|
const suspended = row.suspended && row.status !== "revoked" ? " [suspended]" : "";
|
|
76762
77416
|
const revoked = row.status === "revoked" ? ` [revoked${row.revoked_at ? ` ${row.revoked_at}` : ""}]` : "";
|
|
76763
|
-
|
|
77417
|
+
const count = keyNotes(row).length;
|
|
77418
|
+
const notes = count > 0 ? ` [${count} ${count === 1 ? "note" : "notes"}: primitive keys get ${row.id}]` : "";
|
|
77419
|
+
return `${row.id} ${row.key_prefix} ${row.name ?? "(unnamed)"} ${describePermissions(row.grant)} mail: ${describeMailScope(row.grant)} expires ${row.expires_at ?? "never"} last used ${row.last_used_at ?? "never"}${suspended}${revoked}${notes}`;
|
|
76764
77420
|
}).join("\n");
|
|
76765
77421
|
}
|
|
76766
77422
|
function formatKeyDetail(key) {
|
|
@@ -76785,6 +77441,11 @@ function formatKeyDetail(key) {
|
|
|
76785
77441
|
lines.push("Permissions:");
|
|
76786
77442
|
for (const permission of key.grant.permissions ?? []) lines.push(` ${permission}`);
|
|
76787
77443
|
}
|
|
77444
|
+
const notes = keyNotes(key);
|
|
77445
|
+
if (notes.length > 0) {
|
|
77446
|
+
lines.push("Notes:");
|
|
77447
|
+
for (const note of notes) lines.push(` ${note.replace(/\r?\n/g, "\n ")}`);
|
|
77448
|
+
}
|
|
76788
77449
|
return lines.join("\n");
|
|
76789
77450
|
}
|
|
76790
77451
|
const EVERY_MAILBOX_PRESETS = /* @__PURE__ */ new Set([
|
|
@@ -77420,10 +78081,12 @@ var KeysUpdateCommand = class KeysUpdateCommand extends Command {
|
|
|
77420
78081
|
client: auth.apiClient.client,
|
|
77421
78082
|
path: { id: args.id }
|
|
77422
78083
|
})) : null;
|
|
78084
|
+
const standingNotes = after?.ok ? after.data.address_warnings : void 0;
|
|
77423
78085
|
if (flags.json) {
|
|
77424
78086
|
this.log(JSON.stringify({
|
|
77425
78087
|
...after?.ok ? after.data : {},
|
|
77426
78088
|
...result.data,
|
|
78089
|
+
...!grantChanged && Array.isArray(standingNotes) ? { address_warnings: standingNotes } : {},
|
|
77427
78090
|
...grantChanged ? { notice: HELD_REQUEST_NOTICE } : {},
|
|
77428
78091
|
...grantChanged && rulesRemoved.length > 0 ? { rules_removed: rulesRemoved } : {},
|
|
77429
78092
|
...rulesNotOnKey.length > 0 ? { rules_not_on_key: rulesNotOnKey } : {},
|
|
@@ -87312,6 +87975,26 @@ var ThreadsMutedCommand = class ThreadsMutedCommand extends Command {
|
|
|
87312
87975
|
this.log(JSON.stringify(entries, null, 2));
|
|
87313
87976
|
}
|
|
87314
87977
|
};
|
|
87978
|
+
// src/oclif/commands/version.ts
|
|
87979
|
+
/** The facts `--version` prints, as fields. `node` is Node's version without its leading v. */
|
|
87980
|
+
function versionInfo(config) {
|
|
87981
|
+
return {
|
|
87982
|
+
version: config.version,
|
|
87983
|
+
platform: config.platform,
|
|
87984
|
+
arch: config.arch,
|
|
87985
|
+
node: process.versions.node
|
|
87986
|
+
};
|
|
87987
|
+
}
|
|
87988
|
+
var VersionCommand = class VersionCommand extends Command {
|
|
87989
|
+
static description = "Print the CLI's version, with the platform, architecture and Node version it runs on: the same line `primitive --version` prints. With --json, print them as fields. Needs no login and does not call the API.";
|
|
87990
|
+
static summary = "Print the CLI version";
|
|
87991
|
+
static examples = ["<%= config.bin %> version", "<%= config.bin %> version --json"];
|
|
87992
|
+
static flags = { json: JSON_OUTPUT_FLAG };
|
|
87993
|
+
async run() {
|
|
87994
|
+
const { flags } = await this.parse(VersionCommand);
|
|
87995
|
+
this.log(flags.json ? JSON.stringify(versionInfo(this.config), null, 2) : this.config.userAgent);
|
|
87996
|
+
}
|
|
87997
|
+
};
|
|
87315
87998
|
// src/oclif/verification-extract.ts
|
|
87316
87999
|
const CODE_KEYWORD = /\b(?:verification|verify|verifying|one[- ]?time|otp|passcode|pass code|security code|login code|log[- ]?in code|sign[- ]?in code|access code|auth(?:entication)? code|confirmation code|confirm|code|pin|2fa|two[- ]factor|launch code)\b/i;
|
|
87317
88000
|
const NOT_A_CODE = /\b(?:order|invoice|receipt|total|subtotal|amount|price|paid|charged|phone|tel|call|fax|mobile|ref|reference|ticket|case|account|acct|customer|member|zip|postal|suite|ste|po box|tracking|transaction|txn|item|sku|qty|quantity|street|st|ave|avenue|blvd|road|rd|floor)\b|[#$€£¥]/i;
|
|
@@ -89020,6 +89703,7 @@ const COMMANDS = {
|
|
|
89020
89703
|
signal: SignalCommand,
|
|
89021
89704
|
doctor: DoctorCommand,
|
|
89022
89705
|
billing: BillingCommand,
|
|
89706
|
+
version: VersionCommand,
|
|
89023
89707
|
"machine:doctor": MachineDoctorCommand,
|
|
89024
89708
|
"emails:latest": EmailsLatestCommand,
|
|
89025
89709
|
"emails:attachment": EmailsAttachmentCommand,
|
|
@@ -89053,6 +89737,7 @@ const COMMANDS = {
|
|
|
89053
89737
|
"org:use": OrgUseCommand,
|
|
89054
89738
|
"cli:list-cli-orgs": OrgsCommand,
|
|
89055
89739
|
"activity:asked": ActivityAskedCommand,
|
|
89740
|
+
"activity:concerning": ActivityConcerningCommand,
|
|
89056
89741
|
"activity:created": ActivityCreatedCommand,
|
|
89057
89742
|
"keys:list": KeysListCommand,
|
|
89058
89743
|
"keys:get": KeysGetCommand,
|