primcli 3.0.0-preview.11 → 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-CkMEFiBL.js → api-command-CNCsVNk0.js} +532 -60
- package/dist/{machine-session-D39TUEGF.js → machine-session-DkXYR62a.js} +4 -4
- package/dist/{notify-session-DcFHxUL9.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 +620 -164
- package/dist/oclif/receiver-heal.js +2 -2
- package/dist/{repeats-Dj_o6c-X-ChTwFlyB.js → repeats-Dj_o6c-X-wjmw2Jbx.js} +39 -39
- package/dist/{scoped-chat-DVhJu-DF.js → scoped-chat-B1Fi6_qM.js} +1 -1
- package/dist/{signal-command-CGgHQ_po.js → signal-command-BdJVZXGl.js} +4 -4
- package/package.json +2 -2
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 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-
|
|
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. 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.",
|
|
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": [
|
|
@@ -21819,7 +21819,7 @@ const openapiDocument = {
|
|
|
21819
21819
|
"name": "limit",
|
|
21820
21820
|
"in": "query",
|
|
21821
21821
|
"required": false,
|
|
21822
|
-
"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.",
|
|
21823
21823
|
"schema": {
|
|
21824
21824
|
"default": 50,
|
|
21825
21825
|
"type": "integer",
|
|
@@ -21927,7 +21927,7 @@ const openapiDocument = {
|
|
|
21927
21927
|
"/email-rules/vocabulary": { "get": {
|
|
21928
21928
|
"operationId": "getEmailRuleVocabulary",
|
|
21929
21929
|
"summary": "Read the column catalog",
|
|
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, 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).",
|
|
21931
21931
|
"tags": ["Email Rules"],
|
|
21932
21932
|
"security": [{ "BearerAuth": [] }],
|
|
21933
21933
|
"responses": {
|
|
@@ -21965,7 +21965,7 @@ const openapiDocument = {
|
|
|
21965
21965
|
}
|
|
21966
21966
|
},
|
|
21967
21967
|
"403": {
|
|
21968
|
-
"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.",
|
|
21969
21969
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
21970
21970
|
},
|
|
21971
21971
|
"429": {
|
|
@@ -21997,7 +21997,7 @@ const openapiDocument = {
|
|
|
21997
21997
|
"/email-rules/compile": { "post": {
|
|
21998
21998
|
"operationId": "compileEmailRule",
|
|
21999
21999
|
"summary": "Compile a rule description",
|
|
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. 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).",
|
|
22001
22001
|
"tags": ["Email Rules"],
|
|
22002
22002
|
"security": [{ "BearerAuth": [] }],
|
|
22003
22003
|
"requestBody": {
|
|
@@ -22052,7 +22052,7 @@ const openapiDocument = {
|
|
|
22052
22052
|
}
|
|
22053
22053
|
},
|
|
22054
22054
|
"403": {
|
|
22055
|
-
"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.",
|
|
22056
22056
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
22057
22057
|
},
|
|
22058
22058
|
"422": {
|
|
@@ -22103,7 +22103,7 @@ const openapiDocument = {
|
|
|
22103
22103
|
"/email-rules/test": { "post": {
|
|
22104
22104
|
"operationId": "testEmailRule",
|
|
22105
22105
|
"summary": "Test a rule against received mail",
|
|
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. 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).",
|
|
22107
22107
|
"tags": ["Email Rules"],
|
|
22108
22108
|
"security": [{ "BearerAuth": [] }],
|
|
22109
22109
|
"requestBody": {
|
|
@@ -22149,15 +22149,15 @@ const openapiDocument = {
|
|
|
22149
22149
|
}
|
|
22150
22150
|
},
|
|
22151
22151
|
"403": {
|
|
22152
|
-
"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.",
|
|
22153
22153
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
22154
22154
|
},
|
|
22155
22155
|
"404": {
|
|
22156
|
-
"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).",
|
|
22157
22157
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
22158
22158
|
},
|
|
22159
22159
|
"409": {
|
|
22160
|
-
"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.",
|
|
22161
22161
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
22162
22162
|
},
|
|
22163
22163
|
"429": {
|
|
@@ -22200,7 +22200,7 @@ const openapiDocument = {
|
|
|
22200
22200
|
"/email-rules/look-alikes": { "post": {
|
|
22201
22201
|
"operationId": "generateLookAlikes",
|
|
22202
22202
|
"summary": "Write look-alike emails a rule should or should not match",
|
|
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, 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).",
|
|
22204
22204
|
"tags": ["Email Rules"],
|
|
22205
22205
|
"security": [{ "BearerAuth": [] }],
|
|
22206
22206
|
"requestBody": {
|
|
@@ -22246,7 +22246,7 @@ const openapiDocument = {
|
|
|
22246
22246
|
}
|
|
22247
22247
|
},
|
|
22248
22248
|
"403": {
|
|
22249
|
-
"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.",
|
|
22250
22250
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
22251
22251
|
},
|
|
22252
22252
|
"404": {
|
|
@@ -22305,7 +22305,7 @@ const openapiDocument = {
|
|
|
22305
22305
|
"/email-rules/test-sample": { "post": {
|
|
22306
22306
|
"operationId": "testEmailRuleOnSample",
|
|
22307
22307
|
"summary": "Test a rule against a made-up email",
|
|
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, 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).",
|
|
22309
22309
|
"tags": ["Email Rules"],
|
|
22310
22310
|
"security": [{ "BearerAuth": [] }],
|
|
22311
22311
|
"requestBody": {
|
|
@@ -22351,7 +22351,7 @@ const openapiDocument = {
|
|
|
22351
22351
|
}
|
|
22352
22352
|
},
|
|
22353
22353
|
"403": {
|
|
22354
|
-
"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.",
|
|
22355
22355
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
22356
22356
|
},
|
|
22357
22357
|
"404": {
|
|
@@ -22403,7 +22403,7 @@ const openapiDocument = {
|
|
|
22403
22403
|
"post": {
|
|
22404
22404
|
"operationId": "createEmailRule",
|
|
22405
22405
|
"summary": "Create a rule",
|
|
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, 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).",
|
|
22407
22407
|
"tags": ["Email Rules"],
|
|
22408
22408
|
"security": [{ "BearerAuth": [] }],
|
|
22409
22409
|
"requestBody": {
|
|
@@ -22452,7 +22452,7 @@ const openapiDocument = {
|
|
|
22452
22452
|
}
|
|
22453
22453
|
},
|
|
22454
22454
|
"403": {
|
|
22455
|
-
"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).",
|
|
22456
22456
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
22457
22457
|
},
|
|
22458
22458
|
"409": {
|
|
@@ -22499,7 +22499,7 @@ const openapiDocument = {
|
|
|
22499
22499
|
"get": {
|
|
22500
22500
|
"operationId": "listEmailRules",
|
|
22501
22501
|
"summary": "List rules",
|
|
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, 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).",
|
|
22503
22503
|
"tags": ["Email Rules"],
|
|
22504
22504
|
"security": [{ "BearerAuth": [] }],
|
|
22505
22505
|
"parameters": [
|
|
@@ -22588,7 +22588,7 @@ const openapiDocument = {
|
|
|
22588
22588
|
}
|
|
22589
22589
|
},
|
|
22590
22590
|
"403": {
|
|
22591
|
-
"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.",
|
|
22592
22592
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
22593
22593
|
},
|
|
22594
22594
|
"429": {
|
|
@@ -22622,7 +22622,7 @@ const openapiDocument = {
|
|
|
22622
22622
|
"get": {
|
|
22623
22623
|
"operationId": "getEmailRule",
|
|
22624
22624
|
"summary": "Read a rule",
|
|
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, 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).",
|
|
22626
22626
|
"tags": ["Email Rules"],
|
|
22627
22627
|
"security": [{ "BearerAuth": [] }],
|
|
22628
22628
|
"parameters": [{
|
|
@@ -22692,7 +22692,7 @@ const openapiDocument = {
|
|
|
22692
22692
|
}
|
|
22693
22693
|
},
|
|
22694
22694
|
"403": {
|
|
22695
|
-
"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).",
|
|
22696
22696
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
22697
22697
|
},
|
|
22698
22698
|
"404": {
|
|
@@ -22737,7 +22737,7 @@ const openapiDocument = {
|
|
|
22737
22737
|
"patch": {
|
|
22738
22738
|
"operationId": "updateEmailRule",
|
|
22739
22739
|
"summary": "Change a rule",
|
|
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. 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).",
|
|
22741
22741
|
"tags": ["Email Rules"],
|
|
22742
22742
|
"security": [{ "BearerAuth": [] }],
|
|
22743
22743
|
"parameters": [{
|
|
@@ -22770,7 +22770,7 @@ const openapiDocument = {
|
|
|
22770
22770
|
}
|
|
22771
22771
|
},
|
|
22772
22772
|
"400": {
|
|
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),
|
|
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.",
|
|
22774
22774
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
22775
22775
|
},
|
|
22776
22776
|
"401": {
|
|
@@ -22793,7 +22793,7 @@ const openapiDocument = {
|
|
|
22793
22793
|
}
|
|
22794
22794
|
},
|
|
22795
22795
|
"403": {
|
|
22796
|
-
"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.",
|
|
22797
22797
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
22798
22798
|
},
|
|
22799
22799
|
"404": {
|
|
@@ -22801,7 +22801,7 @@ const openapiDocument = {
|
|
|
22801
22801
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
22802
22802
|
},
|
|
22803
22803
|
"409": {
|
|
22804
|
-
"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.",
|
|
22805
22805
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
22806
22806
|
},
|
|
22807
22807
|
"429": {
|
|
@@ -22826,6 +22826,10 @@ const openapiDocument = {
|
|
|
22826
22826
|
}
|
|
22827
22827
|
}
|
|
22828
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" } } }
|
|
22829
22833
|
}
|
|
22830
22834
|
},
|
|
22831
22835
|
"x-primitive-permission": ["mail:read"]
|
|
@@ -22833,7 +22837,7 @@ const openapiDocument = {
|
|
|
22833
22837
|
"delete": {
|
|
22834
22838
|
"operationId": "deleteEmailRule",
|
|
22835
22839
|
"summary": "Delete a rule",
|
|
22836
|
-
"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).",
|
|
22837
22841
|
"tags": ["Email Rules"],
|
|
22838
22842
|
"security": [{ "BearerAuth": [] }],
|
|
22839
22843
|
"parameters": [{
|
|
@@ -22881,7 +22885,7 @@ const openapiDocument = {
|
|
|
22881
22885
|
}
|
|
22882
22886
|
},
|
|
22883
22887
|
"403": {
|
|
22884
|
-
"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.",
|
|
22885
22889
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
22886
22890
|
},
|
|
22887
22891
|
"404": {
|
|
@@ -22927,7 +22931,7 @@ const openapiDocument = {
|
|
|
22927
22931
|
"/email-rules/{id}/decisions": { "get": {
|
|
22928
22932
|
"operationId": "listEmailRuleDecisions",
|
|
22929
22933
|
"summary": "List a rule's decisions",
|
|
22930
|
-
"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).",
|
|
22931
22935
|
"tags": ["Email Rules"],
|
|
22932
22936
|
"security": [{ "BearerAuth": [] }],
|
|
22933
22937
|
"parameters": [
|
|
@@ -23026,7 +23030,7 @@ const openapiDocument = {
|
|
|
23026
23030
|
}
|
|
23027
23031
|
},
|
|
23028
23032
|
"403": {
|
|
23029
|
-
"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.",
|
|
23030
23034
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
23031
23035
|
},
|
|
23032
23036
|
"404": {
|
|
@@ -23071,7 +23075,7 @@ const openapiDocument = {
|
|
|
23071
23075
|
"/emails/{id}/rule-results": { "get": {
|
|
23072
23076
|
"operationId": "listEmailRuleResults",
|
|
23073
23077
|
"summary": "List every rule's result on an email",
|
|
23074
|
-
"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, 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).",
|
|
23075
23079
|
"tags": ["Email Rules"],
|
|
23076
23080
|
"security": [{ "BearerAuth": [] }],
|
|
23077
23081
|
"parameters": [{
|
|
@@ -23119,7 +23123,7 @@ const openapiDocument = {
|
|
|
23119
23123
|
}
|
|
23120
23124
|
},
|
|
23121
23125
|
"403": {
|
|
23122
|
-
"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.",
|
|
23123
23127
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
23124
23128
|
},
|
|
23125
23129
|
"404": {
|
|
@@ -23155,7 +23159,7 @@ const openapiDocument = {
|
|
|
23155
23159
|
"/email-rules/{id}/versions": { "get": {
|
|
23156
23160
|
"operationId": "listEmailRuleVersions",
|
|
23157
23161
|
"summary": "Read versions of a rule",
|
|
23158
|
-
"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).",
|
|
23159
23163
|
"tags": ["Email Rules"],
|
|
23160
23164
|
"security": [{ "BearerAuth": [] }],
|
|
23161
23165
|
"parameters": [
|
|
@@ -23256,7 +23260,7 @@ const openapiDocument = {
|
|
|
23256
23260
|
}
|
|
23257
23261
|
},
|
|
23258
23262
|
"403": {
|
|
23259
|
-
"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.",
|
|
23260
23264
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
23261
23265
|
},
|
|
23262
23266
|
"404": {
|
|
@@ -23301,7 +23305,7 @@ const openapiDocument = {
|
|
|
23301
23305
|
"/email-rules/{id}/scope": { "get": {
|
|
23302
23306
|
"operationId": "getEmailRuleScope",
|
|
23303
23307
|
"summary": "Read what a rule covers",
|
|
23304
|
-
"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).",
|
|
23305
23309
|
"tags": ["Email Rules"],
|
|
23306
23310
|
"security": [{ "BearerAuth": [] }],
|
|
23307
23311
|
"parameters": [{
|
|
@@ -23349,7 +23353,7 @@ const openapiDocument = {
|
|
|
23349
23353
|
}
|
|
23350
23354
|
},
|
|
23351
23355
|
"403": {
|
|
23352
|
-
"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.",
|
|
23353
23357
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
23354
23358
|
},
|
|
23355
23359
|
"404": {
|
|
@@ -23385,7 +23389,7 @@ const openapiDocument = {
|
|
|
23385
23389
|
"/email-rule-scope-options": { "get": {
|
|
23386
23390
|
"operationId": "listEmailRuleScopeOptions",
|
|
23387
23391
|
"summary": "List what a rule can cover",
|
|
23388
|
-
"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).",
|
|
23389
23393
|
"tags": ["Email Rules"],
|
|
23390
23394
|
"security": [{ "BearerAuth": [] }],
|
|
23391
23395
|
"parameters": [{
|
|
@@ -23447,7 +23451,7 @@ const openapiDocument = {
|
|
|
23447
23451
|
}
|
|
23448
23452
|
},
|
|
23449
23453
|
"403": {
|
|
23450
|
-
"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.",
|
|
23451
23455
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
23452
23456
|
},
|
|
23453
23457
|
"409": {
|
|
@@ -23484,7 +23488,7 @@ const openapiDocument = {
|
|
|
23484
23488
|
"post": {
|
|
23485
23489
|
"operationId": "createEmailRuleRequest",
|
|
23486
23490
|
"summary": "Ask a member for a rule",
|
|
23487
|
-
"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).",
|
|
23488
23492
|
"tags": ["Email Rules"],
|
|
23489
23493
|
"security": [{ "BearerAuth": [] }],
|
|
23490
23494
|
"requestBody": {
|
|
@@ -23524,7 +23528,7 @@ const openapiDocument = {
|
|
|
23524
23528
|
}
|
|
23525
23529
|
},
|
|
23526
23530
|
"403": {
|
|
23527
|
-
"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.",
|
|
23528
23532
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
23529
23533
|
},
|
|
23530
23534
|
"404": {
|
|
@@ -23579,7 +23583,7 @@ const openapiDocument = {
|
|
|
23579
23583
|
"get": {
|
|
23580
23584
|
"operationId": "listEmailRuleRequests",
|
|
23581
23585
|
"summary": "List rule requests",
|
|
23582
|
-
"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).",
|
|
23583
23587
|
"tags": ["Email Rules"],
|
|
23584
23588
|
"security": [{ "BearerAuth": [] }],
|
|
23585
23589
|
"parameters": [
|
|
@@ -23688,7 +23692,7 @@ const openapiDocument = {
|
|
|
23688
23692
|
}
|
|
23689
23693
|
},
|
|
23690
23694
|
"403": {
|
|
23691
|
-
"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.",
|
|
23692
23696
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
23693
23697
|
},
|
|
23694
23698
|
"429": {
|
|
@@ -23721,7 +23725,7 @@ const openapiDocument = {
|
|
|
23721
23725
|
"/email-rule-requests/target-check": { "post": {
|
|
23722
23726
|
"operationId": "checkEmailRuleRequestTarget",
|
|
23723
23727
|
"summary": "Check whether a member can accept a rule request",
|
|
23724
|
-
"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).",
|
|
23725
23729
|
"tags": ["Email Rules"],
|
|
23726
23730
|
"security": [{ "BearerAuth": [] }],
|
|
23727
23731
|
"requestBody": {
|
|
@@ -23767,7 +23771,7 @@ const openapiDocument = {
|
|
|
23767
23771
|
}
|
|
23768
23772
|
},
|
|
23769
23773
|
"403": {
|
|
23770
|
-
"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.",
|
|
23771
23775
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
23772
23776
|
},
|
|
23773
23777
|
"404": {
|
|
@@ -23819,7 +23823,7 @@ const openapiDocument = {
|
|
|
23819
23823
|
"get": {
|
|
23820
23824
|
"operationId": "getEmailRuleRequest",
|
|
23821
23825
|
"summary": "Read a rule request",
|
|
23822
|
-
"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).",
|
|
23823
23827
|
"tags": ["Email Rules"],
|
|
23824
23828
|
"security": [{ "BearerAuth": [] }],
|
|
23825
23829
|
"parameters": [{
|
|
@@ -23867,7 +23871,7 @@ const openapiDocument = {
|
|
|
23867
23871
|
}
|
|
23868
23872
|
},
|
|
23869
23873
|
"403": {
|
|
23870
|
-
"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.",
|
|
23871
23875
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
23872
23876
|
},
|
|
23873
23877
|
"404": {
|
|
@@ -23903,7 +23907,7 @@ const openapiDocument = {
|
|
|
23903
23907
|
"delete": {
|
|
23904
23908
|
"operationId": "deleteEmailRuleRequest",
|
|
23905
23909
|
"summary": "Delete a withdrawn rule request",
|
|
23906
|
-
"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).",
|
|
23907
23911
|
"tags": ["Email Rules"],
|
|
23908
23912
|
"security": [{ "BearerAuth": [] }],
|
|
23909
23913
|
"parameters": [{
|
|
@@ -23951,7 +23955,7 @@ const openapiDocument = {
|
|
|
23951
23955
|
}
|
|
23952
23956
|
},
|
|
23953
23957
|
"403": {
|
|
23954
|
-
"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.",
|
|
23955
23959
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
23956
23960
|
},
|
|
23957
23961
|
"404": {
|
|
@@ -23992,7 +23996,7 @@ const openapiDocument = {
|
|
|
23992
23996
|
"/email-rule-requests/{id}/decline": { "post": {
|
|
23993
23997
|
"operationId": "declineEmailRuleRequest",
|
|
23994
23998
|
"summary": "Decline a rule request",
|
|
23995
|
-
"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).",
|
|
23996
24000
|
"tags": ["Email Rules"],
|
|
23997
24001
|
"security": [{ "BearerAuth": [] }],
|
|
23998
24002
|
"parameters": [{
|
|
@@ -24058,7 +24062,7 @@ const openapiDocument = {
|
|
|
24058
24062
|
}
|
|
24059
24063
|
},
|
|
24060
24064
|
"403": {
|
|
24061
|
-
"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.",
|
|
24062
24066
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
24063
24067
|
},
|
|
24064
24068
|
"404": {
|
|
@@ -24098,7 +24102,7 @@ const openapiDocument = {
|
|
|
24098
24102
|
"/email-rule-requests/{id}/withdraw": { "post": {
|
|
24099
24103
|
"operationId": "withdrawEmailRuleRequest",
|
|
24100
24104
|
"summary": "Withdraw a rule request",
|
|
24101
|
-
"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).",
|
|
24102
24106
|
"tags": ["Email Rules"],
|
|
24103
24107
|
"security": [{ "BearerAuth": [] }],
|
|
24104
24108
|
"parameters": [{
|
|
@@ -24156,7 +24160,7 @@ const openapiDocument = {
|
|
|
24156
24160
|
}
|
|
24157
24161
|
},
|
|
24158
24162
|
"403": {
|
|
24159
|
-
"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.",
|
|
24160
24164
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
24161
24165
|
},
|
|
24162
24166
|
"404": {
|
|
@@ -24196,7 +24200,7 @@ const openapiDocument = {
|
|
|
24196
24200
|
"/email-rule-requests/{id}/accept": { "post": {
|
|
24197
24201
|
"operationId": "acceptEmailRuleRequest",
|
|
24198
24202
|
"summary": "Accept a rule request",
|
|
24199
|
-
"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).",
|
|
24200
24204
|
"tags": ["Email Rules"],
|
|
24201
24205
|
"security": [{ "BearerAuth": [] }],
|
|
24202
24206
|
"parameters": [{
|
|
@@ -24256,7 +24260,7 @@ const openapiDocument = {
|
|
|
24256
24260
|
}
|
|
24257
24261
|
},
|
|
24258
24262
|
"403": {
|
|
24259
|
-
"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.",
|
|
24260
24264
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
24261
24265
|
},
|
|
24262
24266
|
"404": {
|
|
@@ -24300,7 +24304,7 @@ const openapiDocument = {
|
|
|
24300
24304
|
"/email-rule-shares": { "get": {
|
|
24301
24305
|
"operationId": "listEmailRuleShares",
|
|
24302
24306
|
"summary": "List rule shares",
|
|
24303
|
-
"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).",
|
|
24304
24308
|
"tags": ["Email Rules"],
|
|
24305
24309
|
"security": [{ "BearerAuth": [] }],
|
|
24306
24310
|
"parameters": [
|
|
@@ -24401,7 +24405,7 @@ const openapiDocument = {
|
|
|
24401
24405
|
}
|
|
24402
24406
|
},
|
|
24403
24407
|
"403": {
|
|
24404
|
-
"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.",
|
|
24405
24409
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
24406
24410
|
},
|
|
24407
24411
|
"429": {
|
|
@@ -24550,7 +24554,7 @@ const openapiDocument = {
|
|
|
24550
24554
|
"get": {
|
|
24551
24555
|
"operationId": "getEmailRuleShare",
|
|
24552
24556
|
"summary": "Get a rule share",
|
|
24553
|
-
"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).",
|
|
24554
24558
|
"tags": ["Email Rules"],
|
|
24555
24559
|
"security": [{ "BearerAuth": [] }],
|
|
24556
24560
|
"parameters": [{
|
|
@@ -24598,7 +24602,7 @@ const openapiDocument = {
|
|
|
24598
24602
|
}
|
|
24599
24603
|
},
|
|
24600
24604
|
"403": {
|
|
24601
|
-
"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.",
|
|
24602
24606
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
24603
24607
|
},
|
|
24604
24608
|
"404": {
|
|
@@ -24845,7 +24849,7 @@ const openapiDocument = {
|
|
|
24845
24849
|
"/email-rules/covering-me": { "get": {
|
|
24846
24850
|
"operationId": "listEmailRulesCoveringMe",
|
|
24847
24851
|
"summary": "List the rules over your mail",
|
|
24848
|
-
"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,
|
|
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.",
|
|
24849
24853
|
"tags": ["Email Rule Oversight"],
|
|
24850
24854
|
"security": [{ "BearerAuth": [] }],
|
|
24851
24855
|
"parameters": [{
|
|
@@ -24911,7 +24915,7 @@ const openapiDocument = {
|
|
|
24911
24915
|
}
|
|
24912
24916
|
},
|
|
24913
24917
|
"403": {
|
|
24914
|
-
"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.",
|
|
24915
24919
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
24916
24920
|
},
|
|
24917
24921
|
"429": {
|
|
@@ -24943,7 +24947,7 @@ const openapiDocument = {
|
|
|
24943
24947
|
"/email-rules/covering-me/{id}": { "get": {
|
|
24944
24948
|
"operationId": "getEmailRuleCoveringMe",
|
|
24945
24949
|
"summary": "Get a rule over your mail",
|
|
24946
|
-
"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,
|
|
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.",
|
|
24947
24951
|
"tags": ["Email Rule Oversight"],
|
|
24948
24952
|
"security": [{ "BearerAuth": [] }],
|
|
24949
24953
|
"parameters": [{
|
|
@@ -24991,7 +24995,7 @@ const openapiDocument = {
|
|
|
24991
24995
|
}
|
|
24992
24996
|
},
|
|
24993
24997
|
"403": {
|
|
24994
|
-
"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.",
|
|
24995
24999
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
24996
25000
|
},
|
|
24997
25001
|
"404": {
|
|
@@ -25027,7 +25031,7 @@ const openapiDocument = {
|
|
|
25027
25031
|
"/email-rules/covering-me/{id}/decisions": { "get": {
|
|
25028
25032
|
"operationId": "listEmailRuleDecisionsOnMyMail",
|
|
25029
25033
|
"summary": "List what a rule decided about your mail",
|
|
25030
|
-
"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.",
|
|
25031
25035
|
"tags": ["Email Rule Oversight"],
|
|
25032
25036
|
"security": [{ "BearerAuth": [] }],
|
|
25033
25037
|
"parameters": [
|
|
@@ -25117,7 +25121,7 @@ const openapiDocument = {
|
|
|
25117
25121
|
}
|
|
25118
25122
|
},
|
|
25119
25123
|
"403": {
|
|
25120
|
-
"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.",
|
|
25121
25125
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
25122
25126
|
},
|
|
25123
25127
|
"404": {
|
|
@@ -25154,7 +25158,7 @@ const openapiDocument = {
|
|
|
25154
25158
|
"post": {
|
|
25155
25159
|
"operationId": "createEmailRuleObjection",
|
|
25156
25160
|
"summary": "Object to a rule over your mail",
|
|
25157
|
-
"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.",
|
|
25158
25162
|
"tags": ["Email Rule Oversight"],
|
|
25159
25163
|
"security": [{ "BearerAuth": [] }],
|
|
25160
25164
|
"requestBody": {
|
|
@@ -25200,7 +25204,7 @@ const openapiDocument = {
|
|
|
25200
25204
|
}
|
|
25201
25205
|
},
|
|
25202
25206
|
"403": {
|
|
25203
|
-
"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.",
|
|
25204
25208
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
25205
25209
|
},
|
|
25206
25210
|
"404": {
|
|
@@ -25255,7 +25259,7 @@ const openapiDocument = {
|
|
|
25255
25259
|
"get": {
|
|
25256
25260
|
"operationId": "listEmailRuleObjections",
|
|
25257
25261
|
"summary": "List objections",
|
|
25258
|
-
"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.",
|
|
25259
25263
|
"tags": ["Email Rule Oversight"],
|
|
25260
25264
|
"security": [{ "BearerAuth": [] }],
|
|
25261
25265
|
"parameters": [
|
|
@@ -25355,7 +25359,7 @@ const openapiDocument = {
|
|
|
25355
25359
|
}
|
|
25356
25360
|
},
|
|
25357
25361
|
"403": {
|
|
25358
|
-
"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.",
|
|
25359
25363
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
25360
25364
|
},
|
|
25361
25365
|
"429": {
|
|
@@ -25388,7 +25392,7 @@ const openapiDocument = {
|
|
|
25388
25392
|
"/email-rule-objections/{id}": { "get": {
|
|
25389
25393
|
"operationId": "getEmailRuleObjection",
|
|
25390
25394
|
"summary": "Get an objection",
|
|
25391
|
-
"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.",
|
|
25392
25396
|
"tags": ["Email Rule Oversight"],
|
|
25393
25397
|
"security": [{ "BearerAuth": [] }],
|
|
25394
25398
|
"parameters": [{
|
|
@@ -25436,7 +25440,7 @@ const openapiDocument = {
|
|
|
25436
25440
|
}
|
|
25437
25441
|
},
|
|
25438
25442
|
"403": {
|
|
25439
|
-
"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.",
|
|
25440
25444
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
25441
25445
|
},
|
|
25442
25446
|
"404": {
|
|
@@ -25472,7 +25476,7 @@ const openapiDocument = {
|
|
|
25472
25476
|
"/email-rule-objections/{id}/withdraw": { "post": {
|
|
25473
25477
|
"operationId": "withdrawEmailRuleObjection",
|
|
25474
25478
|
"summary": "Withdraw an objection",
|
|
25475
|
-
"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.",
|
|
25476
25480
|
"tags": ["Email Rule Oversight"],
|
|
25477
25481
|
"security": [{ "BearerAuth": [] }],
|
|
25478
25482
|
"parameters": [{
|
|
@@ -25530,7 +25534,7 @@ const openapiDocument = {
|
|
|
25530
25534
|
}
|
|
25531
25535
|
},
|
|
25532
25536
|
"403": {
|
|
25533
|
-
"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.",
|
|
25534
25538
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
25535
25539
|
},
|
|
25536
25540
|
"404": {
|
|
@@ -25570,7 +25574,7 @@ const openapiDocument = {
|
|
|
25570
25574
|
"/email-rule-objections/{id}/decline": { "post": {
|
|
25571
25575
|
"operationId": "declineEmailRuleObjection",
|
|
25572
25576
|
"summary": "Decline an objection to your rule",
|
|
25573
|
-
"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.",
|
|
25574
25578
|
"tags": ["Email Rule Oversight"],
|
|
25575
25579
|
"security": [{ "BearerAuth": [] }],
|
|
25576
25580
|
"parameters": [{
|
|
@@ -25645,7 +25649,7 @@ const openapiDocument = {
|
|
|
25645
25649
|
}
|
|
25646
25650
|
},
|
|
25647
25651
|
"403": {
|
|
25648
|
-
"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.",
|
|
25649
25653
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
25650
25654
|
},
|
|
25651
25655
|
"404": {
|
|
@@ -25685,7 +25689,7 @@ const openapiDocument = {
|
|
|
25685
25689
|
"/email-rule-objections/{id}/accept": { "post": {
|
|
25686
25690
|
"operationId": "acceptEmailRuleObjection",
|
|
25687
25691
|
"summary": "Accept an objection to your rule",
|
|
25688
|
-
"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.",
|
|
25689
25693
|
"tags": ["Email Rule Oversight"],
|
|
25690
25694
|
"security": [{ "BearerAuth": [] }],
|
|
25691
25695
|
"parameters": [{
|
|
@@ -25743,7 +25747,7 @@ const openapiDocument = {
|
|
|
25743
25747
|
}
|
|
25744
25748
|
},
|
|
25745
25749
|
"403": {
|
|
25746
|
-
"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.",
|
|
25747
25751
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
25748
25752
|
},
|
|
25749
25753
|
"404": {
|
|
@@ -34312,7 +34316,7 @@ const openapiDocument = {
|
|
|
34312
34316
|
"summary": "List API keys",
|
|
34313
34317
|
"tags": ["Credentials"],
|
|
34314
34318
|
"security": [{ "BearerAuth": [] }],
|
|
34315
|
-
"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.",
|
|
34316
34320
|
"x-primitive-person-only": { "access": "session_or_cli" },
|
|
34317
34321
|
"parameters": [{
|
|
34318
34322
|
"name": "cursor",
|
|
@@ -34763,7 +34767,7 @@ const openapiDocument = {
|
|
|
34763
34767
|
"summary": "Get an API key",
|
|
34764
34768
|
"tags": ["Credentials"],
|
|
34765
34769
|
"security": [{ "BearerAuth": [] }],
|
|
34766
|
-
"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.",
|
|
34767
34771
|
"x-primitive-person-only": { "access": "session_or_cli" },
|
|
34768
34772
|
"parameters": [{
|
|
34769
34773
|
"name": "id",
|
|
@@ -37500,7 +37504,7 @@ const openapiDocument = {
|
|
|
37500
37504
|
"get": {
|
|
37501
37505
|
"operationId": "getRelayAutoJoin",
|
|
37502
37506
|
"summary": "Get the auto-join setting",
|
|
37503
|
-
"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.",
|
|
37504
37508
|
"tags": ["Roles and members"],
|
|
37505
37509
|
"security": [{ "BearerAuth": [] }],
|
|
37506
37510
|
"responses": {
|
|
@@ -37587,7 +37591,7 @@ const openapiDocument = {
|
|
|
37587
37591
|
"put": {
|
|
37588
37592
|
"operationId": "setRelayAutoJoin",
|
|
37589
37593
|
"summary": "Change the auto-join setting",
|
|
37590
|
-
"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.",
|
|
37591
37595
|
"tags": ["Roles and members"],
|
|
37592
37596
|
"security": [{ "BearerAuth": [] }],
|
|
37593
37597
|
"requestBody": {
|
|
@@ -40313,6 +40317,7 @@ const openapiDocument = {
|
|
|
40313
40317
|
"build_failed",
|
|
40314
40318
|
"builder_unavailable",
|
|
40315
40319
|
"builtin_role",
|
|
40320
|
+
"chunk_size_mismatch",
|
|
40316
40321
|
"chunk_too_large",
|
|
40317
40322
|
"chunks_missing",
|
|
40318
40323
|
"claim_failed",
|
|
@@ -40397,6 +40402,7 @@ const openapiDocument = {
|
|
|
40397
40402
|
"invalid_code",
|
|
40398
40403
|
"invalid_cursor",
|
|
40399
40404
|
"invalid_email",
|
|
40405
|
+
"invalid_manifest",
|
|
40400
40406
|
"invalid_payload_reference",
|
|
40401
40407
|
"invalid_request",
|
|
40402
40408
|
"invalid_signature",
|
|
@@ -42607,6 +42613,35 @@ const openapiDocument = {
|
|
|
42607
42613
|
"format": "uuid",
|
|
42608
42614
|
"description": "With `group=message`: the send of this message, when you can read it (under a connected agent key, only its own sends)."
|
|
42609
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
|
+
},
|
|
42610
42645
|
"snippet": {
|
|
42611
42646
|
"type": ["string", "null"],
|
|
42612
42647
|
"maxLength": 200,
|
|
@@ -42629,6 +42664,7 @@ const openapiDocument = {
|
|
|
42629
42664
|
"automated_reasons",
|
|
42630
42665
|
"from_verified",
|
|
42631
42666
|
"from_header_email",
|
|
42667
|
+
"imported",
|
|
42632
42668
|
"snippet"
|
|
42633
42669
|
]
|
|
42634
42670
|
},
|
|
@@ -43252,6 +43288,35 @@ const openapiDocument = {
|
|
|
43252
43288
|
}
|
|
43253
43289
|
}
|
|
43254
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
|
+
},
|
|
43255
43320
|
"snippet": {
|
|
43256
43321
|
"type": ["string", "null"],
|
|
43257
43322
|
"maxLength": 200,
|
|
@@ -43281,6 +43346,7 @@ const openapiDocument = {
|
|
|
43281
43346
|
"from_verified",
|
|
43282
43347
|
"from_header_email",
|
|
43283
43348
|
"from_name",
|
|
43349
|
+
"imported",
|
|
43284
43350
|
"snippet"
|
|
43285
43351
|
]
|
|
43286
43352
|
},
|
|
@@ -43802,6 +43868,35 @@ const openapiDocument = {
|
|
|
43802
43868
|
"items": { "$ref": "#/components/schemas/EmailAttachment" },
|
|
43803
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}`."
|
|
43804
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
|
+
},
|
|
43805
43900
|
"copies": {
|
|
43806
43901
|
"type": "array",
|
|
43807
43902
|
"items": {
|
|
@@ -50236,7 +50331,7 @@ const openapiDocument = {
|
|
|
50236
50331
|
},
|
|
50237
50332
|
"state": {
|
|
50238
50333
|
"type": "string",
|
|
50239
|
-
"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)."
|
|
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."
|
|
50240
50335
|
},
|
|
50241
50336
|
"created_at": {
|
|
50242
50337
|
"type": "string",
|
|
@@ -50315,6 +50410,15 @@ const openapiDocument = {
|
|
|
50315
50410
|
"next_cursor": {
|
|
50316
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.",
|
|
50317
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"
|
|
50318
50422
|
}
|
|
50319
50423
|
},
|
|
50320
50424
|
"required": [
|
|
@@ -50562,16 +50666,25 @@ const openapiDocument = {
|
|
|
50562
50666
|
"warnings": {
|
|
50563
50667
|
"type": "array",
|
|
50564
50668
|
"items": { "type": "string" },
|
|
50565
|
-
"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."
|
|
50566
50670
|
},
|
|
50567
50671
|
"compiled_by": {
|
|
50568
50672
|
"type": "string",
|
|
50569
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."
|
|
50570
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
|
+
},
|
|
50571
50680
|
"breadth": {
|
|
50572
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.",
|
|
50573
50682
|
"anyOf": [{ "$ref": "#/components/schemas/EmailRuleBreadth" }, { "type": "null" }]
|
|
50574
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
|
+
},
|
|
50575
50688
|
"sql": {
|
|
50576
50689
|
"description": "Present only when include_sql was true.",
|
|
50577
50690
|
"type": "object",
|
|
@@ -50597,6 +50710,34 @@ const openapiDocument = {
|
|
|
50597
50710
|
"compiled_by"
|
|
50598
50711
|
]
|
|
50599
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
|
+
},
|
|
50600
50741
|
"EmailRuleScopeWarning": {
|
|
50601
50742
|
"type": "object",
|
|
50602
50743
|
"properties": {
|
|
@@ -50860,7 +51001,7 @@ const openapiDocument = {
|
|
|
50860
51001
|
},
|
|
50861
51002
|
"scope_selection": { "$ref": "#/components/schemas/EmailRuleScopeSelection" },
|
|
50862
51003
|
"rule_id": {
|
|
50863
|
-
"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).",
|
|
50864
51005
|
"type": "string",
|
|
50865
51006
|
"format": "uuid"
|
|
50866
51007
|
},
|
|
@@ -50917,25 +51058,7 @@ const openapiDocument = {
|
|
|
50917
51058
|
"TestEmailRuleResult": {
|
|
50918
51059
|
"type": "object",
|
|
50919
51060
|
"properties": {
|
|
50920
|
-
"rule": {
|
|
50921
|
-
"type": "object",
|
|
50922
|
-
"properties": {
|
|
50923
|
-
"id": {
|
|
50924
|
-
"type": ["string", "null"],
|
|
50925
|
-
"format": "uuid"
|
|
50926
|
-
},
|
|
50927
|
-
"version": {
|
|
50928
|
-
"type": ["integer", "null"],
|
|
50929
|
-
"exclusiveMinimum": 0
|
|
50930
|
-
},
|
|
50931
|
-
"vocabulary": { "type": "string" }
|
|
50932
|
-
},
|
|
50933
|
-
"required": [
|
|
50934
|
-
"id",
|
|
50935
|
-
"version",
|
|
50936
|
-
"vocabulary"
|
|
50937
|
-
]
|
|
50938
|
-
},
|
|
51061
|
+
"rule": { "$ref": "#/components/schemas/EmailRuleTested" },
|
|
50939
51062
|
"window": {
|
|
50940
51063
|
"type": "object",
|
|
50941
51064
|
"properties": {
|
|
@@ -51540,25 +51663,7 @@ const openapiDocument = {
|
|
|
51540
51663
|
"GenerateLookAlikesResult": {
|
|
51541
51664
|
"type": "object",
|
|
51542
51665
|
"properties": {
|
|
51543
|
-
"rule": {
|
|
51544
|
-
"type": "object",
|
|
51545
|
-
"properties": {
|
|
51546
|
-
"id": {
|
|
51547
|
-
"type": ["string", "null"],
|
|
51548
|
-
"format": "uuid"
|
|
51549
|
-
},
|
|
51550
|
-
"version": {
|
|
51551
|
-
"type": ["integer", "null"],
|
|
51552
|
-
"exclusiveMinimum": 0
|
|
51553
|
-
},
|
|
51554
|
-
"vocabulary": { "type": "string" }
|
|
51555
|
-
},
|
|
51556
|
-
"required": [
|
|
51557
|
-
"id",
|
|
51558
|
-
"version",
|
|
51559
|
-
"vocabulary"
|
|
51560
|
-
]
|
|
51561
|
-
},
|
|
51666
|
+
"rule": { "$ref": "#/components/schemas/EmailRuleTested" },
|
|
51562
51667
|
"look_alikes": {
|
|
51563
51668
|
"type": "array",
|
|
51564
51669
|
"items": { "$ref": "#/components/schemas/EmailRuleLookAlike" }
|
|
@@ -51722,25 +51827,7 @@ const openapiDocument = {
|
|
|
51722
51827
|
"TestEmailRuleOnSampleResult": {
|
|
51723
51828
|
"type": "object",
|
|
51724
51829
|
"properties": {
|
|
51725
|
-
"rule": {
|
|
51726
|
-
"type": "object",
|
|
51727
|
-
"properties": {
|
|
51728
|
-
"id": {
|
|
51729
|
-
"type": ["string", "null"],
|
|
51730
|
-
"format": "uuid"
|
|
51731
|
-
},
|
|
51732
|
-
"version": {
|
|
51733
|
-
"type": ["integer", "null"],
|
|
51734
|
-
"exclusiveMinimum": 0
|
|
51735
|
-
},
|
|
51736
|
-
"vocabulary": { "type": "string" }
|
|
51737
|
-
},
|
|
51738
|
-
"required": [
|
|
51739
|
-
"id",
|
|
51740
|
-
"version",
|
|
51741
|
-
"vocabulary"
|
|
51742
|
-
]
|
|
51743
|
-
},
|
|
51830
|
+
"rule": { "$ref": "#/components/schemas/EmailRuleTested" },
|
|
51744
51831
|
"received_at": {
|
|
51745
51832
|
"type": "string",
|
|
51746
51833
|
"format": "date-time",
|
|
@@ -52046,6 +52133,10 @@ const openapiDocument = {
|
|
|
52046
52133
|
"endpoints",
|
|
52047
52134
|
"shares_ended"
|
|
52048
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"
|
|
52049
52140
|
}
|
|
52050
52141
|
},
|
|
52051
52142
|
"required": [
|
|
@@ -52286,6 +52377,10 @@ const openapiDocument = {
|
|
|
52286
52377
|
"breadth": {
|
|
52287
52378
|
"description": "Ignored (the compile answer's breadth).",
|
|
52288
52379
|
"anyOf": [{ "$ref": "#/components/schemas/EmailRuleBreadth" }, { "type": "null" }]
|
|
52380
|
+
},
|
|
52381
|
+
"conditions_breadth": {
|
|
52382
|
+
"description": "Ignored.",
|
|
52383
|
+
"anyOf": [{ "$ref": "#/components/schemas/EmailRuleBreadth" }, { "type": "null" }]
|
|
52289
52384
|
}
|
|
52290
52385
|
},
|
|
52291
52386
|
"required": [
|
|
@@ -52569,6 +52664,15 @@ const openapiDocument = {
|
|
|
52569
52664
|
"description": "Ignored (the compile answer's breadth).",
|
|
52570
52665
|
"anyOf": [{ "$ref": "#/components/schemas/EmailRuleBreadth" }, { "type": "null" }]
|
|
52571
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
|
+
},
|
|
52572
52676
|
"evaluation_scope": {
|
|
52573
52677
|
"type": "string",
|
|
52574
52678
|
"enum": [
|
|
@@ -52627,7 +52731,7 @@ const openapiDocument = {
|
|
|
52627
52731
|
"maximum": 2147483647
|
|
52628
52732
|
},
|
|
52629
52733
|
"if_expectations_pass": {
|
|
52630
|
-
"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.",
|
|
52631
52735
|
"type": "boolean"
|
|
52632
52736
|
},
|
|
52633
52737
|
"restore_version": {
|
|
@@ -52853,7 +52957,7 @@ const openapiDocument = {
|
|
|
52853
52957
|
},
|
|
52854
52958
|
"required": ["owner", "count"]
|
|
52855
52959
|
},
|
|
52856
|
-
"description": "API keys that work now (not revoked, expired or suspended) whose access lists the rule
|
|
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."
|
|
52857
52961
|
},
|
|
52858
52962
|
"webhooks": {
|
|
52859
52963
|
"type": "array",
|
|
@@ -52894,11 +52998,21 @@ const openapiDocument = {
|
|
|
52894
52998
|
"count": {
|
|
52895
52999
|
"type": "integer",
|
|
52896
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
|
|
52897
53011
|
}
|
|
52898
53012
|
},
|
|
52899
53013
|
"required": ["owner", "count"]
|
|
52900
53014
|
},
|
|
52901
|
-
"description": "Webhooks that are sent what it matches: those
|
|
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)."
|
|
52902
53016
|
},
|
|
52903
53017
|
"shares": {
|
|
52904
53018
|
"type": "array",
|
|
@@ -52935,7 +53049,7 @@ const openapiDocument = {
|
|
|
52935
53049
|
},
|
|
52936
53050
|
"required": ["beneficiary", "count"]
|
|
52937
53051
|
},
|
|
52938
|
-
"description": "The rule's live share
|
|
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."
|
|
52939
53053
|
}
|
|
52940
53054
|
},
|
|
52941
53055
|
"required": [
|
|
@@ -53423,6 +53537,15 @@ const openapiDocument = {
|
|
|
53423
53537
|
"breadth": {
|
|
53424
53538
|
"description": "Ignored (the compile answer's breadth).",
|
|
53425
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"
|
|
53426
53549
|
}
|
|
53427
53550
|
},
|
|
53428
53551
|
"required": [
|
|
@@ -54037,6 +54160,15 @@ const openapiDocument = {
|
|
|
54037
54160
|
"description": "Ignored (the compile answer's breadth).",
|
|
54038
54161
|
"anyOf": [{ "$ref": "#/components/schemas/EmailRuleBreadth" }, { "type": "null" }]
|
|
54039
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
|
+
},
|
|
54040
54172
|
"expectation_samples": {
|
|
54041
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.",
|
|
54042
54174
|
"minItems": 1,
|
|
@@ -54078,6 +54210,34 @@ const openapiDocument = {
|
|
|
54078
54210
|
"items": {
|
|
54079
54211
|
"type": "object",
|
|
54080
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
|
+
},
|
|
54081
54241
|
"delivery_report": {
|
|
54082
54242
|
"type": ["object", "null"],
|
|
54083
54243
|
"properties": {
|
|
@@ -54315,6 +54475,7 @@ const openapiDocument = {
|
|
|
54315
54475
|
}
|
|
54316
54476
|
},
|
|
54317
54477
|
"required": [
|
|
54478
|
+
"imported",
|
|
54318
54479
|
"id",
|
|
54319
54480
|
"message_id",
|
|
54320
54481
|
"domain_id",
|
|
@@ -55078,6 +55239,7 @@ const openapiDocument = {
|
|
|
55078
55239
|
"type": "object",
|
|
55079
55240
|
"description": "What an inbound email says, as plain text, with the fields that identify it.",
|
|
55080
55241
|
"required": [
|
|
55242
|
+
"imported",
|
|
55081
55243
|
"id",
|
|
55082
55244
|
"thread_id",
|
|
55083
55245
|
"received_at",
|
|
@@ -55098,6 +55260,35 @@ const openapiDocument = {
|
|
|
55098
55260
|
"attachments"
|
|
55099
55261
|
],
|
|
55100
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
|
+
},
|
|
55101
55292
|
"id": {
|
|
55102
55293
|
"type": "string",
|
|
55103
55294
|
"format": "uuid",
|
|
@@ -58590,6 +58781,24 @@ const openapiDocument = {
|
|
|
58590
58781
|
"agent_address",
|
|
58591
58782
|
"person"
|
|
58592
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."
|
|
58593
58802
|
}
|
|
58594
58803
|
},
|
|
58595
58804
|
"required": [
|
|
@@ -59877,6 +60086,24 @@ const openapiDocument = {
|
|
|
59877
60086
|
"rotated_to": {
|
|
59878
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.",
|
|
59879
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."
|
|
59880
60107
|
}
|
|
59881
60108
|
},
|
|
59882
60109
|
"required": [
|
|
@@ -59976,6 +60203,24 @@ const openapiDocument = {
|
|
|
59976
60203
|
"rotated_to": {
|
|
59977
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.",
|
|
59978
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."
|
|
59979
60224
|
}
|
|
59980
60225
|
},
|
|
59981
60226
|
"required": [
|
|
@@ -62746,6 +62991,29 @@ const openapiDocument = {
|
|
|
62746
62991
|
],
|
|
62747
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."
|
|
62748
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
|
+
}] },
|
|
62749
63017
|
"EndpointUpdateWarning": {
|
|
62750
63018
|
"type": "object",
|
|
62751
63019
|
"properties": {
|
|
@@ -63183,6 +63451,7 @@ async function call$1(request) {
|
|
|
63183
63451
|
};
|
|
63184
63452
|
}
|
|
63185
63453
|
}
|
|
63454
|
+
/** A time as "YYYY-MM-DD HH:MM" in UTC; anything that is not a time, as given. */
|
|
63186
63455
|
function minute(value) {
|
|
63187
63456
|
if (!value) return "";
|
|
63188
63457
|
const date = new Date(value);
|
|
@@ -63244,16 +63513,21 @@ function formatAskedRows(items, complete = false) {
|
|
|
63244
63513
|
const line = (cells) => cells.map((cell, i) => i === cells.length - 1 ? cell : cell.padEnd(widths[i] ?? 0)).join(" ");
|
|
63245
63514
|
return [line(header), ...rows.map(line)].join("\n");
|
|
63246
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.`;
|
|
63247
63518
|
/**
|
|
63248
63519
|
* One line per coverage notice: what it told (started, new_version, or
|
|
63249
63520
|
* baseline for a rule that already covered you when notices began), when, the
|
|
63250
|
-
* rule's name then, and its author
|
|
63251
|
-
*
|
|
63252
|
-
*
|
|
63253
|
-
*
|
|
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.
|
|
63254
63528
|
*/
|
|
63255
|
-
function formatConcerningRows(items, complete = false) {
|
|
63256
|
-
if (items.length === 0) return complete ? "
|
|
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.";
|
|
63257
63531
|
const rows = items.map((item) => [
|
|
63258
63532
|
item.state,
|
|
63259
63533
|
minute(item.created_at),
|
|
@@ -63268,7 +63542,12 @@ function formatConcerningRows(items, complete = false) {
|
|
|
63268
63542
|
];
|
|
63269
63543
|
const widths = header.map((h, i) => Math.max(h.length, ...rows.map((row) => (row[i] ?? "").length)));
|
|
63270
63544
|
const line = (cells) => cells.map((cell, i) => i === cells.length - 1 ? cell : cell.padEnd(widths[i] ?? 0)).join(" ");
|
|
63271
|
-
|
|
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");
|
|
63272
63551
|
}
|
|
63273
63552
|
/** What was left out, and why: no counts, only the kinds and what would show them. */
|
|
63274
63553
|
function formatWithheld(withheld) {
|
|
@@ -63300,6 +63579,7 @@ async function runActivityList(command, flags, relation) {
|
|
|
63300
63579
|
const items = [];
|
|
63301
63580
|
let covers = "";
|
|
63302
63581
|
let withheld = [];
|
|
63582
|
+
let asOf;
|
|
63303
63583
|
let cursor = flags.cursor;
|
|
63304
63584
|
for (let page = 0; page < (flags.all ? 50 : 1); page += 1) {
|
|
63305
63585
|
const result = await call$1(listActivityObjects({
|
|
@@ -63326,6 +63606,7 @@ async function runActivityList(command, flags, relation) {
|
|
|
63326
63606
|
}
|
|
63327
63607
|
covers = result.data.covers;
|
|
63328
63608
|
withheld = result.data.withheld;
|
|
63609
|
+
if (page === 0) asOf = result.data.as_of;
|
|
63329
63610
|
items.push(...result.data.items);
|
|
63330
63611
|
cursor = result.data.next_cursor ?? void 0;
|
|
63331
63612
|
if (!cursor) break;
|
|
@@ -63335,12 +63616,13 @@ async function runActivityList(command, flags, relation) {
|
|
|
63335
63616
|
covers,
|
|
63336
63617
|
items,
|
|
63337
63618
|
withheld,
|
|
63338
|
-
next_cursor: cursor ?? null
|
|
63619
|
+
next_cursor: cursor ?? null,
|
|
63620
|
+
...asOf !== void 0 ? { as_of: asOf } : {}
|
|
63339
63621
|
}, null, 2));
|
|
63340
63622
|
return;
|
|
63341
63623
|
}
|
|
63342
63624
|
const complete = flags.state === "all" && !flags.cursor && !cursor && withheld.length === 0;
|
|
63343
|
-
command.log(relation === "asked" ? formatAskedRows(items, complete) : relation === "concerning" ? formatConcerningRows(items, complete) : formatActivityRows(covers, items));
|
|
63625
|
+
command.log(relation === "asked" ? formatAskedRows(items, complete) : relation === "concerning" ? formatConcerningRows(items, complete, asOf) : formatActivityRows(covers, items));
|
|
63344
63626
|
const notShown = formatWithheld(withheld);
|
|
63345
63627
|
if (notShown) command.log(`\n${notShown}`);
|
|
63346
63628
|
if (cursor) command.log(`\nMore: ${resumeCommand(command.config.bin, flags, cursor, relation)}`);
|
|
@@ -63425,7 +63707,9 @@ var ActivityAskedCommand = class ActivityAskedCommand extends Command {
|
|
|
63425
63707
|
var ActivityConcerningCommand = class ActivityConcerningCommand extends Command {
|
|
63426
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.
|
|
63427
63709
|
|
|
63428
|
-
|
|
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.`;
|
|
63429
63713
|
static summary = "List rules that started covering your mail or changed";
|
|
63430
63714
|
static examples = ["<%= config.bin %> activity concerning", "<%= config.bin %> activity concerning --all --json"];
|
|
63431
63715
|
static flags = {
|
|
@@ -70493,6 +70777,130 @@ async function checkDomains(client) {
|
|
|
70493
70777
|
};
|
|
70494
70778
|
}
|
|
70495
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
|
+
}
|
|
70496
70904
|
/**
|
|
70497
70905
|
* A background start that gave up, such as a receiver replacing its lost
|
|
70498
70906
|
* supervisor, has no terminal to report to. Its saved reason is read
|
|
@@ -70521,7 +70929,7 @@ function checkReceiverStart(configDir, profileName) {
|
|
|
70521
70929
|
}
|
|
70522
70930
|
}
|
|
70523
70931
|
var DoctorCommand = class DoctorCommand extends Command {
|
|
70524
|
-
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.`;
|
|
70525
70933
|
static summary = "Check the local environment and live API for common problems";
|
|
70526
70934
|
static examples = ["<%= config.bin %> doctor", "<%= config.bin %> doctor --api-key prim_..."];
|
|
70527
70935
|
static flags = {
|
|
@@ -70587,6 +70995,11 @@ var DoctorCommand = class DoctorCommand extends Command {
|
|
|
70587
70995
|
label: "Domains",
|
|
70588
70996
|
outcome: domainsOutcome
|
|
70589
70997
|
});
|
|
70998
|
+
const asked = await checkAskedOfYou(apiClient);
|
|
70999
|
+
if (asked) rows.push({
|
|
71000
|
+
label: "Asked of you",
|
|
71001
|
+
outcome: asked
|
|
71002
|
+
});
|
|
70590
71003
|
}
|
|
70591
71004
|
}
|
|
70592
71005
|
}
|
|
@@ -73607,8 +74020,8 @@ const PRIMITIVE_TEAM_AUTHOR = {
|
|
|
73607
74020
|
name: "Primitive Team",
|
|
73608
74021
|
url: "https://primitive.dev"
|
|
73609
74022
|
};
|
|
73610
|
-
const SDK_VERSION_RANGE = "^3.0.0-preview.
|
|
73611
|
-
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";
|
|
73612
74025
|
const ESBUILD_VERSION_RANGE = "^0.27.0";
|
|
73613
74026
|
function renderHandler() {
|
|
73614
74027
|
return `// env.PRIMITIVE_API_KEY, env.PRIMITIVE_WEBHOOK_SECRET, and
|
|
@@ -76983,12 +77396,27 @@ function describePermissions(grant) {
|
|
|
76983
77396
|
const permissions = grant.permissions ?? [];
|
|
76984
77397
|
return permissions.length > 0 ? permissions.join(", ") : "none";
|
|
76985
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
|
+
}
|
|
76986
77412
|
function formatKeyRows(rows, options = {}) {
|
|
76987
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.";
|
|
76988
77414
|
return rows.map((row) => {
|
|
76989
77415
|
const suspended = row.suspended && row.status !== "revoked" ? " [suspended]" : "";
|
|
76990
77416
|
const revoked = row.status === "revoked" ? ` [revoked${row.revoked_at ? ` ${row.revoked_at}` : ""}]` : "";
|
|
76991
|
-
|
|
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}`;
|
|
76992
77420
|
}).join("\n");
|
|
76993
77421
|
}
|
|
76994
77422
|
function formatKeyDetail(key) {
|
|
@@ -77013,6 +77441,11 @@ function formatKeyDetail(key) {
|
|
|
77013
77441
|
lines.push("Permissions:");
|
|
77014
77442
|
for (const permission of key.grant.permissions ?? []) lines.push(` ${permission}`);
|
|
77015
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
|
+
}
|
|
77016
77449
|
return lines.join("\n");
|
|
77017
77450
|
}
|
|
77018
77451
|
const EVERY_MAILBOX_PRESETS = /* @__PURE__ */ new Set([
|
|
@@ -77648,10 +78081,12 @@ var KeysUpdateCommand = class KeysUpdateCommand extends Command {
|
|
|
77648
78081
|
client: auth.apiClient.client,
|
|
77649
78082
|
path: { id: args.id }
|
|
77650
78083
|
})) : null;
|
|
78084
|
+
const standingNotes = after?.ok ? after.data.address_warnings : void 0;
|
|
77651
78085
|
if (flags.json) {
|
|
77652
78086
|
this.log(JSON.stringify({
|
|
77653
78087
|
...after?.ok ? after.data : {},
|
|
77654
78088
|
...result.data,
|
|
78089
|
+
...!grantChanged && Array.isArray(standingNotes) ? { address_warnings: standingNotes } : {},
|
|
77655
78090
|
...grantChanged ? { notice: HELD_REQUEST_NOTICE } : {},
|
|
77656
78091
|
...grantChanged && rulesRemoved.length > 0 ? { rules_removed: rulesRemoved } : {},
|
|
77657
78092
|
...rulesNotOnKey.length > 0 ? { rules_not_on_key: rulesNotOnKey } : {},
|
|
@@ -87540,6 +87975,26 @@ var ThreadsMutedCommand = class ThreadsMutedCommand extends Command {
|
|
|
87540
87975
|
this.log(JSON.stringify(entries, null, 2));
|
|
87541
87976
|
}
|
|
87542
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
|
+
};
|
|
87543
87998
|
// src/oclif/verification-extract.ts
|
|
87544
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;
|
|
87545
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;
|
|
@@ -89248,6 +89703,7 @@ const COMMANDS = {
|
|
|
89248
89703
|
signal: SignalCommand,
|
|
89249
89704
|
doctor: DoctorCommand,
|
|
89250
89705
|
billing: BillingCommand,
|
|
89706
|
+
version: VersionCommand,
|
|
89251
89707
|
"machine:doctor": MachineDoctorCommand,
|
|
89252
89708
|
"emails:latest": EmailsLatestCommand,
|
|
89253
89709
|
"emails:attachment": EmailsAttachmentCommand,
|