@primitivedotdev/sdk 0.16.0 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/generated/sdk.gen.js +48 -10
- package/dist/api/index.d.ts +1 -1
- package/dist/{api-CTf0cUsi.js → api-DrAZhxS-.js} +48 -10
- package/dist/{index-SK_HbwVN.d.ts → index-CHWqMBs6.d.ts} +48 -10
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/oclif/api-command.js +2 -2
- package/dist/openapi/openapi.generated.js +4 -4
- package/dist/openapi/operations.generated.js +3 -3
- package/oclif.manifest.json +4 -4
- package/package.json +1 -1
|
@@ -31,8 +31,25 @@ export const getStorageStats = (options) => (options?.client ?? client).get({
|
|
|
31
31
|
/**
|
|
32
32
|
* Get webhook signing secret
|
|
33
33
|
*
|
|
34
|
-
* Returns the webhook signing secret for your account. If no
|
|
35
|
-
* exists yet, one is generated automatically on first
|
|
34
|
+
* Returns the webhook signing secret for your account. If no
|
|
35
|
+
* secret exists yet, one is generated automatically on first
|
|
36
|
+
* access.
|
|
37
|
+
*
|
|
38
|
+
* Signing is account-scoped, not per-endpoint. Every webhook
|
|
39
|
+
* delivery from any of your registered endpoints is signed
|
|
40
|
+
* with this single secret. Rotate via
|
|
41
|
+
* `POST /account/webhook-secret/rotate`.
|
|
42
|
+
*
|
|
43
|
+
* **Secret format**: the returned string looks base64-shaped
|
|
44
|
+
* (e.g. `XNHBBW8VqoBjRfNs1tkZj11jTk...`) but is NOT base64.
|
|
45
|
+
* Use it AS-IS as a UTF-8 string when computing HMAC over a
|
|
46
|
+
* delivery body. Base64-decoding before HMAC will silently
|
|
47
|
+
* produce mismatched signatures.
|
|
48
|
+
*
|
|
49
|
+
* See the API-level "Webhook signing" section for the full
|
|
50
|
+
* wire format (header name, signed string shape, hash algo,
|
|
51
|
+
* tolerance) including a language-agnostic verification
|
|
52
|
+
* recipe.
|
|
36
53
|
*
|
|
37
54
|
*/
|
|
38
55
|
export const getWebhookSecret = (options) => (options?.client ?? client).get({
|
|
@@ -125,12 +142,20 @@ export const verifyDomain = (options) => (options.client ?? client).post({
|
|
|
125
142
|
* List inbound emails
|
|
126
143
|
*
|
|
127
144
|
* Returns a paginated list of INBOUND emails received at your
|
|
128
|
-
* verified domains. Outbound messages sent via /send-mail are
|
|
129
|
-
* included; this endpoint is the inbox view, not a
|
|
130
|
-
* send/receive history.
|
|
145
|
+
* verified domains. Outbound messages sent via /send-mail are
|
|
146
|
+
* not included; this endpoint is the inbox view, not a
|
|
147
|
+
* unified send/receive history.
|
|
148
|
+
*
|
|
149
|
+
* Supports filtering by domain, status, date range, and
|
|
150
|
+
* free-text search across subject, sender, and recipient
|
|
151
|
+
* fields.
|
|
131
152
|
*
|
|
132
|
-
*
|
|
133
|
-
*
|
|
153
|
+
* For a compact text-table summary of the most recent N
|
|
154
|
+
* inbounds (no filters, no cursor pagination), the CLI ships
|
|
155
|
+
* `primitive emails:latest` as a one-line-per-email shortcut.
|
|
156
|
+
* It's TTY-aware so id columns are full UUIDs when piped, and
|
|
157
|
+
* a `--json` flag returns the same envelope this endpoint
|
|
158
|
+
* does. Use whichever fits the call site.
|
|
134
159
|
*
|
|
135
160
|
*/
|
|
136
161
|
export const listEmails = (options) => (options?.client ?? client).get({
|
|
@@ -288,9 +313,22 @@ export const listEndpoints = (options) => (options?.client ?? client).get({
|
|
|
288
313
|
/**
|
|
289
314
|
* Create a webhook endpoint
|
|
290
315
|
*
|
|
291
|
-
* Creates a new webhook endpoint. If a deactivated endpoint
|
|
292
|
-
* same URL and domain exists, it is reactivated
|
|
293
|
-
* Subject to plan limits on the number of active
|
|
316
|
+
* Creates a new webhook endpoint. If a deactivated endpoint
|
|
317
|
+
* with the same URL and domain exists, it is reactivated
|
|
318
|
+
* instead. Subject to plan limits on the number of active
|
|
319
|
+
* endpoints.
|
|
320
|
+
*
|
|
321
|
+
* **Signing is account-scoped, not per-endpoint.** This call
|
|
322
|
+
* does not return any signing material; every endpoint on the
|
|
323
|
+
* account uses the same webhook secret, fetched via
|
|
324
|
+
* `GET /account/webhook-secret`. See the API-level "Webhook
|
|
325
|
+
* signing" section for the full wire format (header name,
|
|
326
|
+
* signed string, hash algo, secret format, tolerance) and a
|
|
327
|
+
* language-agnostic verification recipe.
|
|
328
|
+
*
|
|
329
|
+
* After creating the endpoint, fire a test delivery against
|
|
330
|
+
* it via `POST /endpoints/{id}/test` to confirm your verifier
|
|
331
|
+
* accepts the signature.
|
|
294
332
|
*
|
|
295
333
|
*/
|
|
296
334
|
export const createEndpoint = (options) => (options.client ?? client).post({
|
package/dist/api/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as AddDomainData, $i as RequestOptions, $n as ListDomainsErrors, $r as SendPermissionAddress, $t as DownloadAttachmentsResponses, A as getSendPermissions, Ai as UpdateEndpointError, An as GetSentEmailData, Ar as ReplayEmailWebhooksError, At as DeleteEndpointError, B as replayDelivery, Bi as UpdateFilterResponses, Bn as GetWebhookSecretData, Br as ResourceId, Bt as DeliverySummary, C as deleteEndpoint, Ci as UpdateDomainData, Cn as GetEmailResponse, Cr as PaginationMeta, Ct as DeleteDomainResponses, D as downloadRawEmail, Di as UpdateDomainResponse, Dn as GetSendPermissionsErrors, Dr as ReplayDeliveryResponse, Dt as DeleteEmailResponse, E as downloadAttachments, Ei as UpdateDomainInput, En as GetSendPermissionsError, Er as ReplayDeliveryErrors, Et as DeleteEmailErrors, F as listDomains, Fi as UpdateFilterData, Fn as GetStorageStatsData, Fr as ReplyToEmailData, Ft as DeleteFilterError, G as testEndpoint, Gi as VerifyDomainResponse, Gn as Limit, Gr as RotateWebhookSecretResponses, Gt as DiscardEmailContentResponse, H as replyToEmail, Hi as VerifyDomainData, Hn as GetWebhookSecretErrors, Hr as RotateWebhookSecretError, Ht as DiscardEmailContentData, I as listEmails, Ii as UpdateFilterError, In as GetStorageStatsError, Ir as ReplyToEmailError, It as DeleteFilterErrors, J as updateEndpoint, Ji as Client, Jn as ListDeliveriesErrors, Jr as SendEmailErrors, Jt as DomainVerifyResult, K as updateAccount, Ki as VerifyDomainResponses, Kn as ListDeliveriesData, Kr as SendEmailData, Kt as DiscardEmailContentResponses, L as listEndpoints, Li as UpdateFilterErrors, Ln as GetStorageStatsErrors, Lr as ReplyToEmailErrors, Lt as DeleteFilterResponse, M as getStorageStats, Mi as UpdateEndpointInput, Mn as GetSentEmailErrors, Mr as ReplayEmailWebhooksResponse, Mt as DeleteEndpointResponse, N as getWebhookSecret, Ni as UpdateEndpointResponse, Nn as GetSentEmailResponse, Nr as ReplayEmailWebhooksResponses, Nt as DeleteEndpointResponses, O as getAccount, Oi as UpdateDomainResponses, On as GetSendPermissionsResponse, Or as ReplayDeliveryResponses, Ot as DeleteEmailResponses, P as listDeliveries, Pi as UpdateEndpointResponses, Pn as GetSentEmailResponses, Pr as ReplayResult, Pt as DeleteFilterData, Q as AccountUpdated, Qi as Options$1, Qn as ListDomainsError, Qr as SendMailResult, Qt as DownloadAttachmentsResponse, R as listFilters, Ri as UpdateFilterInput, Rn as GetStorageStatsResponse, Rr as ReplyToEmailResponse, Rt as DeleteFilterResponses, S as deleteEmail, Si as UpdateAccountResponses, Sn as GetEmailErrors, Sr as ListSentEmailsResponses, St as DeleteDomainResponse, T as discardEmailContent, Ti as UpdateDomainErrors, Tn as GetSendPermissionsData, Tr as ReplayDeliveryError, Tt as DeleteEmailError, U as rotateWebhookSecret, Ui as VerifyDomainError, Un as GetWebhookSecretResponse, Ur as RotateWebhookSecretErrors, Ut as DiscardEmailContentError, V as replayEmailWebhooks, Vi as VerifiedDomain, Vn as GetWebhookSecretError, Vr as RotateWebhookSecretData, Vt as DiscardContentResult, W as sendEmail, Wi as VerifyDomainErrors, Wn as GetWebhookSecretResponses, Wr as RotateWebhookSecretResponse, Wt as DiscardEmailContentErrors, X as verifyDomain, Xi as Config, Xn as ListDeliveriesResponses, Xr as SendEmailResponses, Xt as DownloadAttachmentsError, Y as updateFilter, Yi as ClientOptions$1, Yn as ListDeliveriesResponse, Yr as SendEmailResponse, Yt as DownloadAttachmentsData, Z as Account, Zi as CreateClientConfig, Zn as ListDomainsData, Zr as SendMailInput, Zt as DownloadAttachmentsErrors, _ as Options, _i as UpdateAccountData, _n as GetAccountErrors, _r as ListFiltersResponses, _t as CreateFilterResponses, a as PrimitiveApiError, ai as SentEmailDetail, an as EmailDetail, ar as ListEmailsResponse, at as ClientOptions, b as createFilter, bi as UpdateAccountInput, bn as GetEmailData, br as ListSentEmailsErrors, bt as DeleteDomainError, c as PrimitiveClientOptions, ci as StorageStats, cn as EmailSummary, cr as ListEndpointsError, ct as CreateEndpointErrors, d as SendResult, di as TestEndpointError, dn as ErrorResponse, dr as ListEndpointsResponses, dt as CreateEndpointResponses, ea as RequestResult, ei as SendPermissionAnyRecipient, en as DownloadRawEmailData, er as ListDomainsResponse, et as AddDomainError, f as SendThreadInput, fi as TestEndpointErrors, fn as Filter, fr as ListEnvelope, ft as CreateFilterData, g as operations, gi as UnverifiedDomain, gn as GetAccountError, gr as ListFiltersResponse, gt as CreateFilterResponse, h as createPrimitiveClient, hi as TestResult, hn as GetAccountData, hr as ListFiltersErrors, ht as CreateFilterInput, i as PrimitiveApiClientOptions, ii as SendPermissionsMeta, in as DownloadRawEmailResponses, ir as ListEmailsErrors, it as AddDomainResponses, j as getSentEmail, ji as UpdateEndpointErrors, jn as GetSentEmailError, jr as ReplayEmailWebhooksErrors, jt as DeleteEndpointErrors, k as getEmail, ki as UpdateEndpointData, kn as GetSendPermissionsResponses, kr as ReplayEmailWebhooksData, kt as DeleteEndpointData, l as ReplyInput, li as SuccessEnvelope, ln as EmailWebhookStatus, lr as ListEndpointsErrors, lt as CreateEndpointInput, m as createPrimitiveApiClient, mi as TestEndpointResponses, mn as GateFix, mr as ListFiltersError, mt as CreateFilterErrors, n as ForwardInput, na as Auth, ni as SendPermissionRule, nn as DownloadRawEmailErrors, nr as ListEmailsData, nt as AddDomainInput, o as PrimitiveApiErrorDetails, oi as SentEmailStatus, on as EmailDetailReply, or as ListEmailsResponses, ot as CreateEndpointData, p as client, pi as TestEndpointResponse, pn as GateDenial, pr as ListFiltersData, pt as CreateFilterError, q as updateDomain, qi as WebhookSecret, qn as ListDeliveriesError, qr as SendEmailError, qt as Domain, r as PrimitiveApiClient, ri as SendPermissionYourDomain, rn as DownloadRawEmailResponse, rr as ListEmailsError, rt as AddDomainResponse, s as PrimitiveClient, si as SentEmailSummary, sn as EmailStatus, sr as ListEndpointsData, st as CreateEndpointError, t as DEFAULT_BASE_URL, ta as ResponseStyle, ti as SendPermissionManagedZone, tn as DownloadRawEmailError, tr as ListDomainsResponses, tt as AddDomainErrors, u as SendInput, ui as TestEndpointData, un as Endpoint, ur as ListEndpointsResponse, ut as CreateEndpointResponse, v as addDomain, vi as UpdateAccountError, vn as GetAccountResponse, vr as ListSentEmailsData, vt as Cursor, w as deleteFilter, wi as UpdateDomainError, wn as GetEmailResponses, wr as ReplayDeliveryData, wt as DeleteEmailData, x as deleteDomain, xi as UpdateAccountResponse, xn as GetEmailError, xr as ListSentEmailsResponse, xt as DeleteDomainErrors, y as createEndpoint, yi as UpdateAccountErrors, yn as GetAccountResponses, yr as ListSentEmailsError, yt as DeleteDomainData, z as listSentEmails, zi as UpdateFilterResponse, zn as GetStorageStatsResponses, zr as ReplyToEmailResponses, zt as DeliveryStatus } from "../index-
|
|
1
|
+
import { $ as AddDomainData, $i as RequestOptions, $n as ListDomainsErrors, $r as SendPermissionAddress, $t as DownloadAttachmentsResponses, A as getSendPermissions, Ai as UpdateEndpointError, An as GetSentEmailData, Ar as ReplayEmailWebhooksError, At as DeleteEndpointError, B as replayDelivery, Bi as UpdateFilterResponses, Bn as GetWebhookSecretData, Br as ResourceId, Bt as DeliverySummary, C as deleteEndpoint, Ci as UpdateDomainData, Cn as GetEmailResponse, Cr as PaginationMeta, Ct as DeleteDomainResponses, D as downloadRawEmail, Di as UpdateDomainResponse, Dn as GetSendPermissionsErrors, Dr as ReplayDeliveryResponse, Dt as DeleteEmailResponse, E as downloadAttachments, Ei as UpdateDomainInput, En as GetSendPermissionsError, Er as ReplayDeliveryErrors, Et as DeleteEmailErrors, F as listDomains, Fi as UpdateFilterData, Fn as GetStorageStatsData, Fr as ReplyToEmailData, Ft as DeleteFilterError, G as testEndpoint, Gi as VerifyDomainResponse, Gn as Limit, Gr as RotateWebhookSecretResponses, Gt as DiscardEmailContentResponse, H as replyToEmail, Hi as VerifyDomainData, Hn as GetWebhookSecretErrors, Hr as RotateWebhookSecretError, Ht as DiscardEmailContentData, I as listEmails, Ii as UpdateFilterError, In as GetStorageStatsError, Ir as ReplyToEmailError, It as DeleteFilterErrors, J as updateEndpoint, Ji as Client, Jn as ListDeliveriesErrors, Jr as SendEmailErrors, Jt as DomainVerifyResult, K as updateAccount, Ki as VerifyDomainResponses, Kn as ListDeliveriesData, Kr as SendEmailData, Kt as DiscardEmailContentResponses, L as listEndpoints, Li as UpdateFilterErrors, Ln as GetStorageStatsErrors, Lr as ReplyToEmailErrors, Lt as DeleteFilterResponse, M as getStorageStats, Mi as UpdateEndpointInput, Mn as GetSentEmailErrors, Mr as ReplayEmailWebhooksResponse, Mt as DeleteEndpointResponse, N as getWebhookSecret, Ni as UpdateEndpointResponse, Nn as GetSentEmailResponse, Nr as ReplayEmailWebhooksResponses, Nt as DeleteEndpointResponses, O as getAccount, Oi as UpdateDomainResponses, On as GetSendPermissionsResponse, Or as ReplayDeliveryResponses, Ot as DeleteEmailResponses, P as listDeliveries, Pi as UpdateEndpointResponses, Pn as GetSentEmailResponses, Pr as ReplayResult, Pt as DeleteFilterData, Q as AccountUpdated, Qi as Options$1, Qn as ListDomainsError, Qr as SendMailResult, Qt as DownloadAttachmentsResponse, R as listFilters, Ri as UpdateFilterInput, Rn as GetStorageStatsResponse, Rr as ReplyToEmailResponse, Rt as DeleteFilterResponses, S as deleteEmail, Si as UpdateAccountResponses, Sn as GetEmailErrors, Sr as ListSentEmailsResponses, St as DeleteDomainResponse, T as discardEmailContent, Ti as UpdateDomainErrors, Tn as GetSendPermissionsData, Tr as ReplayDeliveryError, Tt as DeleteEmailError, U as rotateWebhookSecret, Ui as VerifyDomainError, Un as GetWebhookSecretResponse, Ur as RotateWebhookSecretErrors, Ut as DiscardEmailContentError, V as replayEmailWebhooks, Vi as VerifiedDomain, Vn as GetWebhookSecretError, Vr as RotateWebhookSecretData, Vt as DiscardContentResult, W as sendEmail, Wi as VerifyDomainErrors, Wn as GetWebhookSecretResponses, Wr as RotateWebhookSecretResponse, Wt as DiscardEmailContentErrors, X as verifyDomain, Xi as Config, Xn as ListDeliveriesResponses, Xr as SendEmailResponses, Xt as DownloadAttachmentsError, Y as updateFilter, Yi as ClientOptions$1, Yn as ListDeliveriesResponse, Yr as SendEmailResponse, Yt as DownloadAttachmentsData, Z as Account, Zi as CreateClientConfig, Zn as ListDomainsData, Zr as SendMailInput, Zt as DownloadAttachmentsErrors, _ as Options, _i as UpdateAccountData, _n as GetAccountErrors, _r as ListFiltersResponses, _t as CreateFilterResponses, a as PrimitiveApiError, ai as SentEmailDetail, an as EmailDetail, ar as ListEmailsResponse, at as ClientOptions, b as createFilter, bi as UpdateAccountInput, bn as GetEmailData, br as ListSentEmailsErrors, bt as DeleteDomainError, c as PrimitiveClientOptions, ci as StorageStats, cn as EmailSummary, cr as ListEndpointsError, ct as CreateEndpointErrors, d as SendResult, di as TestEndpointError, dn as ErrorResponse, dr as ListEndpointsResponses, dt as CreateEndpointResponses, ea as RequestResult, ei as SendPermissionAnyRecipient, en as DownloadRawEmailData, er as ListDomainsResponse, et as AddDomainError, f as SendThreadInput, fi as TestEndpointErrors, fn as Filter, fr as ListEnvelope, ft as CreateFilterData, g as operations, gi as UnverifiedDomain, gn as GetAccountError, gr as ListFiltersResponse, gt as CreateFilterResponse, h as createPrimitiveClient, hi as TestResult, hn as GetAccountData, hr as ListFiltersErrors, ht as CreateFilterInput, i as PrimitiveApiClientOptions, ii as SendPermissionsMeta, in as DownloadRawEmailResponses, ir as ListEmailsErrors, it as AddDomainResponses, j as getSentEmail, ji as UpdateEndpointErrors, jn as GetSentEmailError, jr as ReplayEmailWebhooksErrors, jt as DeleteEndpointErrors, k as getEmail, ki as UpdateEndpointData, kn as GetSendPermissionsResponses, kr as ReplayEmailWebhooksData, kt as DeleteEndpointData, l as ReplyInput, li as SuccessEnvelope, ln as EmailWebhookStatus, lr as ListEndpointsErrors, lt as CreateEndpointInput, m as createPrimitiveApiClient, mi as TestEndpointResponses, mn as GateFix, mr as ListFiltersError, mt as CreateFilterErrors, n as ForwardInput, na as Auth, ni as SendPermissionRule, nn as DownloadRawEmailErrors, nr as ListEmailsData, nt as AddDomainInput, o as PrimitiveApiErrorDetails, oi as SentEmailStatus, on as EmailDetailReply, or as ListEmailsResponses, ot as CreateEndpointData, p as client, pi as TestEndpointResponse, pn as GateDenial, pr as ListFiltersData, pt as CreateFilterError, q as updateDomain, qi as WebhookSecret, qn as ListDeliveriesError, qr as SendEmailError, qt as Domain, r as PrimitiveApiClient, ri as SendPermissionYourDomain, rn as DownloadRawEmailResponse, rr as ListEmailsError, rt as AddDomainResponse, s as PrimitiveClient, si as SentEmailSummary, sn as EmailStatus, sr as ListEndpointsData, st as CreateEndpointError, t as DEFAULT_BASE_URL, ta as ResponseStyle, ti as SendPermissionManagedZone, tn as DownloadRawEmailError, tr as ListDomainsResponses, tt as AddDomainErrors, u as SendInput, ui as TestEndpointData, un as Endpoint, ur as ListEndpointsResponse, ut as CreateEndpointResponse, v as addDomain, vi as UpdateAccountError, vn as GetAccountResponse, vr as ListSentEmailsData, vt as Cursor, w as deleteFilter, wi as UpdateDomainError, wn as GetEmailResponses, wr as ReplayDeliveryData, wt as DeleteEmailData, x as deleteDomain, xi as UpdateAccountResponse, xn as GetEmailError, xr as ListSentEmailsResponse, xt as DeleteDomainErrors, y as createEndpoint, yi as UpdateAccountErrors, yn as GetAccountResponses, yr as ListSentEmailsError, yt as DeleteDomainData, z as listSentEmails, zi as UpdateFilterResponse, zn as GetStorageStatsResponses, zr as ReplyToEmailResponses, zt as DeliveryStatus } from "../index-CHWqMBs6.js";
|
|
2
2
|
export { Account, AccountUpdated, AddDomainData, AddDomainError, AddDomainErrors, AddDomainInput, AddDomainResponse, AddDomainResponses, Auth, ClientOptions, CreateClientConfig, CreateEndpointData, CreateEndpointError, CreateEndpointErrors, CreateEndpointInput, CreateEndpointResponse, CreateEndpointResponses, CreateFilterData, CreateFilterError, CreateFilterErrors, CreateFilterInput, CreateFilterResponse, CreateFilterResponses, Cursor, DEFAULT_BASE_URL, DeleteDomainData, DeleteDomainError, DeleteDomainErrors, DeleteDomainResponse, DeleteDomainResponses, DeleteEmailData, DeleteEmailError, DeleteEmailErrors, DeleteEmailResponse, DeleteEmailResponses, DeleteEndpointData, DeleteEndpointError, DeleteEndpointErrors, DeleteEndpointResponse, DeleteEndpointResponses, DeleteFilterData, DeleteFilterError, DeleteFilterErrors, DeleteFilterResponse, DeleteFilterResponses, DeliveryStatus, DeliverySummary, DiscardContentResult, DiscardEmailContentData, DiscardEmailContentError, DiscardEmailContentErrors, DiscardEmailContentResponse, DiscardEmailContentResponses, Domain, DomainVerifyResult, DownloadAttachmentsData, DownloadAttachmentsError, DownloadAttachmentsErrors, DownloadAttachmentsResponse, DownloadAttachmentsResponses, DownloadRawEmailData, DownloadRawEmailError, DownloadRawEmailErrors, DownloadRawEmailResponse, DownloadRawEmailResponses, EmailDetail, EmailDetailReply, EmailStatus, EmailSummary, EmailWebhookStatus, Endpoint, ErrorResponse, Filter, ForwardInput, GateDenial, GateFix, GetAccountData, GetAccountError, GetAccountErrors, GetAccountResponse, GetAccountResponses, GetEmailData, GetEmailError, GetEmailErrors, GetEmailResponse, GetEmailResponses, GetSendPermissionsData, GetSendPermissionsError, GetSendPermissionsErrors, GetSendPermissionsResponse, GetSendPermissionsResponses, GetSentEmailData, GetSentEmailError, GetSentEmailErrors, GetSentEmailResponse, GetSentEmailResponses, GetStorageStatsData, GetStorageStatsError, GetStorageStatsErrors, GetStorageStatsResponse, GetStorageStatsResponses, GetWebhookSecretData, GetWebhookSecretError, GetWebhookSecretErrors, GetWebhookSecretResponse, GetWebhookSecretResponses, Limit, ListDeliveriesData, ListDeliveriesError, ListDeliveriesErrors, ListDeliveriesResponse, ListDeliveriesResponses, ListDomainsData, ListDomainsError, ListDomainsErrors, ListDomainsResponse, ListDomainsResponses, ListEmailsData, ListEmailsError, ListEmailsErrors, ListEmailsResponse, ListEmailsResponses, ListEndpointsData, ListEndpointsError, ListEndpointsErrors, ListEndpointsResponse, ListEndpointsResponses, ListEnvelope, ListFiltersData, ListFiltersError, ListFiltersErrors, ListFiltersResponse, ListFiltersResponses, ListSentEmailsData, ListSentEmailsError, ListSentEmailsErrors, ListSentEmailsResponse, ListSentEmailsResponses, Options, PaginationMeta, PrimitiveApiClient, PrimitiveApiClientOptions, PrimitiveApiError, PrimitiveApiErrorDetails, PrimitiveClient, PrimitiveClientOptions, Client as PrimitiveGeneratedApiClient, ClientOptions$1 as PrimitiveGeneratedApiClientOptions, Config as PrimitiveGeneratedApiConfig, Options$1 as PrimitiveGeneratedApiOptions, RequestOptions as PrimitiveGeneratedApiRequestOptions, RequestResult as PrimitiveGeneratedApiRequestResult, ReplayDeliveryData, ReplayDeliveryError, ReplayDeliveryErrors, ReplayDeliveryResponse, ReplayDeliveryResponses, ReplayEmailWebhooksData, ReplayEmailWebhooksError, ReplayEmailWebhooksErrors, ReplayEmailWebhooksResponse, ReplayEmailWebhooksResponses, ReplayResult, ReplyInput, ReplyToEmailData, ReplyToEmailError, ReplyToEmailErrors, ReplyToEmailResponse, ReplyToEmailResponses, ResourceId, ResponseStyle, RotateWebhookSecretData, RotateWebhookSecretError, RotateWebhookSecretErrors, RotateWebhookSecretResponse, RotateWebhookSecretResponses, SendEmailData, SendEmailError, SendEmailErrors, SendEmailResponse, SendEmailResponses, SendInput, SendMailInput, SendMailResult, SendPermissionAddress, SendPermissionAnyRecipient, SendPermissionManagedZone, SendPermissionRule, SendPermissionYourDomain, SendPermissionsMeta, SendResult, SendThreadInput, SentEmailDetail, SentEmailStatus, SentEmailSummary, StorageStats, SuccessEnvelope, TestEndpointData, TestEndpointError, TestEndpointErrors, TestEndpointResponse, TestEndpointResponses, TestResult, UnverifiedDomain, UpdateAccountData, UpdateAccountError, UpdateAccountErrors, UpdateAccountInput, UpdateAccountResponse, UpdateAccountResponses, UpdateDomainData, UpdateDomainError, UpdateDomainErrors, UpdateDomainInput, UpdateDomainResponse, UpdateDomainResponses, UpdateEndpointData, UpdateEndpointError, UpdateEndpointErrors, UpdateEndpointInput, UpdateEndpointResponse, UpdateEndpointResponses, UpdateFilterData, UpdateFilterError, UpdateFilterErrors, UpdateFilterInput, UpdateFilterResponse, UpdateFilterResponses, VerifiedDomain, VerifyDomainData, VerifyDomainError, VerifyDomainErrors, VerifyDomainResponse, VerifyDomainResponses, WebhookSecret, addDomain, client, createEndpoint, createFilter, createPrimitiveApiClient, createPrimitiveClient, deleteDomain, deleteEmail, deleteEndpoint, deleteFilter, discardEmailContent, downloadAttachments, downloadRawEmail, getAccount, getEmail, getSendPermissions, getSentEmail, getStorageStats, getWebhookSecret, listDeliveries, listDomains, listEmails, listEndpoints, listFilters, listSentEmails, operations, replayDelivery, replayEmailWebhooks, replyToEmail, rotateWebhookSecret, sendEmail, testEndpoint, updateAccount, updateDomain, updateEndpoint, updateFilter, verifyDomain };
|
|
@@ -687,8 +687,25 @@ const getStorageStats = (options) => (options?.client ?? client$1).get({
|
|
|
687
687
|
/**
|
|
688
688
|
* Get webhook signing secret
|
|
689
689
|
*
|
|
690
|
-
* Returns the webhook signing secret for your account. If no
|
|
691
|
-
* exists yet, one is generated automatically on first
|
|
690
|
+
* Returns the webhook signing secret for your account. If no
|
|
691
|
+
* secret exists yet, one is generated automatically on first
|
|
692
|
+
* access.
|
|
693
|
+
*
|
|
694
|
+
* Signing is account-scoped, not per-endpoint. Every webhook
|
|
695
|
+
* delivery from any of your registered endpoints is signed
|
|
696
|
+
* with this single secret. Rotate via
|
|
697
|
+
* `POST /account/webhook-secret/rotate`.
|
|
698
|
+
*
|
|
699
|
+
* **Secret format**: the returned string looks base64-shaped
|
|
700
|
+
* (e.g. `XNHBBW8VqoBjRfNs1tkZj11jTk...`) but is NOT base64.
|
|
701
|
+
* Use it AS-IS as a UTF-8 string when computing HMAC over a
|
|
702
|
+
* delivery body. Base64-decoding before HMAC will silently
|
|
703
|
+
* produce mismatched signatures.
|
|
704
|
+
*
|
|
705
|
+
* See the API-level "Webhook signing" section for the full
|
|
706
|
+
* wire format (header name, signed string shape, hash algo,
|
|
707
|
+
* tolerance) including a language-agnostic verification
|
|
708
|
+
* recipe.
|
|
692
709
|
*
|
|
693
710
|
*/
|
|
694
711
|
const getWebhookSecret = (options) => (options?.client ?? client$1).get({
|
|
@@ -802,12 +819,20 @@ const verifyDomain = (options) => (options.client ?? client$1).post({
|
|
|
802
819
|
* List inbound emails
|
|
803
820
|
*
|
|
804
821
|
* Returns a paginated list of INBOUND emails received at your
|
|
805
|
-
* verified domains. Outbound messages sent via /send-mail are
|
|
806
|
-
* included; this endpoint is the inbox view, not a
|
|
807
|
-
* send/receive history.
|
|
822
|
+
* verified domains. Outbound messages sent via /send-mail are
|
|
823
|
+
* not included; this endpoint is the inbox view, not a
|
|
824
|
+
* unified send/receive history.
|
|
808
825
|
*
|
|
809
|
-
* Supports filtering by domain, status, date range, and
|
|
810
|
-
* search across subject, sender, and recipient
|
|
826
|
+
* Supports filtering by domain, status, date range, and
|
|
827
|
+
* free-text search across subject, sender, and recipient
|
|
828
|
+
* fields.
|
|
829
|
+
*
|
|
830
|
+
* For a compact text-table summary of the most recent N
|
|
831
|
+
* inbounds (no filters, no cursor pagination), the CLI ships
|
|
832
|
+
* `primitive emails:latest` as a one-line-per-email shortcut.
|
|
833
|
+
* It's TTY-aware so id columns are full UUIDs when piped, and
|
|
834
|
+
* a `--json` flag returns the same envelope this endpoint
|
|
835
|
+
* does. Use whichever fits the call site.
|
|
811
836
|
*
|
|
812
837
|
*/
|
|
813
838
|
const listEmails = (options) => (options?.client ?? client$1).get({
|
|
@@ -992,9 +1017,22 @@ const listEndpoints = (options) => (options?.client ?? client$1).get({
|
|
|
992
1017
|
/**
|
|
993
1018
|
* Create a webhook endpoint
|
|
994
1019
|
*
|
|
995
|
-
* Creates a new webhook endpoint. If a deactivated endpoint
|
|
996
|
-
* same URL and domain exists, it is reactivated
|
|
997
|
-
* Subject to plan limits on the number of active
|
|
1020
|
+
* Creates a new webhook endpoint. If a deactivated endpoint
|
|
1021
|
+
* with the same URL and domain exists, it is reactivated
|
|
1022
|
+
* instead. Subject to plan limits on the number of active
|
|
1023
|
+
* endpoints.
|
|
1024
|
+
*
|
|
1025
|
+
* **Signing is account-scoped, not per-endpoint.** This call
|
|
1026
|
+
* does not return any signing material; every endpoint on the
|
|
1027
|
+
* account uses the same webhook secret, fetched via
|
|
1028
|
+
* `GET /account/webhook-secret`. See the API-level "Webhook
|
|
1029
|
+
* signing" section for the full wire format (header name,
|
|
1030
|
+
* signed string, hash algo, secret format, tolerance) and a
|
|
1031
|
+
* language-agnostic verification recipe.
|
|
1032
|
+
*
|
|
1033
|
+
* After creating the endpoint, fire a test delivery against
|
|
1034
|
+
* it via `POST /endpoints/{id}/test` to confirm your verifier
|
|
1035
|
+
* accepts the signature.
|
|
998
1036
|
*
|
|
999
1037
|
*/
|
|
1000
1038
|
const createEndpoint = (options) => (options.client ?? client$1).post({
|
|
@@ -2711,8 +2711,25 @@ declare const getStorageStats: <ThrowOnError extends boolean = false>(options?:
|
|
|
2711
2711
|
/**
|
|
2712
2712
|
* Get webhook signing secret
|
|
2713
2713
|
*
|
|
2714
|
-
* Returns the webhook signing secret for your account. If no
|
|
2715
|
-
* exists yet, one is generated automatically on first
|
|
2714
|
+
* Returns the webhook signing secret for your account. If no
|
|
2715
|
+
* secret exists yet, one is generated automatically on first
|
|
2716
|
+
* access.
|
|
2717
|
+
*
|
|
2718
|
+
* Signing is account-scoped, not per-endpoint. Every webhook
|
|
2719
|
+
* delivery from any of your registered endpoints is signed
|
|
2720
|
+
* with this single secret. Rotate via
|
|
2721
|
+
* `POST /account/webhook-secret/rotate`.
|
|
2722
|
+
*
|
|
2723
|
+
* **Secret format**: the returned string looks base64-shaped
|
|
2724
|
+
* (e.g. `XNHBBW8VqoBjRfNs1tkZj11jTk...`) but is NOT base64.
|
|
2725
|
+
* Use it AS-IS as a UTF-8 string when computing HMAC over a
|
|
2726
|
+
* delivery body. Base64-decoding before HMAC will silently
|
|
2727
|
+
* produce mismatched signatures.
|
|
2728
|
+
*
|
|
2729
|
+
* See the API-level "Webhook signing" section for the full
|
|
2730
|
+
* wire format (header name, signed string shape, hash algo,
|
|
2731
|
+
* tolerance) including a language-agnostic verification
|
|
2732
|
+
* recipe.
|
|
2716
2733
|
*
|
|
2717
2734
|
*/
|
|
2718
2735
|
declare const getWebhookSecret: <ThrowOnError extends boolean = false>(options?: Options<GetWebhookSecretData, ThrowOnError>) => RequestResult<GetWebhookSecretResponses, GetWebhookSecretErrors, ThrowOnError, "fields">;
|
|
@@ -2769,12 +2786,20 @@ declare const verifyDomain: <ThrowOnError extends boolean = false>(options: Opti
|
|
|
2769
2786
|
* List inbound emails
|
|
2770
2787
|
*
|
|
2771
2788
|
* Returns a paginated list of INBOUND emails received at your
|
|
2772
|
-
* verified domains. Outbound messages sent via /send-mail are
|
|
2773
|
-
* included; this endpoint is the inbox view, not a
|
|
2774
|
-
* send/receive history.
|
|
2789
|
+
* verified domains. Outbound messages sent via /send-mail are
|
|
2790
|
+
* not included; this endpoint is the inbox view, not a
|
|
2791
|
+
* unified send/receive history.
|
|
2775
2792
|
*
|
|
2776
|
-
* Supports filtering by domain, status, date range, and
|
|
2777
|
-
* search across subject, sender, and recipient
|
|
2793
|
+
* Supports filtering by domain, status, date range, and
|
|
2794
|
+
* free-text search across subject, sender, and recipient
|
|
2795
|
+
* fields.
|
|
2796
|
+
*
|
|
2797
|
+
* For a compact text-table summary of the most recent N
|
|
2798
|
+
* inbounds (no filters, no cursor pagination), the CLI ships
|
|
2799
|
+
* `primitive emails:latest` as a one-line-per-email shortcut.
|
|
2800
|
+
* It's TTY-aware so id columns are full UUIDs when piped, and
|
|
2801
|
+
* a `--json` flag returns the same envelope this endpoint
|
|
2802
|
+
* does. Use whichever fits the call site.
|
|
2778
2803
|
*
|
|
2779
2804
|
*/
|
|
2780
2805
|
declare const listEmails: <ThrowOnError extends boolean = false>(options?: Options<ListEmailsData, ThrowOnError>) => RequestResult<ListEmailsResponses, ListEmailsErrors, ThrowOnError, "fields">;
|
|
@@ -2884,9 +2909,22 @@ declare const listEndpoints: <ThrowOnError extends boolean = false>(options?: Op
|
|
|
2884
2909
|
/**
|
|
2885
2910
|
* Create a webhook endpoint
|
|
2886
2911
|
*
|
|
2887
|
-
* Creates a new webhook endpoint. If a deactivated endpoint
|
|
2888
|
-
* same URL and domain exists, it is reactivated
|
|
2889
|
-
* Subject to plan limits on the number of active
|
|
2912
|
+
* Creates a new webhook endpoint. If a deactivated endpoint
|
|
2913
|
+
* with the same URL and domain exists, it is reactivated
|
|
2914
|
+
* instead. Subject to plan limits on the number of active
|
|
2915
|
+
* endpoints.
|
|
2916
|
+
*
|
|
2917
|
+
* **Signing is account-scoped, not per-endpoint.** This call
|
|
2918
|
+
* does not return any signing material; every endpoint on the
|
|
2919
|
+
* account uses the same webhook secret, fetched via
|
|
2920
|
+
* `GET /account/webhook-secret`. See the API-level "Webhook
|
|
2921
|
+
* signing" section for the full wire format (header name,
|
|
2922
|
+
* signed string, hash algo, secret format, tolerance) and a
|
|
2923
|
+
* language-agnostic verification recipe.
|
|
2924
|
+
*
|
|
2925
|
+
* After creating the endpoint, fire a test delivery against
|
|
2926
|
+
* it via `POST /endpoints/{id}/test` to confirm your verifier
|
|
2927
|
+
* accepts the signature.
|
|
2890
2928
|
*
|
|
2891
2929
|
*/
|
|
2892
2930
|
declare const createEndpoint: <ThrowOnError extends boolean = false>(options: Options<CreateEndpointData, ThrowOnError>) => RequestResult<CreateEndpointResponses, CreateEndpointErrors, ThrowOnError, "fields">;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { A as UnknownEvent, C as ParsedDataFailed, D as RawContentDownloadOnly, E as RawContent, M as WebhookAttachment, N as WebhookEvent, O as RawContentInline, S as ParsedDataComplete, T as ParsedStatus, _ as ForwardResultInline, a as DmarcPolicy, b as KnownWebhookEvent, c as EmailAnalysis, d as EventType, f as ForwardAnalysis, g as ForwardResultAttachmentSkipped, h as ForwardResultAttachmentAnalyzed, i as DkimSignature, j as ValidateEmailAuthResult, k as SpfResult, l as EmailAuth, m as ForwardResult, n as AuthVerdict, o as DmarcResult, p as ForwardOriginalSender, r as DkimResult, s as EmailAddress, t as AuthConfidence, u as EmailReceivedEvent, v as ForwardVerdict, w as ParsedError, x as ParsedData, y as ForwardVerification } from "./types-9vXGZjPd.js";
|
|
2
2
|
import { a as buildReplySubject, c as parseHeaderAddress, i as buildForwardSubject, n as ReceivedEmailAddress, o as formatAddress, r as ReceivedEmailThread, s as normalizeReceivedEmail, t as ReceivedEmail } from "./received-email-DNjpq_Wt.js";
|
|
3
|
-
import { a as PrimitiveApiError, c as PrimitiveClientOptions, d as SendResult, f as SendThreadInput, h as createPrimitiveClient, l as ReplyInput, n as ForwardInput, p as client, s as PrimitiveClient, u as SendInput } from "./index-
|
|
3
|
+
import { a as PrimitiveApiError, c as PrimitiveClientOptions, d as SendResult, f as SendThreadInput, h as createPrimitiveClient, l as ReplyInput, n as ForwardInput, p as client, s as PrimitiveClient, u as SendInput } from "./index-CHWqMBs6.js";
|
|
4
4
|
import { A as VerifyOptions, B as PAYLOAD_ERRORS, C as signStandardWebhooksPayload, D as PRIMITIVE_CONFIRMED_HEADER, E as LEGACY_SIGNATURE_HEADER, F as VerifyDownloadTokenResult, G as VERIFICATION_ERRORS, H as RAW_EMAIL_ERRORS, I as generateDownloadToken, J as WebhookPayloadErrorCode, K as WebhookErrorCode, L as verifyDownloadToken, M as verifyWebhookSignature, N as GenerateDownloadTokenOptions, O as PRIMITIVE_SIGNATURE_HEADER, P as VerifyDownloadTokenOptions, Q as WebhookVerificationErrorCode, R as safeValidateEmailReceivedEvent, S as StandardWebhooksVerifyOptions, T as LEGACY_CONFIRMED_HEADER, U as RawEmailDecodeError, V as PrimitiveWebhookError, W as RawEmailDecodeErrorCode, X as WebhookValidationErrorCode, Y as WebhookValidationError, Z as WebhookVerificationError, _ as emailReceivedEventJsonSchema, a as confirmedHeaders, b as STANDARD_WEBHOOK_TIMESTAMP_HEADER, c as handleWebhook, d as isRawIncluded, f as parseWebhookEvent, g as validateEmailAuth, h as WEBHOOK_VERSION, i as WebhookHeaders, j as signWebhookPayload, k as SignResult, l as isDownloadExpired, m as verifyRawEmailDownload, n as HandleWebhookOptions, o as decodeRawEmail, p as receive, q as WebhookPayloadError, r as ReceiveRequestOptions, s as getDownloadTimeRemaining, t as DecodeRawEmailOptions, u as isEmailReceivedEvent, v as STANDARD_WEBHOOK_ID_HEADER, w as verifyStandardWebhooksSignature, x as StandardWebhooksSignResult, y as STANDARD_WEBHOOK_SIGNATURE_HEADER, z as validateEmailReceivedEvent } from "./index-CbEivn3S.js";
|
|
5
5
|
|
|
6
6
|
//#region src/index.d.ts
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as parseHeaderAddress, i as normalizeReceivedEmail, n as buildReplySubject, r as formatAddress, t as buildForwardSubject } from "./received-email-D6tKtWwW.js";
|
|
2
|
-
import { a as client, i as PrimitiveClient, r as PrimitiveApiError, s as createPrimitiveClient } from "./api-
|
|
2
|
+
import { a as client, i as PrimitiveClient, r as PrimitiveApiError, s as createPrimitiveClient } from "./api-DrAZhxS-.js";
|
|
3
3
|
import { A as PRIMITIVE_CONFIRMED_HEADER, B as RAW_EMAIL_ERRORS, C as STANDARD_WEBHOOK_ID_HEADER, D as verifyStandardWebhooksSignature, E as signStandardWebhooksPayload, F as verifyDownloadToken, G as WebhookVerificationError, H as VERIFICATION_ERRORS, I as safeValidateEmailReceivedEvent, L as validateEmailReceivedEvent, M as signWebhookPayload, N as verifyWebhookSignature, O as LEGACY_CONFIRMED_HEADER, P as generateDownloadToken, R as PAYLOAD_ERRORS, S as emailReceivedEventJsonSchema, T as STANDARD_WEBHOOK_TIMESTAMP_HEADER, U as WebhookPayloadError, V as RawEmailDecodeError, W as WebhookValidationError, _ as DmarcResult, a as isDownloadExpired, b as ParsedStatus, c as parseWebhookEvent, d as WEBHOOK_VERSION, f as validateEmailAuth, g as DmarcPolicy, h as DkimResult, i as handleWebhook, j as PRIMITIVE_SIGNATURE_HEADER, k as LEGACY_SIGNATURE_HEADER, l as receive, m as AuthVerdict, n as decodeRawEmail, o as isEmailReceivedEvent, p as AuthConfidence, r as getDownloadTimeRemaining, s as isRawIncluded, t as confirmedHeaders, u as verifyRawEmailDownload, v as EventType, w as STANDARD_WEBHOOK_SIGNATURE_HEADER, x as SpfResult, y as ForwardVerdict, z as PrimitiveWebhookError } from "./webhook-zkN4wUTs.js";
|
|
4
4
|
//#region src/index.ts
|
|
5
5
|
const primitive = {
|
|
@@ -566,9 +566,9 @@ export function createOperationCommand(operation) {
|
|
|
566
566
|
// `sdkName` for the operation. Operations without an entry fall
|
|
567
567
|
// back to no hint (silent empty array, same as before).
|
|
568
568
|
const EMPTY_RESULT_HINTS = {
|
|
569
|
-
listDeliveries: "(no results)
|
|
569
|
+
listDeliveries: "(no results) No webhook deliveries logged yet. If you have an endpoint configured but expected to see test fires here: test deliveries from `primitive endpoints:test-endpoint` are NOT logged in this list, they're synchronous and visible only in the test-endpoint command's response. Real deliveries are logged when an inbound `email.received` event fans out to your endpoints. If you have no endpoints, run `primitive endpoints:list-endpoints` to check.",
|
|
570
570
|
listEndpoints: "(no results) No webhook endpoints configured. Add one with `primitive endpoints:create-endpoint --url <your-url>`.",
|
|
571
|
-
listEmails: "(no results) No inbound emails received yet on this account.",
|
|
571
|
+
listEmails: "(no results) No inbound emails received yet on this account. Send one to a verified domain to populate this list. For a compact view, prefer `primitive emails:latest`.",
|
|
572
572
|
listDomains: "(no results) No domains on this account. Add one with `primitive domains:add-domain --domain <yourdomain.example>`.",
|
|
573
573
|
listFilters: "(no results) No filter rules configured.",
|
|
574
574
|
};
|
|
@@ -9,7 +9,7 @@ export const openapiDocument = {
|
|
|
9
9
|
"info": {
|
|
10
10
|
"title": "Primitive API",
|
|
11
11
|
"version": "1.0.0",
|
|
12
|
-
"description": "The Primitive API lets you manage domains, emails, webhook endpoints,\nfilters, and account settings programmatically.\n\n## Authentication\n\nAll endpoints require a Bearer token in the `Authorization` header:\n\n```\nAuthorization: Bearer prim_<your_api_key>\n```\n\nAPI keys are org-scoped. Create and manage them in your dashboard\nunder Settings > API Keys.\n\n## Rate Limiting\n\nThe API enforces a sliding window rate limit of **120 requests per\n60 seconds** per organization. When exceeded, the API returns `429`\nwith a `Retry-After` header indicating how many seconds to wait.\n\n## Pagination\n\nList endpoints use cursor-based pagination. Responses include a\n`meta` object with `total`, `limit`, and `cursor` fields. Pass the\n`cursor` value as a query parameter to fetch the next page. When\n`cursor` is `null`, there are no more results.\n\n## Response Format\n\nAll responses use a consistent envelope:\n\n```json\n{\n \"success\": true,\n \"data\": { ... },\n \"meta\": { \"total\": 42, \"limit\": 50, \"cursor\": \"...\" }\n}\n```\n\nErrors follow the same pattern:\n\n```json\n{\n \"success\": false,\n \"error\": { \"code\": \"not_found\", \"message\": \"Email not found\" }\n}\n```\n",
|
|
12
|
+
"description": "The Primitive API lets you manage domains, emails, webhook endpoints,\nfilters, and account settings programmatically.\n\n## Authentication\n\nAll endpoints require a Bearer token in the `Authorization` header:\n\n```\nAuthorization: Bearer prim_<your_api_key>\n```\n\nAPI keys are org-scoped. Create and manage them in your dashboard\nunder Settings > API Keys.\n\n## Rate Limiting\n\nThe API enforces a sliding window rate limit of **120 requests per\n60 seconds** per organization. When exceeded, the API returns `429`\nwith a `Retry-After` header indicating how many seconds to wait.\n\n## Pagination\n\nList endpoints use cursor-based pagination. Responses include a\n`meta` object with `total`, `limit`, and `cursor` fields. Pass the\n`cursor` value as a query parameter to fetch the next page. When\n`cursor` is `null`, there are no more results.\n\n## Response Format\n\nAll responses use a consistent envelope:\n\n```json\n{\n \"success\": true,\n \"data\": { ... },\n \"meta\": { \"total\": 42, \"limit\": 50, \"cursor\": \"...\" }\n}\n```\n\nErrors follow the same pattern:\n\n```json\n{\n \"success\": false,\n \"error\": { \"code\": \"not_found\", \"message\": \"Email not found\" }\n}\n```\n\n## Webhook signing\n\nOutbound webhook deliveries (configured via the `endpoints` API)\nare signed so receivers can verify they came from Primitive and\nhave not been tampered with in transit. The signing scheme is\ndeliberately simple so it can be reimplemented in any language\nin a few lines. The Node SDK's `verifyWebhookSignature` helper\nis the reference implementation; the wire details below let you\nwrite a verifier in Python, Go, Ruby, etc. without reading our\nsource.\n\n**Header**: `Primitive-Signature: t=<unix-seconds>,v1=<hex>`\n\nA legacy `MyMX-Signature` header is also sent on every delivery\nwith the same value, retained for back-compatibility with\nintegrations written before the rename. New code should read\n`Primitive-Signature`.\n\n**Signed string**: `${timestamp}.${rawBody}` where `timestamp`\nis the Unix-seconds integer from the `t=` parameter and\n`rawBody` is the exact bytes of the HTTP request body BEFORE\nany JSON decoding. Verify against the raw body, not a\nre-serialized parse, or you will silently mismatch on\ninsignificant whitespace.\n\n**Signature**: HMAC-SHA256 of the signed string, hex-encoded\n(lowercase). Use the account's webhook secret as the HMAC key,\nas a UTF-8 byte sequence.\n\n**Secret**: returned by `GET /account/webhook-secret`. The\nstring looks base64-shaped (e.g. `XNHBBW8VqoBjRfNs1tkZj11jTk...`)\nbut is NOT base64; use it AS-IS as a UTF-8 string for the HMAC\nkey. Base64-decoding before HMAC will silently produce\nmismatched signatures.\n\n**Tolerance**: by convention, reject deliveries whose `t=`\ntimestamp is more than 5 minutes off your wall-clock to defend\nagainst replay attacks. The Node SDK's helper enforces this by\ndefault.\n\n**Verification recipe** (any language):\n\n```\n1. Read the raw HTTP body (do not parse).\n2. Read `Primitive-Signature: t=<ts>,v1=<sig>`.\n3. Reject if abs(now - ts) > 300 seconds.\n4. expected = HMAC_SHA256_hex(secret_utf8, f\"{ts}.{rawBody}\")\n5. Constant-time compare expected to sig. Reject if not equal.\n```\n\nFor Node, use `verifyWebhookSignature` from\n`@primitivedotdev/sdk/webhook` (or the higher-level\n`handleWebhook` helper if you want a one-liner). For other\nlanguages, the recipe above is everything you need.\n\nTest deliveries: `POST /endpoints/{id}/test` triggers a fake\ndelivery to your endpoint URL, signed with your real account\nsecret, so you can confirm verification end-to-end without\nneeding real inbound mail. The test response carries the exact\n`signature` header value sent on the wire so you can compare\nstrings directly.\n",
|
|
13
13
|
"contact": {
|
|
14
14
|
"name": "Primitive",
|
|
15
15
|
"url": "https://primitive.dev"
|
|
@@ -193,7 +193,7 @@ export const openapiDocument = {
|
|
|
193
193
|
"get": {
|
|
194
194
|
"operationId": "getWebhookSecret",
|
|
195
195
|
"summary": "Get webhook signing secret",
|
|
196
|
-
"description": "Returns the webhook signing secret for your account. If no
|
|
196
|
+
"description": "Returns the webhook signing secret for your account. If no\nsecret exists yet, one is generated automatically on first\naccess.\n\nSigning is account-scoped, not per-endpoint. Every webhook\ndelivery from any of your registered endpoints is signed\nwith this single secret. Rotate via\n`POST /account/webhook-secret/rotate`.\n\n**Secret format**: the returned string looks base64-shaped\n(e.g. `XNHBBW8VqoBjRfNs1tkZj11jTk...`) but is NOT base64.\nUse it AS-IS as a UTF-8 string when computing HMAC over a\ndelivery body. Base64-decoding before HMAC will silently\nproduce mismatched signatures.\n\nSee the API-level \"Webhook signing\" section for the full\nwire format (header name, signed string shape, hash algo,\ntolerance) including a language-agnostic verification\nrecipe.\n",
|
|
197
197
|
"tags": [
|
|
198
198
|
"Account"
|
|
199
199
|
],
|
|
@@ -533,7 +533,7 @@ export const openapiDocument = {
|
|
|
533
533
|
"get": {
|
|
534
534
|
"operationId": "listEmails",
|
|
535
535
|
"summary": "List inbound emails",
|
|
536
|
-
"description": "Returns a paginated list of INBOUND emails received at your\nverified domains. Outbound messages sent via /send-mail are
|
|
536
|
+
"description": "Returns a paginated list of INBOUND emails received at your\nverified domains. Outbound messages sent via /send-mail are\nnot included; this endpoint is the inbox view, not a\nunified send/receive history.\n\nSupports filtering by domain, status, date range, and\nfree-text search across subject, sender, and recipient\nfields.\n\nFor a compact text-table summary of the most recent N\ninbounds (no filters, no cursor pagination), the CLI ships\n`primitive emails:latest` as a one-line-per-email shortcut.\nIt's TTY-aware so id columns are full UUIDs when piped, and\na `--json` flag returns the same envelope this endpoint\ndoes. Use whichever fits the call site.\n",
|
|
537
537
|
"tags": [
|
|
538
538
|
"Emails"
|
|
539
539
|
],
|
|
@@ -1080,7 +1080,7 @@ export const openapiDocument = {
|
|
|
1080
1080
|
"post": {
|
|
1081
1081
|
"operationId": "createEndpoint",
|
|
1082
1082
|
"summary": "Create a webhook endpoint",
|
|
1083
|
-
"description": "Creates a new webhook endpoint. If a deactivated endpoint
|
|
1083
|
+
"description": "Creates a new webhook endpoint. If a deactivated endpoint\nwith the same URL and domain exists, it is reactivated\ninstead. Subject to plan limits on the number of active\nendpoints.\n\n**Signing is account-scoped, not per-endpoint.** This call\ndoes not return any signing material; every endpoint on the\naccount uses the same webhook secret, fetched via\n`GET /account/webhook-secret`. See the API-level \"Webhook\nsigning\" section for the full wire format (header name,\nsigned string, hash algo, secret format, tolerance) and a\nlanguage-agnostic verification recipe.\n\nAfter creating the endpoint, fire a test delivery against\nit via `POST /endpoints/{id}/test` to confirm your verifier\naccepts the signature.\n",
|
|
1084
1084
|
"tags": [
|
|
1085
1085
|
"Endpoints"
|
|
1086
1086
|
],
|
|
@@ -152,7 +152,7 @@ export const operationManifest = [
|
|
|
152
152
|
"binaryResponse": false,
|
|
153
153
|
"bodyRequired": false,
|
|
154
154
|
"command": "get-webhook-secret",
|
|
155
|
-
"description": "Returns the webhook signing secret for your account. If no
|
|
155
|
+
"description": "Returns the webhook signing secret for your account. If no\nsecret exists yet, one is generated automatically on first\naccess.\n\nSigning is account-scoped, not per-endpoint. Every webhook\ndelivery from any of your registered endpoints is signed\nwith this single secret. Rotate via\n`POST /account/webhook-secret/rotate`.\n\n**Secret format**: the returned string looks base64-shaped\n(e.g. `XNHBBW8VqoBjRfNs1tkZj11jTk...`) but is NOT base64.\nUse it AS-IS as a UTF-8 string when computing HMAC over a\ndelivery body. Base64-decoding before HMAC will silently\nproduce mismatched signatures.\n\nSee the API-level \"Webhook signing\" section for the full\nwire format (header name, signed string shape, hash algo,\ntolerance) including a language-agnostic verification\nrecipe.\n",
|
|
156
156
|
"hasJsonBody": false,
|
|
157
157
|
"method": "GET",
|
|
158
158
|
"operationId": "getWebhookSecret",
|
|
@@ -1071,7 +1071,7 @@ export const operationManifest = [
|
|
|
1071
1071
|
"binaryResponse": false,
|
|
1072
1072
|
"bodyRequired": false,
|
|
1073
1073
|
"command": "list-emails",
|
|
1074
|
-
"description": "Returns a paginated list of INBOUND emails received at your\nverified domains. Outbound messages sent via /send-mail are
|
|
1074
|
+
"description": "Returns a paginated list of INBOUND emails received at your\nverified domains. Outbound messages sent via /send-mail are\nnot included; this endpoint is the inbox view, not a\nunified send/receive history.\n\nSupports filtering by domain, status, date range, and\nfree-text search across subject, sender, and recipient\nfields.\n\nFor a compact text-table summary of the most recent N\ninbounds (no filters, no cursor pagination), the CLI ships\n`primitive emails:latest` as a one-line-per-email shortcut.\nIt's TTY-aware so id columns are full UUIDs when piped, and\na `--json` flag returns the same envelope this endpoint\ndoes. Use whichever fits the call site.\n",
|
|
1075
1075
|
"hasJsonBody": false,
|
|
1076
1076
|
"method": "GET",
|
|
1077
1077
|
"operationId": "listEmails",
|
|
@@ -1286,7 +1286,7 @@ export const operationManifest = [
|
|
|
1286
1286
|
"binaryResponse": false,
|
|
1287
1287
|
"bodyRequired": true,
|
|
1288
1288
|
"command": "create-endpoint",
|
|
1289
|
-
"description": "Creates a new webhook endpoint. If a deactivated endpoint
|
|
1289
|
+
"description": "Creates a new webhook endpoint. If a deactivated endpoint\nwith the same URL and domain exists, it is reactivated\ninstead. Subject to plan limits on the number of active\nendpoints.\n\n**Signing is account-scoped, not per-endpoint.** This call\ndoes not return any signing material; every endpoint on the\naccount uses the same webhook secret, fetched via\n`GET /account/webhook-secret`. See the API-level \"Webhook\nsigning\" section for the full wire format (header name,\nsigned string, hash algo, secret format, tolerance) and a\nlanguage-agnostic verification recipe.\n\nAfter creating the endpoint, fire a test delivery against\nit via `POST /endpoints/{id}/test` to confirm your verifier\naccepts the signature.\n",
|
|
1290
1290
|
"hasJsonBody": true,
|
|
1291
1291
|
"method": "POST",
|
|
1292
1292
|
"operationId": "createEndpoint",
|
package/oclif.manifest.json
CHANGED
|
@@ -317,7 +317,7 @@
|
|
|
317
317
|
"account:get-webhook-secret": {
|
|
318
318
|
"aliases": [],
|
|
319
319
|
"args": {},
|
|
320
|
-
"description": "Returns the webhook signing secret for your account. If no
|
|
320
|
+
"description": "Returns the webhook signing secret for your account. If no\nsecret exists yet, one is generated automatically on first\naccess.\n\nSigning is account-scoped, not per-endpoint. Every webhook\ndelivery from any of your registered endpoints is signed\nwith this single secret. Rotate via\n`POST /account/webhook-secret/rotate`.\n\n**Secret format**: the returned string looks base64-shaped\n(e.g. `XNHBBW8VqoBjRfNs1tkZj11jTk...`) but is NOT base64.\nUse it AS-IS as a UTF-8 string when computing HMAC over a\ndelivery body. Base64-decoding before HMAC will silently\nproduce mismatched signatures.\n\nSee the API-level \"Webhook signing\" section for the full\nwire format (header name, signed string shape, hash algo,\ntolerance) including a language-agnostic verification\nrecipe.\n",
|
|
321
321
|
"flags": {
|
|
322
322
|
"api-key": {
|
|
323
323
|
"description": "Primitive API key (defaults to PRIMITIVE_API_KEY)",
|
|
@@ -902,7 +902,7 @@
|
|
|
902
902
|
"emails:list-emails": {
|
|
903
903
|
"aliases": [],
|
|
904
904
|
"args": {},
|
|
905
|
-
"description": "Returns a paginated list of INBOUND emails received at your\nverified domains. Outbound messages sent via /send-mail are
|
|
905
|
+
"description": "Returns a paginated list of INBOUND emails received at your\nverified domains. Outbound messages sent via /send-mail are\nnot included; this endpoint is the inbox view, not a\nunified send/receive history.\n\nSupports filtering by domain, status, date range, and\nfree-text search across subject, sender, and recipient\nfields.\n\nFor a compact text-table summary of the most recent N\ninbounds (no filters, no cursor pagination), the CLI ships\n`primitive emails:latest` as a one-line-per-email shortcut.\nIt's TTY-aware so id columns are full UUIDs when piped, and\na `--json` flag returns the same envelope this endpoint\ndoes. Use whichever fits the call site.\n",
|
|
906
906
|
"flags": {
|
|
907
907
|
"api-key": {
|
|
908
908
|
"description": "Primitive API key (defaults to PRIMITIVE_API_KEY)",
|
|
@@ -1030,7 +1030,7 @@
|
|
|
1030
1030
|
"endpoints:create-endpoint": {
|
|
1031
1031
|
"aliases": [],
|
|
1032
1032
|
"args": {},
|
|
1033
|
-
"description": "Creates a new webhook endpoint. If a deactivated endpoint
|
|
1033
|
+
"description": "Creates a new webhook endpoint. If a deactivated endpoint\nwith the same URL and domain exists, it is reactivated\ninstead. Subject to plan limits on the number of active\nendpoints.\n\n**Signing is account-scoped, not per-endpoint.** This call\ndoes not return any signing material; every endpoint on the\naccount uses the same webhook secret, fetched via\n`GET /account/webhook-secret`. See the API-level \"Webhook\nsigning\" section for the full wire format (header name,\nsigned string, hash algo, secret format, tolerance) and a\nlanguage-agnostic verification recipe.\n\nAfter creating the endpoint, fire a test delivery against\nit via `POST /endpoints/{id}/test` to confirm your verifier\naccepts the signature.\n\n\nBody fields requiring --raw-body JSON (these are not exposed as flags):\n rules object Endpoint-specific filtering rules\n(* = required. Scalar body fields are exposed as individual --flag-name flags; see FLAGS above.)",
|
|
1034
1034
|
"flags": {
|
|
1035
1035
|
"api-key": {
|
|
1036
1036
|
"description": "Primitive API key (defaults to PRIMITIVE_API_KEY)",
|
|
@@ -1951,5 +1951,5 @@
|
|
|
1951
1951
|
"enableJsonFlag": false
|
|
1952
1952
|
}
|
|
1953
1953
|
},
|
|
1954
|
-
"version": "0.
|
|
1954
|
+
"version": "0.17.0"
|
|
1955
1955
|
}
|