@primitivedotdev/sdk 0.14.0 → 0.15.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.
@@ -147,7 +147,30 @@ export const deleteEmail = (options) => (options.client ?? client).delete({
147
147
  ...options
148
148
  });
149
149
  /**
150
- * Get email details
150
+ * Get inbound email by id
151
+ *
152
+ * Returns the full record for an inbound email received at one
153
+ * of your verified domains, including the parsed text and HTML
154
+ * bodies, threading metadata, SMTP envelope detail, webhook
155
+ * delivery state, and a `replies` array for any outbound sends
156
+ * recorded as replies to this inbound.
157
+ *
158
+ * For listing inbound emails (with cursor pagination, status
159
+ * and date filters, and free-text search), use
160
+ * `/emails`. Outbound (sent) email records are NOT returned
161
+ * here; use `/sent-emails/{id}` for those.
162
+ *
163
+ * The response carries four sender-shaped fields whose
164
+ * meanings overlap. `from_email` is the canonical "who sent
165
+ * this" field for most use cases (parsed bare address from
166
+ * the `From:` header, with a `sender` fallback). `from_header`
167
+ * is the raw header including any display name. `sender` and
168
+ * `smtp_mail_from` both carry the SMTP envelope MAIL FROM
169
+ * (return-path) and are equal by construction; `sender` is
170
+ * the older field name retained for compatibility. See
171
+ * `primitive describe emails:get-email | jq '.responseSchema.properties'`
172
+ * for per-field detail.
173
+ *
151
174
  */
152
175
  export const getEmail = (options) => (options.client ?? client).get({
153
176
  security: [{ scheme: 'bearer', type: 'http' }],
@@ -1,2 +1,2 @@
1
- import { $ as AddDomainError, $n as ListEndpointsError, $r as StorageStats, $t as EmailDetailReply, A as getSentEmail, Ai as UpdateFilterResponse, An as GetStorageStatsResponses, Ar as ReplyToEmailResponses, At as DeleteEndpointErrors, B as replayEmailWebhooks, Bi as ClientOptions$1, Bn as ListDeliveriesResponse, Br as SendEmailResponse, Bt as Domain, C as deleteEndpoint, Ci as UpdateEndpointInput, Cn as GetSentEmailErrors, Cr as ReplayEmailWebhooksResponse, Ct as DeleteEmailData, D as getAccount, Di as UpdateFilterError, Dn as GetStorageStatsError, Dr as ReplyToEmailError, Dt as DeleteEmailResponses, E as downloadRawEmail, Ei as UpdateFilterData, En as GetStorageStatsData, Er as ReplyToEmailData, Et as DeleteEmailResponse, F as listEmails, Fi as VerifyDomainErrors, Fn as GetWebhookSecretResponses, Fr as RotateWebhookSecretResponse, Ft as DeleteFilterErrors, G as updateAccount, Gi as RequestResult, Gn as ListDomainsResponse, Gr as SendPermissionAnyRecipient, Gt as DownloadAttachmentsResponse, H as rotateWebhookSecret, Hi as CreateClientConfig, Hn as ListDomainsData, Hr as SendMailInput, Ht as DownloadAttachmentsData, I as listEndpoints, Ii as VerifyDomainResponse, In as Limit, Ir as RotateWebhookSecretResponses, It as DeleteFilterResponse, J as updateFilter, Jn as ListEmailsError, Jr as SendPermissionYourDomain, Jt as DownloadRawEmailError, K as updateDomain, Ki as ResponseStyle, Kn as ListDomainsResponses, Kr as SendPermissionManagedZone, Kt as DownloadAttachmentsResponses, L as listFilters, Li as VerifyDomainResponses, Ln as ListDeliveriesData, Lr as SendEmailData, Lt as DeleteFilterResponses, M as getWebhookSecret, Mi as VerifiedDomain, Mn as GetWebhookSecretError, Mr as RotateWebhookSecretData, Mt as DeleteEndpointResponses, N as listDeliveries, Ni as VerifyDomainData, Nn as GetWebhookSecretErrors, Nr as RotateWebhookSecretError, Nt as DeleteFilterData, O as getEmail, Oi as UpdateFilterErrors, On as GetStorageStatsErrors, Or as ReplyToEmailErrors, Ot as DeleteEndpointData, P as listDomains, Pi as VerifyDomainError, Pn as GetWebhookSecretResponse, Pr as RotateWebhookSecretErrors, Pt as DeleteFilterError, Q as AddDomainData, Qn as ListEndpointsData, Qr as SentEmailSummary, Qt as EmailDetail, R as listSentEmails, Ri as WebhookSecret, Rn as ListDeliveriesError, Rr as SendEmailError, Rt as DeliveryStatus, S as deleteEmail, Si as UpdateEndpointErrors, Sn as GetSentEmailError, Sr as ReplayEmailWebhooksErrors, St as DeleteDomainResponses, T as downloadAttachments, Ti as UpdateEndpointResponses, Tn as GetSentEmailResponses, Tr as ReplayResult, Tt as DeleteEmailErrors, U as sendEmail, Ui as Options$1, Un as ListDomainsError, Ur as SendMailResult, Ut as DownloadAttachmentsError, V as replyToEmail, Vi as Config, Vn as ListDeliveriesResponses, Vr as SendEmailResponses, Vt as DomainVerifyResult, W as testEndpoint, Wi as RequestOptions, Wn as ListDomainsErrors, Wr as SendPermissionAddress, Wt as DownloadAttachmentsErrors, X as Account, Xn as ListEmailsResponse, Xr as SentEmailDetail, Xt as DownloadRawEmailResponse, Y as verifyDomain, Yn as ListEmailsErrors, Yr as SendPermissionsMeta, Yt as DownloadRawEmailErrors, Z as AccountUpdated, Zn as ListEmailsResponses, Zr as SentEmailStatus, Zt as DownloadRawEmailResponses, _ as Options, _i as UpdateDomainInput, _n as GetSendPermissionsError, _r as ReplayDeliveryErrors, _t as Cursor, a as PrimitiveApiError, ai as TestEndpointResponses, an as GateFix, ar as ListFiltersError, at as CreateEndpointData, b as createFilter, bi as UpdateEndpointData, bn as GetSendPermissionsResponses, br as ReplayEmailWebhooksData, bt as DeleteDomainErrors, c as PrimitiveClientOptions, ci as UpdateAccountData, cn as GetAccountErrors, cr as ListFiltersResponses, ct as CreateEndpointInput, d as SendResult, di as UpdateAccountInput, dn as GetEmailData, dr as ListSentEmailsErrors, dt as CreateFilterData, ei as SuccessEnvelope, en as EmailSummary, er as ListEndpointsErrors, et as AddDomainErrors, f as SendThreadInput, fi as UpdateAccountResponse, fn as GetEmailError, fr as ListSentEmailsResponse, ft as CreateFilterError, g as operations, gi as UpdateDomainErrors, gn as GetSendPermissionsData, gr as ReplayDeliveryError, gt as CreateFilterResponses, h as createPrimitiveClient, hi as UpdateDomainError, hn as GetEmailResponses, hr as ReplayDeliveryData, ht as CreateFilterResponse, i as PrimitiveApiClientOptions, ii as TestEndpointResponse, in as GateDenial, ir as ListFiltersData, it as ClientOptions, j as getStorageStats, ji as UpdateFilterResponses, jn as GetWebhookSecretData, jr as ResourceId, jt as DeleteEndpointResponse, k as getSendPermissions, ki as UpdateFilterInput, kn as GetStorageStatsResponse, kr as ReplyToEmailResponse, kt as DeleteEndpointError, l as ReplyInput, li as UpdateAccountError, ln as GetAccountResponse, lr as ListSentEmailsData, lt as CreateEndpointResponse, m as createPrimitiveApiClient, mi as UpdateDomainData, mn as GetEmailResponse, mr as PaginationMeta, mt as CreateFilterInput, n as ForwardInput, ni as TestEndpointError, nn as ErrorResponse, nr as ListEndpointsResponses, nt as AddDomainResponse, o as PrimitiveApiErrorDetails, oi as TestResult, on as GetAccountData, or as ListFiltersErrors, ot as CreateEndpointError, p as client, pi as UpdateAccountResponses, pn as GetEmailErrors, pr as ListSentEmailsResponses, pt as CreateFilterErrors, q as updateEndpoint, qi as Auth, qn as ListEmailsData, qr as SendPermissionRule, qt as DownloadRawEmailData, r as PrimitiveApiClient, ri as TestEndpointErrors, rn as Filter, rr as ListEnvelope, rt as AddDomainResponses, s as PrimitiveClient, si as UnverifiedDomain, sn as GetAccountError, sr as ListFiltersResponse, st as CreateEndpointErrors, t as DEFAULT_BASE_URL, ti as TestEndpointData, tn as Endpoint, tr as ListEndpointsResponse, tt as AddDomainInput, u as SendInput, ui as UpdateAccountErrors, un as GetAccountResponses, ur as ListSentEmailsError, ut as CreateEndpointResponses, v as addDomain, vi as UpdateDomainResponse, vn as GetSendPermissionsErrors, vr as ReplayDeliveryResponse, vt as DeleteDomainData, w as deleteFilter, wi as UpdateEndpointResponse, wn as GetSentEmailResponse, wr as ReplayEmailWebhooksResponses, wt as DeleteEmailError, x as deleteDomain, xi as UpdateEndpointError, xn as GetSentEmailData, xr as ReplayEmailWebhooksError, xt as DeleteDomainResponse, y as createEndpoint, yi as UpdateDomainResponses, yn as GetSendPermissionsResponse, yr as ReplayDeliveryResponses, yt as DeleteDomainError, z as replayDelivery, zi as Client, zn as ListDeliveriesErrors, zr as SendEmailErrors, zt as DeliverySummary } from "../index-Cts9r1sL.js";
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, Domain, DomainVerifyResult, DownloadAttachmentsData, DownloadAttachmentsError, DownloadAttachmentsErrors, DownloadAttachmentsResponse, DownloadAttachmentsResponses, DownloadRawEmailData, DownloadRawEmailError, DownloadRawEmailErrors, DownloadRawEmailResponse, DownloadRawEmailResponses, EmailDetail, EmailDetailReply, EmailSummary, 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, 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 };
1
+ import { $ as AddDomainError, $n as ListEmailsResponses, $r as SentEmailStatus, $t as EmailDetailReply, A as getSentEmail, Ai as UpdateFilterErrors, An as GetStorageStatsErrors, Ar as ReplyToEmailErrors, At as DeleteEndpointErrors, B as replayEmailWebhooks, Bi as WebhookSecret, Bn as ListDeliveriesError, Br as SendEmailError, Bt as Domain, C as deleteEndpoint, Ci as UpdateEndpointError, Cn as GetSentEmailData, Cr as ReplayEmailWebhooksError, Ct as DeleteEmailData, D as getAccount, Di as UpdateEndpointResponses, Dn as GetSentEmailResponses, Dr as ReplayResult, Dt as DeleteEmailResponses, E as downloadRawEmail, Ei as UpdateEndpointResponse, En as GetSentEmailResponse, Er as ReplayEmailWebhooksResponses, Et as DeleteEmailResponse, F as listEmails, Fi as VerifyDomainData, Fn as GetWebhookSecretErrors, Fr as RotateWebhookSecretError, Ft as DeleteFilterErrors, G as updateAccount, Gi as Options$1, Gn as ListDomainsError, Gr as SendMailResult, Gt as DownloadAttachmentsResponse, H as rotateWebhookSecret, Hi as ClientOptions$1, Hn as ListDeliveriesResponse, Hr as SendEmailResponse, Ht as DownloadAttachmentsData, I as listEndpoints, Ii as VerifyDomainError, In as GetWebhookSecretResponse, Ir as RotateWebhookSecretErrors, It as DeleteFilterResponse, J as updateFilter, Ji as ResponseStyle, Jn as ListDomainsResponses, Jr as SendPermissionManagedZone, Jt as DownloadRawEmailError, K as updateDomain, Ki as RequestOptions, Kn as ListDomainsErrors, Kr as SendPermissionAddress, Kt as DownloadAttachmentsResponses, L as listFilters, Li as VerifyDomainErrors, Ln as GetWebhookSecretResponses, Lr as RotateWebhookSecretResponse, Lt as DeleteFilterResponses, M as getWebhookSecret, Mi as UpdateFilterResponse, Mn as GetStorageStatsResponses, Mr as ReplyToEmailResponses, Mt as DeleteEndpointResponses, N as listDeliveries, Ni as UpdateFilterResponses, Nn as GetWebhookSecretData, Nr as ResourceId, Nt as DeleteFilterData, O as getEmail, Oi as UpdateFilterData, On as GetStorageStatsData, Or as ReplyToEmailData, Ot as DeleteEndpointData, P as listDomains, Pi as VerifiedDomain, Pn as GetWebhookSecretError, Pr as RotateWebhookSecretData, Pt as DeleteFilterError, Q as AddDomainData, Qn as ListEmailsResponse, Qr as SentEmailDetail, Qt as EmailDetail, R as listSentEmails, Ri as VerifyDomainResponse, Rn as Limit, Rr as RotateWebhookSecretResponses, Rt as DeliveryStatus, S as deleteEmail, Si as UpdateEndpointData, Sn as GetSendPermissionsResponses, Sr as ReplayEmailWebhooksData, St as DeleteDomainResponses, T as downloadAttachments, Ti as UpdateEndpointInput, Tn as GetSentEmailErrors, Tr as ReplayEmailWebhooksResponse, Tt as DeleteEmailErrors, U as sendEmail, Ui as Config, Un as ListDeliveriesResponses, Ur as SendEmailResponses, Ut as DownloadAttachmentsError, V as replyToEmail, Vi as Client, Vn as ListDeliveriesErrors, Vr as SendEmailErrors, Vt as DomainVerifyResult, W as testEndpoint, Wi as CreateClientConfig, Wn as ListDomainsData, Wr as SendMailInput, Wt as DownloadAttachmentsErrors, X as Account, Xn as ListEmailsError, Xr as SendPermissionYourDomain, Xt as DownloadRawEmailResponse, Y as verifyDomain, Yi as Auth, Yn as ListEmailsData, Yr as SendPermissionRule, Yt as DownloadRawEmailErrors, Z as AccountUpdated, Zn as ListEmailsErrors, Zr as SendPermissionsMeta, Zt as DownloadRawEmailResponses, _ as Options, _i as UpdateDomainError, _n as GetEmailResponses, _r as ReplayDeliveryData, _t as Cursor, a as PrimitiveApiError, ai as TestEndpointErrors, an as Filter, ar as ListEnvelope, at as CreateEndpointData, b as createFilter, bi as UpdateDomainResponse, bn as GetSendPermissionsErrors, br as ReplayDeliveryResponse, bt as DeleteDomainErrors, c as PrimitiveClientOptions, ci as TestResult, cn as GetAccountData, cr as ListFiltersErrors, ct as CreateEndpointInput, d as SendResult, di as UpdateAccountError, dn as GetAccountResponse, dr as ListSentEmailsData, dt as CreateFilterData, ei as SentEmailSummary, en as EmailStatus, er as ListEndpointsData, et as AddDomainErrors, f as SendThreadInput, fi as UpdateAccountErrors, fn as GetAccountResponses, fr as ListSentEmailsError, ft as CreateFilterError, g as operations, gi as UpdateDomainData, gn as GetEmailResponse, gr as PaginationMeta, gt as CreateFilterResponses, h as createPrimitiveClient, hi as UpdateAccountResponses, hn as GetEmailErrors, hr as ListSentEmailsResponses, ht as CreateFilterResponse, i as PrimitiveApiClientOptions, ii as TestEndpointError, in as ErrorResponse, ir as ListEndpointsResponses, it as ClientOptions, j as getStorageStats, ji as UpdateFilterInput, jn as GetStorageStatsResponse, jr as ReplyToEmailResponse, jt as DeleteEndpointResponse, k as getSendPermissions, ki as UpdateFilterError, kn as GetStorageStatsError, kr as ReplyToEmailError, kt as DeleteEndpointError, l as ReplyInput, li as UnverifiedDomain, ln as GetAccountError, lr as ListFiltersResponse, lt as CreateEndpointResponse, m as createPrimitiveApiClient, mi as UpdateAccountResponse, mn as GetEmailError, mr as ListSentEmailsResponse, mt as CreateFilterInput, n as ForwardInput, ni as SuccessEnvelope, nn as EmailWebhookStatus, nr as ListEndpointsErrors, nt as AddDomainResponse, o as PrimitiveApiErrorDetails, oi as TestEndpointResponse, on as GateDenial, or as ListFiltersData, ot as CreateEndpointError, p as client, pi as UpdateAccountInput, pn as GetEmailData, pr as ListSentEmailsErrors, pt as CreateFilterErrors, q as updateEndpoint, qi as RequestResult, qn as ListDomainsResponse, qr as SendPermissionAnyRecipient, qt as DownloadRawEmailData, r as PrimitiveApiClient, ri as TestEndpointData, rn as Endpoint, rr as ListEndpointsResponse, rt as AddDomainResponses, s as PrimitiveClient, si as TestEndpointResponses, sn as GateFix, sr as ListFiltersError, st as CreateEndpointErrors, t as DEFAULT_BASE_URL, ti as StorageStats, tn as EmailSummary, tr as ListEndpointsError, tt as AddDomainInput, u as SendInput, ui as UpdateAccountData, un as GetAccountErrors, ur as ListFiltersResponses, ut as CreateEndpointResponses, v as addDomain, vi as UpdateDomainErrors, vn as GetSendPermissionsData, vr as ReplayDeliveryError, vt as DeleteDomainData, w as deleteFilter, wi as UpdateEndpointErrors, wn as GetSentEmailError, wr as ReplayEmailWebhooksErrors, wt as DeleteEmailError, x as deleteDomain, xi as UpdateDomainResponses, xn as GetSendPermissionsResponse, xr as ReplayDeliveryResponses, xt as DeleteDomainResponse, y as createEndpoint, yi as UpdateDomainInput, yn as GetSendPermissionsError, yr as ReplayDeliveryErrors, yt as DeleteDomainError, z as replayDelivery, zi as VerifyDomainResponses, zn as ListDeliveriesData, zr as SendEmailData, zt as DeliverySummary } from "../index-DEY4h3MZ.js";
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, 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, 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 };
@@ -829,7 +829,30 @@ const deleteEmail = (options) => (options.client ?? client$1).delete({
829
829
  ...options
830
830
  });
831
831
  /**
832
- * Get email details
832
+ * Get inbound email by id
833
+ *
834
+ * Returns the full record for an inbound email received at one
835
+ * of your verified domains, including the parsed text and HTML
836
+ * bodies, threading metadata, SMTP envelope detail, webhook
837
+ * delivery state, and a `replies` array for any outbound sends
838
+ * recorded as replies to this inbound.
839
+ *
840
+ * For listing inbound emails (with cursor pagination, status
841
+ * and date filters, and free-text search), use
842
+ * `/emails`. Outbound (sent) email records are NOT returned
843
+ * here; use `/sent-emails/{id}` for those.
844
+ *
845
+ * The response carries four sender-shaped fields whose
846
+ * meanings overlap. `from_email` is the canonical "who sent
847
+ * this" field for most use cases (parsed bare address from
848
+ * the `From:` header, with a `sender` fallback). `from_header`
849
+ * is the raw header including any display name. `sender` and
850
+ * `smtp_mail_from` both carry the SMTP envelope MAIL FROM
851
+ * (return-path) and are equal by construction; `sender` is
852
+ * the older field name retained for compatibility. See
853
+ * `primitive describe emails:get-email | jq '.responseSchema.properties'`
854
+ * for per-field detail.
855
+ *
833
856
  */
834
857
  const getEmail = (options) => (options.client ?? client$1).get({
835
858
  security: [{
@@ -559,7 +559,7 @@ type EmailSummary = {
559
559
  message_id?: string | null;
560
560
  domain_id?: string | null;
561
561
  org_id?: string | null;
562
- status: 'pending' | 'accepted' | 'completed' | 'rejected';
562
+ status: EmailStatus;
563
563
  /**
564
564
  * SMTP envelope sender (return-path) the inbound mail server
565
565
  * accepted. For most legitimate mail this equals the bare
@@ -580,7 +580,7 @@ type EmailSummary = {
580
580
  created_at: string;
581
581
  received_at: string;
582
582
  raw_size_bytes?: number | null;
583
- webhook_status?: 'pending' | 'in_flight' | 'fired' | 'failed' | 'exhausted' | null;
583
+ webhook_status?: EmailWebhookStatus;
584
584
  webhook_attempt_count: number;
585
585
  };
586
586
  type EmailDetail = {
@@ -613,7 +613,7 @@ type EmailDetail = {
613
613
  * HTML body parsed from the inbound MIME, matching the `email.parsed.body_html` field on the webhook payload. Null when the message had no HTML part or parsing failed.
614
614
  */
615
615
  body_html?: string | null;
616
- status: 'pending' | 'accepted' | 'completed' | 'rejected';
616
+ status: EmailStatus;
617
617
  domain: string;
618
618
  spam_score?: number | null;
619
619
  raw_size_bytes?: number | null;
@@ -621,7 +621,7 @@ type EmailDetail = {
621
621
  created_at: string;
622
622
  received_at: string;
623
623
  rejection_reason?: string | null;
624
- webhook_status?: 'pending' | 'in_flight' | 'fired' | 'failed' | 'exhausted' | null;
624
+ webhook_status?: EmailWebhookStatus;
625
625
  webhook_attempt_count: number;
626
626
  webhook_last_attempt_at?: string | null;
627
627
  webhook_last_status_code?: number | null;
@@ -746,6 +746,63 @@ type SendMailInput = {
746
746
  */
747
747
  wait_timeout_ms?: number;
748
748
  };
749
+ /**
750
+ * Lifecycle status of an INBOUND email (a row in the `emails`
751
+ * table). Distinct from `SentEmailStatus`, which describes
752
+ * the OUTBOUND lifecycle (the `sent_emails` table) and uses
753
+ * a different vocabulary because the lifecycles differ.
754
+ * Possible values:
755
+ *
756
+ * - `pending`: the row was inserted at ingestion (mx_main)
757
+ * and has not yet completed the spam / filter / auth
758
+ * pipeline. Body and parsed fields are present; webhook
759
+ * delivery is not yet scheduled. Most rows transition out
760
+ * of `pending` within seconds.
761
+ * - `accepted`: the inbound passed the policy gates and is
762
+ * queued for webhook delivery. The `webhook_status` field
763
+ * tracks the separate webhook-delivery lifecycle from
764
+ * this point.
765
+ * - `completed`: terminal success. Webhook delivery
766
+ * attempted and acknowledged by every active endpoint, OR
767
+ * no endpoints are configured, so the row is durably
768
+ * archived.
769
+ * - `rejected`: terminal failure at ingestion (spam, blocked
770
+ * sender, filter rule, malformed). The body and metadata
771
+ * are stored for auditing but no webhook fires and the
772
+ * row is not repliable.
773
+ *
774
+ * See also `webhook_status` (separate enum tracking the
775
+ * webhook-delivery state machine) and `SentEmailStatus` (the
776
+ * outbound vocabulary).
777
+ *
778
+ */
779
+ type EmailStatus = 'pending' | 'accepted' | 'completed' | 'rejected';
780
+ /**
781
+ * Webhook-delivery state for an inbound email. Tracks a
782
+ * SEPARATE lifecycle from the email's `status` field; the
783
+ * same row carries both. Possible values:
784
+ *
785
+ * - `pending`: ingestion is past `pending` (the email itself
786
+ * is `accepted`) but the webhook fan-out has not yet
787
+ * started for this row.
788
+ * - `in_flight`: at least one delivery attempt is in flight.
789
+ * - `fired`: terminal success. Every active endpoint
790
+ * acknowledged the delivery (or accepted it after retries).
791
+ * - `failed`: terminal partial-failure. At least one endpoint
792
+ * exhausted its retry budget; some endpoints may still
793
+ * have succeeded.
794
+ * - `exhausted`: terminal failure. Every endpoint exhausted
795
+ * its retry budget without success.
796
+ * - `null`: no endpoints configured, so no webhook lifecycle
797
+ * applies.
798
+ *
799
+ * Note that the value `pending` here does NOT mean the email
800
+ * is `pending`; it means the email is past ingestion but
801
+ * webhook delivery has not yet begun. Two overlapping uses
802
+ * of the word `pending` for distinct lifecycle phases.
803
+ *
804
+ */
805
+ type EmailWebhookStatus = 'pending' | 'in_flight' | 'fired' | 'failed' | 'exhausted' | null;
749
806
  /**
750
807
  * Lifecycle status of a sent_emails row. Possible values:
751
808
  *
@@ -1676,9 +1733,14 @@ type ListEmailsData = {
1676
1733
  */
1677
1734
  domain_id?: string;
1678
1735
  /**
1679
- * Filter by email status
1736
+ * Filter inbound rows by lifecycle status. See `EmailStatus`
1737
+ * for what each value means. Note that the webhook delivery
1738
+ * state is a SEPARATE lifecycle on the same row; filter by
1739
+ * `webhook_status` semantics is not currently supported on
1740
+ * this endpoint.
1741
+ *
1680
1742
  */
1681
- status?: 'pending' | 'accepted' | 'completed' | 'rejected';
1743
+ status?: EmailStatus;
1682
1744
  /**
1683
1745
  * Search subject, sender, and recipient (case-insensitive)
1684
1746
  */
@@ -2626,7 +2688,30 @@ declare const listEmails: <ThrowOnError extends boolean = false>(options?: Optio
2626
2688
  */
2627
2689
  declare const deleteEmail: <ThrowOnError extends boolean = false>(options: Options<DeleteEmailData, ThrowOnError>) => RequestResult<DeleteEmailResponses, DeleteEmailErrors, ThrowOnError, "fields">;
2628
2690
  /**
2629
- * Get email details
2691
+ * Get inbound email by id
2692
+ *
2693
+ * Returns the full record for an inbound email received at one
2694
+ * of your verified domains, including the parsed text and HTML
2695
+ * bodies, threading metadata, SMTP envelope detail, webhook
2696
+ * delivery state, and a `replies` array for any outbound sends
2697
+ * recorded as replies to this inbound.
2698
+ *
2699
+ * For listing inbound emails (with cursor pagination, status
2700
+ * and date filters, and free-text search), use
2701
+ * `/emails`. Outbound (sent) email records are NOT returned
2702
+ * here; use `/sent-emails/{id}` for those.
2703
+ *
2704
+ * The response carries four sender-shaped fields whose
2705
+ * meanings overlap. `from_email` is the canonical "who sent
2706
+ * this" field for most use cases (parsed bare address from
2707
+ * the `From:` header, with a `sender` fallback). `from_header`
2708
+ * is the raw header including any display name. `sender` and
2709
+ * `smtp_mail_from` both carry the SMTP envelope MAIL FROM
2710
+ * (return-path) and are equal by construction; `sender` is
2711
+ * the older field name retained for compatibility. See
2712
+ * `primitive describe emails:get-email | jq '.responseSchema.properties'`
2713
+ * for per-field detail.
2714
+ *
2630
2715
  */
2631
2716
  declare const getEmail: <ThrowOnError extends boolean = false>(options: Options<GetEmailData, ThrowOnError>) => RequestResult<GetEmailResponses, GetEmailErrors, ThrowOnError, "fields">;
2632
2717
  /**
@@ -2969,4 +3054,4 @@ declare function createPrimitiveClient(options?: PrimitiveClientOptions): Primit
2969
3054
  declare function client(options?: PrimitiveClientOptions): PrimitiveClient;
2970
3055
  declare const operations: typeof sdk_gen_d_exports;
2971
3056
  //#endregion
2972
- export { AddDomainError as $, ListEndpointsError as $n, StorageStats as $r, EmailDetailReply as $t, getSentEmail as A, UpdateFilterResponse as Ai, GetStorageStatsResponses as An, ReplyToEmailResponses as Ar, DeleteEndpointErrors as At, replayEmailWebhooks as B, ClientOptions$1 as Bi, ListDeliveriesResponse as Bn, SendEmailResponse as Br, Domain as Bt, deleteEndpoint as C, UpdateEndpointInput as Ci, GetSentEmailErrors as Cn, ReplayEmailWebhooksResponse as Cr, DeleteEmailData as Ct, getAccount as D, UpdateFilterError as Di, GetStorageStatsError as Dn, ReplyToEmailError as Dr, DeleteEmailResponses as Dt, downloadRawEmail as E, UpdateFilterData as Ei, GetStorageStatsData as En, ReplyToEmailData as Er, DeleteEmailResponse as Et, listEmails as F, VerifyDomainErrors as Fi, GetWebhookSecretResponses as Fn, RotateWebhookSecretResponse as Fr, DeleteFilterErrors as Ft, updateAccount as G, RequestResult as Gi, ListDomainsResponse as Gn, SendPermissionAnyRecipient as Gr, DownloadAttachmentsResponse as Gt, rotateWebhookSecret as H, CreateClientConfig as Hi, ListDomainsData as Hn, SendMailInput as Hr, DownloadAttachmentsData as Ht, listEndpoints as I, VerifyDomainResponse as Ii, Limit as In, RotateWebhookSecretResponses as Ir, DeleteFilterResponse as It, updateFilter as J, ListEmailsError as Jn, SendPermissionYourDomain as Jr, DownloadRawEmailError as Jt, updateDomain as K, ResponseStyle as Ki, ListDomainsResponses as Kn, SendPermissionManagedZone as Kr, DownloadAttachmentsResponses as Kt, listFilters as L, VerifyDomainResponses as Li, ListDeliveriesData as Ln, SendEmailData as Lr, DeleteFilterResponses as Lt, getWebhookSecret as M, VerifiedDomain as Mi, GetWebhookSecretError as Mn, RotateWebhookSecretData as Mr, DeleteEndpointResponses as Mt, listDeliveries as N, VerifyDomainData as Ni, GetWebhookSecretErrors as Nn, RotateWebhookSecretError as Nr, DeleteFilterData as Nt, getEmail as O, UpdateFilterErrors as Oi, GetStorageStatsErrors as On, ReplyToEmailErrors as Or, DeleteEndpointData as Ot, listDomains as P, VerifyDomainError as Pi, GetWebhookSecretResponse as Pn, RotateWebhookSecretErrors as Pr, DeleteFilterError as Pt, AddDomainData as Q, ListEndpointsData as Qn, SentEmailSummary as Qr, EmailDetail as Qt, listSentEmails as R, WebhookSecret as Ri, ListDeliveriesError as Rn, SendEmailError as Rr, DeliveryStatus as Rt, deleteEmail as S, UpdateEndpointErrors as Si, GetSentEmailError as Sn, ReplayEmailWebhooksErrors as Sr, DeleteDomainResponses as St, downloadAttachments as T, UpdateEndpointResponses as Ti, GetSentEmailResponses as Tn, ReplayResult as Tr, DeleteEmailErrors as Tt, sendEmail as U, Options$1 as Ui, ListDomainsError as Un, SendMailResult as Ur, DownloadAttachmentsError as Ut, replyToEmail as V, Config as Vi, ListDeliveriesResponses as Vn, SendEmailResponses as Vr, DomainVerifyResult as Vt, testEndpoint as W, RequestOptions as Wi, ListDomainsErrors as Wn, SendPermissionAddress as Wr, DownloadAttachmentsErrors as Wt, Account as X, ListEmailsResponse as Xn, SentEmailDetail as Xr, DownloadRawEmailResponse as Xt, verifyDomain as Y, ListEmailsErrors as Yn, SendPermissionsMeta as Yr, DownloadRawEmailErrors as Yt, AccountUpdated as Z, ListEmailsResponses as Zn, SentEmailStatus as Zr, DownloadRawEmailResponses as Zt, Options as _, UpdateDomainInput as _i, GetSendPermissionsError as _n, ReplayDeliveryErrors as _r, Cursor as _t, PrimitiveApiError as a, TestEndpointResponses as ai, GateFix as an, ListFiltersError as ar, CreateEndpointData as at, createFilter as b, UpdateEndpointData as bi, GetSendPermissionsResponses as bn, ReplayEmailWebhooksData as br, DeleteDomainErrors as bt, PrimitiveClientOptions as c, UpdateAccountData as ci, GetAccountErrors as cn, ListFiltersResponses as cr, CreateEndpointInput as ct, SendResult as d, UpdateAccountInput as di, GetEmailData as dn, ListSentEmailsErrors as dr, CreateFilterData as dt, SuccessEnvelope as ei, EmailSummary as en, ListEndpointsErrors as er, AddDomainErrors as et, SendThreadInput as f, UpdateAccountResponse as fi, GetEmailError as fn, ListSentEmailsResponse as fr, CreateFilterError as ft, operations as g, UpdateDomainErrors as gi, GetSendPermissionsData as gn, ReplayDeliveryError as gr, CreateFilterResponses as gt, createPrimitiveClient as h, UpdateDomainError as hi, GetEmailResponses as hn, ReplayDeliveryData as hr, CreateFilterResponse as ht, PrimitiveApiClientOptions as i, TestEndpointResponse as ii, GateDenial as in, ListFiltersData as ir, ClientOptions as it, getStorageStats as j, UpdateFilterResponses as ji, GetWebhookSecretData as jn, ResourceId as jr, DeleteEndpointResponse as jt, getSendPermissions as k, UpdateFilterInput as ki, GetStorageStatsResponse as kn, ReplyToEmailResponse as kr, DeleteEndpointError as kt, ReplyInput as l, UpdateAccountError as li, GetAccountResponse as ln, ListSentEmailsData as lr, CreateEndpointResponse as lt, createPrimitiveApiClient as m, UpdateDomainData as mi, GetEmailResponse as mn, PaginationMeta as mr, CreateFilterInput as mt, ForwardInput as n, TestEndpointError as ni, ErrorResponse as nn, ListEndpointsResponses as nr, AddDomainResponse as nt, PrimitiveApiErrorDetails as o, TestResult as oi, GetAccountData as on, ListFiltersErrors as or, CreateEndpointError as ot, client as p, UpdateAccountResponses as pi, GetEmailErrors as pn, ListSentEmailsResponses as pr, CreateFilterErrors as pt, updateEndpoint as q, Auth as qi, ListEmailsData as qn, SendPermissionRule as qr, DownloadRawEmailData as qt, PrimitiveApiClient as r, TestEndpointErrors as ri, Filter as rn, ListEnvelope as rr, AddDomainResponses as rt, PrimitiveClient as s, UnverifiedDomain as si, GetAccountError as sn, ListFiltersResponse as sr, CreateEndpointErrors as st, DEFAULT_BASE_URL as t, TestEndpointData as ti, Endpoint as tn, ListEndpointsResponse as tr, AddDomainInput as tt, SendInput as u, UpdateAccountErrors as ui, GetAccountResponses as un, ListSentEmailsError as ur, CreateEndpointResponses as ut, addDomain as v, UpdateDomainResponse as vi, GetSendPermissionsErrors as vn, ReplayDeliveryResponse as vr, DeleteDomainData as vt, deleteFilter as w, UpdateEndpointResponse as wi, GetSentEmailResponse as wn, ReplayEmailWebhooksResponses as wr, DeleteEmailError as wt, deleteDomain as x, UpdateEndpointError as xi, GetSentEmailData as xn, ReplayEmailWebhooksError as xr, DeleteDomainResponse as xt, createEndpoint as y, UpdateDomainResponses as yi, GetSendPermissionsResponse as yn, ReplayDeliveryResponses as yr, DeleteDomainError as yt, replayDelivery as z, Client as zi, ListDeliveriesErrors as zn, SendEmailErrors as zr, DeliverySummary as zt };
3057
+ export { AddDomainError as $, ListEmailsResponses as $n, SentEmailStatus as $r, EmailDetailReply as $t, getSentEmail as A, UpdateFilterErrors as Ai, GetStorageStatsErrors as An, ReplyToEmailErrors as Ar, DeleteEndpointErrors as At, replayEmailWebhooks as B, WebhookSecret as Bi, ListDeliveriesError as Bn, SendEmailError as Br, Domain as Bt, deleteEndpoint as C, UpdateEndpointError as Ci, GetSentEmailData as Cn, ReplayEmailWebhooksError as Cr, DeleteEmailData as Ct, getAccount as D, UpdateEndpointResponses as Di, GetSentEmailResponses as Dn, ReplayResult as Dr, DeleteEmailResponses as Dt, downloadRawEmail as E, UpdateEndpointResponse as Ei, GetSentEmailResponse as En, ReplayEmailWebhooksResponses as Er, DeleteEmailResponse as Et, listEmails as F, VerifyDomainData as Fi, GetWebhookSecretErrors as Fn, RotateWebhookSecretError as Fr, DeleteFilterErrors as Ft, updateAccount as G, Options$1 as Gi, ListDomainsError as Gn, SendMailResult as Gr, DownloadAttachmentsResponse as Gt, rotateWebhookSecret as H, ClientOptions$1 as Hi, ListDeliveriesResponse as Hn, SendEmailResponse as Hr, DownloadAttachmentsData as Ht, listEndpoints as I, VerifyDomainError as Ii, GetWebhookSecretResponse as In, RotateWebhookSecretErrors as Ir, DeleteFilterResponse as It, updateFilter as J, ResponseStyle as Ji, ListDomainsResponses as Jn, SendPermissionManagedZone as Jr, DownloadRawEmailError as Jt, updateDomain as K, RequestOptions as Ki, ListDomainsErrors as Kn, SendPermissionAddress as Kr, DownloadAttachmentsResponses as Kt, listFilters as L, VerifyDomainErrors as Li, GetWebhookSecretResponses as Ln, RotateWebhookSecretResponse as Lr, DeleteFilterResponses as Lt, getWebhookSecret as M, UpdateFilterResponse as Mi, GetStorageStatsResponses as Mn, ReplyToEmailResponses as Mr, DeleteEndpointResponses as Mt, listDeliveries as N, UpdateFilterResponses as Ni, GetWebhookSecretData as Nn, ResourceId as Nr, DeleteFilterData as Nt, getEmail as O, UpdateFilterData as Oi, GetStorageStatsData as On, ReplyToEmailData as Or, DeleteEndpointData as Ot, listDomains as P, VerifiedDomain as Pi, GetWebhookSecretError as Pn, RotateWebhookSecretData as Pr, DeleteFilterError as Pt, AddDomainData as Q, ListEmailsResponse as Qn, SentEmailDetail as Qr, EmailDetail as Qt, listSentEmails as R, VerifyDomainResponse as Ri, Limit as Rn, RotateWebhookSecretResponses as Rr, DeliveryStatus as Rt, deleteEmail as S, UpdateEndpointData as Si, GetSendPermissionsResponses as Sn, ReplayEmailWebhooksData as Sr, DeleteDomainResponses as St, downloadAttachments as T, UpdateEndpointInput as Ti, GetSentEmailErrors as Tn, ReplayEmailWebhooksResponse as Tr, DeleteEmailErrors as Tt, sendEmail as U, Config as Ui, ListDeliveriesResponses as Un, SendEmailResponses as Ur, DownloadAttachmentsError as Ut, replyToEmail as V, Client as Vi, ListDeliveriesErrors as Vn, SendEmailErrors as Vr, DomainVerifyResult as Vt, testEndpoint as W, CreateClientConfig as Wi, ListDomainsData as Wn, SendMailInput as Wr, DownloadAttachmentsErrors as Wt, Account as X, ListEmailsError as Xn, SendPermissionYourDomain as Xr, DownloadRawEmailResponse as Xt, verifyDomain as Y, Auth as Yi, ListEmailsData as Yn, SendPermissionRule as Yr, DownloadRawEmailErrors as Yt, AccountUpdated as Z, ListEmailsErrors as Zn, SendPermissionsMeta as Zr, DownloadRawEmailResponses as Zt, Options as _, UpdateDomainError as _i, GetEmailResponses as _n, ReplayDeliveryData as _r, Cursor as _t, PrimitiveApiError as a, TestEndpointErrors as ai, Filter as an, ListEnvelope as ar, CreateEndpointData as at, createFilter as b, UpdateDomainResponse as bi, GetSendPermissionsErrors as bn, ReplayDeliveryResponse as br, DeleteDomainErrors as bt, PrimitiveClientOptions as c, TestResult as ci, GetAccountData as cn, ListFiltersErrors as cr, CreateEndpointInput as ct, SendResult as d, UpdateAccountError as di, GetAccountResponse as dn, ListSentEmailsData as dr, CreateFilterData as dt, SentEmailSummary as ei, EmailStatus as en, ListEndpointsData as er, AddDomainErrors as et, SendThreadInput as f, UpdateAccountErrors as fi, GetAccountResponses as fn, ListSentEmailsError as fr, CreateFilterError as ft, operations as g, UpdateDomainData as gi, GetEmailResponse as gn, PaginationMeta as gr, CreateFilterResponses as gt, createPrimitiveClient as h, UpdateAccountResponses as hi, GetEmailErrors as hn, ListSentEmailsResponses as hr, CreateFilterResponse as ht, PrimitiveApiClientOptions as i, TestEndpointError as ii, ErrorResponse as in, ListEndpointsResponses as ir, ClientOptions as it, getStorageStats as j, UpdateFilterInput as ji, GetStorageStatsResponse as jn, ReplyToEmailResponse as jr, DeleteEndpointResponse as jt, getSendPermissions as k, UpdateFilterError as ki, GetStorageStatsError as kn, ReplyToEmailError as kr, DeleteEndpointError as kt, ReplyInput as l, UnverifiedDomain as li, GetAccountError as ln, ListFiltersResponse as lr, CreateEndpointResponse as lt, createPrimitiveApiClient as m, UpdateAccountResponse as mi, GetEmailError as mn, ListSentEmailsResponse as mr, CreateFilterInput as mt, ForwardInput as n, SuccessEnvelope as ni, EmailWebhookStatus as nn, ListEndpointsErrors as nr, AddDomainResponse as nt, PrimitiveApiErrorDetails as o, TestEndpointResponse as oi, GateDenial as on, ListFiltersData as or, CreateEndpointError as ot, client as p, UpdateAccountInput as pi, GetEmailData as pn, ListSentEmailsErrors as pr, CreateFilterErrors as pt, updateEndpoint as q, RequestResult as qi, ListDomainsResponse as qn, SendPermissionAnyRecipient as qr, DownloadRawEmailData as qt, PrimitiveApiClient as r, TestEndpointData as ri, Endpoint as rn, ListEndpointsResponse as rr, AddDomainResponses as rt, PrimitiveClient as s, TestEndpointResponses as si, GateFix as sn, ListFiltersError as sr, CreateEndpointErrors as st, DEFAULT_BASE_URL as t, StorageStats as ti, EmailSummary as tn, ListEndpointsError as tr, AddDomainInput as tt, SendInput as u, UpdateAccountData as ui, GetAccountErrors as un, ListFiltersResponses as ur, CreateEndpointResponses as ut, addDomain as v, UpdateDomainErrors as vi, GetSendPermissionsData as vn, ReplayDeliveryError as vr, DeleteDomainData as vt, deleteFilter as w, UpdateEndpointErrors as wi, GetSentEmailError as wn, ReplayEmailWebhooksErrors as wr, DeleteEmailError as wt, deleteDomain as x, UpdateDomainResponses as xi, GetSendPermissionsResponse as xn, ReplayDeliveryResponses as xr, DeleteDomainResponse as xt, createEndpoint as y, UpdateDomainInput as yi, GetSendPermissionsError as yn, ReplayDeliveryErrors as yr, DeleteDomainError as yt, replayDelivery as z, VerifyDomainResponses as zi, ListDeliveriesData as zn, SendEmailData as zr, DeliverySummary as zt };
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-Cts9r1sL.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-DEY4h3MZ.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-DH-YKt7a.js";
2
+ import { a as client, i as PrimitiveClient, r as PrimitiveApiError, s as createPrimitiveClient } from "./api-DpATn7LQ.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 = {
@@ -58,13 +58,16 @@ export function formatRow(email) {
58
58
  return `${id} ${received} ${from} ${to} ${subjectCol}`;
59
59
  }
60
60
  class EmailsLatestCommand extends Command {
61
- static description = `Print the N most recent inbound emails as a one-line-per-row text table. Designed for quick triage and visual scanning. For programmatic access, use \`primitive emails:list-emails\` (full JSON envelope, cursor pagination, filters).
61
+ static description = `Print the N most recent inbound emails as a one-line-per-row text table. Designed for quick triage and visual scanning. For programmatic access, use \`primitive emails:list-emails\` (full JSON envelope, cursor pagination, filters) or pass \`--json\` here for the same raw shape without pagination/filters.
62
62
 
63
- The displayed id is the first ${ID_DISPLAY_WIDTH} characters of the email's UUID; pass the full UUID (from \`emails:list-emails\` or \`emails:get-email\`) to operations that need it.`;
63
+ The default text table truncates each row's id to the first ${ID_DISPLAY_WIDTH} characters for readability. Operations that take an id (\`emails:get-email\`, \`emails:delete-email\`, etc.) require the full UUID, so pass \`--json\` or use \`emails:list-emails\` when you need to feed an id back into another command.
64
+
65
+ Output streams: the column header line is written to STDERR so the row data on STDOUT stays grep/awk-friendly. \`--json\` writes everything (including the envelope) to STDOUT.`;
64
66
  static summary = "Show the most recent inbound emails as a compact table";
65
67
  static examples = [
66
68
  "<%= config.bin %> emails:latest",
67
69
  "<%= config.bin %> emails:latest --limit 25",
70
+ "<%= config.bin %> emails:latest --json | jq '.data[0].id'",
68
71
  ];
69
72
  static flags = {
70
73
  "api-key": Flags.string({
@@ -84,6 +87,9 @@ class EmailsLatestCommand extends Command {
84
87
  min: 1,
85
88
  max: MAX_LIMIT,
86
89
  }),
90
+ json: Flags.boolean({
91
+ description: "Print the raw response envelope (with full UUIDs and meta) as JSON on STDOUT instead of the text table. Useful for piping into `jq`, capturing ids for follow-up commands, or scripting.",
92
+ }),
87
93
  };
88
94
  async run() {
89
95
  const { flags } = await this.parse(EmailsLatestCommand);
@@ -102,6 +108,13 @@ class EmailsLatestCommand extends Command {
102
108
  return;
103
109
  }
104
110
  const envelope = result.data;
111
+ if (flags.json) {
112
+ // Raw envelope on stdout. Mirrors the shape `emails:list-emails`
113
+ // emits so callers can swap one for the other when they want
114
+ // table vs json without remembering different command names.
115
+ this.log(JSON.stringify(envelope ?? null, null, 2));
116
+ return;
117
+ }
105
118
  const rows = envelope?.data ?? [];
106
119
  if (rows.length === 0) {
107
120
  process.stderr.write("No inbound emails yet. Send an email to one of your verified domains to populate this list.\n");
@@ -103,6 +103,7 @@ class SendCommand extends Command {
103
103
  "<%= config.bin %> send --to alice@example.com --from support@yourcompany.com --subject 'Quick question' --body 'Are you free Thursday?'",
104
104
  "<%= config.bin %> send --to alice@example.com --html '<p>Hello!</p>'",
105
105
  "<%= config.bin %> send --to alice@example.com --body 'Confirmed' --wait",
106
+ "<%= config.bin %> send --to inbox@your-managed-domain.primitive.email --body 'self-loop smoke test' --wait # any *.primitive.email address routes back to the sending account; useful for proving outbound + inbound work end-to-end",
106
107
  ];
107
108
  static flags = {
108
109
  "api-key": Flags.string({
@@ -50,7 +50,16 @@ class DescribeCommand extends Command {
50
50
  };
51
51
  static description = `Print the full operation manifest entry for a single API command, including the path, request schema, response schema, and per-field descriptions sourced from the OpenAPI spec.
52
52
 
53
- Useful for clarifying response field meanings (e.g. on inbound EmailDetail, which of \`sender\`, \`from_email\`, \`from_header\`, and \`smtp_mail_from\` to read), confirming required body fields, or checking a path's parameter shape before composing a request.`;
53
+ The manifest entry's \`responseSchema\` carries the inlined JSON Schema for the operation's 200/201 \`data\` envelope contents (\`$ref\`s resolved). Use it to look up what specific response fields mean. Examples:
54
+
55
+ # Which of EmailDetail's sender-shaped fields is canonical?
56
+ primitive describe emails:get-email | jq '.responseSchema.properties | keys'
57
+ primitive describe emails:get-email | jq -r '.responseSchema.properties.from_email.description'
58
+
59
+ # What does each value of SentEmailStatus mean?
60
+ primitive describe sending:get-sent-email | jq -r '.responseSchema.properties.status.description'
61
+
62
+ \`requestSchema\` is the same shape for the request body when one exists. For a single field across many operations at once, use \`primitive list-operations | jq\` instead.`;
54
63
  static summary = "Describe a single API operation in detail";
55
64
  static examples = [
56
65
  "<%= config.bin %> describe emails:get-email",
@@ -37,6 +37,12 @@ type PrimitiveOperationManifest = {
37
37
  * true. `$ref`s into the OpenAPI components are inlined.
38
38
  */
39
39
  requestSchema: Record<string, unknown> | null;
40
+ /**
41
+ * Resolved JSON Schema for the 200/201 response body's `data`
42
+ * envelope contents. Same shape as `requestSchema`: `$ref`s
43
+ * inlined. Null on operations without a 200/201 JSON response.
44
+ */
45
+ responseSchema: Record<string, unknown> | null;
40
46
  sdkName: string;
41
47
  summary: string | null;
42
48
  tag: string;
@@ -557,15 +557,9 @@ export const openapiDocument = {
557
557
  "name": "status",
558
558
  "in": "query",
559
559
  "schema": {
560
- "type": "string",
561
- "enum": [
562
- "pending",
563
- "accepted",
564
- "completed",
565
- "rejected"
566
- ]
560
+ "$ref": "#/components/schemas/EmailStatus"
567
561
  },
568
- "description": "Filter by email status"
562
+ "description": "Filter inbound rows by lifecycle status. See `EmailStatus`\nfor what each value means. Note that the webhook delivery\nstate is a SEPARATE lifecycle on the same row; filter by\n`webhook_status` semantics is not currently supported on\nthis endpoint.\n"
569
563
  },
570
564
  {
571
565
  "name": "search",
@@ -638,7 +632,8 @@ export const openapiDocument = {
638
632
  ],
639
633
  "get": {
640
634
  "operationId": "getEmail",
641
- "summary": "Get email details",
635
+ "summary": "Get inbound email by id",
636
+ "description": "Returns the full record for an inbound email received at one\nof your verified domains, including the parsed text and HTML\nbodies, threading metadata, SMTP envelope detail, webhook\ndelivery state, and a `replies` array for any outbound sends\nrecorded as replies to this inbound.\n\nFor listing inbound emails (with cursor pagination, status\nand date filters, and free-text search), use\n`/emails`. Outbound (sent) email records are NOT returned\nhere; use `/sent-emails/{id}` for those.\n\nThe response carries four sender-shaped fields whose\nmeanings overlap. `from_email` is the canonical \"who sent\nthis\" field for most use cases (parsed bare address from\nthe `From:` header, with a `sender` fallback). `from_header`\nis the raw header including any display name. `sender` and\n`smtp_mail_from` both carry the SMTP envelope MAIL FROM\n(return-path) and are equal by construction; `sender` is\nthe older field name retained for compatibility. See\n`primitive describe emails:get-email | jq '.responseSchema.properties'`\nfor per-field detail.\n",
642
637
  "tags": [
643
638
  "Emails"
644
639
  ],
@@ -2614,13 +2609,7 @@ export const openapiDocument = {
2614
2609
  "format": "uuid"
2615
2610
  },
2616
2611
  "status": {
2617
- "type": "string",
2618
- "enum": [
2619
- "pending",
2620
- "accepted",
2621
- "completed",
2622
- "rejected"
2623
- ]
2612
+ "$ref": "#/components/schemas/EmailStatus"
2624
2613
  },
2625
2614
  "sender": {
2626
2615
  "type": "string",
@@ -2659,18 +2648,7 @@ export const openapiDocument = {
2659
2648
  ]
2660
2649
  },
2661
2650
  "webhook_status": {
2662
- "type": [
2663
- "string",
2664
- "null"
2665
- ],
2666
- "enum": [
2667
- "pending",
2668
- "in_flight",
2669
- "fired",
2670
- "failed",
2671
- "exhausted",
2672
- null
2673
- ]
2651
+ "$ref": "#/components/schemas/EmailWebhookStatus"
2674
2652
  },
2675
2653
  "webhook_attempt_count": {
2676
2654
  "type": "integer"
@@ -2742,13 +2720,7 @@ export const openapiDocument = {
2742
2720
  "description": "HTML body parsed from the inbound MIME, matching the `email.parsed.body_html` field on the webhook payload. Null when the message had no HTML part or parsing failed."
2743
2721
  },
2744
2722
  "status": {
2745
- "type": "string",
2746
- "enum": [
2747
- "pending",
2748
- "accepted",
2749
- "completed",
2750
- "rejected"
2751
- ]
2723
+ "$ref": "#/components/schemas/EmailStatus"
2752
2724
  },
2753
2725
  "domain": {
2754
2726
  "type": "string"
@@ -2786,18 +2758,7 @@ export const openapiDocument = {
2786
2758
  ]
2787
2759
  },
2788
2760
  "webhook_status": {
2789
- "type": [
2790
- "string",
2791
- "null"
2792
- ],
2793
- "enum": [
2794
- "pending",
2795
- "in_flight",
2796
- "fired",
2797
- "failed",
2798
- "exhausted",
2799
- null
2800
- ]
2761
+ "$ref": "#/components/schemas/EmailWebhookStatus"
2801
2762
  },
2802
2763
  "webhook_attempt_count": {
2803
2764
  "type": "integer"
@@ -3009,6 +2970,31 @@ export const openapiDocument = {
3009
2970
  "subject"
3010
2971
  ]
3011
2972
  },
2973
+ "EmailStatus": {
2974
+ "type": "string",
2975
+ "description": "Lifecycle status of an INBOUND email (a row in the `emails`\ntable). Distinct from `SentEmailStatus`, which describes\nthe OUTBOUND lifecycle (the `sent_emails` table) and uses\na different vocabulary because the lifecycles differ.\nPossible values:\n\n - `pending`: the row was inserted at ingestion (mx_main)\n and has not yet completed the spam / filter / auth\n pipeline. Body and parsed fields are present; webhook\n delivery is not yet scheduled. Most rows transition out\n of `pending` within seconds.\n - `accepted`: the inbound passed the policy gates and is\n queued for webhook delivery. The `webhook_status` field\n tracks the separate webhook-delivery lifecycle from\n this point.\n - `completed`: terminal success. Webhook delivery\n attempted and acknowledged by every active endpoint, OR\n no endpoints are configured, so the row is durably\n archived.\n - `rejected`: terminal failure at ingestion (spam, blocked\n sender, filter rule, malformed). The body and metadata\n are stored for auditing but no webhook fires and the\n row is not repliable.\n\nSee also `webhook_status` (separate enum tracking the\nwebhook-delivery state machine) and `SentEmailStatus` (the\noutbound vocabulary).\n",
2976
+ "enum": [
2977
+ "pending",
2978
+ "accepted",
2979
+ "completed",
2980
+ "rejected"
2981
+ ]
2982
+ },
2983
+ "EmailWebhookStatus": {
2984
+ "type": [
2985
+ "string",
2986
+ "null"
2987
+ ],
2988
+ "description": "Webhook-delivery state for an inbound email. Tracks a\nSEPARATE lifecycle from the email's `status` field; the\nsame row carries both. Possible values:\n\n - `pending`: ingestion is past `pending` (the email itself\n is `accepted`) but the webhook fan-out has not yet\n started for this row.\n - `in_flight`: at least one delivery attempt is in flight.\n - `fired`: terminal success. Every active endpoint\n acknowledged the delivery (or accepted it after retries).\n - `failed`: terminal partial-failure. At least one endpoint\n exhausted its retry budget; some endpoints may still\n have succeeded.\n - `exhausted`: terminal failure. Every endpoint exhausted\n its retry budget without success.\n - `null`: no endpoints configured, so no webhook lifecycle\n applies.\n\nNote that the value `pending` here does NOT mean the email\nis `pending`; it means the email is past ingestion but\nwebhook delivery has not yet begun. Two overlapping uses\nof the word `pending` for distinct lifecycle phases.\n",
2989
+ "enum": [
2990
+ "pending",
2991
+ "in_flight",
2992
+ "fired",
2993
+ "failed",
2994
+ "exhausted",
2995
+ null
2996
+ ]
2997
+ },
3012
2998
  "SentEmailStatus": {
3013
2999
  "type": "string",
3014
3000
  "description": "Lifecycle status of a sent_emails row. Possible values:\n\n - `queued`: pre-call INSERT; the outbound agent has not\n yet replied.\n - `submitted_to_agent`: agent accepted; `queue_id` is set.\n - `agent_failed`: agent rejected; `error_code` and\n `error_message` carry the reason.\n - `gate_denied`: a recipient-scope gate denied the send;\n the agent was never called. The `gates` array carries\n the denial detail. /send-mail returns 403 in this case\n so callers see the denial synchronously; /sent-emails\n additionally records the row for historical lookup,\n which is when this status appears in a listing.\n - `unknown`: terminal indeterminate; the on-box log\n poller couldn't classify the receiver's response.\n - `delivered` / `bounced` / `deferred` / `wait_timeout`:\n terminal delivery outcomes (see DeliveryStatus).\n",