primcli 3.0.0-preview.2 → 3.0.0-preview.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/{api-command-B37DPKFA.js → api-command-DWjtyqH9.js} +52 -11
- package/dist/{json-output-BzSBR-KX.js → json-output-DWrJMakZ.js} +7 -1
- package/dist/{machine-session-g-xPd3X0.js → machine-session-BG4getHB.js} +4 -4
- package/dist/{notify-session-Bo8WgG3q.js → notify-session-8Jv4jJzI.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 +506 -90
- package/dist/oclif/proxy-auto-detect.js +1 -1
- package/dist/oclif/receiver-heal.js +2 -2
- package/dist/{repeats-Dj_o6c-X-BzXj5ICh.js → repeats-Dj_o6c-X-BKHiZsYv.js} +25 -25
- package/dist/{scoped-chat-TJlyUTi7.js → scoped-chat-_AEpylPV.js} +1 -1
- package/dist/{signal-command-BO93dM2Q.js → signal-command-CBHAR7zj.js} +4 -4
- package/man/primitive.1 +4 -3
- package/package.json +2 -2
package/dist/oclif/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { $ as AutomatedFilterUnsupportedError, $n as updateRoute, $t as listAgentContacts, A as sleep$3, An as resendAgentSignupVerification, At as getAccessMode, B as hasReplyState, Bn as setFunctionSecret, Bt as getFunctionTestRunTrace, C as collectNewAcceptedEmails, Ct as deleteWakeAuthorization, D as filtersFromFlags, Dn as removeDefaultNetworkMember, E as fetchEmailSearchPage, En as redeemCreditCode, Et as downloadEmailAttachmentByFilename, F as assertAwaitingFilterRows, Fn as searchEmails, Ft as getCreditBalance, Gn as startCliLogin, Gt as getOwnGrant, H as queryUsesAwaiting, Hn as simulateRoute, Ht as getKey, I as awaitingRejectedError, In as searchMemories, It as getDefaultNetworkAgent, J as parseWebhookEvent, Jn as unsetFunctionRoute, Jt as getThread, K as isEmailReceivedEvent, Kn as stopRepeatFromEmail, Kt as getRepeatingSend, L as ensureSearchReportsReplyState, Ln as semanticSearch, Lt as getEmail, M as AWAITING_VALUES, Mn as rotateKey, Mt as getAgentContactPolicy, N as REPLY_STATE_UNSUPPORTED_CODE, Nn as runWakeSchedule, O as quoteDslValue, On as reorderRoutes, Ot as downloadSentAttachmentArchiveMember, P as ReplyStateUnsupportedError, Pt as getConversation, Q as AUTOMATED_VALUES, Qn as updateRepeatingSend, R as formatAwaitingCell, Rn as sendEmail, Rt as getFunction, S as transientFailure, Sn as pullWebhookEvent, St as deleteRoute, T as encodeReceivedAtSearchCursor, Tt as downloadEmailAttachmentArchiveMember, Un as startAgentClaim, Ut as getMemory, V as isAwaitingRejectedError, Vn as setMemory, Vt as getInboxStatus, Wn as startAgentSignup, Wt as getOrgRoutingTopology, X as AUTOMATED_FILTER_UNSUPPORTED_CODE, Xn as updateFunction, Y as parseFromHeader, Yn as updateDefaultNetworkMember, Yt as getWakeSchedule, Z as AUTOMATED_FLAG_DESCRIPTION, Zn as updateKey, Zt as leaveOrganization, _ as describeApiFailure, _n as listSentEmails, _t as createWakeAuthorization, a as REPEAT_IDLE_MAX_MINUTES, an as listEmailAttachmentArchiveMembers, at as hasAutomatedVerdict, b as retryTransient, bn as listWakeSchedules, cn as listFunctionLogs, ct as cancelSentEmail, d as parseRepeatTick, dn as listKeys, dt as cliLogout, en as listAgentNetworks, er as updateWakeAuthorization, et as assertAutomatedVerdict, f as preparePresenceAliveEmail, fn as listMailboxAccess, ft as completeWebhookEvent, g as WaitDeadlineReached, gn as listSentAttachmentArchiveMembers, gt as createRoute, hn as listRoutes, ht as createKey, i as REPEAT_EVERY_MAX_MINUTES, in as listDomains, j as AWAITING_FLAG_DESCRIPTION, jn as revokeCredential, jt as getAccount, k as sinceFromFlags, kn as replyToEmail, kt as downloadSentAttachmentByFilename, l as parseInteractionEnvelope, ln as listFunctions, lt as cancelSentEmailByIdempotencyKey, m as repeatStopCommand, mn as listRoles, mt as createFunction, nn as listDefaultNetworkAgents, nr as verifyAgentClaim, o as REPEAT_MAX_SENDS_MAX, on as listEmails, ot as isAutomatedRejectedError, p as prepareSignalEmail, pn as listRepeatingSends, pt as createEndpoint, qn as testFunction, qt as getSentEmail, rn as listDefaultNetworkMembers, rr as verifyAgentSignup, s as buildRepeatStopBody, sn as listEndpoints, st as addDefaultNetworkMember, tr as updateWakeSchedule, tt as automatedRejectedError, u as parsePresenceEnvelope, un as listGroups, ut as checkDefaultNetworkContactAdmission, vn as listWakeAuthorizations, vt as createWakeSchedule, w as cursorFromAcceptedRows, wt as deleteWakeSchedule, x as retryingOperation, xn as pollCliLogin, xt as deleteMemory, y as pauseForTransientFailure, yn as listWakeDispatches, z as formatRepliesCell, zn as setFunctionRoute, zt as getFunctionRouting } 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 deriveSendIdempotencyKey, A as wakeRelationship, At as ATTACHMENT_WAIT_MAX_MS, B as readEmailInteraction, Bt as CliOrgRefusedError, C as readThreadContext, Ct as currentMailSessionKey, Dt as formatAlreadySentNotice, E as serverRelationship, Et as runtimeSessionVariableList, F as readPendingMail, Ft as createCliApiClient, G as MAX_SEND_WAIT_TIMEOUT_MS, H as replyInteractionWarning, Ht as fetchCliOrgs, I as recordPendingMail, It as refreshStoredCliCredentials, J as assertValidIdempotencyKey, K as SEND_OUTCOME_HELP, L as removePendingMail, Lt as refuseOrgSelectionForProfile, M as clearConsumedPendingMail, Mt as ConnectedAgentKeyRequiredError, N as clearReadPendingMail, O as wakeReadCommand, Ot as withFlagSuggestion, P as pendingMailPath, Pt as createAuthenticatedCliApiClient, Q as classifySendError, R as interactionHumanLine, Rt as resolveCliApiRequestConfig, S as latestOwnOutbound, St as loadSkillLine, T as serverMuted, Tt as detectRuntimeSession, Ut as revokeUserLogin, V as replyExpectation, Vt as credentialsFromUserLogin, W as IDEMPOTENCY_KEY_FLAG_DESCRIPTION, Wt as switchCurrentOrg, X as buildThrownSendFailureEnvelope, Y as buildFollowUpCommand, Z as checkPriorReplies, _ as explainPendingMailNotFound, _t as cliInvocation, a as createOperationCommand, at as formatSendFailureSummary, b as displayAddress, bt as generatedAgentName, c as formatErrorPayload, ct as reportSendCommandResult, d as isGrantRefusal, dt as sendWaitClampNotice, et as excludeSignalReplies, f as parameterFlagName, ft as sentHistoryWindowStart, g as writeErrorWithHints, h as surfaceUnauthorizedHint, ht as thrownErrorExitCode, i as TIME_FLAG_DESCRIPTION, it as formatPriorRepliesWarning, j as claimPendingMail, jt as withAttachmentWait, k as wakeRecipientField, kt as ATTACHMENT_WAIT_FLAG_DESCRIPTION, l as hasControlCharacter$1, lt as sendIdentityFields, m as runWithTiming, mt as successfulSendOutcome, n as API_ERROR_CODES, nt as formatDeletedEarlierSendNotice, o as extractErrorCode, ot as formatSendRecordFailureSummary, p as readTextFileFlag, pt as serializeErrorPayload, q as apiResultHttpStatus, r as OPERATION_PATH_FLAGS, rt as formatPriorRepliesCheckSkipped, s as extractErrorPayload, st as priorRepliesThatWentOut, t as API_BASE_URL_FLAG_DESCRIPTION, tt as followUpCommandPrefix, u as headerFlagName, ut as sendOutcomeExitCode, v as bareAddress, vt as connectNextSteps, w as sentInThread, wt as detectAgentRuntime, x as formatMailWakeLine, xt as identitySuggestions, y as describeWake, z as interactionNextActions, zt as selectedOrgFromEnv } from "../api-command-DWjtyqH9.js";
|
|
2
|
+
import { $ as AutomatedFilterUnsupportedError, $n as updateRoute, $t as listAgentContacts, A as sleep$3, An as resendAgentSignupVerification, At as getAccessMode, B as hasReplyState, Bn as setFunctionSecret, Bt as getFunctionTestRunTrace, C as collectNewAcceptedEmails, Ct as deleteWakeAuthorization, D as filtersFromFlags, Dn as removeDefaultNetworkMember, E as fetchEmailSearchPage, En as redeemCreditCode, Et as downloadEmailAttachmentByFilename, F as assertAwaitingFilterRows, Fn as searchEmails, Ft as getCreditBalance, Gn as startCliLogin, Gt as getOwnGrant, H as queryUsesAwaiting, Hn as simulateRoute, Ht as getKey, I as awaitingRejectedError, In as searchMemories, It as getDefaultNetworkAgent, J as parseWebhookEvent, Jn as unsetFunctionRoute, Jt as getThread, K as isEmailReceivedEvent, Kn as stopRepeatFromEmail, Kt as getRepeatingSend, L as ensureSearchReportsReplyState, Ln as semanticSearch, Lt as getEmail, M as AWAITING_VALUES, Mn as rotateKey, Mt as getAgentContactPolicy, N as REPLY_STATE_UNSUPPORTED_CODE, Nn as runWakeSchedule, O as quoteDslValue, On as reorderRoutes, Ot as downloadSentAttachmentArchiveMember, P as ReplyStateUnsupportedError, Pt as getConversation, Q as AUTOMATED_VALUES, Qn as updateRepeatingSend, R as formatAwaitingCell, Rn as sendEmail, Rt as getFunction, S as transientFailure, Sn as pullWebhookEvent, St as deleteRoute, T as encodeReceivedAtSearchCursor, Tt as downloadEmailAttachmentArchiveMember, Un as startAgentClaim, Ut as getMemory, V as isAwaitingRejectedError, Vn as setMemory, Vt as getInboxStatus, Wn as startAgentSignup, Wt as getOrgRoutingTopology, X as AUTOMATED_FILTER_UNSUPPORTED_CODE, Xn as updateFunction, Y as parseFromHeader, Yn as updateDefaultNetworkMember, Yt as getWakeSchedule, Z as AUTOMATED_FLAG_DESCRIPTION, Zn as updateKey, Zt as leaveOrganization, _ as describeApiFailure, _n as listSentEmails, _t as createWakeAuthorization, a as REPEAT_IDLE_MAX_MINUTES, an as listEmailAttachmentArchiveMembers, at as hasAutomatedVerdict, b as retryTransient, bn as listWakeSchedules, cn as listFunctionLogs, ct as cancelSentEmail, d as parseRepeatTick, dn as listKeys, dt as cliLogout, en as listAgentNetworks, er as updateWakeAuthorization, et as assertAutomatedVerdict, f as preparePresenceAliveEmail, fn as listMailboxAccess, ft as completeWebhookEvent, g as WaitDeadlineReached, gn as listSentAttachmentArchiveMembers, gt as createRoute, hn as listRoutes, ht as createKey, i as REPEAT_EVERY_MAX_MINUTES, in as listDomains, j as AWAITING_FLAG_DESCRIPTION, jn as revokeCredential, jt as getAccount, k as sinceFromFlags, kn as replyToEmail, kt as downloadSentAttachmentByFilename, l as parseInteractionEnvelope, ln as listFunctions, lt as cancelSentEmailByIdempotencyKey, m as repeatStopCommand, mn as listRoles, mt as createFunction, nn as listDefaultNetworkAgents, nr as verifyAgentClaim, o as REPEAT_MAX_SENDS_MAX, on as listEmails, ot as isAutomatedRejectedError, p as prepareSignalEmail, pn as listRepeatingSends, pt as createEndpoint, qn as testFunction, qt as getSentEmail, rn as listDefaultNetworkMembers, rr as verifyAgentSignup, s as buildRepeatStopBody, sn as listEndpoints, st as addDefaultNetworkMember, tr as updateWakeSchedule, tt as automatedRejectedError, u as parsePresenceEnvelope, un as listGroups, ut as checkDefaultNetworkContactAdmission, vn as listWakeAuthorizations, vt as createWakeSchedule, w as cursorFromAcceptedRows, wt as deleteWakeSchedule, x as retryingOperation, xn as pollCliLogin, xt as deleteMemory, y as pauseForTransientFailure, yn as listWakeDispatches, z as formatRepliesCell, zn as setFunctionRoute, zt as getFunctionRouting } from "../repeats-Dj_o6c-X-BKHiZsYv.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-8Jv4jJzI.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-BG4getHB.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-_AEpylPV.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-
|
|
10
|
-
import { n as
|
|
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-CBHAR7zj.js";
|
|
10
|
+
import { i as runStreamingJson, n as guardJsonOutputCommands, r as jsonOutputRequested, t as JSON_OUTPUT_FLAG } from "../json-output-DWrJMakZ.js";
|
|
11
11
|
import { c as startBackgroundListen, i as backgroundListenToken, l as stopBackgroundListen, o as runBackgroundListen, r as backgroundListenStatus, u as verifyBackgroundListenTarget } from "../listen-background-C0F9gNDD.js";
|
|
12
12
|
import { ORG_SELECTION_ENV } from "./global-org-flag.js";
|
|
13
13
|
import { n as createConfig, t as createClient } from "../client.gen-6rZvmHfx.js";
|
|
@@ -172,7 +172,7 @@ const openapiDocument = {
|
|
|
172
172
|
},
|
|
173
173
|
{
|
|
174
174
|
"name": "Mailbox access",
|
|
175
|
-
"description": "Who may read, draft and send for each mailbox, and the groups access can be given to. Readable by people and org-wide API keys; changed by a dashboard session, an org-wide API key, or the person's own Primitive CLI. Other OAuth apps need a session step-up to change it. Answers 404 feature_disabled while
|
|
175
|
+
"description": "Who may read, draft and send for each mailbox, and the groups access can be given to. Readable by people and org-wide API keys; changed by a dashboard session, an org-wide API key, or the person's own Primitive CLI. Other OAuth apps need a session step-up to change it. Answers 404 feature_disabled, with details.feature naming the feature (mailbox_access, or roles for groups), while it is not enabled for the organization; only Primitive turns it on.",
|
|
176
176
|
"x-openapi-spec": "https://api.primitive.dev/v1/openapi/tags/mailbox-access"
|
|
177
177
|
},
|
|
178
178
|
{
|
|
@@ -187,7 +187,7 @@ const openapiDocument = {
|
|
|
187
187
|
},
|
|
188
188
|
{
|
|
189
189
|
"name": "Roles and members",
|
|
190
|
-
"description": "Roles, member roles and removal, the mailbox access mode, break-glass, transfers and suspensions. Reads are open to people; every write is person only: a dashboard session, or the person's own OAuth or CLI token with a session step-up. API keys never reach these. Answers 404 feature_disabled while the feature is not enabled for the organization.",
|
|
190
|
+
"description": "Roles, member roles and removal, the mailbox access mode, break-glass, transfers and suspensions. Reads are open to people; every write is person only: a dashboard session, or the person's own OAuth or CLI token with a session step-up. API keys never reach these. Answers 404 feature_disabled while the feature is not enabled for the organization, with details.feature naming the feature; only Primitive turns it on.",
|
|
191
191
|
"x-openapi-spec": "https://api.primitive.dev/v1/openapi/tags/roles-and-members"
|
|
192
192
|
},
|
|
193
193
|
{
|
|
@@ -20885,7 +20885,7 @@ const openapiDocument = {
|
|
|
20885
20885
|
}
|
|
20886
20886
|
},
|
|
20887
20887
|
"403": {
|
|
20888
|
-
"description": "feature_disabled: interactions (or, for wake.dispatch, Wake dispatch) are not enabled for this organization; grant_forbidden: the credential does not hold the permission",
|
|
20888
|
+
"description": "feature_disabled: interactions (or, for wake.dispatch, Wake dispatch) are not enabled for this organization, and details.feature is interactions or wake_dispatch; only Primitive turns them on. grant_forbidden: the credential does not hold the permission",
|
|
20889
20889
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
20890
20890
|
},
|
|
20891
20891
|
"429": {
|
|
@@ -20972,7 +20972,7 @@ const openapiDocument = {
|
|
|
20972
20972
|
}
|
|
20973
20973
|
},
|
|
20974
20974
|
"403": {
|
|
20975
|
-
"description": "feature_disabled: interactions (or, for wake.dispatch, Wake dispatch) are not enabled for this organization; grant_forbidden: the credential does not hold the permission",
|
|
20975
|
+
"description": "feature_disabled: interactions (or, for wake.dispatch, Wake dispatch) are not enabled for this organization, and details.feature is interactions or wake_dispatch; only Primitive turns them on. grant_forbidden: the credential does not hold the permission",
|
|
20976
20976
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
20977
20977
|
},
|
|
20978
20978
|
"429": {
|
|
@@ -21064,7 +21064,7 @@ const openapiDocument = {
|
|
|
21064
21064
|
}
|
|
21065
21065
|
},
|
|
21066
21066
|
"403": {
|
|
21067
|
-
"description": "feature_disabled: interactions (or, for wake.dispatch, Wake dispatch) are not enabled for this organization; grant_forbidden: the credential does not hold the permission",
|
|
21067
|
+
"description": "feature_disabled: interactions (or, for wake.dispatch, Wake dispatch) are not enabled for this organization, and details.feature is interactions or wake_dispatch; only Primitive turns them on. grant_forbidden: the credential does not hold the permission",
|
|
21068
21068
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
21069
21069
|
},
|
|
21070
21070
|
"404": {
|
|
@@ -21184,7 +21184,7 @@ const openapiDocument = {
|
|
|
21184
21184
|
}
|
|
21185
21185
|
},
|
|
21186
21186
|
"403": {
|
|
21187
|
-
"description": "feature_disabled: interactions (or, for wake.dispatch, Wake dispatch) are not enabled for this organization; grant_forbidden: the credential does not hold the permission",
|
|
21187
|
+
"description": "feature_disabled: interactions (or, for wake.dispatch, Wake dispatch) are not enabled for this organization, and details.feature is interactions or wake_dispatch; only Primitive turns them on. grant_forbidden: the credential does not hold the permission",
|
|
21188
21188
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
21189
21189
|
},
|
|
21190
21190
|
"404": {
|
|
@@ -21648,7 +21648,7 @@ const openapiDocument = {
|
|
|
21648
21648
|
"/email-rules/test": { "post": {
|
|
21649
21649
|
"operationId": "testEmailRule",
|
|
21650
21650
|
"summary": "Test a rule against received mail",
|
|
21651
|
-
"description": "Runs a rule over received mail and reports what it would decide for each email: matched, near_miss, no_match, unclassified or not_found. Test an unsaved tree from a compile response, or a saved rule by rule_id (its current version, run with its author's access). Either way the rule reads only mail its author can read, and only what its scope covers. Without email_ids, the newest emails it can read are tested, at most 200 and none older than 30 days. Emails not classified yet that arrived more than 2 hours ago are classified first and their classification is saved, unless classify_missing is false; newer ones are left to normal classification and reported unclassified with reason pending. The rule itself records nothing and grants nothing. Classification and the rule's own questions stop at about 90 seconds; run the test again to continue where it stopped. Needs mail:read, a credential acting as a member with their full access (API keys, agent keys and narrowed tokens are refused), and the email rules feature on the organization.",
|
|
21651
|
+
"description": "Runs a rule over received mail and reports what it would decide for each email: matched, near_miss, no_match, unclassified or not_found. Test an unsaved tree from a compile response, or a saved rule by rule_id (its current version, run with its author's access). Either way the rule reads only mail its author can read, and only what its scope covers; an unsaved tree covers only your own mail unless evaluation_scope names more. Without email_ids, the newest emails it can read are tested, at most 200 and none older than 30 days. Emails not classified yet that arrived more than 2 hours ago are classified first and their classification is saved, unless classify_missing is false; newer ones are left to normal classification and reported unclassified with reason pending. The rule itself records nothing and grants nothing. Classification and the rule's own questions stop at about 90 seconds; run the test again to continue where it stopped. Needs mail:read, a credential acting as a member with their full access (API keys, agent keys and narrowed tokens are refused), and the email rules feature on the organization.",
|
|
21652
21652
|
"tags": ["Email Rules"],
|
|
21653
21653
|
"security": [{ "BearerAuth": [] }],
|
|
21654
21654
|
"requestBody": {
|
|
@@ -21671,7 +21671,7 @@ const openapiDocument = {
|
|
|
21671
21671
|
}
|
|
21672
21672
|
},
|
|
21673
21673
|
"400": {
|
|
21674
|
-
"description": "validation_error: give exactly one of tree and rule_id, at most 200 email_ids, and a tree that is valid for the column contract. evaluation_scope and
|
|
21674
|
+
"description": "validation_error: give exactly one of tree and rule_id, at most 200 email_ids, and a tree that is valid for the column contract. evaluation_scope, scope_selection and kind go only with tree. A saved rule whose current version no longer renders answers details.reason version_not_renderable.",
|
|
21675
21675
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
21676
21676
|
},
|
|
21677
21677
|
"401": {
|
|
@@ -21745,7 +21745,7 @@ const openapiDocument = {
|
|
|
21745
21745
|
"/email-rules/test-sample": { "post": {
|
|
21746
21746
|
"operationId": "testEmailRuleOnSample",
|
|
21747
21747
|
"summary": "Test a rule against a made-up email",
|
|
21748
|
-
"description": "Reports what a rule would decide for an email you describe: its sender, recipients, subject, plain text and attachment types, and optionally whether it is automated or from a mailing list and its spam score. The email is classified the way received mail is, and the rule's conditions and its own questions are decided as they would be for received mail with that content and those signals, received now. Without them it is not automated and not from a mailing list; a rule that reads a spam score you gave none for is decided on no score, and spam_score is listed in unset_columns. Nothing is stored: no email, classification or decision. Test an unsaved tree from a compile response, or a saved rule by rule_id (its current version). The answer includes what the classifier read from the email. Needs mail:read, a credential acting as a member with their full access (API keys, agent keys and narrowed tokens are refused), and the email rules feature on the organization.",
|
|
21748
|
+
"description": "Reports what a rule would decide for an email you describe: its sender, recipients, subject, plain text and attachment types, and optionally whether it is automated or from a mailing list and its spam score. The email is classified the way received mail is, and the rule's conditions and its own questions are decided as they would be for received mail with that content and those signals, received now. Without them it is not automated and not from a mailing list; a rule that reads a spam score you gave none for is decided on no score, and spam_score is listed in unset_columns. Nothing is stored: no email, classification or decision. Test an unsaved tree from a compile response, or a saved rule by rule_id (its current version); an unsaved tree is run as covering only your own mail unless evaluation_scope names more, as on POST /email-rules/test. The answer includes what the classifier read from the email. Needs mail:read, a credential acting as a member with their full access (API keys, agent keys and narrowed tokens are refused), and the email rules feature on the organization.",
|
|
21749
21749
|
"tags": ["Email Rules"],
|
|
21750
21750
|
"security": [{ "BearerAuth": [] }],
|
|
21751
21751
|
"requestBody": {
|
|
@@ -21768,7 +21768,7 @@ const openapiDocument = {
|
|
|
21768
21768
|
}
|
|
21769
21769
|
},
|
|
21770
21770
|
"400": {
|
|
21771
|
-
"description": "validation_error: give exactly one of tree and rule_id (evaluation_scope and
|
|
21771
|
+
"description": "validation_error: give exactly one of tree and rule_id (evaluation_scope, scope_selection and kind only with tree), an email with a sender, 1 to 50 To addresses (and up to 50 Cc), and a text body, and a tree that is valid for the column contract and within the size limits for a saved rule. A saved rule whose current version no longer renders answers details.reason version_not_renderable.",
|
|
21772
21772
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
21773
21773
|
},
|
|
21774
21774
|
"401": {
|
|
@@ -21791,7 +21791,7 @@ const openapiDocument = {
|
|
|
21791
21791
|
}
|
|
21792
21792
|
},
|
|
21793
21793
|
"403": {
|
|
21794
|
-
"description": "feature_not_enabled: the email rules feature is not enabled for this organization yet. Permission refusals answer forbidden or grant_forbidden instead.",
|
|
21794
|
+
"description": "feature_not_enabled: the email rules feature is not enabled for this organization yet. Permission refusals answer forbidden or grant_forbidden instead. email_rule_scope_not_readable: scope_selection names something you cannot read.",
|
|
21795
21795
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
21796
21796
|
},
|
|
21797
21797
|
"404": {
|
|
@@ -21843,7 +21843,7 @@ const openapiDocument = {
|
|
|
21843
21843
|
"post": {
|
|
21844
21844
|
"operationId": "createEmailRule",
|
|
21845
21845
|
"summary": "Create a rule",
|
|
21846
|
-
"description": "Saves a rule as version 1, from a compile response or a tree you wrote. The tree is checked against the column contract. New rules start in observe, where what the rule matches is recorded and nothing is granted; draft is not evaluated. The caller is the rule's author, and the rule never reaches mail the author cannot read. evaluation_scope (
|
|
21846
|
+
"description": "Saves a rule as version 1, from a compile response or a tree you wrote. The tree is checked against the column contract. New rules start in observe, where what the rule matches is recorded and nothing is granted or blocked; draft is not evaluated. The caller is the rule's author, and the rule never reaches mail the author cannot read. evaluation_scope chooses whose mail it runs over: own_mailboxes (only your own mail) when omitted, so any other scope (author for all you can read, or selected) is named; scope_selection may name only what you can read. The answer carries the scope as stored. kind do_not_share makes a rule that blocks sharing: it runs before every other rule, and while it is active no rule shares an email it matches or cannot decide. A key cannot list one (details.reason rule_blocks_sharing on the key). Needs mail:read, a credential acting as a member with their full access (API keys, agent keys and narrowed tokens are refused), and the email rules feature on the organization.",
|
|
21847
21847
|
"tags": ["Email Rules"],
|
|
21848
21848
|
"security": [{ "BearerAuth": [] }],
|
|
21849
21849
|
"requestBody": {
|
|
@@ -21896,7 +21896,7 @@ const openapiDocument = {
|
|
|
21896
21896
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
21897
21897
|
},
|
|
21898
21898
|
"409": {
|
|
21899
|
-
"description": "email_rule_author_unresolvable: the rule could not run as you over the chosen scope.",
|
|
21899
|
+
"description": "email_rule_author_unresolvable: the rule could not run as you over the chosen scope. details.reason is left, revoked, suspended, membership_ended, no_mail_read, no_own_mailbox or no_shareable_mailbox. With no evaluation_scope it covers only your own mail, so no_own_mailbox or no_shareable_mailbox there means a scope must be named.",
|
|
21900
21900
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
21901
21901
|
},
|
|
21902
21902
|
"429": {
|
|
@@ -21939,7 +21939,7 @@ const openapiDocument = {
|
|
|
21939
21939
|
"get": {
|
|
21940
21940
|
"operationId": "listEmailRules",
|
|
21941
21941
|
"summary": "List rules",
|
|
21942
|
-
"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. With matched_email_id, only the rules that matched that email. Needs mail:read, a credential acting as a member with their full access (API keys, agent keys and narrowed tokens are refused), and the email rules feature on the organization.",
|
|
21942
|
+
"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). With matched_email_id, only the rules that matched that email. Needs mail:read, a credential acting as a member with their full access (API keys, agent keys and narrowed tokens are refused), and the email rules feature on the organization.",
|
|
21943
21943
|
"tags": ["Email Rules"],
|
|
21944
21944
|
"security": [{ "BearerAuth": [] }],
|
|
21945
21945
|
"parameters": [
|
|
@@ -22059,7 +22059,7 @@ const openapiDocument = {
|
|
|
22059
22059
|
"get": {
|
|
22060
22060
|
"operationId": "getEmailRule",
|
|
22061
22061
|
"summary": "Read a rule",
|
|
22062
|
-
"description": "A rule and its current version. The SQL the version renders to is included only when include_sql is true. Needs mail:read, a credential acting as a member with their full access (API keys, agent keys and narrowed tokens are refused), and the email rules feature on the organization.",
|
|
22062
|
+
"description": "A rule, its scope (evaluation_scope, and scope_selection for a selected rule) and its current version. 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 credential acting as a member with their full access (API keys, agent keys and narrowed tokens are refused), and the email rules feature on the organization.",
|
|
22063
22063
|
"tags": ["Email Rules"],
|
|
22064
22064
|
"security": [{ "BearerAuth": [] }],
|
|
22065
22065
|
"parameters": [{
|
|
@@ -22174,7 +22174,7 @@ const openapiDocument = {
|
|
|
22174
22174
|
"patch": {
|
|
22175
22175
|
"operationId": "updateEmailRule",
|
|
22176
22176
|
"summary": "Change a rule",
|
|
22177
|
-
"description": "Renames the rule, saves a new version (english, tree and explanation together; earlier versions are kept unchanged), changes its state (draft, disabled; observe; or active) or changes whose mail it runs over (evaluation_scope, with scope_selection when selected). Only the rule's author may rename it, add a version, change its scope or move it to observe or active; anyone else who can see it may only disable it (state draft), and while it is shared with another member only if they manage members from the dashboard. Omit evaluation_scope to keep the current scope. A scope change saves a new version with the same conditions; what was granted stays. A shared rule keeps its scope. Needs mail:read, a credential acting as a member with their full access (API keys, agent keys and narrowed tokens are refused), and the email rules feature on the organization.",
|
|
22177
|
+
"description": "Renames the rule, saves a new version (english, tree and explanation together; earlier versions are kept unchanged), changes its state (draft, disabled; observe; or active) or changes whose mail it runs over (evaluation_scope, with scope_selection when selected). Only the rule's author may rename it, add a version, change its scope or move it to observe or active; anyone else who can see it may only disable it (state draft), and while it is shared with another member only if they manage members from the dashboard. Omit evaluation_scope to keep the current scope. A scope change saves a new version with the same conditions; what was granted stays. A shared rule keeps its scope. A rule's kind never changes. Needs mail:read, a credential acting as a member with their full access (API keys, agent keys and narrowed tokens are refused), and the email rules feature on the organization.",
|
|
22178
22178
|
"tags": ["Email Rules"],
|
|
22179
22179
|
"security": [{ "BearerAuth": [] }],
|
|
22180
22180
|
"parameters": [{
|
|
@@ -22523,7 +22523,7 @@ const openapiDocument = {
|
|
|
22523
22523
|
"/emails/{id}/rule-results": { "get": {
|
|
22524
22524
|
"operationId": "listEmailRuleResults",
|
|
22525
22525
|
"summary": "List every rule's result on an email",
|
|
22526
|
-
"description": "Every rule the caller can see and what it decided about this email: those that matched, those that did not, and those that have not run on it, with what is known about them. A result names the version of the rule that decided and carries that version's conditions and questions. Only a caller who can read the email gets an answer, and a rule the caller cannot see is left out. At most 50 rules are listed, those with a result first; hidden counts the rest. Needs mail:read, a credential acting as a member with their full access (API keys, agent keys and narrowed tokens are refused), and the email rules feature on the organization.",
|
|
22526
|
+
"description": "Every rule the caller can see and what it decided about this email: those that matched, those that did not, and those that have not run on it, with what is known about them. A result names the version of the rule that decided and carries that version's conditions and questions. A matched rule with kind do_not_share keeps rules from sharing the email while it is active; anything shared before then stays shared. Only a caller who can read the email gets an answer, and a rule the caller cannot see is left out. At most 50 rules are listed, those with a result first; hidden counts the rest. Needs mail:read, a credential acting as a member with their full access (API keys, agent keys and narrowed tokens are refused), and the email rules feature on the organization.",
|
|
22527
22527
|
"tags": ["Email Rules"],
|
|
22528
22528
|
"security": [{ "BearerAuth": [] }],
|
|
22529
22529
|
"parameters": [{
|
|
@@ -22807,7 +22807,7 @@ const openapiDocument = {
|
|
|
22807
22807
|
"/email-rule-scope-options": { "get": {
|
|
22808
22808
|
"operationId": "listEmailRuleScopeOptions",
|
|
22809
22809
|
"summary": "List what a rule can cover",
|
|
22810
|
-
"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. Needs mail:read, a credential acting as a member with their full access (API keys, agent keys and narrowed tokens are refused), and the email rules feature on the organization.",
|
|
22810
|
+
"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 credential acting as a member with their full access (API keys, agent keys and narrowed tokens are refused), and the email rules feature on the organization.",
|
|
22811
22811
|
"tags": ["Email Rules"],
|
|
22812
22812
|
"security": [{ "BearerAuth": [] }],
|
|
22813
22813
|
"parameters": [{
|
|
@@ -31340,7 +31340,7 @@ const openapiDocument = {
|
|
|
31340
31340
|
"summary": "List every credential",
|
|
31341
31341
|
"tags": ["Credentials"],
|
|
31342
31342
|
"security": [{ "BearerAuth": [] }],
|
|
31343
|
-
"description": "Every credential that can act in the organization: API keys, Function keys, agent connection keys, connected apps (OAuth), agent delegates and, where enabled, CLI logins. Secrets are never returned. Filter with kind. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled.\n\nPerson only: a dashboard session. The person's role must hold credentials:read. API keys, agent connection keys and agents are refused.",
|
|
31343
|
+
"description": "Every credential that can act in the organization: API keys, Function keys, agent connection keys, connected apps (OAuth), agent delegates and, where enabled, CLI logins. Secrets are never returned. Filter with kind. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature. Only Primitive turns these on.\n\nPerson only: a dashboard session. The person's role must hold credentials:read. API keys, agent connection keys and agents are refused.",
|
|
31344
31344
|
"x-primitive-person-only": { "access": "session" },
|
|
31345
31345
|
"parameters": [{
|
|
31346
31346
|
"name": "kind",
|
|
@@ -31469,7 +31469,7 @@ const openapiDocument = {
|
|
|
31469
31469
|
"summary": "Revoke a credential",
|
|
31470
31470
|
"tags": ["Credentials"],
|
|
31471
31471
|
"security": [{ "BearerAuth": [] }],
|
|
31472
|
-
"description": "Revoke one credential by kind and id. A Function key is rotated, never revoked (409 rotate_instead). An API key is revoked only by a person whose own access covers the key's access (an owner covers every key); otherwise 403 grant_forbidden, details.reason target_not_covered. What the credential set up keeps working and is listed in standing_objects for review. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled.\n\nPerson only: a dashboard session. The person's role must hold keys:manage. API keys, agent connection keys and agents are refused.",
|
|
31472
|
+
"description": "Revoke one credential by kind and id. A Function key is rotated, never revoked (409 rotate_instead). An API key is revoked only by a person whose own access covers the key's access (an owner covers every key); otherwise 403 grant_forbidden, details.reason target_not_covered. What the credential set up keeps working and is listed in standing_objects for review. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature. Only Primitive turns these on.\n\nPerson only: a dashboard session. The person's role must hold keys:manage. API keys, agent connection keys and agents are refused.",
|
|
31473
31473
|
"x-primitive-person-only": { "access": "session" },
|
|
31474
31474
|
"parameters": [{
|
|
31475
31475
|
"name": "Idempotency-Key",
|
|
@@ -31609,7 +31609,7 @@ const openapiDocument = {
|
|
|
31609
31609
|
"summary": "Revoke every credential (emergency)",
|
|
31610
31610
|
"tags": ["Credentials"],
|
|
31611
31611
|
"security": [{ "BearerAuth": [] }],
|
|
31612
|
-
"description": "The emergency response to a leak: revokes every API key, agent connection key and connected app created since a time, rotates the organization Function key and every running Function's own key, and optionally suspends Functions. Owners only, from a dashboard session, and the body must confirm with \"revoke all\". Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled.\n\nPerson only: a dashboard session. The person's role must hold credentials:revoke_all. API keys, agent connection keys and agents are refused.",
|
|
31612
|
+
"description": "The emergency response to a leak: revokes every API key, agent connection key and connected app created since a time, rotates the organization Function key and every running Function's own key, and optionally suspends Functions. Owners only, from a dashboard session, and the body must confirm with \"revoke all\". Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature. Only Primitive turns these on.\n\nPerson only: a dashboard session. The person's role must hold credentials:revoke_all. API keys, agent connection keys and agents are refused.",
|
|
31613
31613
|
"x-primitive-person-only": { "access": "session" },
|
|
31614
31614
|
"parameters": [{
|
|
31615
31615
|
"name": "Idempotency-Key",
|
|
@@ -31736,7 +31736,7 @@ const openapiDocument = {
|
|
|
31736
31736
|
"summary": "Read the credential audit trail",
|
|
31737
31737
|
"tags": ["Credentials"],
|
|
31738
31738
|
"security": [{ "BearerAuth": [] }],
|
|
31739
|
-
"description": "Credential events (created, rotated, edited, revoked, used with a step-up, policy changes), newest first, with a cursor. format=csv returns the same page as CSV. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled.\n\nPerson only: a dashboard session. The person's role must hold credential_events:read. API keys, agent connection keys and agents are refused.",
|
|
31739
|
+
"description": "Credential events (created, rotated, edited, revoked, used with a step-up, policy changes), newest first, with a cursor. format=csv returns the same page as CSV. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature. Only Primitive turns these on.\n\nPerson only: a dashboard session. The person's role must hold credential_events:read. API keys, agent connection keys and agents are refused.",
|
|
31740
31740
|
"x-primitive-person-only": { "access": "session" },
|
|
31741
31741
|
"parameters": [
|
|
31742
31742
|
{
|
|
@@ -31938,7 +31938,7 @@ const openapiDocument = {
|
|
|
31938
31938
|
"summary": "Read the credential policy",
|
|
31939
31939
|
"tags": ["Credentials"],
|
|
31940
31940
|
"security": [{ "BearerAuth": [] }],
|
|
31941
|
-
"description": "The organization credential policy: key lifetime and expiry rules, who may create super admin keys, whether members may create keys and the other rules every new key is held to. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled.\n\nPerson only: a dashboard session. The person's role must hold credentials:read. API keys, agent connection keys and agents are refused.",
|
|
31941
|
+
"description": "The organization credential policy: key lifetime and expiry rules, who may create super admin keys, whether members may create keys and the other rules every new key is held to. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature. Only Primitive turns these on.\n\nPerson only: a dashboard session. The person's role must hold credentials:read. API keys, agent connection keys and agents are refused.",
|
|
31942
31942
|
"x-primitive-person-only": { "access": "session" },
|
|
31943
31943
|
"parameters": [],
|
|
31944
31944
|
"responses": {
|
|
@@ -32051,7 +32051,7 @@ const openapiDocument = {
|
|
|
32051
32051
|
"summary": "Change the credential policy",
|
|
32052
32052
|
"tags": ["Credentials"],
|
|
32053
32053
|
"security": [{ "BearerAuth": [] }],
|
|
32054
|
-
"description": "Change one or more policy rules. Admins may only tighten the policy; loosening any rule needs an owner. Owners and admins are emailed about every change. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled.\n\nPerson only: a dashboard session. The person's role must hold credential_policy:manage. API keys, agent connection keys and agents are refused.",
|
|
32054
|
+
"description": "Change one or more policy rules. Admins may only tighten the policy; loosening any rule needs an owner. Owners and admins are emailed about every change. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature. Only Primitive turns these on.\n\nPerson only: a dashboard session. The person's role must hold credential_policy:manage. API keys, agent connection keys and agents are refused.",
|
|
32055
32055
|
"x-primitive-person-only": { "access": "session" },
|
|
32056
32056
|
"parameters": [],
|
|
32057
32057
|
"responses": {
|
|
@@ -32169,7 +32169,7 @@ const openapiDocument = {
|
|
|
32169
32169
|
"summary": "Read the key builder",
|
|
32170
32170
|
"tags": ["Credentials"],
|
|
32171
32171
|
"security": [{ "BearerAuth": [] }],
|
|
32172
|
-
"description": "The key presets the caller may use (each with whether it is available and why not), the permission matrix for custom keys and the policy in force. An area marked org_wide_only (Members) is listed only to a person who holds its permission, and only a custom key with no addresses or domains may hold it. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled.\n\nPerson only: a dashboard session. The person's role must hold keys:read. API keys, agent connection keys and agents are refused.",
|
|
32172
|
+
"description": "The key presets the caller may use (each with whether it is available and why not), the permission matrix for custom keys and the policy in force. An area marked org_wide_only (Members) is listed only to a person who holds its permission, and only a custom key with no addresses or domains may hold it. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature. Only Primitive turns these on.\n\nPerson only: a dashboard session. The person's role must hold keys:read. API keys, agent connection keys and agents are refused.",
|
|
32173
32173
|
"x-primitive-person-only": { "access": "session" },
|
|
32174
32174
|
"parameters": [],
|
|
32175
32175
|
"responses": {
|
|
@@ -32283,10 +32283,11 @@ const openapiDocument = {
|
|
|
32283
32283
|
"summary": "Create an API key",
|
|
32284
32284
|
"tags": ["Credentials"],
|
|
32285
32285
|
"security": [{ "BearerAuth": [] }],
|
|
32286
|
-
"description": "Create an API key, super admin or narrowed to a preset or a custom permission set, optionally with an expiry and conditions. The secret is returned once. A key never holds more than the person creating it; the credential policy decides who may create which keys. grant is required: a request without it is refused (400 validation_error, details.reason grant_required), never treated as super admin. A custom key must say which mail it reaches: the addresses and domains it lists (grant.addresses, grant.domains), or every mailbox in the organization with grant.mail_scope \"org\", which cannot be combined with them; one that says neither is refused (400 validation_error, details.reason mail_scope_required). Super admin, Send only and Read only reach every mailbox by definition. members:read is only for an org-wide custom key: naming it with grant.addresses or grant.domains is refused (400). Owners and admins are emailed about every super admin key. Send an Idempotency-Key to retry safely: a second create by the same person under the same key makes no second key and is refused (409 idempotency_key_reused) with the first key's id in error.details.key_id, so a caller whose first answer was lost can revoke that key. The onboarding field is for the dashboard only. The Primitive CLI
|
|
32286
|
+
"description": "Create an API key, super admin or narrowed to a preset or a custom permission set, optionally with an expiry and conditions. The secret is returned once. A key never holds more than the person creating it; the credential policy decides who may create which keys. grant is required: a request without it is refused (400 validation_error, details.reason grant_required), never treated as super admin. A custom key must say which mail it reaches: the addresses and domains it lists (grant.addresses, grant.domains), or every mailbox in the organization with grant.mail_scope \"org\", which cannot be combined with them; one that says neither is refused (400 validation_error, details.reason mail_scope_required). Super admin, Send only and Read only reach every mailbox by definition. members:read is only for an org-wide custom key: naming it with grant.addresses or grant.domains is refused (400). Owners and admins are emailed about every super admin key. Send an Idempotency-Key to retry safely: a second create by the same person under the same key makes no second key and is refused (409 idempotency_key_reused) with the first key's id in error.details.key_id, so a caller whose first answer was lost can revoke that key. The onboarding field is for the dashboard only. The person's own Primitive CLI login needs no step-up (it acts as the person, held to the same rules); the Primitive app's token is refused, even with one. While the organization's keys API is not enabled, this answers 404 feature_disabled (details.feature keys_api; only Primitive turns it on), except that a dashboard session may still create a super admin key (the dashboard's own create).\n\nPerson only: a dashboard session, the person's own Primitive CLI login with no step-up, or the person's own OAuth token with a step-up token for purpose `keys.create` in the Primitive-Step-Up header. Without one any other OAuth token is answered 403 step_up_required, whose details carry the dashboard URL that issues it (or 403 grant_forbidden when the person's role, or the client, could not do it anyway). The person's role must hold keys:manage. API keys and agent connection keys are refused. An agent acting for the person is refused unless it carries a step-up token the person issued in the dashboard.",
|
|
32287
32287
|
"x-primitive-person-only": {
|
|
32288
32288
|
"access": "step_up",
|
|
32289
|
-
"step_up_purpose": "keys.create"
|
|
32289
|
+
"step_up_purpose": "keys.create",
|
|
32290
|
+
"cli_without_step_up": true
|
|
32290
32291
|
},
|
|
32291
32292
|
"parameters": [
|
|
32292
32293
|
{
|
|
@@ -32313,7 +32314,7 @@ const openapiDocument = {
|
|
|
32313
32314
|
"name": "Primitive-Step-Up",
|
|
32314
32315
|
"in": "header",
|
|
32315
32316
|
"required": false,
|
|
32316
|
-
"description": "A single-use step-up token of purpose `keys.create` (Create, rotate or change an API key), valid 5 minutes. When this operation answers 403 `step_up_required`, the person confirms at the link in `details.step_up_url` and the request is retried with the token that page shows, in this header. Accepted only with the person's own OAuth token of the client it was confirmed for; refused with a token issued for MCP, with any API key or agent connection key, and with a dashboard session. The Primitive app is refused for this purpose even with a token (403 `grant_forbidden`, `details.reason` `dashboard_only`). The Primitive CLI
|
|
32317
|
+
"description": "A single-use step-up token of purpose `keys.create` (Create, rotate or change an API key), valid 5 minutes. When this operation answers 403 `step_up_required`, the person confirms at the link in `details.step_up_url` and the request is retried with the token that page shows, in this header. Accepted only with the person's own OAuth token of the client it was confirmed for; refused with a token issued for MCP, with any API key or agent connection key, and with a dashboard session. The Primitive app is refused for this purpose even with a token (403 `grant_forbidden`, `details.reason` `dashboard_only`). The person's own Primitive CLI login needs no token for this purpose while the organization's keys API is on (a token it sends is still checked); while it is off, a token it sends is refused the same way.",
|
|
32317
32318
|
"schema": {
|
|
32318
32319
|
"type": "string",
|
|
32319
32320
|
"pattern": "^pstep_[0-9a-f]{64}$"
|
|
@@ -32441,7 +32442,7 @@ const openapiDocument = {
|
|
|
32441
32442
|
"summary": "List API keys",
|
|
32442
32443
|
"tags": ["Credentials"],
|
|
32443
32444
|
"security": [{ "BearerAuth": [] }],
|
|
32444
|
-
"description": "Key metadata, never a secret: name, prefix, grant, creator, last use, expiry and suspension. 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.\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.",
|
|
32445
|
+
"description": "Key metadata, never a secret: name, prefix, grant, creator, last use, expiry and suspension. 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. Only Primitive turns these 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.",
|
|
32445
32446
|
"x-primitive-person-only": { "access": "session_or_cli" },
|
|
32446
32447
|
"parameters": [{
|
|
32447
32448
|
"name": "cursor",
|
|
@@ -32564,10 +32565,11 @@ const openapiDocument = {
|
|
|
32564
32565
|
"summary": "Rotate an API key",
|
|
32565
32566
|
"tags": ["Credentials"],
|
|
32566
32567
|
"security": [{ "BearerAuth": [] }],
|
|
32567
|
-
"description": "Mint a successor with the same grant and return its secret once. The old key keeps working for overlap_seconds, then stops. The person rotating must cover the key's access (403 grant_forbidden, details.reason target_not_covered), and a key an owner created is rotated by an owner only (403 forbidden, details.reason owner_key_rotation), since rotating hands over the new secret. The Primitive CLI
|
|
32568
|
+
"description": "Mint a successor with the same grant and return its secret once. The old key keeps working for overlap_seconds, then stops. The person rotating must cover the key's access (403 grant_forbidden, details.reason target_not_covered), and a key an owner created is rotated by an owner only (403 forbidden, details.reason owner_key_rotation), since rotating hands over the new secret. The person's own Primitive CLI login needs no step-up (it acts as the person, held to the same rules); the Primitive app's token is refused, even with one. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature. Only Primitive turns these on.\n\nPerson only: a dashboard session, the person's own Primitive CLI login with no step-up, or the person's own OAuth token with a step-up token for purpose `keys.create` in the Primitive-Step-Up header. Without one any other OAuth token is answered 403 step_up_required, whose details carry the dashboard URL that issues it (or 403 grant_forbidden when the person's role, or the client, could not do it anyway). The person's role must hold keys:manage. API keys and agent connection keys are refused. An agent acting for the person is refused unless it carries a step-up token the person issued in the dashboard.",
|
|
32568
32569
|
"x-primitive-person-only": {
|
|
32569
32570
|
"access": "step_up",
|
|
32570
|
-
"step_up_purpose": "keys.create"
|
|
32571
|
+
"step_up_purpose": "keys.create",
|
|
32572
|
+
"cli_without_step_up": true
|
|
32571
32573
|
},
|
|
32572
32574
|
"parameters": [
|
|
32573
32575
|
{
|
|
@@ -32584,7 +32586,7 @@ const openapiDocument = {
|
|
|
32584
32586
|
"name": "Primitive-Step-Up",
|
|
32585
32587
|
"in": "header",
|
|
32586
32588
|
"required": false,
|
|
32587
|
-
"description": "A single-use step-up token of purpose `keys.create` (Create, rotate or change an API key), valid 5 minutes. When this operation answers 403 `step_up_required`, the person confirms at the link in `details.step_up_url` and the request is retried with the token that page shows, in this header. Accepted only with the person's own OAuth token of the client it was confirmed for; refused with a token issued for MCP, with any API key or agent connection key, and with a dashboard session. The Primitive app is refused for this purpose even with a token (403 `grant_forbidden`, `details.reason` `dashboard_only`). The Primitive CLI
|
|
32589
|
+
"description": "A single-use step-up token of purpose `keys.create` (Create, rotate or change an API key), valid 5 minutes. When this operation answers 403 `step_up_required`, the person confirms at the link in `details.step_up_url` and the request is retried with the token that page shows, in this header. Accepted only with the person's own OAuth token of the client it was confirmed for; refused with a token issued for MCP, with any API key or agent connection key, and with a dashboard session. The Primitive app is refused for this purpose even with a token (403 `grant_forbidden`, `details.reason` `dashboard_only`). The person's own Primitive CLI login needs no token for this purpose while the organization's keys API is on (a token it sends is still checked); while it is off, a token it sends is refused the same way.",
|
|
32588
32590
|
"schema": {
|
|
32589
32591
|
"type": "string",
|
|
32590
32592
|
"pattern": "^pstep_[0-9a-f]{64}$"
|
|
@@ -32730,10 +32732,11 @@ const openapiDocument = {
|
|
|
32730
32732
|
"summary": "Change an API key",
|
|
32731
32733
|
"tags": ["Credentials"],
|
|
32732
32734
|
"security": [{ "BearerAuth": [] }],
|
|
32733
|
-
"description": "Rename a key, change its expiry, its grant or its conditions, or suspend it. Any change needs the person's own access to cover the key's access now (an owner covers every key); otherwise 403 grant_forbidden, details.reason target_not_covered. A grant change is a new version of the key and is held to the same rules as creating one (a custom grant that does not say which mail it reaches is refused with details.reason mail_scope_required), so it takes the same step-up. The Primitive CLI
|
|
32735
|
+
"description": "Rename a key, change its expiry, its grant or its conditions, or suspend it. Any change needs the person's own access to cover the key's access now (an owner covers every key); otherwise 403 grant_forbidden, details.reason target_not_covered. A grant change is a new version of the key and is held to the same rules as creating one (a custom grant that does not say which mail it reaches is refused with details.reason mail_scope_required), so it takes the same step-up. The person's own Primitive CLI login needs no step-up (it acts as the person, held to the same rules); the Primitive app's token is refused, even with one. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature. Only Primitive turns these on.\n\nPerson only: a dashboard session, the person's own Primitive CLI login with no step-up, or the person's own OAuth token with a step-up token for purpose `keys.create` in the Primitive-Step-Up header. Without one any other OAuth token is answered 403 step_up_required, whose details carry the dashboard URL that issues it (or 403 grant_forbidden when the person's role, or the client, could not do it anyway). The person's role must hold keys:manage. API keys and agent connection keys are refused. An agent acting for the person is refused unless it carries a step-up token the person issued in the dashboard.",
|
|
32734
32736
|
"x-primitive-person-only": {
|
|
32735
32737
|
"access": "step_up",
|
|
32736
|
-
"step_up_purpose": "keys.create"
|
|
32738
|
+
"step_up_purpose": "keys.create",
|
|
32739
|
+
"cli_without_step_up": true
|
|
32737
32740
|
},
|
|
32738
32741
|
"parameters": [{
|
|
32739
32742
|
"name": "id",
|
|
@@ -32748,7 +32751,7 @@ const openapiDocument = {
|
|
|
32748
32751
|
"name": "Primitive-Step-Up",
|
|
32749
32752
|
"in": "header",
|
|
32750
32753
|
"required": false,
|
|
32751
|
-
"description": "A single-use step-up token of purpose `keys.create` (Create, rotate or change an API key), valid 5 minutes. When this operation answers 403 `step_up_required`, the person confirms at the link in `details.step_up_url` and the request is retried with the token that page shows, in this header. Accepted only with the person's own OAuth token of the client it was confirmed for; refused with a token issued for MCP, with any API key or agent connection key, and with a dashboard session. The Primitive app is refused for this purpose even with a token (403 `grant_forbidden`, `details.reason` `dashboard_only`). The Primitive CLI
|
|
32754
|
+
"description": "A single-use step-up token of purpose `keys.create` (Create, rotate or change an API key), valid 5 minutes. When this operation answers 403 `step_up_required`, the person confirms at the link in `details.step_up_url` and the request is retried with the token that page shows, in this header. Accepted only with the person's own OAuth token of the client it was confirmed for; refused with a token issued for MCP, with any API key or agent connection key, and with a dashboard session. The Primitive app is refused for this purpose even with a token (403 `grant_forbidden`, `details.reason` `dashboard_only`). The person's own Primitive CLI login needs no token for this purpose while the organization's keys API is on (a token it sends is still checked); while it is off, a token it sends is refused the same way.",
|
|
32752
32755
|
"schema": {
|
|
32753
32756
|
"type": "string",
|
|
32754
32757
|
"pattern": "^pstep_[0-9a-f]{64}$"
|
|
@@ -32881,7 +32884,7 @@ const openapiDocument = {
|
|
|
32881
32884
|
"summary": "Get an API key",
|
|
32882
32885
|
"tags": ["Credentials"],
|
|
32883
32886
|
"security": [{ "BearerAuth": [] }],
|
|
32884
|
-
"description": "One key's metadata, never its secret. The person needs access to the whole organization's mail. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled.\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.",
|
|
32887
|
+
"description": "One key's metadata, never its secret. The person needs access to the whole organization's mail. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature. Only Primitive turns these 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.",
|
|
32885
32888
|
"x-primitive-person-only": { "access": "session_or_cli" },
|
|
32886
32889
|
"parameters": [{
|
|
32887
32890
|
"name": "id",
|
|
@@ -33004,7 +33007,7 @@ const openapiDocument = {
|
|
|
33004
33007
|
"summary": "Suggest a least-privilege grant for a key",
|
|
33005
33008
|
"tags": ["Credentials"],
|
|
33006
33009
|
"security": [{ "BearerAuth": [] }],
|
|
33007
|
-
"description": "The permissions a key used over the last 30 days, as a custom grant that would have served every successful call (also as builder areas), the narrowest mail scope its calls support (depth is deprecated: raw when it downloaded raw MIME, otherwise content) (the mailboxes of the messages it named and sent, with notes on what the request log cannot account for), and whether it is unused. Calls to routes only the super admin key can use (groups and mailbox access) derive no permission, since a custom key is refused there; super_admin_only_calls counts them. usage gives the same window anonymized: successful and failed requests per UTC day, the routes called by their declared template (never the called path) with the permission each needed, and how many mailboxes the key read and sent from (counts only, and only for a person with access to the whole organization's mail). Nothing is applied: narrowing is a change to the key (PATCH /v1/keys/:id). Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled.\n\nPerson only: a dashboard session. The person's role must hold credentials:read. API keys, agent connection keys and agents are refused.",
|
|
33010
|
+
"description": "The permissions a key used over the last 30 days, as a custom grant that would have served every successful call (also as builder areas), the narrowest mail scope its calls support (depth is deprecated: raw when it downloaded raw MIME, otherwise content) (the mailboxes of the messages it named and sent, with notes on what the request log cannot account for), and whether it is unused. Calls to routes only the super admin key can use (groups and mailbox access) derive no permission, since a custom key is refused there; super_admin_only_calls counts them. usage gives the same window anonymized: successful and failed requests per UTC day, the routes called by their declared template (never the called path) with the permission each needed, and how many mailboxes the key read and sent from (counts only, and only for a person with access to the whole organization's mail). Nothing is applied: narrowing is a change to the key (PATCH /v1/keys/:id). Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature. Only Primitive turns these on.\n\nPerson only: a dashboard session. The person's role must hold credentials:read. API keys, agent connection keys and agents are refused.",
|
|
33008
33011
|
"x-primitive-person-only": { "access": "session" },
|
|
33009
33012
|
"parameters": [{
|
|
33010
33013
|
"name": "id",
|
|
@@ -36545,7 +36548,7 @@ const openapiDocument = {
|
|
|
36545
36548
|
"/access-suspensions/{id}/decision": { "post": {
|
|
36546
36549
|
"operationId": "decideSuspension",
|
|
36547
36550
|
"summary": "Decide a suspension",
|
|
36548
|
-
"description": "Keep, narrow or revoke one suspended or flagged item. Keeping it, and revoking an API key, needs the decider to cover it (revoking an uncovered key is refused with `grant_forbidden`, `target_not_covered`). Keeping an API key rotated (`rotate: true`, other than the shared Function key) also revokes its older secrets still in a rotation overlap, and needs keys:manage on both the credential and the person: without it, or if the decider lost members:manage meanwhile, it is refused with `grant_forbidden` (`keys_manage_required` or `actor_access_changed`) and nothing is rotated. Person only: a dashboard session, or the person's own OAuth or CLI token with a session step-up of purpose `suspensions.decide` (the person confirms at the step_up_url a 403 step_up_required answer carries, which names this client, then send the token in the Primitive-Step-Up header; the token works only with the client it was confirmed for). Needs members:manage. API keys are refused.",
|
|
36551
|
+
"description": "Keep, narrow or revoke one suspended or flagged item. Keeping it, and revoking an API key, needs the decider to cover it (revoking an uncovered key is refused with `grant_forbidden`, `target_not_covered`). Keeping an API key rotated (`rotate: true`, other than the shared Function key) also revokes its older secrets still in a rotation overlap, and needs keys:manage on both the credential and the person: without it, or if the decider lost members:manage meanwhile, it is refused with `grant_forbidden` (`keys_manage_required` or `actor_access_changed`) and nothing is rotated. A rule share paused by a role change (`email_rule_share`) takes keep, which leaves it paused, or revoke, which ends the share and needs confirm: true (the person it was shared with loses the emails already shared; without it, 409 `confirmation_required`). Neither of the share's two people may keep it (`grant_forbidden`, `share_decision_forbidden`). Access a person gave on their own mailbox (`mailbox_access`) takes keep or revoke, and both need delegations:manage; revoke removes only what that person gave on that mailbox. Nobody the access reaches, nor the person who gave it, may keep it (`grant_forbidden`, `mailbox_access_decision_forbidden`). Person only: a dashboard session, or the person's own OAuth or CLI token with a session step-up of purpose `suspensions.decide` (the person confirms at the step_up_url a 403 step_up_required answer carries, which names this client, then send the token in the Primitive-Step-Up header; the token works only with the client it was confirmed for). Needs members:manage. API keys are refused.",
|
|
36549
36552
|
"tags": ["Roles and members"],
|
|
36550
36553
|
"security": [{ "BearerAuth": [] }],
|
|
36551
36554
|
"parameters": [
|
|
@@ -38388,6 +38391,7 @@ const openapiDocument = {
|
|
|
38388
38391
|
"signal_not_allowed",
|
|
38389
38392
|
"signal_parent_not_ready",
|
|
38390
38393
|
"signal_sender_unauthenticated",
|
|
38394
|
+
"signing_secret_unavailable",
|
|
38391
38395
|
"signup_failed",
|
|
38392
38396
|
"standing_owner_revoked",
|
|
38393
38397
|
"step_up_invalid",
|
|
@@ -47995,7 +47999,7 @@ const openapiDocument = {
|
|
|
47995
47999
|
"own_mailboxes",
|
|
47996
48000
|
"selected"
|
|
47997
48001
|
],
|
|
47998
|
-
"description": "
|
|
48002
|
+
"description": "own_mailboxes (the default): mail to your own addresses and agents (for a rule that shares, those you can send from). author: all mail you can read, including inboxes added later. selected: what scope_selection names."
|
|
47999
48003
|
},
|
|
48000
48004
|
"scope_selection": {
|
|
48001
48005
|
"type": "object",
|
|
@@ -48029,6 +48033,11 @@ const openapiDocument = {
|
|
|
48029
48033
|
"type": "string",
|
|
48030
48034
|
"format": "uuid"
|
|
48031
48035
|
},
|
|
48036
|
+
"kind": {
|
|
48037
|
+
"description": "For an unsaved tree: do_not_share tests it as a rule that blocks sharing, so an email it cannot decide counts as matched. A saved rule uses its own.",
|
|
48038
|
+
"type": "string",
|
|
48039
|
+
"enum": ["grant", "do_not_share"]
|
|
48040
|
+
},
|
|
48032
48041
|
"email_ids": {
|
|
48033
48042
|
"description": "Test exactly these emails. Without it, the newest emails the rule can read are tested, at most 200 and none older than 30 days.",
|
|
48034
48043
|
"minItems": 1,
|
|
@@ -48298,7 +48307,7 @@ const openapiDocument = {
|
|
|
48298
48307
|
"own_mailboxes",
|
|
48299
48308
|
"selected"
|
|
48300
48309
|
],
|
|
48301
|
-
"description": "
|
|
48310
|
+
"description": "own_mailboxes (the default): mail to your own addresses and agents (for a rule that shares, those you can send from). author: all mail you can read, including inboxes added later. selected: what scope_selection names."
|
|
48302
48311
|
},
|
|
48303
48312
|
"scope_selection": {
|
|
48304
48313
|
"type": "object",
|
|
@@ -48332,6 +48341,11 @@ const openapiDocument = {
|
|
|
48332
48341
|
"type": "string",
|
|
48333
48342
|
"format": "uuid"
|
|
48334
48343
|
},
|
|
48344
|
+
"kind": {
|
|
48345
|
+
"description": "For an unsaved tree: do_not_share tests it as a rule that blocks sharing, so an email it cannot decide counts as matched. A saved rule uses its own.",
|
|
48346
|
+
"type": "string",
|
|
48347
|
+
"enum": ["grant", "do_not_share"]
|
|
48348
|
+
},
|
|
48335
48349
|
"email": {
|
|
48336
48350
|
"type": "object",
|
|
48337
48351
|
"properties": {
|
|
@@ -48555,8 +48569,13 @@ const openapiDocument = {
|
|
|
48555
48569
|
"maxLength": 200,
|
|
48556
48570
|
"description": "A short name for the rule."
|
|
48557
48571
|
},
|
|
48572
|
+
"kind": {
|
|
48573
|
+
"description": "grant (the default): what the rule matches can be shared. do_not_share: the rule runs before every other rule, and while it is active no rule shares an email it matches; an email it cannot decide counts as matched. Set when the rule is created; it never changes.",
|
|
48574
|
+
"type": "string",
|
|
48575
|
+
"enum": ["grant", "do_not_share"]
|
|
48576
|
+
},
|
|
48558
48577
|
"state": {
|
|
48559
|
-
"description": "observe (the default) records what the rule would match and grants nothing; draft is not evaluated.",
|
|
48578
|
+
"description": "observe (the default) records what the rule would match and grants or blocks nothing; draft is not evaluated.",
|
|
48560
48579
|
"type": "string",
|
|
48561
48580
|
"enum": ["draft", "observe"]
|
|
48562
48581
|
},
|
|
@@ -48567,7 +48586,7 @@ const openapiDocument = {
|
|
|
48567
48586
|
"own_mailboxes",
|
|
48568
48587
|
"selected"
|
|
48569
48588
|
],
|
|
48570
|
-
"description": "
|
|
48589
|
+
"description": "own_mailboxes (the default): mail to your own addresses and agents (for a rule that shares, those you can send from). author: all mail you can read, including inboxes added later. selected: what scope_selection names."
|
|
48571
48590
|
},
|
|
48572
48591
|
"scope_selection": {
|
|
48573
48592
|
"type": "object",
|
|
@@ -48691,6 +48710,35 @@ const openapiDocument = {
|
|
|
48691
48710
|
"active"
|
|
48692
48711
|
]
|
|
48693
48712
|
},
|
|
48713
|
+
"kind": {
|
|
48714
|
+
"description": "do_not_share: the rule blocks sharing of what it matches. Absent (or grant) on a rule that shares what it matches.",
|
|
48715
|
+
"type": "string",
|
|
48716
|
+
"enum": ["grant", "do_not_share"]
|
|
48717
|
+
},
|
|
48718
|
+
"evaluation_scope": {
|
|
48719
|
+
"description": "Whose mail the rule runs over, as stored; GET /email-rules/{id}/scope says what that comes to now.",
|
|
48720
|
+
"type": "string",
|
|
48721
|
+
"enum": [
|
|
48722
|
+
"author",
|
|
48723
|
+
"own_mailboxes",
|
|
48724
|
+
"selected"
|
|
48725
|
+
]
|
|
48726
|
+
},
|
|
48727
|
+
"scope_selection": {
|
|
48728
|
+
"type": ["object", "null"],
|
|
48729
|
+
"properties": {
|
|
48730
|
+
"addresses": {
|
|
48731
|
+
"type": "array",
|
|
48732
|
+
"items": { "type": "string" }
|
|
48733
|
+
},
|
|
48734
|
+
"domains": {
|
|
48735
|
+
"type": "array",
|
|
48736
|
+
"items": { "type": "string" }
|
|
48737
|
+
}
|
|
48738
|
+
},
|
|
48739
|
+
"required": ["addresses", "domains"],
|
|
48740
|
+
"description": "What a selected rule names; null for any other scope."
|
|
48741
|
+
},
|
|
48694
48742
|
"current_version": {
|
|
48695
48743
|
"type": ["integer", "null"],
|
|
48696
48744
|
"exclusiveMinimum": 0
|
|
@@ -48827,6 +48875,35 @@ const openapiDocument = {
|
|
|
48827
48875
|
"active"
|
|
48828
48876
|
]
|
|
48829
48877
|
},
|
|
48878
|
+
"kind": {
|
|
48879
|
+
"description": "do_not_share: the rule blocks sharing of what it matches. Absent (or grant) on a rule that shares what it matches.",
|
|
48880
|
+
"type": "string",
|
|
48881
|
+
"enum": ["grant", "do_not_share"]
|
|
48882
|
+
},
|
|
48883
|
+
"evaluation_scope": {
|
|
48884
|
+
"description": "Whose mail the rule runs over, as stored; GET /email-rules/{id}/scope says what that comes to now.",
|
|
48885
|
+
"type": "string",
|
|
48886
|
+
"enum": [
|
|
48887
|
+
"author",
|
|
48888
|
+
"own_mailboxes",
|
|
48889
|
+
"selected"
|
|
48890
|
+
]
|
|
48891
|
+
},
|
|
48892
|
+
"scope_selection": {
|
|
48893
|
+
"type": ["object", "null"],
|
|
48894
|
+
"properties": {
|
|
48895
|
+
"addresses": {
|
|
48896
|
+
"type": "array",
|
|
48897
|
+
"items": { "type": "string" }
|
|
48898
|
+
},
|
|
48899
|
+
"domains": {
|
|
48900
|
+
"type": "array",
|
|
48901
|
+
"items": { "type": "string" }
|
|
48902
|
+
}
|
|
48903
|
+
},
|
|
48904
|
+
"required": ["addresses", "domains"],
|
|
48905
|
+
"description": "What a selected rule names; null for any other scope."
|
|
48906
|
+
},
|
|
48830
48907
|
"current_version": {
|
|
48831
48908
|
"type": ["integer", "null"],
|
|
48832
48909
|
"exclusiveMinimum": 0
|
|
@@ -48876,6 +48953,35 @@ const openapiDocument = {
|
|
|
48876
48953
|
"active"
|
|
48877
48954
|
]
|
|
48878
48955
|
},
|
|
48956
|
+
"kind": {
|
|
48957
|
+
"description": "do_not_share: the rule blocks sharing of what it matches. Absent (or grant) on a rule that shares what it matches.",
|
|
48958
|
+
"type": "string",
|
|
48959
|
+
"enum": ["grant", "do_not_share"]
|
|
48960
|
+
},
|
|
48961
|
+
"evaluation_scope": {
|
|
48962
|
+
"description": "Whose mail the rule runs over, as stored; GET /email-rules/{id}/scope says what that comes to now.",
|
|
48963
|
+
"type": "string",
|
|
48964
|
+
"enum": [
|
|
48965
|
+
"author",
|
|
48966
|
+
"own_mailboxes",
|
|
48967
|
+
"selected"
|
|
48968
|
+
]
|
|
48969
|
+
},
|
|
48970
|
+
"scope_selection": {
|
|
48971
|
+
"type": ["object", "null"],
|
|
48972
|
+
"properties": {
|
|
48973
|
+
"addresses": {
|
|
48974
|
+
"type": "array",
|
|
48975
|
+
"items": { "type": "string" }
|
|
48976
|
+
},
|
|
48977
|
+
"domains": {
|
|
48978
|
+
"type": "array",
|
|
48979
|
+
"items": { "type": "string" }
|
|
48980
|
+
}
|
|
48981
|
+
},
|
|
48982
|
+
"required": ["addresses", "domains"],
|
|
48983
|
+
"description": "What a selected rule names; null for any other scope."
|
|
48984
|
+
},
|
|
48879
48985
|
"current_version": {
|
|
48880
48986
|
"type": ["integer", "null"],
|
|
48881
48987
|
"exclusiveMinimum": 0
|
|
@@ -49004,7 +49110,7 @@ const openapiDocument = {
|
|
|
49004
49110
|
"description": "A short name for the rule."
|
|
49005
49111
|
},
|
|
49006
49112
|
"state": {
|
|
49007
|
-
"description": "draft disables the rule; observe records decisions; active also grants what it matches. Keys read and receive what a rule granted only while it is active: leaving active pauses that, and returning to active restores reads and the delivery of queued mail not yet skipped.",
|
|
49113
|
+
"description": "draft disables the rule; observe records decisions; active also grants what it matches, or for a do_not_share rule keeps it from being shared. Keys read and receive what a rule granted only while it is active: leaving active pauses that, and returning to active restores reads and the delivery of queued mail not yet skipped.",
|
|
49008
49114
|
"type": "string",
|
|
49009
49115
|
"enum": [
|
|
49010
49116
|
"draft",
|
|
@@ -49137,6 +49243,35 @@ const openapiDocument = {
|
|
|
49137
49243
|
"active"
|
|
49138
49244
|
]
|
|
49139
49245
|
},
|
|
49246
|
+
"kind": {
|
|
49247
|
+
"description": "do_not_share: the rule blocks sharing of what it matches. Absent (or grant) on a rule that shares what it matches.",
|
|
49248
|
+
"type": "string",
|
|
49249
|
+
"enum": ["grant", "do_not_share"]
|
|
49250
|
+
},
|
|
49251
|
+
"evaluation_scope": {
|
|
49252
|
+
"description": "Whose mail the rule runs over, as stored; GET /email-rules/{id}/scope says what that comes to now.",
|
|
49253
|
+
"type": "string",
|
|
49254
|
+
"enum": [
|
|
49255
|
+
"author",
|
|
49256
|
+
"own_mailboxes",
|
|
49257
|
+
"selected"
|
|
49258
|
+
]
|
|
49259
|
+
},
|
|
49260
|
+
"scope_selection": {
|
|
49261
|
+
"type": ["object", "null"],
|
|
49262
|
+
"properties": {
|
|
49263
|
+
"addresses": {
|
|
49264
|
+
"type": "array",
|
|
49265
|
+
"items": { "type": "string" }
|
|
49266
|
+
},
|
|
49267
|
+
"domains": {
|
|
49268
|
+
"type": "array",
|
|
49269
|
+
"items": { "type": "string" }
|
|
49270
|
+
}
|
|
49271
|
+
},
|
|
49272
|
+
"required": ["addresses", "domains"],
|
|
49273
|
+
"description": "What a selected rule names; null for any other scope."
|
|
49274
|
+
},
|
|
49140
49275
|
"current_version": {
|
|
49141
49276
|
"type": ["integer", "null"],
|
|
49142
49277
|
"exclusiveMinimum": 0
|
|
@@ -49335,6 +49470,11 @@ const openapiDocument = {
|
|
|
49335
49470
|
"active"
|
|
49336
49471
|
]
|
|
49337
49472
|
},
|
|
49473
|
+
"kind": {
|
|
49474
|
+
"description": "do_not_share: the rule blocks sharing of what it matches. While it is active, no rule shares an email it has matched from then on; anything shared before, including while it was in observe, stays shared. Absent on a rule that shares what it matches.",
|
|
49475
|
+
"type": "string",
|
|
49476
|
+
"enum": ["grant", "do_not_share"]
|
|
49477
|
+
},
|
|
49338
49478
|
"decision": {
|
|
49339
49479
|
"type": ["object", "null"],
|
|
49340
49480
|
"properties": {
|
|
@@ -49439,6 +49579,11 @@ const openapiDocument = {
|
|
|
49439
49579
|
null
|
|
49440
49580
|
],
|
|
49441
49581
|
"description": "What is known about a rule with no result on this email. draft: the rule is a draft now. created_after_email: the rule was created after the email arrived. Null when it has a result, or when nothing is known."
|
|
49582
|
+
},
|
|
49583
|
+
"author_left": {
|
|
49584
|
+
"description": "On a do-not-share rule whose author is no longer a member of the organization: it blocks nothing now, whatever it decided. Absent otherwise.",
|
|
49585
|
+
"type": "boolean",
|
|
49586
|
+
"const": true
|
|
49442
49587
|
}
|
|
49443
49588
|
},
|
|
49444
49589
|
"required": [
|
|
@@ -49602,6 +49747,11 @@ const openapiDocument = {
|
|
|
49602
49747
|
"required": ["addresses", "domains"],
|
|
49603
49748
|
"description": "What scope_selection names that its author no longer reads in full."
|
|
49604
49749
|
},
|
|
49750
|
+
"still_read": {
|
|
49751
|
+
"description": "Inboxes its author still reads at the domains in no_longer_readable; the rule still covers them.",
|
|
49752
|
+
"type": "array",
|
|
49753
|
+
"items": { "type": "string" }
|
|
49754
|
+
},
|
|
49605
49755
|
"stopped_reason": {
|
|
49606
49756
|
"description": "Why it cannot run now (a reason as on POST /email-rules/test), or null.",
|
|
49607
49757
|
"type": ["string", "null"]
|
|
@@ -49632,10 +49782,14 @@ const openapiDocument = {
|
|
|
49632
49782
|
"type": "boolean",
|
|
49633
49783
|
"description": "Whether a rule over only your own mail would run for you."
|
|
49634
49784
|
},
|
|
49785
|
+
"own_mail_to_block": {
|
|
49786
|
+
"description": "Whether a do_not_share rule over only your own mail would run for you: it covers every own mailbox you read, including ones you could not share.",
|
|
49787
|
+
"type": "boolean"
|
|
49788
|
+
},
|
|
49635
49789
|
"addresses": {
|
|
49636
49790
|
"type": "array",
|
|
49637
49791
|
"items": { "type": "string" },
|
|
49638
|
-
"description": "Inboxes you can read, matching q."
|
|
49792
|
+
"description": "Inboxes you can read, matching q. For someone who reads the whole organization, the inboxes known as someone's: member addresses, members' verified work emails at the organization's domains, agents' addresses and inboxes with shared access. Otherwise the inboxes your access lists (search with q for those past the first page). See may_name_unlisted for what else you may name."
|
|
49639
49793
|
},
|
|
49640
49794
|
"domains": {
|
|
49641
49795
|
"type": "array",
|
|
@@ -49645,6 +49799,10 @@ const openapiDocument = {
|
|
|
49645
49799
|
"more": {
|
|
49646
49800
|
"type": "boolean",
|
|
49647
49801
|
"description": "More match than are listed."
|
|
49802
|
+
},
|
|
49803
|
+
"may_name_unlisted": {
|
|
49804
|
+
"description": "Whether you may also name an inbox this list never shows, however it is searched (more only says whether a search would show further ones): true when you read the whole organization (any address, such as an inbox at its domains nobody has claimed yet) or read a domain (any address there your access does not leave out). Name it in scope_selection.addresses as you would a listed one. Absent from a server that predates it.",
|
|
49805
|
+
"type": "boolean"
|
|
49648
49806
|
}
|
|
49649
49807
|
},
|
|
49650
49808
|
"required": [
|
|
@@ -50837,6 +50995,35 @@ const openapiDocument = {
|
|
|
50837
50995
|
"active"
|
|
50838
50996
|
]
|
|
50839
50997
|
},
|
|
50998
|
+
"kind": {
|
|
50999
|
+
"description": "do_not_share: the rule blocks sharing of what it matches. Absent (or grant) on a rule that shares what it matches.",
|
|
51000
|
+
"type": "string",
|
|
51001
|
+
"enum": ["grant", "do_not_share"]
|
|
51002
|
+
},
|
|
51003
|
+
"evaluation_scope": {
|
|
51004
|
+
"description": "Whose mail the rule runs over, as stored; GET /email-rules/{id}/scope says what that comes to now.",
|
|
51005
|
+
"type": "string",
|
|
51006
|
+
"enum": [
|
|
51007
|
+
"author",
|
|
51008
|
+
"own_mailboxes",
|
|
51009
|
+
"selected"
|
|
51010
|
+
]
|
|
51011
|
+
},
|
|
51012
|
+
"scope_selection": {
|
|
51013
|
+
"type": ["object", "null"],
|
|
51014
|
+
"properties": {
|
|
51015
|
+
"addresses": {
|
|
51016
|
+
"type": "array",
|
|
51017
|
+
"items": { "type": "string" }
|
|
51018
|
+
},
|
|
51019
|
+
"domains": {
|
|
51020
|
+
"type": "array",
|
|
51021
|
+
"items": { "type": "string" }
|
|
51022
|
+
}
|
|
51023
|
+
},
|
|
51024
|
+
"required": ["addresses", "domains"],
|
|
51025
|
+
"description": "What a selected rule names; null for any other scope."
|
|
51026
|
+
},
|
|
50840
51027
|
"current_version": {
|
|
50841
51028
|
"type": ["integer", "null"],
|
|
50842
51029
|
"exclusiveMinimum": 0
|
|
@@ -68682,7 +68869,7 @@ const operationManifest = [
|
|
|
68682
68869
|
"binaryResponse": false,
|
|
68683
68870
|
"bodyRequired": true,
|
|
68684
68871
|
"command": "create-key",
|
|
68685
|
-
"description": "Create an API key, super admin or narrowed to a preset or a custom permission set, optionally with an expiry and conditions. The secret is returned once. A key never holds more than the person creating it; the credential policy decides who may create which keys. grant is required: a request without it is refused (400 validation_error, details.reason grant_required), never treated as super admin. A custom key must say which mail it reaches: the addresses and domains it lists (grant.addresses, grant.domains), or every mailbox in the organization with grant.mail_scope \"org\", which cannot be combined with them; one that says neither is refused (400 validation_error, details.reason mail_scope_required). Super admin, Send only and Read only reach every mailbox by definition. members:read is only for an org-wide custom key: naming it with grant.addresses or grant.domains is refused (400). Owners and admins are emailed about every super admin key. Send an Idempotency-Key to retry safely: a second create by the same person under the same key makes no second key and is refused (409 idempotency_key_reused) with the first key's id in error.details.key_id, so a caller whose first answer was lost can revoke that key. The onboarding field is for the dashboard only. The Primitive CLI
|
|
68872
|
+
"description": "Create an API key, super admin or narrowed to a preset or a custom permission set, optionally with an expiry and conditions. The secret is returned once. A key never holds more than the person creating it; the credential policy decides who may create which keys. grant is required: a request without it is refused (400 validation_error, details.reason grant_required), never treated as super admin. A custom key must say which mail it reaches: the addresses and domains it lists (grant.addresses, grant.domains), or every mailbox in the organization with grant.mail_scope \"org\", which cannot be combined with them; one that says neither is refused (400 validation_error, details.reason mail_scope_required). Super admin, Send only and Read only reach every mailbox by definition. members:read is only for an org-wide custom key: naming it with grant.addresses or grant.domains is refused (400). Owners and admins are emailed about every super admin key. Send an Idempotency-Key to retry safely: a second create by the same person under the same key makes no second key and is refused (409 idempotency_key_reused) with the first key's id in error.details.key_id, so a caller whose first answer was lost can revoke that key. The onboarding field is for the dashboard only. The person's own Primitive CLI login needs no step-up (it acts as the person, held to the same rules); the Primitive app's token is refused, even with one. While the organization's keys API is not enabled, this answers 404 feature_disabled (details.feature keys_api; only Primitive turns it on), except that a dashboard session may still create a super admin key (the dashboard's own create).\n\nPerson only: a dashboard session, the person's own Primitive CLI login with no step-up, or the person's own OAuth token with a step-up token for purpose `keys.create` in the Primitive-Step-Up header. Without one any other OAuth token is answered 403 step_up_required, whose details carry the dashboard URL that issues it (or 403 grant_forbidden when the person's role, or the client, could not do it anyway). The person's role must hold keys:manage. API keys and agent connection keys are refused. An agent acting for the person is refused unless it carries a step-up token the person issued in the dashboard.",
|
|
68686
68873
|
"hasJsonBody": true,
|
|
68687
68874
|
"method": "POST",
|
|
68688
68875
|
"operationId": "createKey",
|
|
@@ -68705,7 +68892,7 @@ const operationManifest = [
|
|
|
68705
68892
|
"type": "string"
|
|
68706
68893
|
},
|
|
68707
68894
|
{
|
|
68708
|
-
"description": "A single-use step-up token of purpose `keys.create` (Create, rotate or change an API key), valid 5 minutes. When this operation answers 403 `step_up_required`, the person confirms at the link in `details.step_up_url` and the request is retried with the token that page shows, in this header. Accepted only with the person's own OAuth token of the client it was confirmed for; refused with a token issued for MCP, with any API key or agent connection key, and with a dashboard session. The Primitive app is refused for this purpose even with a token (403 `grant_forbidden`, `details.reason` `dashboard_only`). The Primitive CLI
|
|
68895
|
+
"description": "A single-use step-up token of purpose `keys.create` (Create, rotate or change an API key), valid 5 minutes. When this operation answers 403 `step_up_required`, the person confirms at the link in `details.step_up_url` and the request is retried with the token that page shows, in this header. Accepted only with the person's own OAuth token of the client it was confirmed for; refused with a token issued for MCP, with any API key or agent connection key, and with a dashboard session. The Primitive app is refused for this purpose even with a token (403 `grant_forbidden`, `details.reason` `dashboard_only`). The person's own Primitive CLI login needs no token for this purpose while the organization's keys API is on (a token it sends is still checked); while it is off, a token it sends is refused the same way.",
|
|
68709
68896
|
"enum": null,
|
|
68710
68897
|
"name": "Primitive-Step-Up",
|
|
68711
68898
|
"required": false,
|
|
@@ -68934,7 +69121,7 @@ const operationManifest = [
|
|
|
68934
69121
|
"binaryResponse": false,
|
|
68935
69122
|
"bodyRequired": false,
|
|
68936
69123
|
"command": "get-credential-policy",
|
|
68937
|
-
"description": "The organization credential policy: key lifetime and expiry rules, who may create super admin keys, whether members may create keys and the other rules every new key is held to. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled.\n\nPerson only: a dashboard session. The person's role must hold credentials:read. API keys, agent connection keys and agents are refused.",
|
|
69124
|
+
"description": "The organization credential policy: key lifetime and expiry rules, who may create super admin keys, whether members may create keys and the other rules every new key is held to. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature. Only Primitive turns these on.\n\nPerson only: a dashboard session. The person's role must hold credentials:read. API keys, agent connection keys and agents are refused.",
|
|
68938
69125
|
"hasJsonBody": false,
|
|
68939
69126
|
"method": "GET",
|
|
68940
69127
|
"operationId": "getCredentialPolicy",
|
|
@@ -68993,7 +69180,7 @@ const operationManifest = [
|
|
|
68993
69180
|
"binaryResponse": false,
|
|
68994
69181
|
"bodyRequired": false,
|
|
68995
69182
|
"command": "get-key",
|
|
68996
|
-
"description": "One key's metadata, never its secret. The person needs access to the whole organization's mail. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled.\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.",
|
|
69183
|
+
"description": "One key's metadata, never its secret. The person needs access to the whole organization's mail. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature. Only Primitive turns these 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.",
|
|
68997
69184
|
"hasJsonBody": false,
|
|
68998
69185
|
"method": "GET",
|
|
68999
69186
|
"operationId": "getKey",
|
|
@@ -69071,7 +69258,7 @@ const operationManifest = [
|
|
|
69071
69258
|
"binaryResponse": false,
|
|
69072
69259
|
"bodyRequired": false,
|
|
69073
69260
|
"command": "get-key-builder",
|
|
69074
|
-
"description": "The key presets the caller may use (each with whether it is available and why not), the permission matrix for custom keys and the policy in force. An area marked org_wide_only (Members) is listed only to a person who holds its permission, and only a custom key with no addresses or domains may hold it. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled.\n\nPerson only: a dashboard session. The person's role must hold keys:read. API keys, agent connection keys and agents are refused.",
|
|
69261
|
+
"description": "The key presets the caller may use (each with whether it is available and why not), the permission matrix for custom keys and the policy in force. An area marked org_wide_only (Members) is listed only to a person who holds its permission, and only a custom key with no addresses or domains may hold it. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature. Only Primitive turns these on.\n\nPerson only: a dashboard session. The person's role must hold keys:read. API keys, agent connection keys and agents are refused.",
|
|
69075
69262
|
"hasJsonBody": false,
|
|
69076
69263
|
"method": "GET",
|
|
69077
69264
|
"operationId": "getKeyBuilder",
|
|
@@ -69204,7 +69391,7 @@ const operationManifest = [
|
|
|
69204
69391
|
"binaryResponse": false,
|
|
69205
69392
|
"bodyRequired": false,
|
|
69206
69393
|
"command": "get-key-suggestion",
|
|
69207
|
-
"description": "The permissions a key used over the last 30 days, as a custom grant that would have served every successful call (also as builder areas), the narrowest mail scope its calls support (depth is deprecated: raw when it downloaded raw MIME, otherwise content) (the mailboxes of the messages it named and sent, with notes on what the request log cannot account for), and whether it is unused. Calls to routes only the super admin key can use (groups and mailbox access) derive no permission, since a custom key is refused there; super_admin_only_calls counts them. usage gives the same window anonymized: successful and failed requests per UTC day, the routes called by their declared template (never the called path) with the permission each needed, and how many mailboxes the key read and sent from (counts only, and only for a person with access to the whole organization's mail). Nothing is applied: narrowing is a change to the key (PATCH /v1/keys/:id). Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled.\n\nPerson only: a dashboard session. The person's role must hold credentials:read. API keys, agent connection keys and agents are refused.",
|
|
69394
|
+
"description": "The permissions a key used over the last 30 days, as a custom grant that would have served every successful call (also as builder areas), the narrowest mail scope its calls support (depth is deprecated: raw when it downloaded raw MIME, otherwise content) (the mailboxes of the messages it named and sent, with notes on what the request log cannot account for), and whether it is unused. Calls to routes only the super admin key can use (groups and mailbox access) derive no permission, since a custom key is refused there; super_admin_only_calls counts them. usage gives the same window anonymized: successful and failed requests per UTC day, the routes called by their declared template (never the called path) with the permission each needed, and how many mailboxes the key read and sent from (counts only, and only for a person with access to the whole organization's mail). Nothing is applied: narrowing is a change to the key (PATCH /v1/keys/:id). Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature. Only Primitive turns these on.\n\nPerson only: a dashboard session. The person's role must hold credentials:read. API keys, agent connection keys and agents are refused.",
|
|
69208
69395
|
"hasJsonBody": false,
|
|
69209
69396
|
"method": "GET",
|
|
69210
69397
|
"operationId": "getKeySuggestion",
|
|
@@ -69448,7 +69635,7 @@ const operationManifest = [
|
|
|
69448
69635
|
"binaryResponse": false,
|
|
69449
69636
|
"bodyRequired": false,
|
|
69450
69637
|
"command": "list-credential-events",
|
|
69451
|
-
"description": "Credential events (created, rotated, edited, revoked, used with a step-up, policy changes), newest first, with a cursor. format=csv returns the same page as CSV. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled.\n\nPerson only: a dashboard session. The person's role must hold credential_events:read. API keys, agent connection keys and agents are refused.",
|
|
69638
|
+
"description": "Credential events (created, rotated, edited, revoked, used with a step-up, policy changes), newest first, with a cursor. format=csv returns the same page as CSV. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature. Only Primitive turns these on.\n\nPerson only: a dashboard session. The person's role must hold credential_events:read. API keys, agent connection keys and agents are refused.",
|
|
69452
69639
|
"hasJsonBody": false,
|
|
69453
69640
|
"method": "GET",
|
|
69454
69641
|
"operationId": "listCredentialEvents",
|
|
@@ -69577,7 +69764,7 @@ const operationManifest = [
|
|
|
69577
69764
|
"binaryResponse": false,
|
|
69578
69765
|
"bodyRequired": false,
|
|
69579
69766
|
"command": "list-credentials",
|
|
69580
|
-
"description": "Every credential that can act in the organization: API keys, Function keys, agent connection keys, connected apps (OAuth), agent delegates and, where enabled, CLI logins. Secrets are never returned. Filter with kind. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled.\n\nPerson only: a dashboard session. The person's role must hold credentials:read. API keys, agent connection keys and agents are refused.",
|
|
69767
|
+
"description": "Every credential that can act in the organization: API keys, Function keys, agent connection keys, connected apps (OAuth), agent delegates and, where enabled, CLI logins. Secrets are never returned. Filter with kind. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature. Only Primitive turns these on.\n\nPerson only: a dashboard session. The person's role must hold credentials:read. API keys, agent connection keys and agents are refused.",
|
|
69581
69768
|
"hasJsonBody": false,
|
|
69582
69769
|
"method": "GET",
|
|
69583
69770
|
"operationId": "listCredentials",
|
|
@@ -69813,7 +70000,7 @@ const operationManifest = [
|
|
|
69813
70000
|
"binaryResponse": false,
|
|
69814
70001
|
"bodyRequired": false,
|
|
69815
70002
|
"command": "list-keys",
|
|
69816
|
-
"description": "Key metadata, never a secret: name, prefix, grant, creator, last use, expiry and suspension. 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.\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.",
|
|
70003
|
+
"description": "Key metadata, never a secret: name, prefix, grant, creator, last use, expiry and suspension. 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. Only Primitive turns these 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.",
|
|
69817
70004
|
"hasJsonBody": false,
|
|
69818
70005
|
"method": "GET",
|
|
69819
70006
|
"operationId": "listKeys",
|
|
@@ -69902,7 +70089,7 @@ const operationManifest = [
|
|
|
69902
70089
|
"binaryResponse": false,
|
|
69903
70090
|
"bodyRequired": true,
|
|
69904
70091
|
"command": "revoke-all-credentials",
|
|
69905
|
-
"description": "The emergency response to a leak: revokes every API key, agent connection key and connected app created since a time, rotates the organization Function key and every running Function's own key, and optionally suspends Functions. Owners only, from a dashboard session, and the body must confirm with \"revoke all\". Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled.\n\nPerson only: a dashboard session. The person's role must hold credentials:revoke_all. API keys, agent connection keys and agents are refused.",
|
|
70092
|
+
"description": "The emergency response to a leak: revokes every API key, agent connection key and connected app created since a time, rotates the organization Function key and every running Function's own key, and optionally suspends Functions. Owners only, from a dashboard session, and the body must confirm with \"revoke all\". Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature. Only Primitive turns these on.\n\nPerson only: a dashboard session. The person's role must hold credentials:revoke_all. API keys, agent connection keys and agents are refused.",
|
|
69906
70093
|
"hasJsonBody": true,
|
|
69907
70094
|
"method": "POST",
|
|
69908
70095
|
"operationId": "revokeAllCredentials",
|
|
@@ -69987,7 +70174,7 @@ const operationManifest = [
|
|
|
69987
70174
|
"binaryResponse": false,
|
|
69988
70175
|
"bodyRequired": true,
|
|
69989
70176
|
"command": "revoke-credential",
|
|
69990
|
-
"description": "Revoke one credential by kind and id. A Function key is rotated, never revoked (409 rotate_instead). An API key is revoked only by a person whose own access covers the key's access (an owner covers every key); otherwise 403 grant_forbidden, details.reason target_not_covered. What the credential set up keeps working and is listed in standing_objects for review. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled.\n\nPerson only: a dashboard session. The person's role must hold keys:manage. API keys, agent connection keys and agents are refused.",
|
|
70177
|
+
"description": "Revoke one credential by kind and id. A Function key is rotated, never revoked (409 rotate_instead). An API key is revoked only by a person whose own access covers the key's access (an owner covers every key); otherwise 403 grant_forbidden, details.reason target_not_covered. What the credential set up keeps working and is listed in standing_objects for review. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature. Only Primitive turns these on.\n\nPerson only: a dashboard session. The person's role must hold keys:manage. API keys, agent connection keys and agents are refused.",
|
|
69991
70178
|
"hasJsonBody": true,
|
|
69992
70179
|
"method": "POST",
|
|
69993
70180
|
"operationId": "revokeCredential",
|
|
@@ -70109,7 +70296,7 @@ const operationManifest = [
|
|
|
70109
70296
|
"binaryResponse": false,
|
|
70110
70297
|
"bodyRequired": true,
|
|
70111
70298
|
"command": "rotate-key",
|
|
70112
|
-
"description": "Mint a successor with the same grant and return its secret once. The old key keeps working for overlap_seconds, then stops. The person rotating must cover the key's access (403 grant_forbidden, details.reason target_not_covered), and a key an owner created is rotated by an owner only (403 forbidden, details.reason owner_key_rotation), since rotating hands over the new secret. The Primitive CLI
|
|
70299
|
+
"description": "Mint a successor with the same grant and return its secret once. The old key keeps working for overlap_seconds, then stops. The person rotating must cover the key's access (403 grant_forbidden, details.reason target_not_covered), and a key an owner created is rotated by an owner only (403 forbidden, details.reason owner_key_rotation), since rotating hands over the new secret. The person's own Primitive CLI login needs no step-up (it acts as the person, held to the same rules); the Primitive app's token is refused, even with one. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature. Only Primitive turns these on.\n\nPerson only: a dashboard session, the person's own Primitive CLI login with no step-up, or the person's own OAuth token with a step-up token for purpose `keys.create` in the Primitive-Step-Up header. Without one any other OAuth token is answered 403 step_up_required, whose details carry the dashboard URL that issues it (or 403 grant_forbidden when the person's role, or the client, could not do it anyway). The person's role must hold keys:manage. API keys and agent connection keys are refused. An agent acting for the person is refused unless it carries a step-up token the person issued in the dashboard.",
|
|
70113
70300
|
"hasJsonBody": true,
|
|
70114
70301
|
"method": "POST",
|
|
70115
70302
|
"operationId": "rotateKey",
|
|
@@ -70123,7 +70310,7 @@ const operationManifest = [
|
|
|
70123
70310
|
}],
|
|
70124
70311
|
"queryParams": [],
|
|
70125
70312
|
"headerParams": [{
|
|
70126
|
-
"description": "A single-use step-up token of purpose `keys.create` (Create, rotate or change an API key), valid 5 minutes. When this operation answers 403 `step_up_required`, the person confirms at the link in `details.step_up_url` and the request is retried with the token that page shows, in this header. Accepted only with the person's own OAuth token of the client it was confirmed for; refused with a token issued for MCP, with any API key or agent connection key, and with a dashboard session. The Primitive app is refused for this purpose even with a token (403 `grant_forbidden`, `details.reason` `dashboard_only`). The Primitive CLI
|
|
70313
|
+
"description": "A single-use step-up token of purpose `keys.create` (Create, rotate or change an API key), valid 5 minutes. When this operation answers 403 `step_up_required`, the person confirms at the link in `details.step_up_url` and the request is retried with the token that page shows, in this header. Accepted only with the person's own OAuth token of the client it was confirmed for; refused with a token issued for MCP, with any API key or agent connection key, and with a dashboard session. The Primitive app is refused for this purpose even with a token (403 `grant_forbidden`, `details.reason` `dashboard_only`). The person's own Primitive CLI login needs no token for this purpose while the organization's keys API is on (a token it sends is still checked); while it is off, a token it sends is refused the same way.",
|
|
70127
70314
|
"enum": null,
|
|
70128
70315
|
"name": "Primitive-Step-Up",
|
|
70129
70316
|
"required": false,
|
|
@@ -70181,7 +70368,7 @@ const operationManifest = [
|
|
|
70181
70368
|
"binaryResponse": false,
|
|
70182
70369
|
"bodyRequired": true,
|
|
70183
70370
|
"command": "update-credential-policy",
|
|
70184
|
-
"description": "Change one or more policy rules. Admins may only tighten the policy; loosening any rule needs an owner. Owners and admins are emailed about every change. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled.\n\nPerson only: a dashboard session. The person's role must hold credential_policy:manage. API keys, agent connection keys and agents are refused.",
|
|
70371
|
+
"description": "Change one or more policy rules. Admins may only tighten the policy; loosening any rule needs an owner. Owners and admins are emailed about every change. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature. Only Primitive turns these on.\n\nPerson only: a dashboard session. The person's role must hold credential_policy:manage. API keys, agent connection keys and agents are refused.",
|
|
70185
70372
|
"hasJsonBody": true,
|
|
70186
70373
|
"method": "PATCH",
|
|
70187
70374
|
"operationId": "updateCredentialPolicy",
|
|
@@ -70269,7 +70456,7 @@ const operationManifest = [
|
|
|
70269
70456
|
"binaryResponse": false,
|
|
70270
70457
|
"bodyRequired": true,
|
|
70271
70458
|
"command": "update-key",
|
|
70272
|
-
"description": "Rename a key, change its expiry, its grant or its conditions, or suspend it. Any change needs the person's own access to cover the key's access now (an owner covers every key); otherwise 403 grant_forbidden, details.reason target_not_covered. A grant change is a new version of the key and is held to the same rules as creating one (a custom grant that does not say which mail it reaches is refused with details.reason mail_scope_required), so it takes the same step-up. The Primitive CLI
|
|
70459
|
+
"description": "Rename a key, change its expiry, its grant or its conditions, or suspend it. Any change needs the person's own access to cover the key's access now (an owner covers every key); otherwise 403 grant_forbidden, details.reason target_not_covered. A grant change is a new version of the key and is held to the same rules as creating one (a custom grant that does not say which mail it reaches is refused with details.reason mail_scope_required), so it takes the same step-up. The person's own Primitive CLI login needs no step-up (it acts as the person, held to the same rules); the Primitive app's token is refused, even with one. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled, with details.feature naming the feature. Only Primitive turns these on.\n\nPerson only: a dashboard session, the person's own Primitive CLI login with no step-up, or the person's own OAuth token with a step-up token for purpose `keys.create` in the Primitive-Step-Up header. Without one any other OAuth token is answered 403 step_up_required, whose details carry the dashboard URL that issues it (or 403 grant_forbidden when the person's role, or the client, could not do it anyway). The person's role must hold keys:manage. API keys and agent connection keys are refused. An agent acting for the person is refused unless it carries a step-up token the person issued in the dashboard.",
|
|
70273
70460
|
"hasJsonBody": true,
|
|
70274
70461
|
"method": "PATCH",
|
|
70275
70462
|
"operationId": "updateKey",
|
|
@@ -70283,7 +70470,7 @@ const operationManifest = [
|
|
|
70283
70470
|
}],
|
|
70284
70471
|
"queryParams": [],
|
|
70285
70472
|
"headerParams": [{
|
|
70286
|
-
"description": "A single-use step-up token of purpose `keys.create` (Create, rotate or change an API key), valid 5 minutes. When this operation answers 403 `step_up_required`, the person confirms at the link in `details.step_up_url` and the request is retried with the token that page shows, in this header. Accepted only with the person's own OAuth token of the client it was confirmed for; refused with a token issued for MCP, with any API key or agent connection key, and with a dashboard session. The Primitive app is refused for this purpose even with a token (403 `grant_forbidden`, `details.reason` `dashboard_only`). The Primitive CLI
|
|
70473
|
+
"description": "A single-use step-up token of purpose `keys.create` (Create, rotate or change an API key), valid 5 minutes. When this operation answers 403 `step_up_required`, the person confirms at the link in `details.step_up_url` and the request is retried with the token that page shows, in this header. Accepted only with the person's own OAuth token of the client it was confirmed for; refused with a token issued for MCP, with any API key or agent connection key, and with a dashboard session. The Primitive app is refused for this purpose even with a token (403 `grant_forbidden`, `details.reason` `dashboard_only`). The person's own Primitive CLI login needs no token for this purpose while the organization's keys API is on (a token it sends is still checked); while it is off, a token it sends is refused the same way.",
|
|
70287
70474
|
"enum": null,
|
|
70288
70475
|
"name": "Primitive-Step-Up",
|
|
70289
70476
|
"required": false,
|
|
@@ -72547,6 +72734,35 @@ const operationManifest = [
|
|
|
72547
72734
|
"active"
|
|
72548
72735
|
]
|
|
72549
72736
|
},
|
|
72737
|
+
"kind": {
|
|
72738
|
+
"description": "do_not_share: the rule blocks sharing of what it matches. Absent (or grant) on a rule that shares what it matches.",
|
|
72739
|
+
"type": "string",
|
|
72740
|
+
"enum": ["grant", "do_not_share"]
|
|
72741
|
+
},
|
|
72742
|
+
"evaluation_scope": {
|
|
72743
|
+
"description": "Whose mail the rule runs over, as stored; GET /email-rules/{id}/scope says what that comes to now.",
|
|
72744
|
+
"type": "string",
|
|
72745
|
+
"enum": [
|
|
72746
|
+
"author",
|
|
72747
|
+
"own_mailboxes",
|
|
72748
|
+
"selected"
|
|
72749
|
+
]
|
|
72750
|
+
},
|
|
72751
|
+
"scope_selection": {
|
|
72752
|
+
"type": ["object", "null"],
|
|
72753
|
+
"properties": {
|
|
72754
|
+
"addresses": {
|
|
72755
|
+
"type": "array",
|
|
72756
|
+
"items": { "type": "string" }
|
|
72757
|
+
},
|
|
72758
|
+
"domains": {
|
|
72759
|
+
"type": "array",
|
|
72760
|
+
"items": { "type": "string" }
|
|
72761
|
+
}
|
|
72762
|
+
},
|
|
72763
|
+
"required": ["addresses", "domains"],
|
|
72764
|
+
"description": "What a selected rule names; null for any other scope."
|
|
72765
|
+
},
|
|
72550
72766
|
"current_version": {
|
|
72551
72767
|
"type": ["integer", "null"],
|
|
72552
72768
|
"exclusiveMinimum": 0
|
|
@@ -72953,7 +73169,7 @@ const operationManifest = [
|
|
|
72953
73169
|
"binaryResponse": false,
|
|
72954
73170
|
"bodyRequired": true,
|
|
72955
73171
|
"command": "create-email-rule",
|
|
72956
|
-
"description": "Saves a rule as version 1, from a compile response or a tree you wrote. The tree is checked against the column contract. New rules start in observe, where what the rule matches is recorded and nothing is granted; draft is not evaluated. The caller is the rule's author, and the rule never reaches mail the author cannot read. evaluation_scope (
|
|
73172
|
+
"description": "Saves a rule as version 1, from a compile response or a tree you wrote. The tree is checked against the column contract. New rules start in observe, where what the rule matches is recorded and nothing is granted or blocked; draft is not evaluated. The caller is the rule's author, and the rule never reaches mail the author cannot read. evaluation_scope chooses whose mail it runs over: own_mailboxes (only your own mail) when omitted, so any other scope (author for all you can read, or selected) is named; scope_selection may name only what you can read. The answer carries the scope as stored. kind do_not_share makes a rule that blocks sharing: it runs before every other rule, and while it is active no rule shares an email it matches or cannot decide. A key cannot list one (details.reason rule_blocks_sharing on the key). Needs mail:read, a credential acting as a member with their full access (API keys, agent keys and narrowed tokens are refused), and the email rules feature on the organization.",
|
|
72957
73173
|
"hasJsonBody": true,
|
|
72958
73174
|
"method": "POST",
|
|
72959
73175
|
"operationId": "createEmailRule",
|
|
@@ -72977,8 +73193,13 @@ const operationManifest = [
|
|
|
72977
73193
|
"maxLength": 200,
|
|
72978
73194
|
"description": "A short name for the rule."
|
|
72979
73195
|
},
|
|
73196
|
+
"kind": {
|
|
73197
|
+
"description": "grant (the default): what the rule matches can be shared. do_not_share: the rule runs before every other rule, and while it is active no rule shares an email it matches; an email it cannot decide counts as matched. Set when the rule is created; it never changes.",
|
|
73198
|
+
"type": "string",
|
|
73199
|
+
"enum": ["grant", "do_not_share"]
|
|
73200
|
+
},
|
|
72980
73201
|
"state": {
|
|
72981
|
-
"description": "observe (the default) records what the rule would match and grants nothing; draft is not evaluated.",
|
|
73202
|
+
"description": "observe (the default) records what the rule would match and grants or blocks nothing; draft is not evaluated.",
|
|
72982
73203
|
"type": "string",
|
|
72983
73204
|
"enum": ["draft", "observe"]
|
|
72984
73205
|
},
|
|
@@ -72989,7 +73210,7 @@ const operationManifest = [
|
|
|
72989
73210
|
"own_mailboxes",
|
|
72990
73211
|
"selected"
|
|
72991
73212
|
],
|
|
72992
|
-
"description": "
|
|
73213
|
+
"description": "own_mailboxes (the default): mail to your own addresses and agents (for a rule that shares, those you can send from). author: all mail you can read, including inboxes added later. selected: what scope_selection names."
|
|
72993
73214
|
},
|
|
72994
73215
|
"scope_selection": {
|
|
72995
73216
|
"type": "object",
|
|
@@ -73113,6 +73334,35 @@ const operationManifest = [
|
|
|
73113
73334
|
"active"
|
|
73114
73335
|
]
|
|
73115
73336
|
},
|
|
73337
|
+
"kind": {
|
|
73338
|
+
"description": "do_not_share: the rule blocks sharing of what it matches. Absent (or grant) on a rule that shares what it matches.",
|
|
73339
|
+
"type": "string",
|
|
73340
|
+
"enum": ["grant", "do_not_share"]
|
|
73341
|
+
},
|
|
73342
|
+
"evaluation_scope": {
|
|
73343
|
+
"description": "Whose mail the rule runs over, as stored; GET /email-rules/{id}/scope says what that comes to now.",
|
|
73344
|
+
"type": "string",
|
|
73345
|
+
"enum": [
|
|
73346
|
+
"author",
|
|
73347
|
+
"own_mailboxes",
|
|
73348
|
+
"selected"
|
|
73349
|
+
]
|
|
73350
|
+
},
|
|
73351
|
+
"scope_selection": {
|
|
73352
|
+
"type": ["object", "null"],
|
|
73353
|
+
"properties": {
|
|
73354
|
+
"addresses": {
|
|
73355
|
+
"type": "array",
|
|
73356
|
+
"items": { "type": "string" }
|
|
73357
|
+
},
|
|
73358
|
+
"domains": {
|
|
73359
|
+
"type": "array",
|
|
73360
|
+
"items": { "type": "string" }
|
|
73361
|
+
}
|
|
73362
|
+
},
|
|
73363
|
+
"required": ["addresses", "domains"],
|
|
73364
|
+
"description": "What a selected rule names; null for any other scope."
|
|
73365
|
+
},
|
|
73116
73366
|
"current_version": {
|
|
73117
73367
|
"type": ["integer", "null"],
|
|
73118
73368
|
"exclusiveMinimum": 0
|
|
@@ -73781,7 +74031,7 @@ const operationManifest = [
|
|
|
73781
74031
|
"binaryResponse": false,
|
|
73782
74032
|
"bodyRequired": false,
|
|
73783
74033
|
"command": "get-email-rule",
|
|
73784
|
-
"description": "A rule and its current version. The SQL the version renders to is included only when include_sql is true. Needs mail:read, a credential acting as a member with their full access (API keys, agent keys and narrowed tokens are refused), and the email rules feature on the organization.",
|
|
74034
|
+
"description": "A rule, its scope (evaluation_scope, and scope_selection for a selected rule) and its current version. 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 credential acting as a member with their full access (API keys, agent keys and narrowed tokens are refused), and the email rules feature on the organization.",
|
|
73785
74035
|
"hasJsonBody": false,
|
|
73786
74036
|
"method": "GET",
|
|
73787
74037
|
"operationId": "getEmailRule",
|
|
@@ -73819,6 +74069,35 @@ const operationManifest = [
|
|
|
73819
74069
|
"active"
|
|
73820
74070
|
]
|
|
73821
74071
|
},
|
|
74072
|
+
"kind": {
|
|
74073
|
+
"description": "do_not_share: the rule blocks sharing of what it matches. Absent (or grant) on a rule that shares what it matches.",
|
|
74074
|
+
"type": "string",
|
|
74075
|
+
"enum": ["grant", "do_not_share"]
|
|
74076
|
+
},
|
|
74077
|
+
"evaluation_scope": {
|
|
74078
|
+
"description": "Whose mail the rule runs over, as stored; GET /email-rules/{id}/scope says what that comes to now.",
|
|
74079
|
+
"type": "string",
|
|
74080
|
+
"enum": [
|
|
74081
|
+
"author",
|
|
74082
|
+
"own_mailboxes",
|
|
74083
|
+
"selected"
|
|
74084
|
+
]
|
|
74085
|
+
},
|
|
74086
|
+
"scope_selection": {
|
|
74087
|
+
"type": ["object", "null"],
|
|
74088
|
+
"properties": {
|
|
74089
|
+
"addresses": {
|
|
74090
|
+
"type": "array",
|
|
74091
|
+
"items": { "type": "string" }
|
|
74092
|
+
},
|
|
74093
|
+
"domains": {
|
|
74094
|
+
"type": "array",
|
|
74095
|
+
"items": { "type": "string" }
|
|
74096
|
+
}
|
|
74097
|
+
},
|
|
74098
|
+
"required": ["addresses", "domains"],
|
|
74099
|
+
"description": "What a selected rule names; null for any other scope."
|
|
74100
|
+
},
|
|
73822
74101
|
"current_version": {
|
|
73823
74102
|
"type": ["integer", "null"],
|
|
73824
74103
|
"exclusiveMinimum": 0
|
|
@@ -74205,6 +74484,11 @@ const operationManifest = [
|
|
|
74205
74484
|
"required": ["addresses", "domains"],
|
|
74206
74485
|
"description": "What scope_selection names that its author no longer reads in full."
|
|
74207
74486
|
},
|
|
74487
|
+
"still_read": {
|
|
74488
|
+
"description": "Inboxes its author still reads at the domains in no_longer_readable; the rule still covers them.",
|
|
74489
|
+
"type": "array",
|
|
74490
|
+
"items": { "type": "string" }
|
|
74491
|
+
},
|
|
74208
74492
|
"stopped_reason": {
|
|
74209
74493
|
"description": "Why it cannot run now (a reason as on POST /email-rules/test), or null.",
|
|
74210
74494
|
"type": ["string", "null"]
|
|
@@ -74739,7 +75023,7 @@ const operationManifest = [
|
|
|
74739
75023
|
"binaryResponse": false,
|
|
74740
75024
|
"bodyRequired": false,
|
|
74741
75025
|
"command": "list-email-rule-results",
|
|
74742
|
-
"description": "Every rule the caller can see and what it decided about this email: those that matched, those that did not, and those that have not run on it, with what is known about them. A result names the version of the rule that decided and carries that version's conditions and questions. Only a caller who can read the email gets an answer, and a rule the caller cannot see is left out. At most 50 rules are listed, those with a result first; hidden counts the rest. Needs mail:read, a credential acting as a member with their full access (API keys, agent keys and narrowed tokens are refused), and the email rules feature on the organization.",
|
|
75026
|
+
"description": "Every rule the caller can see and what it decided about this email: those that matched, those that did not, and those that have not run on it, with what is known about them. A result names the version of the rule that decided and carries that version's conditions and questions. A matched rule with kind do_not_share keeps rules from sharing the email while it is active; anything shared before then stays shared. Only a caller who can read the email gets an answer, and a rule the caller cannot see is left out. At most 50 rules are listed, those with a result first; hidden counts the rest. Needs mail:read, a credential acting as a member with their full access (API keys, agent keys and narrowed tokens are refused), and the email rules feature on the organization.",
|
|
74743
75027
|
"hasJsonBody": false,
|
|
74744
75028
|
"method": "GET",
|
|
74745
75029
|
"operationId": "listEmailRuleResults",
|
|
@@ -74776,6 +75060,11 @@ const operationManifest = [
|
|
|
74776
75060
|
"active"
|
|
74777
75061
|
]
|
|
74778
75062
|
},
|
|
75063
|
+
"kind": {
|
|
75064
|
+
"description": "do_not_share: the rule blocks sharing of what it matches. While it is active, no rule shares an email it has matched from then on; anything shared before, including while it was in observe, stays shared. Absent on a rule that shares what it matches.",
|
|
75065
|
+
"type": "string",
|
|
75066
|
+
"enum": ["grant", "do_not_share"]
|
|
75067
|
+
},
|
|
74779
75068
|
"decision": {
|
|
74780
75069
|
"type": ["object", "null"],
|
|
74781
75070
|
"properties": {
|
|
@@ -74880,6 +75169,11 @@ const operationManifest = [
|
|
|
74880
75169
|
null
|
|
74881
75170
|
],
|
|
74882
75171
|
"description": "What is known about a rule with no result on this email. draft: the rule is a draft now. created_after_email: the rule was created after the email arrived. Null when it has a result, or when nothing is known."
|
|
75172
|
+
},
|
|
75173
|
+
"author_left": {
|
|
75174
|
+
"description": "On a do-not-share rule whose author is no longer a member of the organization: it blocks nothing now, whatever it decided. Absent otherwise.",
|
|
75175
|
+
"type": "boolean",
|
|
75176
|
+
"const": true
|
|
74883
75177
|
}
|
|
74884
75178
|
},
|
|
74885
75179
|
"required": [
|
|
@@ -74909,7 +75203,7 @@ const operationManifest = [
|
|
|
74909
75203
|
"binaryResponse": false,
|
|
74910
75204
|
"bodyRequired": false,
|
|
74911
75205
|
"command": "list-email-rule-scope-options",
|
|
74912
|
-
"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. Needs mail:read, a credential acting as a member with their full access (API keys, agent keys and narrowed tokens are refused), and the email rules feature on the organization.",
|
|
75206
|
+
"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 credential acting as a member with their full access (API keys, agent keys and narrowed tokens are refused), and the email rules feature on the organization.",
|
|
74913
75207
|
"hasJsonBody": false,
|
|
74914
75208
|
"method": "GET",
|
|
74915
75209
|
"operationId": "listEmailRuleScopeOptions",
|
|
@@ -74941,10 +75235,14 @@ const operationManifest = [
|
|
|
74941
75235
|
"type": "boolean",
|
|
74942
75236
|
"description": "Whether a rule over only your own mail would run for you."
|
|
74943
75237
|
},
|
|
75238
|
+
"own_mail_to_block": {
|
|
75239
|
+
"description": "Whether a do_not_share rule over only your own mail would run for you: it covers every own mailbox you read, including ones you could not share.",
|
|
75240
|
+
"type": "boolean"
|
|
75241
|
+
},
|
|
74944
75242
|
"addresses": {
|
|
74945
75243
|
"type": "array",
|
|
74946
75244
|
"items": { "type": "string" },
|
|
74947
|
-
"description": "Inboxes you can read, matching q."
|
|
75245
|
+
"description": "Inboxes you can read, matching q. For someone who reads the whole organization, the inboxes known as someone's: member addresses, members' verified work emails at the organization's domains, agents' addresses and inboxes with shared access. Otherwise the inboxes your access lists (search with q for those past the first page). See may_name_unlisted for what else you may name."
|
|
74948
75246
|
},
|
|
74949
75247
|
"domains": {
|
|
74950
75248
|
"type": "array",
|
|
@@ -74954,6 +75252,10 @@ const operationManifest = [
|
|
|
74954
75252
|
"more": {
|
|
74955
75253
|
"type": "boolean",
|
|
74956
75254
|
"description": "More match than are listed."
|
|
75255
|
+
},
|
|
75256
|
+
"may_name_unlisted": {
|
|
75257
|
+
"description": "Whether you may also name an inbox this list never shows, however it is searched (more only says whether a search would show further ones): true when you read the whole organization (any address, such as an inbox at its domains nobody has claimed yet) or read a domain (any address there your access does not leave out). Name it in scope_selection.addresses as you would a listed one. Absent from a server that predates it.",
|
|
75258
|
+
"type": "boolean"
|
|
74957
75259
|
}
|
|
74958
75260
|
},
|
|
74959
75261
|
"required": [
|
|
@@ -75616,7 +75918,7 @@ const operationManifest = [
|
|
|
75616
75918
|
"binaryResponse": false,
|
|
75617
75919
|
"bodyRequired": false,
|
|
75618
75920
|
"command": "list-email-rules",
|
|
75619
|
-
"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. With matched_email_id, only the rules that matched that email. Needs mail:read, a credential acting as a member with their full access (API keys, agent keys and narrowed tokens are refused), and the email rules feature on the organization.",
|
|
75921
|
+
"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). With matched_email_id, only the rules that matched that email. Needs mail:read, a credential acting as a member with their full access (API keys, agent keys and narrowed tokens are refused), and the email rules feature on the organization.",
|
|
75620
75922
|
"hasJsonBody": false,
|
|
75621
75923
|
"method": "GET",
|
|
75622
75924
|
"operationId": "listEmailRules",
|
|
@@ -75669,6 +75971,35 @@ const operationManifest = [
|
|
|
75669
75971
|
"active"
|
|
75670
75972
|
]
|
|
75671
75973
|
},
|
|
75974
|
+
"kind": {
|
|
75975
|
+
"description": "do_not_share: the rule blocks sharing of what it matches. Absent (or grant) on a rule that shares what it matches.",
|
|
75976
|
+
"type": "string",
|
|
75977
|
+
"enum": ["grant", "do_not_share"]
|
|
75978
|
+
},
|
|
75979
|
+
"evaluation_scope": {
|
|
75980
|
+
"description": "Whose mail the rule runs over, as stored; GET /email-rules/{id}/scope says what that comes to now.",
|
|
75981
|
+
"type": "string",
|
|
75982
|
+
"enum": [
|
|
75983
|
+
"author",
|
|
75984
|
+
"own_mailboxes",
|
|
75985
|
+
"selected"
|
|
75986
|
+
]
|
|
75987
|
+
},
|
|
75988
|
+
"scope_selection": {
|
|
75989
|
+
"type": ["object", "null"],
|
|
75990
|
+
"properties": {
|
|
75991
|
+
"addresses": {
|
|
75992
|
+
"type": "array",
|
|
75993
|
+
"items": { "type": "string" }
|
|
75994
|
+
},
|
|
75995
|
+
"domains": {
|
|
75996
|
+
"type": "array",
|
|
75997
|
+
"items": { "type": "string" }
|
|
75998
|
+
}
|
|
75999
|
+
},
|
|
76000
|
+
"required": ["addresses", "domains"],
|
|
76001
|
+
"description": "What a selected rule names; null for any other scope."
|
|
76002
|
+
},
|
|
75672
76003
|
"current_version": {
|
|
75673
76004
|
"type": ["integer", "null"],
|
|
75674
76005
|
"exclusiveMinimum": 0
|
|
@@ -75918,7 +76249,7 @@ const operationManifest = [
|
|
|
75918
76249
|
"binaryResponse": false,
|
|
75919
76250
|
"bodyRequired": true,
|
|
75920
76251
|
"command": "test-email-rule",
|
|
75921
|
-
"description": "Runs a rule over received mail and reports what it would decide for each email: matched, near_miss, no_match, unclassified or not_found. Test an unsaved tree from a compile response, or a saved rule by rule_id (its current version, run with its author's access). Either way the rule reads only mail its author can read, and only what its scope covers. Without email_ids, the newest emails it can read are tested, at most 200 and none older than 30 days. Emails not classified yet that arrived more than 2 hours ago are classified first and their classification is saved, unless classify_missing is false; newer ones are left to normal classification and reported unclassified with reason pending. The rule itself records nothing and grants nothing. Classification and the rule's own questions stop at about 90 seconds; run the test again to continue where it stopped. Needs mail:read, a credential acting as a member with their full access (API keys, agent keys and narrowed tokens are refused), and the email rules feature on the organization.",
|
|
76252
|
+
"description": "Runs a rule over received mail and reports what it would decide for each email: matched, near_miss, no_match, unclassified or not_found. Test an unsaved tree from a compile response, or a saved rule by rule_id (its current version, run with its author's access). Either way the rule reads only mail its author can read, and only what its scope covers; an unsaved tree covers only your own mail unless evaluation_scope names more. Without email_ids, the newest emails it can read are tested, at most 200 and none older than 30 days. Emails not classified yet that arrived more than 2 hours ago are classified first and their classification is saved, unless classify_missing is false; newer ones are left to normal classification and reported unclassified with reason pending. The rule itself records nothing and grants nothing. Classification and the rule's own questions stop at about 90 seconds; run the test again to continue where it stopped. Needs mail:read, a credential acting as a member with their full access (API keys, agent keys and narrowed tokens are refused), and the email rules feature on the organization.",
|
|
75922
76253
|
"hasJsonBody": true,
|
|
75923
76254
|
"method": "POST",
|
|
75924
76255
|
"operationId": "testEmailRule",
|
|
@@ -75975,7 +76306,7 @@ const operationManifest = [
|
|
|
75975
76306
|
"own_mailboxes",
|
|
75976
76307
|
"selected"
|
|
75977
76308
|
],
|
|
75978
|
-
"description": "
|
|
76309
|
+
"description": "own_mailboxes (the default): mail to your own addresses and agents (for a rule that shares, those you can send from). author: all mail you can read, including inboxes added later. selected: what scope_selection names."
|
|
75979
76310
|
},
|
|
75980
76311
|
"scope_selection": {
|
|
75981
76312
|
"type": "object",
|
|
@@ -76009,6 +76340,11 @@ const operationManifest = [
|
|
|
76009
76340
|
"type": "string",
|
|
76010
76341
|
"format": "uuid"
|
|
76011
76342
|
},
|
|
76343
|
+
"kind": {
|
|
76344
|
+
"description": "For an unsaved tree: do_not_share tests it as a rule that blocks sharing, so an email it cannot decide counts as matched. A saved rule uses its own.",
|
|
76345
|
+
"type": "string",
|
|
76346
|
+
"enum": ["grant", "do_not_share"]
|
|
76347
|
+
},
|
|
76012
76348
|
"email_ids": {
|
|
76013
76349
|
"description": "Test exactly these emails. Without it, the newest emails the rule can read are tested, at most 200 and none older than 30 days.",
|
|
76014
76350
|
"minItems": 1,
|
|
@@ -76245,7 +76581,7 @@ const operationManifest = [
|
|
|
76245
76581
|
"binaryResponse": false,
|
|
76246
76582
|
"bodyRequired": true,
|
|
76247
76583
|
"command": "test-email-rule-on-sample",
|
|
76248
|
-
"description": "Reports what a rule would decide for an email you describe: its sender, recipients, subject, plain text and attachment types, and optionally whether it is automated or from a mailing list and its spam score. The email is classified the way received mail is, and the rule's conditions and its own questions are decided as they would be for received mail with that content and those signals, received now. Without them it is not automated and not from a mailing list; a rule that reads a spam score you gave none for is decided on no score, and spam_score is listed in unset_columns. Nothing is stored: no email, classification or decision. Test an unsaved tree from a compile response, or a saved rule by rule_id (its current version). The answer includes what the classifier read from the email. Needs mail:read, a credential acting as a member with their full access (API keys, agent keys and narrowed tokens are refused), and the email rules feature on the organization.",
|
|
76584
|
+
"description": "Reports what a rule would decide for an email you describe: its sender, recipients, subject, plain text and attachment types, and optionally whether it is automated or from a mailing list and its spam score. The email is classified the way received mail is, and the rule's conditions and its own questions are decided as they would be for received mail with that content and those signals, received now. Without them it is not automated and not from a mailing list; a rule that reads a spam score you gave none for is decided on no score, and spam_score is listed in unset_columns. Nothing is stored: no email, classification or decision. Test an unsaved tree from a compile response, or a saved rule by rule_id (its current version); an unsaved tree is run as covering only your own mail unless evaluation_scope names more, as on POST /email-rules/test. The answer includes what the classifier read from the email. Needs mail:read, a credential acting as a member with their full access (API keys, agent keys and narrowed tokens are refused), and the email rules feature on the organization.",
|
|
76249
76585
|
"hasJsonBody": true,
|
|
76250
76586
|
"method": "POST",
|
|
76251
76587
|
"operationId": "testEmailRuleOnSample",
|
|
@@ -76302,7 +76638,7 @@ const operationManifest = [
|
|
|
76302
76638
|
"own_mailboxes",
|
|
76303
76639
|
"selected"
|
|
76304
76640
|
],
|
|
76305
|
-
"description": "
|
|
76641
|
+
"description": "own_mailboxes (the default): mail to your own addresses and agents (for a rule that shares, those you can send from). author: all mail you can read, including inboxes added later. selected: what scope_selection names."
|
|
76306
76642
|
},
|
|
76307
76643
|
"scope_selection": {
|
|
76308
76644
|
"type": "object",
|
|
@@ -76336,6 +76672,11 @@ const operationManifest = [
|
|
|
76336
76672
|
"type": "string",
|
|
76337
76673
|
"format": "uuid"
|
|
76338
76674
|
},
|
|
76675
|
+
"kind": {
|
|
76676
|
+
"description": "For an unsaved tree: do_not_share tests it as a rule that blocks sharing, so an email it cannot decide counts as matched. A saved rule uses its own.",
|
|
76677
|
+
"type": "string",
|
|
76678
|
+
"enum": ["grant", "do_not_share"]
|
|
76679
|
+
},
|
|
76339
76680
|
"email": {
|
|
76340
76681
|
"type": "object",
|
|
76341
76682
|
"properties": {
|
|
@@ -76559,7 +76900,7 @@ const operationManifest = [
|
|
|
76559
76900
|
"binaryResponse": false,
|
|
76560
76901
|
"bodyRequired": true,
|
|
76561
76902
|
"command": "update-email-rule",
|
|
76562
|
-
"description": "Renames the rule, saves a new version (english, tree and explanation together; earlier versions are kept unchanged), changes its state (draft, disabled; observe; or active) or changes whose mail it runs over (evaluation_scope, with scope_selection when selected). Only the rule's author may rename it, add a version, change its scope or move it to observe or active; anyone else who can see it may only disable it (state draft), and while it is shared with another member only if they manage members from the dashboard. Omit evaluation_scope to keep the current scope. A scope change saves a new version with the same conditions; what was granted stays. A shared rule keeps its scope. Needs mail:read, a credential acting as a member with their full access (API keys, agent keys and narrowed tokens are refused), and the email rules feature on the organization.",
|
|
76903
|
+
"description": "Renames the rule, saves a new version (english, tree and explanation together; earlier versions are kept unchanged), changes its state (draft, disabled; observe; or active) or changes whose mail it runs over (evaluation_scope, with scope_selection when selected). Only the rule's author may rename it, add a version, change its scope or move it to observe or active; anyone else who can see it may only disable it (state draft), and while it is shared with another member only if they manage members from the dashboard. Omit evaluation_scope to keep the current scope. A scope change saves a new version with the same conditions; what was granted stays. A shared rule keeps its scope. A rule's kind never changes. Needs mail:read, a credential acting as a member with their full access (API keys, agent keys and narrowed tokens are refused), and the email rules feature on the organization.",
|
|
76563
76904
|
"hasJsonBody": true,
|
|
76564
76905
|
"method": "PATCH",
|
|
76565
76906
|
"operationId": "updateEmailRule",
|
|
@@ -76584,7 +76925,7 @@ const operationManifest = [
|
|
|
76584
76925
|
"description": "A short name for the rule."
|
|
76585
76926
|
},
|
|
76586
76927
|
"state": {
|
|
76587
|
-
"description": "draft disables the rule; observe records decisions; active also grants what it matches. Keys read and receive what a rule granted only while it is active: leaving active pauses that, and returning to active restores reads and the delivery of queued mail not yet skipped.",
|
|
76928
|
+
"description": "draft disables the rule; observe records decisions; active also grants what it matches, or for a do_not_share rule keeps it from being shared. Keys read and receive what a rule granted only while it is active: leaving active pauses that, and returning to active restores reads and the delivery of queued mail not yet skipped.",
|
|
76588
76929
|
"type": "string",
|
|
76589
76930
|
"enum": [
|
|
76590
76931
|
"draft",
|
|
@@ -76717,6 +77058,35 @@ const operationManifest = [
|
|
|
76717
77058
|
"active"
|
|
76718
77059
|
]
|
|
76719
77060
|
},
|
|
77061
|
+
"kind": {
|
|
77062
|
+
"description": "do_not_share: the rule blocks sharing of what it matches. Absent (or grant) on a rule that shares what it matches.",
|
|
77063
|
+
"type": "string",
|
|
77064
|
+
"enum": ["grant", "do_not_share"]
|
|
77065
|
+
},
|
|
77066
|
+
"evaluation_scope": {
|
|
77067
|
+
"description": "Whose mail the rule runs over, as stored; GET /email-rules/{id}/scope says what that comes to now.",
|
|
77068
|
+
"type": "string",
|
|
77069
|
+
"enum": [
|
|
77070
|
+
"author",
|
|
77071
|
+
"own_mailboxes",
|
|
77072
|
+
"selected"
|
|
77073
|
+
]
|
|
77074
|
+
},
|
|
77075
|
+
"scope_selection": {
|
|
77076
|
+
"type": ["object", "null"],
|
|
77077
|
+
"properties": {
|
|
77078
|
+
"addresses": {
|
|
77079
|
+
"type": "array",
|
|
77080
|
+
"items": { "type": "string" }
|
|
77081
|
+
},
|
|
77082
|
+
"domains": {
|
|
77083
|
+
"type": "array",
|
|
77084
|
+
"items": { "type": "string" }
|
|
77085
|
+
}
|
|
77086
|
+
},
|
|
77087
|
+
"required": ["addresses", "domains"],
|
|
77088
|
+
"description": "What a selected rule names; null for any other scope."
|
|
77089
|
+
},
|
|
76720
77090
|
"current_version": {
|
|
76721
77091
|
"type": ["integer", "null"],
|
|
76722
77092
|
"exclusiveMinimum": 0
|
|
@@ -92194,7 +92564,7 @@ const operationManifest = [
|
|
|
92194
92564
|
"binaryResponse": false,
|
|
92195
92565
|
"bodyRequired": true,
|
|
92196
92566
|
"command": "decide-suspension",
|
|
92197
|
-
"description": "Keep, narrow or revoke one suspended or flagged item. Keeping it, and revoking an API key, needs the decider to cover it (revoking an uncovered key is refused with `grant_forbidden`, `target_not_covered`). Keeping an API key rotated (`rotate: true`, other than the shared Function key) also revokes its older secrets still in a rotation overlap, and needs keys:manage on both the credential and the person: without it, or if the decider lost members:manage meanwhile, it is refused with `grant_forbidden` (`keys_manage_required` or `actor_access_changed`) and nothing is rotated. Person only: a dashboard session, or the person's own OAuth or CLI token with a session step-up of purpose `suspensions.decide` (the person confirms at the step_up_url a 403 step_up_required answer carries, which names this client, then send the token in the Primitive-Step-Up header; the token works only with the client it was confirmed for). Needs members:manage. API keys are refused.",
|
|
92567
|
+
"description": "Keep, narrow or revoke one suspended or flagged item. Keeping it, and revoking an API key, needs the decider to cover it (revoking an uncovered key is refused with `grant_forbidden`, `target_not_covered`). Keeping an API key rotated (`rotate: true`, other than the shared Function key) also revokes its older secrets still in a rotation overlap, and needs keys:manage on both the credential and the person: without it, or if the decider lost members:manage meanwhile, it is refused with `grant_forbidden` (`keys_manage_required` or `actor_access_changed`) and nothing is rotated. A rule share paused by a role change (`email_rule_share`) takes keep, which leaves it paused, or revoke, which ends the share and needs confirm: true (the person it was shared with loses the emails already shared; without it, 409 `confirmation_required`). Neither of the share's two people may keep it (`grant_forbidden`, `share_decision_forbidden`). Access a person gave on their own mailbox (`mailbox_access`) takes keep or revoke, and both need delegations:manage; revoke removes only what that person gave on that mailbox. Nobody the access reaches, nor the person who gave it, may keep it (`grant_forbidden`, `mailbox_access_decision_forbidden`). Person only: a dashboard session, or the person's own OAuth or CLI token with a session step-up of purpose `suspensions.decide` (the person confirms at the step_up_url a 403 step_up_required answer carries, which names this client, then send the token in the Primitive-Step-Up header; the token works only with the client it was confirmed for). Needs members:manage. API keys are refused.",
|
|
92198
92568
|
"hasJsonBody": true,
|
|
92199
92569
|
"method": "POST",
|
|
92200
92570
|
"operationId": "decideSuspension",
|
|
@@ -113260,8 +113630,8 @@ const PRIMITIVE_TEAM_AUTHOR = {
|
|
|
113260
113630
|
name: "Primitive Team",
|
|
113261
113631
|
url: "https://primitive.dev"
|
|
113262
113632
|
};
|
|
113263
|
-
const SDK_VERSION_RANGE = "^3.0.0-preview.
|
|
113264
|
-
const CLI_VERSION_RANGE = "^3.0.0-preview.
|
|
113633
|
+
const SDK_VERSION_RANGE = "^3.0.0-preview.3";
|
|
113634
|
+
const CLI_VERSION_RANGE = "^3.0.0-preview.3";
|
|
113265
113635
|
const ESBUILD_VERSION_RANGE = "^0.27.0";
|
|
113266
113636
|
function renderHandler() {
|
|
113267
113637
|
return `// env.PRIMITIVE_API_KEY, env.PRIMITIVE_WEBHOOK_SECRET, and
|
|
@@ -114389,6 +114759,7 @@ var FunctionsRouteGetCommand = class FunctionsRouteGetCommand extends Command {
|
|
|
114389
114759
|
static summary = "Show a function's current route binding";
|
|
114390
114760
|
static examples = ["<%= config.bin %> functions route-get --id <fn-id>"];
|
|
114391
114761
|
static flags = {
|
|
114762
|
+
json: JSON_OUTPUT_FLAG,
|
|
114392
114763
|
"api-key": Flags.string({
|
|
114393
114764
|
description: "Primitive API key override (defaults to PRIMITIVE_API_KEY or saved OAuth login credentials)",
|
|
114394
114765
|
env: "PRIMITIVE_API_KEY"
|
|
@@ -114451,6 +114822,7 @@ var FunctionsRouteSetCommand = class FunctionsRouteSetCommand extends Command {
|
|
|
114451
114822
|
"<%= config.bin %> functions route-set --id <fn-id> --domain <domain-id> --takeover"
|
|
114452
114823
|
];
|
|
114453
114824
|
static flags = {
|
|
114825
|
+
json: JSON_OUTPUT_FLAG,
|
|
114454
114826
|
"api-key": Flags.string({
|
|
114455
114827
|
description: "Primitive API key override (defaults to PRIMITIVE_API_KEY or saved OAuth login credentials)",
|
|
114456
114828
|
env: "PRIMITIVE_API_KEY"
|
|
@@ -114523,6 +114895,7 @@ var FunctionsRouteUnsetCommand = class FunctionsRouteUnsetCommand extends Comman
|
|
|
114523
114895
|
static summary = "Unbind any route from a function";
|
|
114524
114896
|
static examples = ["<%= config.bin %> functions route-unset --id <fn-id>"];
|
|
114525
114897
|
static flags = {
|
|
114898
|
+
json: JSON_OUTPUT_FLAG,
|
|
114526
114899
|
"api-key": Flags.string({
|
|
114527
114900
|
description: "Primitive API key override (defaults to PRIMITIVE_API_KEY or saved OAuth login credentials)",
|
|
114528
114901
|
env: "PRIMITIVE_API_KEY"
|
|
@@ -114573,6 +114946,7 @@ var FunctionsRoutingTopologyCommand = class FunctionsRoutingTopologyCommand exte
|
|
|
114573
114946
|
static summary = "Show the org-wide function routing topology";
|
|
114574
114947
|
static examples = ["<%= config.bin %> functions routing-topology"];
|
|
114575
114948
|
static flags = {
|
|
114949
|
+
json: JSON_OUTPUT_FLAG,
|
|
114576
114950
|
"api-key": Flags.string({
|
|
114577
114951
|
description: "Primitive API key override (defaults to PRIMITIVE_API_KEY or saved OAuth login credentials)",
|
|
114578
114952
|
env: "PRIMITIVE_API_KEY"
|
|
@@ -114699,6 +115073,7 @@ var FunctionsSetSecretCommand = class FunctionsSetSecretCommand extends Command
|
|
|
114699
115073
|
"printf '%s' \"$MY_API_KEY\" | <%= config.bin %> functions set-secret --id <fn-id> --key MY_API_KEY --stdin --redeploy"
|
|
114700
115074
|
];
|
|
114701
115075
|
static flags = {
|
|
115076
|
+
json: JSON_OUTPUT_FLAG,
|
|
114702
115077
|
"api-key": Flags.string({
|
|
114703
115078
|
description: "Primitive API key override (defaults to PRIMITIVE_API_KEY or saved OAuth login credentials)",
|
|
114704
115079
|
env: "PRIMITIVE_API_KEY"
|
|
@@ -116440,7 +116815,7 @@ function printSecret(command, json, document, secret, summary) {
|
|
|
116440
116815
|
var KeysCreateCommand = class KeysCreateCommand extends Command {
|
|
116441
116816
|
static description = `Create an API key. Say what it can do with --preset or --permission; there is no default.
|
|
116442
116817
|
|
|
116443
|
-
|
|
116818
|
+
The key is created directly. If your organization requires approval, the command prints the approval link, opens it where it can, and waits for the one-time token the page shows. In a script it prints the link and exits: approve, then run it again with --step-up-token. The key never holds more than you do, and your organization's credential policy applies.
|
|
116444
116819
|
|
|
116445
116820
|
The secret is printed once, on its own line on stdout (in the JSON with --json). Store it right away: it is not shown again and the CLI does not save it.
|
|
116446
116821
|
|
|
@@ -116540,7 +116915,7 @@ var KeysCreateCommand = class KeysCreateCommand extends Command {
|
|
|
116540
116915
|
var KeysRotateCommand = class KeysRotateCommand extends Command {
|
|
116541
116916
|
static description = `Rotate an API key: make a successor with the same permissions and print its secret once. The old key keeps working for the overlap, then stops.
|
|
116542
116917
|
|
|
116543
|
-
|
|
116918
|
+
The rotation runs directly; if your organization requires approval, the command prints the approval link and takes --step-up-token, as for a new key. Store the new secret right away: it is not shown again and the CLI does not save it.`;
|
|
116544
116919
|
static summary = "Rotate an API key";
|
|
116545
116920
|
static examples = ["<%= config.bin %> keys rotate 0f0e0d0c-0b0a-4908-8706-050403020100", "<%= config.bin %> keys rotate 0f0e0d0c-0b0a-4908-8706-050403020100 --overlap-seconds 0"];
|
|
116546
116921
|
static args = { id: Args.string({
|
|
@@ -116580,7 +116955,7 @@ var KeysUpdateCommand = class KeysUpdateCommand extends Command {
|
|
|
116580
116955
|
|
|
116581
116956
|
--add and --remove take permissions (repeatable, or comma-separated). --rule sets the email rules the key reaches, replacing the ones it has. Everything else about the key stays as it is.
|
|
116582
116957
|
|
|
116583
|
-
|
|
116958
|
+
The change runs directly; if your organization requires approval, the command prints the approval link and takes --step-up-token, as for a new key. A key never holds more than you do.`;
|
|
116584
116959
|
static summary = "Change an API key";
|
|
116585
116960
|
static examples = [
|
|
116586
116961
|
"<%= config.bin %> keys update 0f0e0d0c-0b0a-4908-8706-050403020100 --add mail:send,mail:reply",
|
|
@@ -121938,6 +122313,16 @@ function printData(command, responseData) {
|
|
|
121938
122313
|
const data = responseData?.data ?? null;
|
|
121939
122314
|
command.log(JSON.stringify(data, null, 2));
|
|
121940
122315
|
}
|
|
122316
|
+
const CONTROL_CHARACTERS = new RegExp(`[${String.fromCharCode(0)}-${String.fromCharCode(31)}]`);
|
|
122317
|
+
/**
|
|
122318
|
+
* The stderr line naming the next page's cursor. A memory key can hold a line
|
|
122319
|
+
* break or another control character, which would split or garble the line,
|
|
122320
|
+
* so such a cursor is printed JSON-encoded, with a note on how to pass it.
|
|
122321
|
+
*/
|
|
122322
|
+
function nextCursorLine(cursor) {
|
|
122323
|
+
if (!CONTROL_CHARACTERS.test(cursor)) return `next cursor: ${cursor}\n`;
|
|
122324
|
+
return `next cursor (JSON-encoded, it holds control characters; decode it before passing it to --cursor, or read meta.cursor with --json --envelope): ${JSON.stringify(cursor)}\n`;
|
|
122325
|
+
}
|
|
121941
122326
|
function handleMemoryInputError(error) {
|
|
121942
122327
|
if (!(error instanceof MemoryCliInputError)) return false;
|
|
121943
122328
|
process.stderr.write(`${error.message}\n`);
|
|
@@ -122077,6 +122462,7 @@ var MemoriesSetCommand = class MemoriesSetCommand extends Command {
|
|
|
122077
122462
|
value: Args.string({ description: "JSON value. Strings must be quoted as JSON strings." })
|
|
122078
122463
|
};
|
|
122079
122464
|
static flags = {
|
|
122465
|
+
json: JSON_OUTPUT_FLAG,
|
|
122080
122466
|
"api-key": API_KEY_FLAG,
|
|
122081
122467
|
"api-base-url": API_BASE_URL_FLAG$1,
|
|
122082
122468
|
...SCOPE_FLAGS,
|
|
@@ -122168,6 +122554,7 @@ var MemoriesGetCommand = class MemoriesGetCommand extends Command {
|
|
|
122168
122554
|
required: true
|
|
122169
122555
|
}) };
|
|
122170
122556
|
static flags = {
|
|
122557
|
+
json: JSON_OUTPUT_FLAG,
|
|
122171
122558
|
"api-key": API_KEY_FLAG,
|
|
122172
122559
|
"api-base-url": API_BASE_URL_FLAG$1,
|
|
122173
122560
|
...SCOPE_FLAGS,
|
|
@@ -122221,6 +122608,7 @@ var MemoriesDeleteCommand = class MemoriesDeleteCommand extends Command {
|
|
|
122221
122608
|
required: true
|
|
122222
122609
|
}) };
|
|
122223
122610
|
static flags = {
|
|
122611
|
+
json: JSON_OUTPUT_FLAG,
|
|
122224
122612
|
"api-key": API_KEY_FLAG,
|
|
122225
122613
|
"api-base-url": API_BASE_URL_FLAG$1,
|
|
122226
122614
|
...SCOPE_FLAGS,
|
|
@@ -122275,6 +122663,7 @@ var MemoriesSearchCommand = class MemoriesSearchCommand extends Command {
|
|
|
122275
122663
|
];
|
|
122276
122664
|
static args = { prefix: Args.string({ description: "Key prefix. Omit to list all active memories in scope." }) };
|
|
122277
122665
|
static flags = {
|
|
122666
|
+
json: JSON_OUTPUT_FLAG,
|
|
122278
122667
|
"api-key": API_KEY_FLAG,
|
|
122279
122668
|
"api-base-url": API_BASE_URL_FLAG$1,
|
|
122280
122669
|
...SCOPE_FLAGS,
|
|
@@ -122284,7 +122673,8 @@ var MemoriesSearchCommand = class MemoriesSearchCommand extends Command {
|
|
|
122284
122673
|
min: 1,
|
|
122285
122674
|
max: 100
|
|
122286
122675
|
}),
|
|
122287
|
-
cursor: Flags.string({ description: "Key cursor from
|
|
122676
|
+
cursor: Flags.string({ description: "Key cursor from the previous page. The next page's cursor is meta.cursor, null on the last page: without --json it is printed on stderr as `next cursor: <value>` (JSON-encoded, with a note, when it holds control characters); with --json, add --envelope to get it, the reliable way for a script to page." }),
|
|
122677
|
+
envelope: Flags.boolean({ description: "Print the full response envelope, including meta.cursor for the next page. Defaults to printing only the data payload." }),
|
|
122288
122678
|
"metadata-only": Flags.boolean({ description: "Omit memory values and return metadata only." }),
|
|
122289
122679
|
"updated-after": Flags.string({ description: "Only include memories updated at or after this ISO timestamp." }),
|
|
122290
122680
|
"updated-before": Flags.string({ description: "Only include memories updated at or before this ISO timestamp." }),
|
|
@@ -122321,7 +122711,11 @@ var MemoriesSearchCommand = class MemoriesSearchCommand extends Command {
|
|
|
122321
122711
|
});
|
|
122322
122712
|
return;
|
|
122323
122713
|
}
|
|
122324
|
-
|
|
122714
|
+
const envelope = result.data;
|
|
122715
|
+
const cursor = envelope?.meta?.cursor;
|
|
122716
|
+
if (cursor && !flags.json) process.stderr.write(nextCursorLine(cursor));
|
|
122717
|
+
if (flags.envelope) this.log(JSON.stringify(envelope ?? null, null, 2));
|
|
122718
|
+
else printData(this, result.data);
|
|
122325
122719
|
});
|
|
122326
122720
|
}
|
|
122327
122721
|
};
|
|
@@ -122841,6 +123235,7 @@ var OrgSecretsListCommand = class OrgSecretsListCommand extends Command {
|
|
|
122841
123235
|
static summary = "List global secrets (keys only; values never returned)";
|
|
122842
123236
|
static examples = ["<%= config.bin %> org secrets list"];
|
|
122843
123237
|
static flags = {
|
|
123238
|
+
json: JSON_OUTPUT_FLAG,
|
|
122844
123239
|
"api-key": Flags.string({
|
|
122845
123240
|
description: "Primitive API key override (defaults to PRIMITIVE_API_KEY or saved OAuth login credentials)",
|
|
122846
123241
|
env: "PRIMITIVE_API_KEY"
|
|
@@ -122886,6 +123281,7 @@ var OrgSecretsRemoveCommand = class OrgSecretsRemoveCommand extends Command {
|
|
|
122886
123281
|
static aliases = ["org:secrets:delete"];
|
|
122887
123282
|
static examples = ["<%= config.bin %> org secrets remove --key MY_API_KEY"];
|
|
122888
123283
|
static flags = {
|
|
123284
|
+
json: JSON_OUTPUT_FLAG,
|
|
122889
123285
|
"api-key": Flags.string({
|
|
122890
123286
|
description: "Primitive API key override (defaults to PRIMITIVE_API_KEY or saved OAuth login credentials)",
|
|
122891
123287
|
env: "PRIMITIVE_API_KEY"
|
|
@@ -122946,6 +123342,7 @@ var OrgSecretsSetCommand = class OrgSecretsSetCommand extends Command {
|
|
|
122946
123342
|
"printf '%s' \"$MY_API_KEY\" | <%= config.bin %> org secrets set --key MY_API_KEY --stdin"
|
|
122947
123343
|
];
|
|
122948
123344
|
static flags = {
|
|
123345
|
+
json: JSON_OUTPUT_FLAG,
|
|
122949
123346
|
"api-key": Flags.string({
|
|
122950
123347
|
description: "Primitive API key override (defaults to PRIMITIVE_API_KEY or saved OAuth login credentials)",
|
|
122951
123348
|
env: "PRIMITIVE_API_KEY"
|
|
@@ -124298,6 +124695,7 @@ var RoutesAddCommand = class RoutesAddCommand extends Command {
|
|
|
124298
124695
|
required: true
|
|
124299
124696
|
}) };
|
|
124300
124697
|
static flags = {
|
|
124698
|
+
json: JSON_OUTPUT_FLAG,
|
|
124301
124699
|
"api-key": Flags.string({
|
|
124302
124700
|
description: "Primitive API key override (defaults to PRIMITIVE_API_KEY or saved OAuth login credentials)",
|
|
124303
124701
|
env: "PRIMITIVE_API_KEY"
|
|
@@ -124377,6 +124775,7 @@ var RoutesListCommand = class RoutesListCommand extends Command {
|
|
|
124377
124775
|
static summary = "List recipient routes";
|
|
124378
124776
|
static examples = ["<%= config.bin %> routes list"];
|
|
124379
124777
|
static flags = {
|
|
124778
|
+
json: JSON_OUTPUT_FLAG,
|
|
124380
124779
|
"api-key": Flags.string({
|
|
124381
124780
|
description: "Primitive API key override (defaults to PRIMITIVE_API_KEY or saved OAuth login credentials)",
|
|
124382
124781
|
env: "PRIMITIVE_API_KEY"
|
|
@@ -124426,6 +124825,7 @@ var RoutesRemoveCommand = class RoutesRemoveCommand extends Command {
|
|
|
124426
124825
|
required: true
|
|
124427
124826
|
}) };
|
|
124428
124827
|
static flags = {
|
|
124828
|
+
json: JSON_OUTPUT_FLAG,
|
|
124429
124829
|
"api-key": Flags.string({
|
|
124430
124830
|
description: "Primitive API key override (defaults to PRIMITIVE_API_KEY or saved OAuth login credentials)",
|
|
124431
124831
|
env: "PRIMITIVE_API_KEY"
|
|
@@ -124492,6 +124892,7 @@ var RoutesReorderCommand = class RoutesReorderCommand extends Command {
|
|
|
124492
124892
|
static summary = "Reorder recipient routes";
|
|
124493
124893
|
static examples = ["<%= config.bin %> routes reorder --set <route-id>=10", "<%= config.bin %> routes reorder --set <id-a>=10 --set <id-b>=20"];
|
|
124494
124894
|
static flags = {
|
|
124895
|
+
json: JSON_OUTPUT_FLAG,
|
|
124495
124896
|
"api-key": Flags.string({
|
|
124496
124897
|
description: "Primitive API key override (defaults to PRIMITIVE_API_KEY or saved OAuth login credentials)",
|
|
124497
124898
|
env: "PRIMITIVE_API_KEY"
|
|
@@ -124557,6 +124958,7 @@ var RoutesTestCommand = class RoutesTestCommand extends Command {
|
|
|
124557
124958
|
required: true
|
|
124558
124959
|
}) };
|
|
124559
124960
|
static flags = {
|
|
124961
|
+
json: JSON_OUTPUT_FLAG,
|
|
124560
124962
|
"api-key": Flags.string({
|
|
124561
124963
|
description: "Primitive API key override (defaults to PRIMITIVE_API_KEY or saved OAuth login credentials)",
|
|
124562
124964
|
env: "PRIMITIVE_API_KEY"
|
|
@@ -124629,6 +125031,7 @@ var RoutesUpdateCommand = class RoutesUpdateCommand extends Command {
|
|
|
124629
125031
|
required: true
|
|
124630
125032
|
}) };
|
|
124631
125033
|
static flags = {
|
|
125034
|
+
json: JSON_OUTPUT_FLAG,
|
|
124632
125035
|
"api-key": Flags.string({
|
|
124633
125036
|
description: "Primitive API key override (defaults to PRIMITIVE_API_KEY or saved OAuth login credentials)",
|
|
124634
125037
|
env: "PRIMITIVE_API_KEY"
|
|
@@ -126874,6 +127277,7 @@ var WakeAuthorizationsCreateCommand = class WakeAuthorizationsCreateCommand exte
|
|
|
126874
127277
|
static summary = "Create a wake authorization";
|
|
126875
127278
|
static examples = ["<%= config.bin %> wake authorizations create --endpoint <endpoint-id> --domain agents.acme.dev --command process_inbox"];
|
|
126876
127279
|
static flags = {
|
|
127280
|
+
json: JSON_OUTPUT_FLAG,
|
|
126877
127281
|
"api-key": Flags.string({
|
|
126878
127282
|
description: "Primitive API key override (defaults to PRIMITIVE_API_KEY or saved OAuth login credentials)",
|
|
126879
127283
|
env: "PRIMITIVE_API_KEY"
|
|
@@ -126944,6 +127348,7 @@ var WakeAuthorizationsDeleteCommand = class WakeAuthorizationsDeleteCommand exte
|
|
|
126944
127348
|
required: true
|
|
126945
127349
|
}) };
|
|
126946
127350
|
static flags = {
|
|
127351
|
+
json: JSON_OUTPUT_FLAG,
|
|
126947
127352
|
"api-key": Flags.string({
|
|
126948
127353
|
description: "Primitive API key override (defaults to PRIMITIVE_API_KEY or saved OAuth login credentials)",
|
|
126949
127354
|
env: "PRIMITIVE_API_KEY"
|
|
@@ -126990,6 +127395,7 @@ var WakeAuthorizationsListCommand = class WakeAuthorizationsListCommand extends
|
|
|
126990
127395
|
static summary = "List wake authorizations";
|
|
126991
127396
|
static examples = ["<%= config.bin %> wake authorizations list", "<%= config.bin %> wake authorizations list --endpoint <endpoint-id>"];
|
|
126992
127397
|
static flags = {
|
|
127398
|
+
json: JSON_OUTPUT_FLAG,
|
|
126993
127399
|
"api-key": Flags.string({
|
|
126994
127400
|
description: "Primitive API key override (defaults to PRIMITIVE_API_KEY or saved OAuth login credentials)",
|
|
126995
127401
|
env: "PRIMITIVE_API_KEY"
|
|
@@ -127041,6 +127447,7 @@ var WakeAuthorizationsUpdateCommand = class WakeAuthorizationsUpdateCommand exte
|
|
|
127041
127447
|
required: true
|
|
127042
127448
|
}) };
|
|
127043
127449
|
static flags = {
|
|
127450
|
+
json: JSON_OUTPUT_FLAG,
|
|
127044
127451
|
"api-key": Flags.string({
|
|
127045
127452
|
description: "Primitive API key override (defaults to PRIMITIVE_API_KEY or saved OAuth login credentials)",
|
|
127046
127453
|
env: "PRIMITIVE_API_KEY"
|
|
@@ -127093,6 +127500,7 @@ var WakeDispatchesListCommand = class WakeDispatchesListCommand extends Command
|
|
|
127093
127500
|
static summary = "List recent wake dispatches";
|
|
127094
127501
|
static examples = ["<%= config.bin %> wake dispatches list", "<%= config.bin %> wake dispatches list --limit 20"];
|
|
127095
127502
|
static flags = {
|
|
127503
|
+
json: JSON_OUTPUT_FLAG,
|
|
127096
127504
|
"api-key": Flags.string({
|
|
127097
127505
|
description: "Primitive API key override (defaults to PRIMITIVE_API_KEY or saved OAuth login credentials)",
|
|
127098
127506
|
env: "PRIMITIVE_API_KEY"
|
|
@@ -127140,6 +127548,7 @@ var WakeSchedulesCreateCommand = class WakeSchedulesCreateCommand extends Comman
|
|
|
127140
127548
|
static summary = "Create a wake schedule";
|
|
127141
127549
|
static examples = ["<%= config.bin %> wake schedules create --from scheduler@acme.dev --to alice@acme.dev --command process_inbox --cron \"0 9 * * *\" --timezone America/New_York"];
|
|
127142
127550
|
static flags = {
|
|
127551
|
+
json: JSON_OUTPUT_FLAG,
|
|
127143
127552
|
"api-key": Flags.string({
|
|
127144
127553
|
description: "Primitive API key override (defaults to PRIMITIVE_API_KEY or saved OAuth login credentials)",
|
|
127145
127554
|
env: "PRIMITIVE_API_KEY"
|
|
@@ -127225,6 +127634,7 @@ var WakeSchedulesDeleteCommand = class WakeSchedulesDeleteCommand extends Comman
|
|
|
127225
127634
|
required: true
|
|
127226
127635
|
}) };
|
|
127227
127636
|
static flags = {
|
|
127637
|
+
json: JSON_OUTPUT_FLAG,
|
|
127228
127638
|
"api-key": Flags.string({
|
|
127229
127639
|
description: "Primitive API key override (defaults to PRIMITIVE_API_KEY or saved OAuth login credentials)",
|
|
127230
127640
|
env: "PRIMITIVE_API_KEY"
|
|
@@ -127275,6 +127685,7 @@ var WakeSchedulesGetCommand = class WakeSchedulesGetCommand extends Command {
|
|
|
127275
127685
|
required: true
|
|
127276
127686
|
}) };
|
|
127277
127687
|
static flags = {
|
|
127688
|
+
json: JSON_OUTPUT_FLAG,
|
|
127278
127689
|
"api-key": Flags.string({
|
|
127279
127690
|
description: "Primitive API key override (defaults to PRIMITIVE_API_KEY or saved OAuth login credentials)",
|
|
127280
127691
|
env: "PRIMITIVE_API_KEY"
|
|
@@ -127321,6 +127732,7 @@ var WakeSchedulesListCommand = class WakeSchedulesListCommand extends Command {
|
|
|
127321
127732
|
static summary = "List wake schedules";
|
|
127322
127733
|
static examples = ["<%= config.bin %> wake schedules list"];
|
|
127323
127734
|
static flags = {
|
|
127735
|
+
json: JSON_OUTPUT_FLAG,
|
|
127324
127736
|
"api-key": Flags.string({
|
|
127325
127737
|
description: "Primitive API key override (defaults to PRIMITIVE_API_KEY or saved OAuth login credentials)",
|
|
127326
127738
|
env: "PRIMITIVE_API_KEY"
|
|
@@ -127370,6 +127782,7 @@ var WakeSchedulesRunCommand = class WakeSchedulesRunCommand extends Command {
|
|
|
127370
127782
|
required: true
|
|
127371
127783
|
}) };
|
|
127372
127784
|
static flags = {
|
|
127785
|
+
json: JSON_OUTPUT_FLAG,
|
|
127373
127786
|
"api-key": Flags.string({
|
|
127374
127787
|
description: "Primitive API key override (defaults to PRIMITIVE_API_KEY or saved OAuth login credentials)",
|
|
127375
127788
|
env: "PRIMITIVE_API_KEY"
|
|
@@ -127420,6 +127833,7 @@ var WakeSchedulesUpdateCommand = class WakeSchedulesUpdateCommand extends Comman
|
|
|
127420
127833
|
required: true
|
|
127421
127834
|
}) };
|
|
127422
127835
|
static flags = {
|
|
127836
|
+
json: JSON_OUTPUT_FLAG,
|
|
127423
127837
|
"api-key": Flags.string({
|
|
127424
127838
|
description: "Primitive API key override (defaults to PRIMITIVE_API_KEY or saved OAuth login credentials)",
|
|
127425
127839
|
env: "PRIMITIVE_API_KEY"
|
|
@@ -127782,7 +128196,7 @@ function renderFishCompletion(binName) {
|
|
|
127782
128196
|
const topicOperations = cliOperationManifest.filter((operation) => operation.tagCommand === topic);
|
|
127783
128197
|
for (const operation of topicOperations) {
|
|
127784
128198
|
lines.push(`complete -c ${binName} -f -n '__fish_${binName}_topic_needs_subcommand ${fishEscape(topic)}' -a '${fishEscape(operation.command)}' -d '${fishEscape(operation.summary ?? `${operation.method} ${operation.path}`)}'`);
|
|
127785
|
-
for (const parameter of [...operation.pathParams, ...operation.queryParams]) lines.push(`complete -c ${binName} -n '${operationCondition(operation).replace(BIN_PLACEHOLDER, binName)}' -l '${fishEscape(parameter.name
|
|
128199
|
+
for (const parameter of [...operation.pathParams, ...operation.queryParams]) lines.push(`complete -c ${binName} -n '${operationCondition(operation).replace(BIN_PLACEHOLDER, binName)}' -l '${fishEscape(parameterFlagName(operation.sdkName, parameter.name))}' -r -d '${fishEscape(OPERATION_PATH_FLAGS[operation.sdkName]?.[parameter.name]?.description ?? parameter.description ?? parameter.name)}'`);
|
|
127786
128200
|
for (const parameter of operation.headerParams) lines.push(`complete -c ${binName} -n '${operationCondition(operation).replace(BIN_PLACEHOLDER, binName)}' -l '${fishEscape(headerFlagName(parameter.name))}' -r -d '${fishEscape(parameter.description ?? parameter.name)}'`);
|
|
127787
128201
|
lines.push(`complete -c ${binName} -n '${operationCondition(operation).replace(BIN_PLACEHOLDER, binName)}' -l 'api-key' -r -d 'Primitive API key override (defaults to PRIMITIVE_API_KEY or saved OAuth login credentials)'`);
|
|
127788
128202
|
if (!operation.binaryResponse) lines.push(`complete -c ${binName} -n '${operationCondition(operation).replace(BIN_PLACEHOLDER, binName)}' -l 'envelope' -d 'Print the full response envelope, including pagination metadata'`);
|
|
@@ -127833,6 +128247,7 @@ function readCompletionFunction(cacheDir, bin, shell) {
|
|
|
127833
128247
|
var ListOperationsCommand = class extends Command {
|
|
127834
128248
|
static description = "List all generated API operations as JSON. Useful for piping to `jq` to discover available commands, their request/response schemas, and per-field descriptions. For inspecting a single operation in detail, prefer `primitive describe <command-or-operation-name>`.";
|
|
127835
128249
|
static summary = "List all generated API operations (JSON)";
|
|
128250
|
+
static flags = { json: JSON_OUTPUT_FLAG };
|
|
127836
128251
|
async run() {
|
|
127837
128252
|
this.log(JSON.stringify(cliOperationManifest, null, 2));
|
|
127838
128253
|
}
|
|
@@ -127928,6 +128343,7 @@ var DescribeCommand = class DescribeCommand extends Command {
|
|
|
127928
128343
|
"<%= config.bin %> describe emails:get",
|
|
127929
128344
|
"<%= config.bin %> describe sent:get"
|
|
127930
128345
|
];
|
|
128346
|
+
static flags = { json: JSON_OUTPUT_FLAG };
|
|
127931
128347
|
async run() {
|
|
127932
128348
|
const { args } = await this.parse(DescribeCommand);
|
|
127933
128349
|
const { match, candidates } = lookupOperation(args.command);
|