@primitivedotdev/sdk 0.12.0 → 0.14.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/index.js +1 -1
- package/dist/api/generated/sdk.gen.js +91 -4
- package/dist/api/index.d.ts +2 -2
- package/dist/{api-CLLpjjWy.js → api-DH-YKt7a.js} +104 -5
- package/dist/{index-K4KbjppU.d.ts → index-Cts9r1sL.d.ts} +625 -8
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/oclif/api-command.js +72 -12
- package/dist/oclif/commands/emails-latest.js +118 -0
- package/dist/oclif/commands/send.js +25 -4
- package/dist/oclif/commands/whoami.js +2 -3
- package/dist/oclif/index.js +69 -3
- package/dist/openapi/openapi.generated.js +570 -7
- package/dist/openapi/operations.generated.js +111 -2
- package/oclif.manifest.json +243 -14
- package/package.json +3 -3
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
-
export { addDomain, createEndpoint, createFilter, deleteDomain, deleteEmail, deleteEndpoint, deleteFilter, downloadAttachments, downloadRawEmail, getAccount, getEmail, getStorageStats, getWebhookSecret, listDeliveries, listDomains, listEmails, listEndpoints, listFilters, replayDelivery, replayEmailWebhooks, replyToEmail, rotateWebhookSecret, sendEmail, testEndpoint, updateAccount, updateDomain, updateEndpoint, updateFilter, verifyDomain } from './sdk.gen.js';
|
|
2
|
+
export { addDomain, createEndpoint, createFilter, deleteDomain, deleteEmail, deleteEndpoint, deleteFilter, downloadAttachments, downloadRawEmail, getAccount, getEmail, getSendPermissions, getSentEmail, getStorageStats, getWebhookSecret, listDeliveries, listDomains, listEmails, listEndpoints, listFilters, listSentEmails, replayDelivery, replayEmailWebhooks, replyToEmail, rotateWebhookSecret, sendEmail, testEndpoint, updateAccount, updateDomain, updateEndpoint, updateFilter, verifyDomain } from './sdk.gen.js';
|
|
@@ -122,11 +122,15 @@ export const verifyDomain = (options) => (options.client ?? client).post({
|
|
|
122
122
|
...options
|
|
123
123
|
});
|
|
124
124
|
/**
|
|
125
|
-
* List emails
|
|
125
|
+
* List inbound emails
|
|
126
126
|
*
|
|
127
|
-
* Returns a paginated list of
|
|
128
|
-
*
|
|
129
|
-
*
|
|
127
|
+
* Returns a paginated list of INBOUND emails received at your
|
|
128
|
+
* verified domains. Outbound messages sent via /send-mail are not
|
|
129
|
+
* included; this endpoint is the inbox view, not a unified
|
|
130
|
+
* send/receive history.
|
|
131
|
+
*
|
|
132
|
+
* Supports filtering by domain, status, date range, and free-text
|
|
133
|
+
* search across subject, sender, and recipient fields.
|
|
130
134
|
*
|
|
131
135
|
*/
|
|
132
136
|
export const listEmails = (options) => (options?.client ?? client).get({
|
|
@@ -371,6 +375,46 @@ export const replayDelivery = (options) => (options.client ?? client).post({
|
|
|
371
375
|
url: '/webhooks/deliveries/{id}/replay',
|
|
372
376
|
...options
|
|
373
377
|
});
|
|
378
|
+
/**
|
|
379
|
+
* List send-permission rules
|
|
380
|
+
*
|
|
381
|
+
* Returns a flat list of rules describing every recipient the
|
|
382
|
+
* caller may send to. Each rule has a `type`, a kind-specific
|
|
383
|
+
* payload, and a human-readable `description`. If any rule
|
|
384
|
+
* matches the recipient, /send-mail will accept the send under
|
|
385
|
+
* the recipient-scope check.
|
|
386
|
+
*
|
|
387
|
+
* The endpoint is the answer to "where can I send" without
|
|
388
|
+
* exposing internal entitlement names. Agents that don't
|
|
389
|
+
* recognize a `type` can still read the `description` prose
|
|
390
|
+
* and act on it.
|
|
391
|
+
*
|
|
392
|
+
* Rule kinds, ordered broadest-first so an agent can stop
|
|
393
|
+
* scanning at the first match:
|
|
394
|
+
*
|
|
395
|
+
* 1. `any_recipient` (one entry, only when the org can send
|
|
396
|
+
* anywhere): every other rule below it is redundant.
|
|
397
|
+
* 2. `managed_zone` (always emitted, one per Primitive-managed
|
|
398
|
+
* zone): sends to any address at *.primitive.email or
|
|
399
|
+
* *.email.works always succeed; no entitlement required.
|
|
400
|
+
* 3. `your_domain` (one per active verified outbound domain
|
|
401
|
+
* owned by the org): sends to that domain are approved.
|
|
402
|
+
* 4. `address` (one per address that has authenticated
|
|
403
|
+
* inbound mail to the org, capped at `meta.address_cap`):
|
|
404
|
+
* sends to that exact address are approved.
|
|
405
|
+
*
|
|
406
|
+
* The list is informational, not an authorization check.
|
|
407
|
+
* /send-mail remains the source of truth on whether an
|
|
408
|
+
* individual send will succeed (it also enforces the
|
|
409
|
+
* from-address and the `send_mail` entitlement, which are
|
|
410
|
+
* not recipient-scope concerns and are not represented here).
|
|
411
|
+
*
|
|
412
|
+
*/
|
|
413
|
+
export const getSendPermissions = (options) => (options?.client ?? client).get({
|
|
414
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
415
|
+
url: '/send-permissions',
|
|
416
|
+
...options
|
|
417
|
+
});
|
|
374
418
|
/**
|
|
375
419
|
* Send outbound email
|
|
376
420
|
*
|
|
@@ -388,3 +432,46 @@ export const sendEmail = (options) => (options.client ?? client).post({
|
|
|
388
432
|
...options.headers
|
|
389
433
|
}
|
|
390
434
|
});
|
|
435
|
+
/**
|
|
436
|
+
* List outbound sent emails
|
|
437
|
+
*
|
|
438
|
+
* Returns a paginated list of OUTBOUND emails the caller's
|
|
439
|
+
* org has sent via /send-mail (and /emails/{id}/reply, which
|
|
440
|
+
* forwards through /send-mail). Includes every recorded
|
|
441
|
+
* attempt, including gate-denied attempts that the agent
|
|
442
|
+
* never called and rows still in `queued` state.
|
|
443
|
+
*
|
|
444
|
+
* For inbound mail received at your verified domains, see
|
|
445
|
+
* /emails. There is no unified send/receive history endpoint;
|
|
446
|
+
* the two surfaces are intentionally separate because the
|
|
447
|
+
* underlying tables, statuses, and lifecycle differ.
|
|
448
|
+
*
|
|
449
|
+
* Email bodies (`body_text`, `body_html`) are NOT included on
|
|
450
|
+
* list rows so a 50-row page can't balloon into a multi-MB
|
|
451
|
+
* response when sends are near the 5MB body cap. Use
|
|
452
|
+
* /sent-emails/{id} to fetch a single row with bodies, or
|
|
453
|
+
* cross-reference by `client_idempotency_key` if the caller
|
|
454
|
+
* already has the body locally.
|
|
455
|
+
*
|
|
456
|
+
*/
|
|
457
|
+
export const listSentEmails = (options) => (options?.client ?? client).get({
|
|
458
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
459
|
+
url: '/sent-emails',
|
|
460
|
+
...options
|
|
461
|
+
});
|
|
462
|
+
/**
|
|
463
|
+
* Get a sent email by id
|
|
464
|
+
*
|
|
465
|
+
* Returns the full sent-email record by id, including
|
|
466
|
+
* `body_text` and `body_html` (omitted from the listing
|
|
467
|
+
* endpoint to keep paginated responses small). Use this when
|
|
468
|
+
* diagnosing a specific send, e.g. inspecting the receiver's
|
|
469
|
+
* SMTP response on a `bounced` row or pulling the gate
|
|
470
|
+
* denial detail on a `gate_denied` row.
|
|
471
|
+
*
|
|
472
|
+
*/
|
|
473
|
+
export const getSentEmail = (options) => (options.client ?? client).get({
|
|
474
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
475
|
+
url: '/sent-emails/{id}',
|
|
476
|
+
...options
|
|
477
|
+
});
|
package/dist/api/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as
|
|
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, 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, 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, SendResult, SendThreadInput, SentEmailStatus, 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, getStorageStats, getWebhookSecret, listDeliveries, listDomains, listEmails, listEndpoints, listFilters, operations, replayDelivery, replayEmailWebhooks, replyToEmail, rotateWebhookSecret, sendEmail, testEndpoint, updateAccount, updateDomain, updateEndpoint, updateFilter, verifyDomain };
|
|
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 };
|
|
@@ -624,6 +624,8 @@ var sdk_gen_exports = /* @__PURE__ */ __exportAll({
|
|
|
624
624
|
downloadRawEmail: () => downloadRawEmail,
|
|
625
625
|
getAccount: () => getAccount,
|
|
626
626
|
getEmail: () => getEmail,
|
|
627
|
+
getSendPermissions: () => getSendPermissions,
|
|
628
|
+
getSentEmail: () => getSentEmail,
|
|
627
629
|
getStorageStats: () => getStorageStats,
|
|
628
630
|
getWebhookSecret: () => getWebhookSecret,
|
|
629
631
|
listDeliveries: () => listDeliveries,
|
|
@@ -631,6 +633,7 @@ var sdk_gen_exports = /* @__PURE__ */ __exportAll({
|
|
|
631
633
|
listEmails: () => listEmails,
|
|
632
634
|
listEndpoints: () => listEndpoints,
|
|
633
635
|
listFilters: () => listFilters,
|
|
636
|
+
listSentEmails: () => listSentEmails,
|
|
634
637
|
replayDelivery: () => replayDelivery,
|
|
635
638
|
replayEmailWebhooks: () => replayEmailWebhooks,
|
|
636
639
|
replyToEmail: () => replyToEmail,
|
|
@@ -795,11 +798,15 @@ const verifyDomain = (options) => (options.client ?? client$1).post({
|
|
|
795
798
|
...options
|
|
796
799
|
});
|
|
797
800
|
/**
|
|
798
|
-
* List emails
|
|
801
|
+
* List inbound emails
|
|
799
802
|
*
|
|
800
|
-
* Returns a paginated list of
|
|
801
|
-
*
|
|
802
|
-
*
|
|
803
|
+
* Returns a paginated list of INBOUND emails received at your
|
|
804
|
+
* verified domains. Outbound messages sent via /send-mail are not
|
|
805
|
+
* included; this endpoint is the inbox view, not a unified
|
|
806
|
+
* send/receive history.
|
|
807
|
+
*
|
|
808
|
+
* Supports filtering by domain, status, date range, and free-text
|
|
809
|
+
* search across subject, sender, and recipient fields.
|
|
803
810
|
*
|
|
804
811
|
*/
|
|
805
812
|
const listEmails = (options) => (options?.client ?? client$1).get({
|
|
@@ -1099,6 +1106,49 @@ const replayDelivery = (options) => (options.client ?? client$1).post({
|
|
|
1099
1106
|
...options
|
|
1100
1107
|
});
|
|
1101
1108
|
/**
|
|
1109
|
+
* List send-permission rules
|
|
1110
|
+
*
|
|
1111
|
+
* Returns a flat list of rules describing every recipient the
|
|
1112
|
+
* caller may send to. Each rule has a `type`, a kind-specific
|
|
1113
|
+
* payload, and a human-readable `description`. If any rule
|
|
1114
|
+
* matches the recipient, /send-mail will accept the send under
|
|
1115
|
+
* the recipient-scope check.
|
|
1116
|
+
*
|
|
1117
|
+
* The endpoint is the answer to "where can I send" without
|
|
1118
|
+
* exposing internal entitlement names. Agents that don't
|
|
1119
|
+
* recognize a `type` can still read the `description` prose
|
|
1120
|
+
* and act on it.
|
|
1121
|
+
*
|
|
1122
|
+
* Rule kinds, ordered broadest-first so an agent can stop
|
|
1123
|
+
* scanning at the first match:
|
|
1124
|
+
*
|
|
1125
|
+
* 1. `any_recipient` (one entry, only when the org can send
|
|
1126
|
+
* anywhere): every other rule below it is redundant.
|
|
1127
|
+
* 2. `managed_zone` (always emitted, one per Primitive-managed
|
|
1128
|
+
* zone): sends to any address at *.primitive.email or
|
|
1129
|
+
* *.email.works always succeed; no entitlement required.
|
|
1130
|
+
* 3. `your_domain` (one per active verified outbound domain
|
|
1131
|
+
* owned by the org): sends to that domain are approved.
|
|
1132
|
+
* 4. `address` (one per address that has authenticated
|
|
1133
|
+
* inbound mail to the org, capped at `meta.address_cap`):
|
|
1134
|
+
* sends to that exact address are approved.
|
|
1135
|
+
*
|
|
1136
|
+
* The list is informational, not an authorization check.
|
|
1137
|
+
* /send-mail remains the source of truth on whether an
|
|
1138
|
+
* individual send will succeed (it also enforces the
|
|
1139
|
+
* from-address and the `send_mail` entitlement, which are
|
|
1140
|
+
* not recipient-scope concerns and are not represented here).
|
|
1141
|
+
*
|
|
1142
|
+
*/
|
|
1143
|
+
const getSendPermissions = (options) => (options?.client ?? client$1).get({
|
|
1144
|
+
security: [{
|
|
1145
|
+
scheme: "bearer",
|
|
1146
|
+
type: "http"
|
|
1147
|
+
}],
|
|
1148
|
+
url: "/send-permissions",
|
|
1149
|
+
...options
|
|
1150
|
+
});
|
|
1151
|
+
/**
|
|
1102
1152
|
* Send outbound email
|
|
1103
1153
|
*
|
|
1104
1154
|
* Sends an outbound email through Primitive's outbound relay. By default
|
|
@@ -1118,6 +1168,55 @@ const sendEmail = (options) => (options.client ?? client$1).post({
|
|
|
1118
1168
|
...options.headers
|
|
1119
1169
|
}
|
|
1120
1170
|
});
|
|
1171
|
+
/**
|
|
1172
|
+
* List outbound sent emails
|
|
1173
|
+
*
|
|
1174
|
+
* Returns a paginated list of OUTBOUND emails the caller's
|
|
1175
|
+
* org has sent via /send-mail (and /emails/{id}/reply, which
|
|
1176
|
+
* forwards through /send-mail). Includes every recorded
|
|
1177
|
+
* attempt, including gate-denied attempts that the agent
|
|
1178
|
+
* never called and rows still in `queued` state.
|
|
1179
|
+
*
|
|
1180
|
+
* For inbound mail received at your verified domains, see
|
|
1181
|
+
* /emails. There is no unified send/receive history endpoint;
|
|
1182
|
+
* the two surfaces are intentionally separate because the
|
|
1183
|
+
* underlying tables, statuses, and lifecycle differ.
|
|
1184
|
+
*
|
|
1185
|
+
* Email bodies (`body_text`, `body_html`) are NOT included on
|
|
1186
|
+
* list rows so a 50-row page can't balloon into a multi-MB
|
|
1187
|
+
* response when sends are near the 5MB body cap. Use
|
|
1188
|
+
* /sent-emails/{id} to fetch a single row with bodies, or
|
|
1189
|
+
* cross-reference by `client_idempotency_key` if the caller
|
|
1190
|
+
* already has the body locally.
|
|
1191
|
+
*
|
|
1192
|
+
*/
|
|
1193
|
+
const listSentEmails = (options) => (options?.client ?? client$1).get({
|
|
1194
|
+
security: [{
|
|
1195
|
+
scheme: "bearer",
|
|
1196
|
+
type: "http"
|
|
1197
|
+
}],
|
|
1198
|
+
url: "/sent-emails",
|
|
1199
|
+
...options
|
|
1200
|
+
});
|
|
1201
|
+
/**
|
|
1202
|
+
* Get a sent email by id
|
|
1203
|
+
*
|
|
1204
|
+
* Returns the full sent-email record by id, including
|
|
1205
|
+
* `body_text` and `body_html` (omitted from the listing
|
|
1206
|
+
* endpoint to keep paginated responses small). Use this when
|
|
1207
|
+
* diagnosing a specific send, e.g. inspecting the receiver's
|
|
1208
|
+
* SMTP response on a `bounced` row or pulling the gate
|
|
1209
|
+
* denial detail on a `gate_denied` row.
|
|
1210
|
+
*
|
|
1211
|
+
*/
|
|
1212
|
+
const getSentEmail = (options) => (options.client ?? client$1).get({
|
|
1213
|
+
security: [{
|
|
1214
|
+
scheme: "bearer",
|
|
1215
|
+
type: "http"
|
|
1216
|
+
}],
|
|
1217
|
+
url: "/sent-emails/{id}",
|
|
1218
|
+
...options
|
|
1219
|
+
});
|
|
1121
1220
|
//#endregion
|
|
1122
1221
|
//#region src/api/index.ts
|
|
1123
1222
|
const DEFAULT_BASE_URL = "https://www.primitive.dev/api/v1";
|
|
@@ -1364,4 +1463,4 @@ function client(options = {}) {
|
|
|
1364
1463
|
}
|
|
1365
1464
|
const operations = sdk_gen_exports;
|
|
1366
1465
|
//#endregion
|
|
1367
|
-
export {
|
|
1466
|
+
export { replayDelivery as A, verifyDomain as B, getWebhookSecret as C, listEndpoints as D, listEmails as E, testEndpoint as F, updateAccount as I, updateDomain as L, replyToEmail as M, rotateWebhookSecret as N, listFilters as O, sendEmail as P, updateEndpoint as R, getStorageStats as S, listDomains as T, downloadRawEmail as _, client as a, getSendPermissions as b, operations as c, createFilter as d, deleteDomain as f, downloadAttachments as g, deleteFilter as h, PrimitiveClient as i, replayEmailWebhooks as j, listSentEmails as k, addDomain as l, deleteEndpoint as m, PrimitiveApiClient as n, createPrimitiveApiClient as o, deleteEmail as p, PrimitiveApiError as r, createPrimitiveClient as s, DEFAULT_BASE_URL as t, createEndpoint as u, getAccount as v, listDeliveries as w, getSentEmail as x, getEmail as y, updateFilter as z };
|