@primitivedotdev/sdk 1.3.0 → 1.5.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/README.md +44 -0
- package/dist/api/index.d.ts +4 -4
- package/dist/api/index.js +3 -3
- package/dist/{api-DacG4JSU.js → api-DrrmrNDe.js} +257 -22
- package/dist/contract/index.d.ts +2 -2
- package/dist/contract/index.js +1 -1
- package/dist/{errors-7E9sW9eX.d.ts → errors-DyuAXctD.d.ts} +1 -1
- package/dist/{index-X7RsDaVi.d.ts → index--2RzTxVl.d.ts} +361 -7
- package/dist/{index-DR978rq5.d.ts → index-iZWfb98V.d.ts} +275 -4
- package/dist/index.d.ts +6 -184
- package/dist/index.js +4 -194
- package/dist/openapi/index.js +1 -1
- package/dist/{operations.generated-DSMTMcWh.js → operations.generated-CA3-eorF.js} +453 -3
- package/dist/parser/index.d.ts +1 -1
- package/dist/{types-yNU-Oiea.d.ts → types-QT2ss9ho.d.ts} +207 -3
- package/dist/webhook/index.d.ts +4 -4
- package/dist/webhook/index.js +1 -1
- package/dist/{webhook-BAwK8EOG.js → webhook-CwjCyFv-.js} +2559 -224
- package/dist/x402/index.d.ts +263 -0
- package/dist/x402/index.js +320 -0
- package/package.json +6 -1
package/README.md
CHANGED
|
@@ -200,6 +200,50 @@ email.raw;
|
|
|
200
200
|
|
|
201
201
|
Use `email.raw` when you need the original validated webhook event shape.
|
|
202
202
|
|
|
203
|
+
## x402 agent-to-agent payments
|
|
204
|
+
|
|
205
|
+
The `x402` client lets one agent request a stablecoin payment and another pay it. Payment is **non-custodial**: the payer signs an EIP-3009 `transferWithAuthorization` locally with their own key and the key never leaves them. The platform resolves the real payee address, verifies every signed field against its own records, enforces the org's spend policy, and settles. Available on Base Sepolia (`base-sepolia`) and Base mainnet (`base`); amounts are token base units (USDC has 6 decimals, so `"10000"` is 0.01 USDC).
|
|
206
|
+
|
|
207
|
+
Requires the `x402_payments` entitlement on your org.
|
|
208
|
+
|
|
209
|
+
```ts
|
|
210
|
+
import primitive from "@primitivedotdev/sdk";
|
|
211
|
+
import { privateKeyToAccount } from "viem/accounts";
|
|
212
|
+
|
|
213
|
+
const x402 = primitive.x402({ apiKey: process.env.PRIMITIVE_API_KEY });
|
|
214
|
+
|
|
215
|
+
// Payee (one-time): register the address you want to be paid at. The signer
|
|
216
|
+
// proves control of the address; this becomes your default payout destination.
|
|
217
|
+
const account = privateKeyToAccount(process.env.PAYEE_KEY);
|
|
218
|
+
await x402.registerPayoutAddress(
|
|
219
|
+
{ org: process.env.PRIMITIVE_ORG_ID, network: "base-sepolia" },
|
|
220
|
+
{ signer: account },
|
|
221
|
+
);
|
|
222
|
+
|
|
223
|
+
// Payee: request a payment. `pay_to` is resolved from your registered address.
|
|
224
|
+
const challenge = await x402.charge({
|
|
225
|
+
amount: "10000",
|
|
226
|
+
network: "base-sepolia",
|
|
227
|
+
payerOrg: process.env.PAYER_ORG_ID,
|
|
228
|
+
});
|
|
229
|
+
|
|
230
|
+
// Payer: sign and settle with your own key.
|
|
231
|
+
const payer = privateKeyToAccount(process.env.PAYER_KEY);
|
|
232
|
+
const receipt = await x402.pay(challenge, { signer: payer });
|
|
233
|
+
// receipt.status === "settled"; receipt.settle_tx is the on-chain hash.
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
A viem `LocalAccount` satisfies the `X402Signer` interface directly. `pay()` only needs `signTypedData`; `registerPayoutAddress()` also uses `signMessage`.
|
|
237
|
+
|
|
238
|
+
Guard your outbound spend with a policy (kill-switch, per-payment and daily caps, payee allowlist):
|
|
239
|
+
|
|
240
|
+
```ts
|
|
241
|
+
await x402.setSpendPolicy({ paused: false, max_per_payment: "5000000" });
|
|
242
|
+
const policy = await x402.getSpendPolicy();
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
`getChallenge(id)` re-hydrates a challenge (e.g. to retry `pay()` after a restart), and `listPayoutAddresses()` lists your registered addresses. Errors throw `X402Error` (`status`, `body`, `retryAfter`; `status === 0` means the request never reached the server). The client is also available as a subpath import: `import { X402Client } from "@primitivedotdev/sdk/x402"`.
|
|
246
|
+
|
|
203
247
|
## Lower-level surfaces
|
|
204
248
|
|
|
205
249
|
### Explicit `receive` form
|
package/dist/api/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as getThread, $a as InboxStatusFunctionSummary, $c as StorageStats, $i as GetEmailResponses, $l as VerifyAgentClaimError, $n as Cursor, $o as PollCliLoginError, $r as DownloadRawEmailError, $s as SemanticSearchScoreBreakdown, $t as AgentSignupResendResult, A as createFunction, Aa as GetSentEmailData, Ac as StartAgentClaimError, Ai as FunctionTestRunDeliveryEndpoint, Al as UpdateDomainInput, An as CreateEndpointErrors, Ao as ListFunctionLogsError, Ar as DeliveryStatus, As as ResendCliSignupVerificationResponse, At as updateAccount, Au as ResponseStyle, B as downloadDomainZoneFile, Ba as GetThreadData, Bc as StartAgentSignupResponses, Bi as GetAccountError, Bl as UpdateFilterError, Bn as CreateFunctionData, Bo as ListFunctionsError, Br as DomainDnsRecord, Bs as SearchEmailsError, Bt as AccountUpdated, C as createPrimitiveApiClient, Ca as GetOrgRoutingTopologyResponse, Cc as SetFunctionSecretData, Ci as FunctionRouteBody, Cl as UpdateAccountErrors, Cn as CreateAgentClaimLinkError, Co as ListEnvelope, Cr as DeleteFunctionResponse, Cs as ResendAgentSignupVerificationInput, Ct as startAgentClaim, Cu as Client, D as createAgentClaimLink, Da as GetSendPermissionsErrors, Dc as SetFunctionSecretResponse, Di as FunctionSecretWriteResult, Dl as UpdateDomainData, Dn as CreateAgentClaimLinkResponses, Do as ListFiltersResponse, Dr as DeleteFunctionSecretErrors, Ds as ResendCliSignupVerificationError, Dt as testEndpoint, Du as Options, E as createAgentAccount, Ea as GetSendPermissionsError, Ec as SetFunctionSecretInput, Ei as FunctionSecretListItem, El as UpdateAccountResponses, En as CreateAgentClaimLinkResponse, Eo as ListFiltersErrors, Er as DeleteFunctionSecretError, Es as ResendCliSignupVerificationData, Et as startCliSignup, Eu as CreateClientConfig, F as deleteFilter, Fa as GetStorageStatsData, Fc as StartAgentSignupData, Fi as FunctionTestRunState, Fl as UpdateEndpointErrors, Fn as CreateFilterError, Fo as ListFunctionSecretsError, Fr as DiscardEmailContentErrors, Fs as RotateWebhookSecretErrors, Ft as verifyAgentClaim, G as getFunction, Ga as GetWebhookSecretData, Gc as StartCliLoginResponse, Gi as GetConversationError, Gl as UpdateFunctionData, Gn as CreateFunctionResponses, Go as ListSentEmailsError, Gr as DownloadAttachmentsResponse, Gs as SemanticSearchData, Gt as AddDomainResponse, H as getAccount, Ha as GetThreadErrors, Hc as StartCliLoginError, Hi as GetAccountResponse, Hl as UpdateFilterInput, Hn as CreateFunctionErrors, Ho as ListFunctionsResponse, Hr as DownloadAttachmentsData, Hs as SearchEmailsResponse, Ht as AddDomainError, I as deleteFunction, Ia as GetStorageStatsError, Ic as StartAgentSignupError, Ii as FunctionTestRunTrace, Il as UpdateEndpointInput, In as CreateFilterErrors, Io as ListFunctionSecretsErrors, Ir as DiscardEmailContentResponse, Is as RotateWebhookSecretResponse, It as verifyAgentSignup, J as getInboxStatus, Ja as GetWebhookSecretResponse, Jc as StartCliSignupError, Ji as GetConversationResponses, Jl as UpdateFunctionInput, Jn as CreateFunctionSecretError, Jo as ListSentEmailsResponses, Jr as DownloadDomainZoneFileError, Js as SemanticSearchField, Jt as AgentAccountUpgradeHint, K as getFunctionRouting, Ka as GetWebhookSecretError, Kc as StartCliLoginResponses, Ki as GetConversationErrors, Kl as UpdateFunctionError, Kn as CreateFunctionResult, Ko as ListSentEmailsErrors, Kr as DownloadAttachmentsResponses, Ks as SemanticSearchError, Kt as AddDomainResponses, L as deleteFunctionSecret, La as GetStorageStatsErrors, Lc as StartAgentSignupErrors, Li as GateDenial, Ll as UpdateEndpointResponse, Ln as CreateFilterInput, Lo as ListFunctionSecretsResponse, Lr as DiscardEmailContentResponses, Ls as RotateWebhookSecretResponses, Lt as verifyCliSignup, M as deleteDomain, Ma as GetSentEmailErrors, Mc as StartAgentClaimInput, Mi as FunctionTestRunOutboundRequest, Ml as UpdateDomainResponses, Mn as CreateEndpointResponse, Mo as ListFunctionLogsResponse, Mr as DiscardContentResult, Ms as ResourceId, Mt as updateEndpoint, Mu as Auth, N as deleteEmail, Na as GetSentEmailResponse, Nc as StartAgentClaimResponse, Ni as FunctionTestRunReply, Nl as UpdateEndpointData, Nn as CreateEndpointResponses, No as ListFunctionLogsResponses, Nr as DiscardEmailContentData, Ns as RotateWebhookSecretData, Nt as updateFilter, O as createEndpoint, Oa as GetSendPermissionsResponse, Oc as SetFunctionSecretResponses, Oi as FunctionTestRun, Ol as UpdateDomainError, On as CreateEndpointData, Oo as ListFiltersResponses, Or as DeleteFunctionSecretResponse, Os as ResendCliSignupVerificationErrors, Ot as testFunction, Ou as RequestOptions, P as deleteEndpoint, Pa as GetSentEmailResponses, Pc as StartAgentClaimResponses, Pi as FunctionTestRunSend, Pl as UpdateEndpointError, Pn as CreateFilterData, Po as ListFunctionSecretsData, Pr as DiscardEmailContentError, Ps as RotateWebhookSecretError, Pt as updateFunction, Q as getStorageStats, Qa as InboxStatusEndpointSummary, Qc as StartCliSignupResponses, Qi as GetEmailResponse, Ql as VerifyAgentClaimData, Qn as CreateFunctionSecretResponses, Qo as PollCliLoginData, Qr as DownloadRawEmailData, Qs as SemanticSearchResult, Qt as AgentOrgRef, R as discardEmailContent, Ra as GetStorageStatsResponse, Rc as StartAgentSignupInput, Ri as GateFix, Rl as UpdateEndpointResponses, Rn as CreateFilterResponse, Ro as ListFunctionSecretsResponses, Rr as DkimSignature, Rs as RoutingTopology, Rt as verifyDomain, S as RequestOptions$1, Sa as GetOrgRoutingTopologyErrors, Sc as SetFunctionRouteResponses, Si as FunctionLogRow, Sl as UpdateAccountError, Sn as CreateAgentClaimLinkData, So as ListEndpointsResponses, Sr as DeleteFunctionErrors, Ss as ResendAgentSignupVerificationErrors, St as setFunctionSecret, Su as createClient, T as cliLogout, Ta as GetSendPermissionsData, Tc as SetFunctionSecretErrors, Ti as FunctionRouting, Tl as UpdateAccountResponse, Tn as CreateAgentClaimLinkInput, To as ListFiltersError, Tr as DeleteFunctionSecretData, Ts as ResendAgentSignupVerificationResponses, Tt as startCliLogin, Tu as Config, U as getConversation, Ua as GetThreadResponse, Uc as StartCliLoginErrors, Ui as GetAccountResponses, Ul as UpdateFilterResponse, Un as CreateFunctionInput, Uo as ListFunctionsResponses, Ur as DownloadAttachmentsError, Us as SearchEmailsResponses, Ut as AddDomainErrors, V as downloadRawEmail, Va as GetThreadError, Vc as StartCliLoginData, Vi as GetAccountErrors, Vl as UpdateFilterErrors, Vn as CreateFunctionError, Vo as ListFunctionsErrors, Vr as DomainVerifyResult, Vs as SearchEmailsErrors, Vt as AddDomainData, W as getEmail, Wa as GetThreadResponses, Wc as StartCliLoginInput, Wi as GetConversationData, Wl as UpdateFilterResponses, Wn as CreateFunctionResponse, Wo as ListSentEmailsData, Wr as DownloadAttachmentsErrors, Ws as SemanticSearchCoverage, Wt as AddDomainInput, X as getSendPermissions, Xa as InboxStatus, Xc as StartCliSignupInput, Xi as GetEmailError, Xl as UpdateFunctionResponses, Xn as CreateFunctionSecretInput, Xo as ParsedEmailData, Xr as DownloadDomainZoneFileResponse, Xs as SemanticSearchMeta, Xt as AgentClaimResult, Y as getOrgRoutingTopology, Ya as GetWebhookSecretResponses, Yc as StartCliSignupErrors, Yi as GetEmailData, Yl as UpdateFunctionResponse, Yn as CreateFunctionSecretErrors, Yo as PaginationMeta, Yr as DownloadDomainZoneFileErrors, Ys as SemanticSearchInput, Yt as AgentClaimLinkResult, Z as getSentEmail, Za as InboxStatusDomain, Zc as StartCliSignupResponse, Zi as GetEmailErrors, Zl as VerifiedDomain, Zn as CreateFunctionSecretResponse, Zo as PlanLimits, Zr as DownloadDomainZoneFileResponses, Zs as SemanticSearchResponses, Zt as AgentClaimStartResult, _ as DEFAULT_API_BASE_URL, _a as GetInboxStatusErrors, _c as SentEmailSummary, _i as ErrorResponse, _l as UnsetFunctionRouteErrors, _n as CreateAgentAccountError, _o as ListEmailsResponses, _r as DeleteFilterErrors, _s as ReplyToEmailErrors, _t as sdk_gen_d_exports, _u as VerifyDomainError, a as ReplyInput, aa as GetFunctionRoutingData, ac as SendEmailResponses, ai as EmailAuth, al as TestEndpointResponses, an as CliLogoutError, ao as ListDeliveriesErrors, ar as DeleteEmailData, as as ReplayDeliveryError, at as listFilters, au as VerifyAgentSignupError, b as PrimitiveApiError, ba as GetOrgRoutingTopologyData, bc as SetFunctionRouteErrors, bi as FunctionDetail, bl as UnverifiedDomain, bn as CreateAgentAccountResponse, bo as ListEndpointsErrors, br as DeleteFunctionData, bs as ResendAgentSignupVerificationData, bt as sendEmail, bu as VerifyDomainResponses, c as SendAttachment, ca as GetFunctionRoutingResponse, cc as SendMailResult, ci as EmailSearchFacetBucket, cl as TestFunctionErrors, cn as CliLogoutResponse, co as ListDomainsData, cr as DeleteEmailResponse, cs as ReplayDeliveryResponses, ct as listFunctions, cu as VerifyAgentSignupResponse, d as SendThreadInput, da as GetFunctionTestRunTraceError, dc as SendPermissionManagedZone, di as EmailSearchMeta, dl as TestInvocationResult, dn as CliSignupResendResult, do as ListDomainsResponse, dr as DeleteEndpointError, ds as ReplayEmailWebhooksErrors, dt as replayDelivery, du as VerifyCliSignupError, ea as GetFunctionData, ec as SemanticSearchSnippet, ei as DownloadRawEmailErrors, el as SuccessEnvelope, en as AgentSignupStartResult, eo as InboxStatusNextAction, er as DeleteDomainData, es as PollCliLoginErrors, et as getWebhookSecret, eu as VerifyAgentClaimErrors, f as client, fa as GetFunctionTestRunTraceErrors, fc as SendPermissionRule, fi as EmailSearchResult, fl as TestResult, fn as CliSignupStartResult, fo as ListDomainsResponses, fr as DeleteEndpointErrors, fs as ReplayEmailWebhooksResponse, ft as replayEmailWebhooks, fu as VerifyCliSignupErrors, g as verifyWebhookSignature, ga as GetInboxStatusError, gc as SentEmailStatus, gi as Endpoint, gl as UnsetFunctionRouteError, gn as CreateAgentAccountData, go as ListEmailsResponse, gr as DeleteFilterError, gs as ReplyToEmailError, gt as rotateWebhookSecret, gu as VerifyDomainData, h as VerifyOptions, ha as GetInboxStatusData, hc as SentEmailDetail, hi as EmailWebhookStatus, hl as UnsetFunctionRouteData, hn as ConversationMessage, ho as ListEmailsErrors, hr as DeleteFilterData, hs as ReplyToEmailData, ht as resendCliSignupVerification, hu as VerifyCliSignupResponses, i as PrimitiveClientOptions, ia as GetFunctionResponses, ic as SendEmailResponse, ii as EmailAttachment, il as TestEndpointResponse, in as CliLogoutData, io as ListDeliveriesError, ir as DeleteDomainResponses, is as ReplayDeliveryData, it as listEndpoints, iu as VerifyAgentSignupData, j as createFunctionSecret, ja as GetSentEmailError, jc as StartAgentClaimErrors, ji as FunctionTestRunInboundEmail, jl as UpdateDomainResponse, jn as CreateEndpointInput, jo as ListFunctionLogsErrors, jr as DeliverySummary, js as ResendCliSignupVerificationResponses, jt as updateDomain, ju as createConfig, k as createFilter, ka as GetSendPermissionsResponses, kc as StartAgentClaimData, ki as FunctionTestRunDelivery, kl as UpdateDomainErrors, kn as CreateEndpointError, ko as ListFunctionLogsData, kr as DeleteFunctionSecretResponses, ks as ResendCliSignupVerificationInput, kt as unsetFunctionRoute, ku as RequestResult, l as SendInput, la as GetFunctionRoutingResponses, lc as SendPermissionAddress, li as EmailSearchFacets, ll as TestFunctionResponse, ln as CliLogoutResponses, lo as ListDomainsError, lr as DeleteEmailResponses, ls as ReplayEmailWebhooksData, lt as listSentEmails, lu as VerifyAgentSignupResponses, m as PRIMITIVE_SIGNATURE_HEADER, ma as GetFunctionTestRunTraceResponses, mc as SendPermissionsMeta, mi as EmailSummary, ml as ThreadMessage, mn as Conversation, mo as ListEmailsError, mr as DeleteEndpointResponses, ms as ReplayResult, mt as resendAgentSignupVerification, mu as VerifyCliSignupResponse, n as ForwardInput, na as GetFunctionErrors, nc as SendEmailError, ni as DownloadRawEmailResponses, nl as TestEndpointError, nn as CliLoginPollResult, no as Limit, nr as DeleteDomainErrors, ns as PollCliLoginResponse, nt as listDomains, nu as VerifyAgentClaimResponse, o as RequestOptions$2, oa as GetFunctionRoutingError, oc as SendMailAttachment, oi as EmailDetail, ol as TestFunctionData, on as CliLogoutErrors, oo as ListDeliveriesResponse, or as DeleteEmailError, os as ReplayDeliveryErrors, ot as listFunctionLogs, ou as VerifyAgentSignupErrors, p as createPrimitiveClient, pa as GetFunctionTestRunTraceResponse, pc as SendPermissionYourDomain, pi as EmailStatus, pl as Thread, pn as CliSignupVerifyResult, po as ListEmailsData, pr as DeleteEndpointResponse, ps as ReplayEmailWebhooksResponses, pt as replyToEmail, pu as VerifyCliSignupInput, q as getFunctionTestRunTrace, qa as GetWebhookSecretErrors, qc as StartCliSignupData, qi as GetConversationResponse, ql as UpdateFunctionErrors, qn as CreateFunctionSecretData, qo as ListSentEmailsResponse, qr as DownloadDomainZoneFileData, qs as SemanticSearchErrors, qt as AgentAccountResult, r as PrimitiveClient, ra as GetFunctionResponse, rc as SendEmailErrors, ri as EmailAddress, rl as TestEndpointErrors, rn as CliLoginStartResult, ro as ListDeliveriesData, rr as DeleteDomainResponse, rs as PollCliLoginResponses, rt as listEmails, ru as VerifyAgentClaimResponses, s as SemanticSearchResponse, sa as GetFunctionRoutingErrors, sc as SendMailInput, si as EmailDetailReply, sl as TestFunctionError, sn as CliLogoutInput, so as ListDeliveriesResponses, sr as DeleteEmailErrors, ss as ReplayDeliveryResponse, st as listFunctionSecrets, su as VerifyAgentSignupInput, t as AgentResource, ta as GetFunctionError, tc as SendEmailData, ti as DownloadRawEmailResponse, tl as TestEndpointData, tn as AgentSignupVerifyResult, to as InboxStatusRecentEmailSummary, tr as DeleteDomainError, ts as PollCliLoginInput, tt as listDeliveries, tu as VerifyAgentClaimInput, u as SendResult, ua as GetFunctionTestRunTraceData, uc as SendPermissionAnyRecipient, ui as EmailSearchHighlights, ul as TestFunctionResponses, un as CliLogoutResult, uo as ListDomainsErrors, ur as DeleteEndpointData, us as ReplayEmailWebhooksError, ut as pollCliLogin, uu as VerifyCliSignupData, v as PrimitiveApiClient, va as GetInboxStatusResponse, vc as SetFunctionRouteData, vi as Filter, vl as UnsetFunctionRouteResponse, vn as CreateAgentAccountErrors, vo as ListEndpointsData, vr as DeleteFilterResponse, vs as ReplyToEmailResponse, vt as searchEmails, vu as VerifyDomainErrors, w as addDomain, wa as GetOrgRoutingTopologyResponses, wc as SetFunctionSecretError, wi as FunctionRouteResult, wl as UpdateAccountInput, wn as CreateAgentClaimLinkErrors, wo as ListFiltersData, wr as DeleteFunctionResponses, ws as ResendAgentSignupVerificationResponse, wt as startAgentSignup, wu as ClientOptions, x as PrimitiveApiErrorDetails, xa as GetOrgRoutingTopologyError, xc as SetFunctionRouteResponse, xi as FunctionListItem, xl as UpdateAccountData, xn as CreateAgentAccountResponses, xo as ListEndpointsResponse, xr as DeleteFunctionError, xs as ResendAgentSignupVerificationError, xt as setFunctionRoute, xu as WebhookSecret, y as PrimitiveApiClientOptions, ya as GetInboxStatusResponses, yc as SetFunctionRouteError, yi as FunctionDeployStatus, yl as UnsetFunctionRouteResponses, yn as CreateAgentAccountInput, yo as ListEndpointsError, yr as DeleteFilterResponses, ys as ReplyToEmailResponses, yt as semanticSearch, yu as VerifyDomainResponse, z as downloadAttachments, za as GetStorageStatsResponses, zc as StartAgentSignupResponse, zi as GetAccountData, zl as UpdateFilterData, zn as CreateFilterResponses, zo as ListFunctionsData, zr as Domain, zs as SearchEmailsData, zt as Account } from "../index-X7RsDaVi.js";
|
|
1
|
+
import { $ as getConversation, $a as GetSentEmailData, $c as SetFunctionSecretData, $i as FunctionTestRunDeliveryEndpoint, $l as UnsetFunctionRouteErrors, $n as CreateFunctionError, $o as ListFunctionLogsError, $r as DeliveryStatus, $s as ResendAgentSignupVerificationInput, $t as AddDomainData, $u as VerifyDomainError, A as RequestOptions$1, Aa as GetFunctionRoutingErrors, Ac as SemanticSearchSnippet, Ai as EmailDetailReply, Al as StartCliSignupError, An as CreateAgentAccountErrors, Ao as ListDeliveriesResponses, Ar as DeleteEndpointErrors, As as PollCliLoginErrors, At as semanticSearch, Au as UpdateFunctionInput, B as createOrgSecret, Ba as GetInboxStatusErrors, Bc as SendPermissionAnyRecipient, Bi as ErrorResponse, Bl as TestEndpointResponse, Bn as CreateEndpointData, Bo as ListEmailsResponses, Br as DeleteFunctionErrors, Bs as ReplayEmailWebhooksError, Bt as testFunction, Bu as VerifyAgentSignupData, C as VerifyOptions, Ca as GetFunctionData, Cc as SemanticSearchErrors, Ci as DownloadRawEmailErrors, Cl as StartCliLoginData, Cn as CliSignupResendResult, Co as InboxStatusNextAction, Cr as DeleteEmailData, Cs as OrgSecretListItem, Ct as replayEmailWebhooks, Cu as UpdateFilterErrors, D as PrimitiveApiClientOptions, Da as GetFunctionResponses, Dc as SemanticSearchResponses, Di as EmailAttachment, Dl as StartCliLoginResponse, Dn as ConversationMessage, Do as ListDeliveriesError, Dr as DeleteEmailResponses, Ds as PlanLimits, Dt as rotateWebhookSecret, Du as UpdateFunctionData, E as PrimitiveApiClient, Ea as GetFunctionResponse, Ec as SemanticSearchMeta, Ei as EmailAddress, El as StartCliLoginInput, En as Conversation, Eo as ListDeliveriesData, Er as DeleteEmailResponse, Es as ParsedEmailData, Et as resendCliSignupVerification, Eu as UpdateFilterResponses, F as createAgentClaimLink, Fa as GetFunctionTestRunTraceErrors, Fc as SendEmailResponses, Fi as EmailSearchResult, Fl as StorageStats, Fn as CreateAgentClaimLinkError, Fo as ListDomainsResponses, Fr as DeleteFilterErrors, Fs as ReplayDeliveryError, Ft as startAgentClaim, Fu as VerifyAgentClaimError, G as deleteFunction, Ga as GetOrgRoutingTopologyErrors, Gc as SentEmailDetail, Gi as FunctionLogRow, Gl as TestFunctionResponse, Gn as CreateEndpointResponses, Go as ListEndpointsResponses, Gr as DeleteFunctionSecretErrors, Gs as ReplyToEmailData, Gt as updateFilter, Gu as VerifyAgentSignupResponses, H as deleteEmail, Ha as GetInboxStatusResponses, Hc as SendPermissionRule, Hi as FunctionDeployStatus, Hl as TestFunctionData, Hn as CreateEndpointErrors, Ho as ListEndpointsError, Hr as DeleteFunctionResponses, Hs as ReplayEmailWebhooksResponse, Ht as updateAccount, Hu as VerifyAgentSignupErrors, I as createEndpoint, Ia as GetFunctionTestRunTraceResponse, Ic as SendMailAttachment, Ii as EmailStatus, Il as SuccessEnvelope, In as CreateAgentClaimLinkErrors, Io as ListEmailsData, Ir as DeleteFilterResponse, Is as ReplayDeliveryErrors, It as startAgentSignup, Iu as VerifyAgentClaimErrors, J as discardEmailContent, Ja as GetSendPermissionsData, Jc as SetFunctionRouteData, Ji as FunctionRouting, Jl as TestResult, Jn as CreateFilterErrors, Jo as ListFiltersError, Jr as DeleteOrgSecretData, Js as ReplyToEmailResponse, Jt as verifyAgentSignup, Ju as VerifyCliSignupErrors, K as deleteFunctionSecret, Ka as GetOrgRoutingTopologyResponse, Kc as SentEmailStatus, Ki as FunctionRouteBody, Kl as TestFunctionResponses, Kn as CreateFilterData, Ko as ListEnvelope, Kr as DeleteFunctionSecretResponse, Ks as ReplyToEmailError, Kt as updateFunction, Ku as VerifyCliSignupData, L as createFilter, La as GetFunctionTestRunTraceResponses, Lc as SendMailInput, Li as EmailSummary, Ll as TestEndpointData, Ln as CreateAgentClaimLinkInput, Lo as ListEmailsError, Lr as DeleteFilterResponses, Ls as ReplayDeliveryResponse, Lt as startCliLogin, Lu as VerifyAgentClaimInput, M as addDomain, Ma as GetFunctionRoutingResponses, Mc as SendEmailError, Mi as EmailSearchFacets, Ml as StartCliSignupInput, Mn as CreateAgentAccountResponse, Mo as ListDomainsError, Mr as DeleteEndpointResponses, Ms as PollCliLoginResponse, Mt as setFunctionRoute, Mu as UpdateFunctionResponses, N as cliLogout, Na as GetFunctionTestRunTraceData, Nc as SendEmailErrors, Ni as EmailSearchHighlights, Nl as StartCliSignupResponse, Nn as CreateAgentAccountResponses, No as ListDomainsErrors, Nr as DeleteFilterData, Ns as PollCliLoginResponses, Nt as setFunctionSecret, Nu as VerifiedDomain, O as PrimitiveApiError, Oa as GetFunctionRoutingData, Oc as SemanticSearchResult, Oi as EmailAuth, Ol as StartCliLoginResponses, On as CreateAgentAccountData, Oo as ListDeliveriesErrors, Or as DeleteEndpointData, Os as PollCliLoginData, Ot as sdk_gen_d_exports, Ou as UpdateFunctionError, P as createAgentAccount, Pa as GetFunctionTestRunTraceError, Pc as SendEmailResponse, Pi as EmailSearchMeta, Pl as StartCliSignupResponses, Pn as CreateAgentClaimLinkData, Po as ListDomainsResponse, Pr as DeleteFilterError, Ps as ReplayDeliveryData, Pt as setOrgSecret, Pu as VerifyAgentClaimData, Q as getAccount, Qa as GetSendPermissionsResponses, Qc as SetFunctionRouteResponses, Qi as FunctionTestRunDelivery, Ql as UnsetFunctionRouteError, Qn as CreateFunctionData, Qo as ListFunctionLogsData, Qr as DeleteOrgSecretResponses, Qs as ResendAgentSignupVerificationErrors, Qt as AccountUpdated, Qu as VerifyDomainData, R as createFunction, Ra as GetInboxStatusData, Rc as SendMailResult, Ri as EmailWebhookStatus, Rl as TestEndpointError, Rn as CreateAgentClaimLinkResponse, Ro as ListEmailsErrors, Rr as DeleteFunctionData, Rs as ReplayDeliveryResponses, Rt as startCliSignup, Ru as VerifyAgentClaimResponse, S as PRIMITIVE_SIGNATURE_HEADER, Sa as GetEmailResponses, Sc as SemanticSearchError, Si as DownloadRawEmailError, Sl as StartAgentSignupResponses, Sn as CliLogoutResult, So as InboxStatusFunctionSummary, Sr as DeleteDomainResponses, Ss as ListSentEmailsResponses, St as replayDelivery, Su as UpdateFilterError, T as DEFAULT_API_BASE_URL, Ta as GetFunctionErrors, Tc as SemanticSearchInput, Ti as DownloadRawEmailResponses, Tl as StartCliLoginErrors, Tn as CliSignupVerifyResult, To as Limit, Tr as DeleteEmailErrors, Ts as PaginationMeta, Tt as resendAgentSignupVerification, Tu as UpdateFilterResponse, U as deleteEndpoint, Ua as GetOrgRoutingTopologyData, Uc as SendPermissionYourDomain, Ui as FunctionDetail, Ul as TestFunctionError, Un as CreateEndpointInput, Uo as ListEndpointsErrors, Ur as DeleteFunctionSecretData, Us as ReplayEmailWebhooksResponses, Ut as updateDomain, Uu as VerifyAgentSignupInput, V as deleteDomain, Va as GetInboxStatusResponse, Vc as SendPermissionManagedZone, Vi as Filter, Vl as TestEndpointResponses, Vn as CreateEndpointError, Vo as ListEndpointsData, Vr as DeleteFunctionResponse, Vs as ReplayEmailWebhooksErrors, Vt as unsetFunctionRoute, Vu as VerifyAgentSignupError, W as deleteFilter, Wa as GetOrgRoutingTopologyError, Wc as SendPermissionsMeta, Wi as FunctionListItem, Wl as TestFunctionErrors, Wn as CreateEndpointResponse, Wo as ListEndpointsResponse, Wr as DeleteFunctionSecretError, Ws as ReplayResult, Wt as updateEndpoint, Wu as VerifyAgentSignupResponse, X as downloadDomainZoneFile, Xa as GetSendPermissionsErrors, Xc as SetFunctionRouteErrors, Xi as FunctionSecretWriteResult, Xl as ThreadMessage, Xn as CreateFilterResponse, Xo as ListFiltersResponse, Xr as DeleteOrgSecretErrors, Xs as ResendAgentSignupVerificationData, Xt as verifyDomain, Xu as VerifyCliSignupResponse, Y as downloadAttachments, Ya as GetSendPermissionsError, Yc as SetFunctionRouteError, Yi as FunctionSecretListItem, Yl as Thread, Yn as CreateFilterInput, Yo as ListFiltersErrors, Yr as DeleteOrgSecretError, Ys as ReplyToEmailResponses, Yt as verifyCliSignup, Yu as VerifyCliSignupInput, Z as downloadRawEmail, Za as GetSendPermissionsResponse, Zc as SetFunctionRouteResponse, Zi as FunctionTestRun, Zl as UnsetFunctionRouteData, Zn as CreateFilterResponses, Zo as ListFiltersResponses, Zr as DeleteOrgSecretResponse, Zs as ResendAgentSignupVerificationError, Zt as Account, Zu as VerifyCliSignupResponses, _ as SendThreadInput, _a as GetConversationResponses, _c as SearchEmailsErrors, _i as DownloadDomainZoneFileError, _l as StartAgentSignupData, _n as CliLogoutError, _o as GetWebhookSecretResponse, _r as Cursor, _s as ListOrgSecretsResponses, _t as listFunctionSecrets, _u as UpdateEndpointErrors, a as ForwardInput, aa as FunctionTestRunTrace, ac as ResendCliSignupVerificationInput, ad as Client, ai as DiscardEmailContentResponse, al as SetOrgSecretData, an as AgentAccountResult, ao as GetStorageStatsError, ar as CreateFunctionSecretData, as as ListFunctionSecretsErrors, at as getOrgRoutingTopology, au as UpdateAccountErrors, b as createAgent, ba as GetEmailErrors, bc as SemanticSearchCoverage, bi as DownloadDomainZoneFileResponses, bl as StartAgentSignupInput, bn as CliLogoutResponse, bo as InboxStatusDomain, br as DeleteDomainErrors, bs as ListSentEmailsErrors, bt as listSentEmails, bu as UpdateEndpointResponses, c as InboxStreamOptions, ca as GetAccountData, cc as ResourceId, cd as CreateClientConfig, ci as Domain, cl as SetOrgSecretInput, cn as AgentClaimResult, co as GetStorageStatsResponses, cr as CreateFunctionSecretInput, cs as ListFunctionsData, ct as getStorageStats, cu as UpdateAccountResponses, d as ReplyInput, da as GetAccountResponse, dc as RotateWebhookSecretErrors, dd as RequestResult, di as DownloadAttachmentsData, dl as StartAgentClaimData, dn as AgentSignupResendResult, do as GetThreadErrors, dr as CreateOrgSecretData, ds as ListFunctionsResponse, dt as listDeliveries, du as UpdateDomainErrors, ea as FunctionTestRunInboundEmail, ec as ResendAgentSignupVerificationResponse, ed as VerifyDomainErrors, ei as DeliverySummary, el as SetFunctionSecretError, en as AddDomainError, eo as GetSentEmailError, er as CreateFunctionErrors, es as ListFunctionLogsErrors, et as getEmail, eu as UnsetFunctionRouteResponse, f as RequestOptions$2, fa as GetAccountResponses, fc as RotateWebhookSecretResponse, fd as ResponseStyle, fi as DownloadAttachmentsError, fl as StartAgentClaimError, fn as AgentSignupStartResult, fo as GetThreadResponse, fr as CreateOrgSecretError, fs as ListFunctionsResponses, ft as listDomains, fu as UpdateDomainInput, g as SendResult, ga as GetConversationResponse, gc as SearchEmailsError, gi as DownloadDomainZoneFileData, gl as StartAgentClaimResponses, gn as CliLogoutData, go as GetWebhookSecretErrors, gr as CreateOrgSecretResponses, gs as ListOrgSecretsResponse, gt as listFunctionLogs, gu as UpdateEndpointError, h as SendInput, ha as GetConversationErrors, hc as SearchEmailsData, hi as DownloadAttachmentsResponses, hl as StartAgentClaimResponse, hn as CliLoginStartResult, ho as GetWebhookSecretError, hr as CreateOrgSecretResponse, hs as ListOrgSecretsErrors, ht as listFilters, hu as UpdateEndpointData, i as CreatedAgent, ia as FunctionTestRunState, ic as ResendCliSignupVerificationErrors, id as createClient, ii as DiscardEmailContentErrors, il as SetFunctionSecretResponses, in as AddDomainResponses, io as GetStorageStatsData, ir as CreateFunctionResult, is as ListFunctionSecretsError, it as getInboxStatus, iu as UpdateAccountError, j as createPrimitiveApiClient, ja as GetFunctionRoutingResponse, jc as SendEmailData, ji as EmailSearchFacetBucket, jl as StartCliSignupErrors, jn as CreateAgentAccountInput, jo as ListDomainsData, jr as DeleteEndpointResponse, js as PollCliLoginInput, jt as sendEmail, ju as UpdateFunctionResponse, k as PrimitiveApiErrorDetails, ka as GetFunctionRoutingError, kc as SemanticSearchScoreBreakdown, ki as EmailDetail, kl as StartCliSignupData, kn as CreateAgentAccountError, ko as ListDeliveriesResponse, kr as DeleteEndpointError, ks as PollCliLoginError, kt as searchEmails, ku as UpdateFunctionErrors, l as PrimitiveClient, la as GetAccountError, lc as RotateWebhookSecretData, ld as Options, li as DomainDnsRecord, ll as SetOrgSecretResponse, ln as AgentClaimStartResult, lo as GetThreadData, lr as CreateFunctionSecretResponse, ls as ListFunctionsError, lt as getThread, lu as UpdateDomainData, m as SendAttachment, ma as GetConversationError, mc as RoutingTopology, md as Auth, mi as DownloadAttachmentsResponse, ml as StartAgentClaimInput, mn as CliLoginPollResult, mo as GetWebhookSecretData, mr as CreateOrgSecretInput, ms as ListOrgSecretsError, mt as listEndpoints, mu as UpdateDomainResponses, n as AgentResource, na as FunctionTestRunReply, nc as ResendCliSignupVerificationData, nd as VerifyDomainResponses, ni as DiscardEmailContentData, nl as SetFunctionSecretInput, nn as AddDomainInput, no as GetSentEmailResponse, nr as CreateFunctionResponse, ns as ListFunctionLogsResponses, nt as getFunctionRouting, nu as UnverifiedDomain, o as InboundEmail, oa as GateDenial, oc as ResendCliSignupVerificationResponse, od as ClientOptions, oi as DiscardEmailContentResponses, ol as SetOrgSecretError, on as AgentAccountUpgradeHint, oo as GetStorageStatsErrors, or as CreateFunctionSecretError, os as ListFunctionSecretsResponse, ot as getSendPermissions, ou as UpdateAccountInput, p as SemanticSearchResponse, pa as GetConversationData, pc as RotateWebhookSecretResponses, pd as createConfig, pi as DownloadAttachmentsErrors, pl as StartAgentClaimErrors, pn as AgentSignupVerifyResult, po as GetThreadResponses, pr as CreateOrgSecretErrors, ps as ListOrgSecretsData, pt as listEmails, pu as UpdateDomainResponse, q as deleteOrgSecret, qa as GetOrgRoutingTopologyResponses, qc as SentEmailSummary, qi as FunctionRouteResult, ql as TestInvocationResult, qn as CreateFilterError, qo as ListFiltersData, qr as DeleteFunctionSecretResponses, qs as ReplyToEmailErrors, qt as verifyAgentClaim, qu as VerifyCliSignupError, r as CreateAgentOptions, ra as FunctionTestRunSend, rc as ResendCliSignupVerificationError, rd as WebhookSecret, ri as DiscardEmailContentError, rl as SetFunctionSecretResponse, rn as AddDomainResponse, ro as GetSentEmailResponses, rr as CreateFunctionResponses, rs as ListFunctionSecretsData, rt as getFunctionTestRunTrace, ru as UpdateAccountData, s as InboxResource, sa as GateFix, sc as ResendCliSignupVerificationResponses, sd as Config, si as DkimSignature, sl as SetOrgSecretErrors, sn as AgentClaimLinkResult, so as GetStorageStatsResponse, sr as CreateFunctionSecretErrors, ss as ListFunctionSecretsResponses, st as getSentEmail, su as UpdateAccountResponse, t as AccountResource, ta as FunctionTestRunOutboundRequest, tc as ResendAgentSignupVerificationResponses, td as VerifyDomainResponse, ti as DiscardContentResult, tl as SetFunctionSecretErrors, tn as AddDomainErrors, to as GetSentEmailErrors, tr as CreateFunctionInput, ts as ListFunctionLogsResponse, tt as getFunction, tu as UnsetFunctionRouteResponses, u as PrimitiveClientOptions, ua as GetAccountErrors, uc as RotateWebhookSecretError, ud as RequestOptions, ui as DomainVerifyResult, ul as SetOrgSecretResponses, un as AgentOrgRef, uo as GetThreadError, ur as CreateFunctionSecretResponses, us as ListFunctionsErrors, ut as getWebhookSecret, uu as UpdateDomainError, v as WaitForNextOptions, va as GetEmailData, vc as SearchEmailsResponse, vi as DownloadDomainZoneFileErrors, vl as StartAgentSignupError, vn as CliLogoutErrors, vo as GetWebhookSecretResponses, vr as DeleteDomainData, vs as ListSentEmailsData, vt as listFunctions, vu as UpdateEndpointInput, w as verifyWebhookSignature, wa as GetFunctionError, wc as SemanticSearchField, wi as DownloadRawEmailResponse, wl as StartCliLoginError, wn as CliSignupStartResult, wo as InboxStatusRecentEmailSummary, wr as DeleteEmailError, ws as OrgSecretWriteResult, wt as replyToEmail, wu as UpdateFilterInput, x as createPrimitiveClient, xa as GetEmailResponse, xc as SemanticSearchData, xi as DownloadRawEmailData, xl as StartAgentSignupResponse, xn as CliLogoutResponses, xo as InboxStatusEndpointSummary, xr as DeleteDomainResponse, xs as ListSentEmailsResponse, xt as pollCliLogin, xu as UpdateFilterData, y as client, ya as GetEmailError, yc as SearchEmailsResponses, yi as DownloadDomainZoneFileResponse, yl as StartAgentSignupErrors, yn as CliLogoutInput, yo as InboxStatus, yr as DeleteDomainError, ys as ListSentEmailsError, yt as listOrgSecrets, yu as UpdateEndpointResponse, z as createFunctionSecret, za as GetInboxStatusError, zc as SendPermissionAddress, zi as Endpoint, zl as TestEndpointErrors, zn as CreateAgentClaimLinkResponses, zo as ListEmailsResponse, zr as DeleteFunctionError, zs as ReplayEmailWebhooksData, zt as testEndpoint, zu as VerifyAgentClaimResponses } from "../index--2RzTxVl.js";
|
|
2
2
|
import { i as openapiDocument, n as PrimitiveParameterManifest, r as operationManifest, t as PrimitiveOperationManifest } from "../operations.generated-BAniFZK9.js";
|
|
3
|
-
import {
|
|
4
|
-
import { b as normalizeReceivedEmail, f as WebhookVerificationError, g as ReceivedEmailThread, h as ReceivedEmailAddress, m as ReceivedEmail, p as WebhookVerificationErrorCode } from "../errors-
|
|
5
|
-
export { Account, AccountUpdated, AddDomainData, AddDomainError, AddDomainErrors, AddDomainInput, AddDomainResponse, AddDomainResponses, AgentAccountResult, AgentAccountUpgradeHint, AgentClaimLinkResult, AgentClaimResult, AgentClaimStartResult, AgentOrgRef, AgentResource, AgentSignupResendResult, AgentSignupStartResult, AgentSignupVerifyResult, Auth, CliLoginPollResult, CliLoginStartResult, CliLogoutData, CliLogoutError, CliLogoutErrors, CliLogoutInput, CliLogoutResponse, CliLogoutResponses, CliLogoutResult, CliSignupResendResult, CliSignupStartResult, CliSignupVerifyResult, Client, Client as PrimitiveGeneratedApiClient, ClientOptions, ClientOptions as PrimitiveGeneratedApiClientOptions, Config, Config as PrimitiveGeneratedApiConfig, Conversation, ConversationMessage, CreateAgentAccountData, CreateAgentAccountError, CreateAgentAccountErrors, CreateAgentAccountInput, CreateAgentAccountResponse, CreateAgentAccountResponses, CreateAgentClaimLinkData, CreateAgentClaimLinkError, CreateAgentClaimLinkErrors, CreateAgentClaimLinkInput, CreateAgentClaimLinkResponse, CreateAgentClaimLinkResponses, CreateClientConfig, CreateEndpointData, CreateEndpointError, CreateEndpointErrors, CreateEndpointInput, CreateEndpointResponse, CreateEndpointResponses, CreateFilterData, CreateFilterError, CreateFilterErrors, CreateFilterInput, CreateFilterResponse, CreateFilterResponses, CreateFunctionData, CreateFunctionError, CreateFunctionErrors, CreateFunctionInput, CreateFunctionResponse, CreateFunctionResponses, CreateFunctionResult, CreateFunctionSecretData, CreateFunctionSecretError, CreateFunctionSecretErrors, CreateFunctionSecretInput, CreateFunctionSecretResponse, CreateFunctionSecretResponses, Cursor, DEFAULT_API_BASE_URL, DeleteDomainData, DeleteDomainError, DeleteDomainErrors, DeleteDomainResponse, DeleteDomainResponses, DeleteEmailData, DeleteEmailError, DeleteEmailErrors, DeleteEmailResponse, DeleteEmailResponses, DeleteEndpointData, DeleteEndpointError, DeleteEndpointErrors, DeleteEndpointResponse, DeleteEndpointResponses, DeleteFilterData, DeleteFilterError, DeleteFilterErrors, DeleteFilterResponse, DeleteFilterResponses, DeleteFunctionData, DeleteFunctionError, DeleteFunctionErrors, DeleteFunctionResponse, DeleteFunctionResponses, DeleteFunctionSecretData, DeleteFunctionSecretError, DeleteFunctionSecretErrors, DeleteFunctionSecretResponse, DeleteFunctionSecretResponses, DeliveryStatus, DeliverySummary, DiscardContentResult, DiscardEmailContentData, DiscardEmailContentError, DiscardEmailContentErrors, DiscardEmailContentResponse, DiscardEmailContentResponses, DkimSignature, Domain, DomainDnsRecord, DomainVerifyResult, DownloadAttachmentsData, DownloadAttachmentsError, DownloadAttachmentsErrors, DownloadAttachmentsResponse, DownloadAttachmentsResponses, DownloadDomainZoneFileData, DownloadDomainZoneFileError, DownloadDomainZoneFileErrors, DownloadDomainZoneFileResponse, DownloadDomainZoneFileResponses, DownloadRawEmailData, DownloadRawEmailError, DownloadRawEmailErrors, DownloadRawEmailResponse, DownloadRawEmailResponses, EmailAddress, EmailAttachment, EmailAuth, EmailDetail, EmailDetailReply, EmailReceivedEvent, EmailSearchFacetBucket, EmailSearchFacets, EmailSearchHighlights, EmailSearchMeta, EmailSearchResult, EmailStatus, EmailSummary, EmailWebhookStatus, Endpoint, ErrorResponse, Filter, ForwardInput, FunctionDeployStatus, FunctionDetail, FunctionListItem, FunctionLogRow, FunctionRouteBody, FunctionRouteResult, FunctionRouting, FunctionSecretListItem, FunctionSecretWriteResult, FunctionTestRun, FunctionTestRunDelivery, FunctionTestRunDeliveryEndpoint, FunctionTestRunInboundEmail, FunctionTestRunOutboundRequest, FunctionTestRunReply, FunctionTestRunSend, FunctionTestRunState, FunctionTestRunTrace, GateDenial, GateFix, GetAccountData, GetAccountError, GetAccountErrors, GetAccountResponse, GetAccountResponses, GetConversationData, GetConversationError, GetConversationErrors, GetConversationResponse, GetConversationResponses, GetEmailData, GetEmailError, GetEmailErrors, GetEmailResponse, GetEmailResponses, GetFunctionData, GetFunctionError, GetFunctionErrors, GetFunctionResponse, GetFunctionResponses, GetFunctionRoutingData, GetFunctionRoutingError, GetFunctionRoutingErrors, GetFunctionRoutingResponse, GetFunctionRoutingResponses, GetFunctionTestRunTraceData, GetFunctionTestRunTraceError, GetFunctionTestRunTraceErrors, GetFunctionTestRunTraceResponse, GetFunctionTestRunTraceResponses, GetInboxStatusData, GetInboxStatusError, GetInboxStatusErrors, GetInboxStatusResponse, GetInboxStatusResponses, GetOrgRoutingTopologyData, GetOrgRoutingTopologyError, GetOrgRoutingTopologyErrors, GetOrgRoutingTopologyResponse, GetOrgRoutingTopologyResponses, GetSendPermissionsData, GetSendPermissionsError, GetSendPermissionsErrors, GetSendPermissionsResponse, GetSendPermissionsResponses, GetSentEmailData, GetSentEmailError, GetSentEmailErrors, GetSentEmailResponse, GetSentEmailResponses, GetStorageStatsData, GetStorageStatsError, GetStorageStatsErrors, GetStorageStatsResponse, GetStorageStatsResponses, GetThreadData, GetThreadError, GetThreadErrors, GetThreadResponse, GetThreadResponses, GetWebhookSecretData, GetWebhookSecretError, GetWebhookSecretErrors, GetWebhookSecretResponse, GetWebhookSecretResponses, InboxStatus, InboxStatusDomain, InboxStatusEndpointSummary, InboxStatusFunctionSummary, InboxStatusNextAction, InboxStatusRecentEmailSummary, 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, ListFunctionLogsData, ListFunctionLogsError, ListFunctionLogsErrors, ListFunctionLogsResponse, ListFunctionLogsResponses, ListFunctionSecretsData, ListFunctionSecretsError, ListFunctionSecretsErrors, ListFunctionSecretsResponse, ListFunctionSecretsResponses, ListFunctionsData, ListFunctionsError, ListFunctionsErrors, ListFunctionsResponse, ListFunctionsResponses, ListSentEmailsData, ListSentEmailsError, ListSentEmailsErrors, ListSentEmailsResponse, ListSentEmailsResponses, Options, Options as PrimitiveGeneratedApiOptions, PRIMITIVE_SIGNATURE_HEADER, PaginationMeta, ParsedEmailData, PlanLimits, PollCliLoginData, PollCliLoginError, PollCliLoginErrors, PollCliLoginInput, PollCliLoginResponse, PollCliLoginResponses, PrimitiveApiClient, PrimitiveApiClientOptions, PrimitiveApiError, PrimitiveApiErrorDetails, PrimitiveClient, PrimitiveClientOptions, RequestOptions as PrimitiveGeneratedApiRequestOptions, RequestResult as PrimitiveGeneratedApiRequestResult, RequestResult, PrimitiveOperationManifest, PrimitiveParameterManifest, RequestOptions$1 as PrimitiveRequestOptions, ReceivedEmail, ReceivedEmailAddress, ReceivedEmailThread, ReplayDeliveryData, ReplayDeliveryError, ReplayDeliveryErrors, ReplayDeliveryResponse, ReplayDeliveryResponses, ReplayEmailWebhooksData, ReplayEmailWebhooksError, ReplayEmailWebhooksErrors, ReplayEmailWebhooksResponse, ReplayEmailWebhooksResponses, ReplayResult, ReplyInput, ReplyToEmailData, ReplyToEmailError, ReplyToEmailErrors, ReplyToEmailResponse, ReplyToEmailResponses, RequestOptions$2 as RequestOptions, ResendAgentSignupVerificationData, ResendAgentSignupVerificationError, ResendAgentSignupVerificationErrors, ResendAgentSignupVerificationInput, ResendAgentSignupVerificationResponse, ResendAgentSignupVerificationResponses, ResendCliSignupVerificationData, ResendCliSignupVerificationError, ResendCliSignupVerificationErrors, ResendCliSignupVerificationInput, ResendCliSignupVerificationResponse, ResendCliSignupVerificationResponses, ResourceId, ResponseStyle, RotateWebhookSecretData, RotateWebhookSecretError, RotateWebhookSecretErrors, RotateWebhookSecretResponse, RotateWebhookSecretResponses, RoutingTopology, SearchEmailsData, SearchEmailsError, SearchEmailsErrors, SearchEmailsResponse, SearchEmailsResponses, SemanticSearchCoverage, SemanticSearchData, SemanticSearchError, SemanticSearchErrors, SemanticSearchField, SemanticSearchInput, SemanticSearchMeta, SemanticSearchResponse, SemanticSearchResponses, SemanticSearchResult, SemanticSearchScoreBreakdown, SemanticSearchSnippet, SendAttachment, SendEmailData, SendEmailError, SendEmailErrors, SendEmailResponse, SendEmailResponses, SendInput, SendMailAttachment, SendMailInput, SendMailResult, SendPermissionAddress, SendPermissionAnyRecipient, SendPermissionManagedZone, SendPermissionRule, SendPermissionYourDomain, SendPermissionsMeta, SendResult, SendThreadInput, SentEmailDetail, SentEmailStatus, SentEmailSummary, SetFunctionRouteData, SetFunctionRouteError, SetFunctionRouteErrors, SetFunctionRouteResponse, SetFunctionRouteResponses, SetFunctionSecretData, SetFunctionSecretError, SetFunctionSecretErrors, SetFunctionSecretInput, SetFunctionSecretResponse, SetFunctionSecretResponses, StartAgentClaimData, StartAgentClaimError, StartAgentClaimErrors, StartAgentClaimInput, StartAgentClaimResponse, StartAgentClaimResponses, StartAgentSignupData, StartAgentSignupError, StartAgentSignupErrors, StartAgentSignupInput, StartAgentSignupResponse, StartAgentSignupResponses, StartCliLoginData, StartCliLoginError, StartCliLoginErrors, StartCliLoginInput, StartCliLoginResponse, StartCliLoginResponses, StartCliSignupData, StartCliSignupError, StartCliSignupErrors, StartCliSignupInput, StartCliSignupResponse, StartCliSignupResponses, StorageStats, SuccessEnvelope, TestEndpointData, TestEndpointError, TestEndpointErrors, TestEndpointResponse, TestEndpointResponses, TestFunctionData, TestFunctionError, TestFunctionErrors, TestFunctionResponse, TestFunctionResponses, TestInvocationResult, TestResult, Thread, ThreadMessage, UnsetFunctionRouteData, UnsetFunctionRouteError, UnsetFunctionRouteErrors, UnsetFunctionRouteResponse, UnsetFunctionRouteResponses, 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, UpdateFunctionData, UpdateFunctionError, UpdateFunctionErrors, UpdateFunctionInput, UpdateFunctionResponse, UpdateFunctionResponses, VerifiedDomain, VerifyAgentClaimData, VerifyAgentClaimError, VerifyAgentClaimErrors, VerifyAgentClaimInput, VerifyAgentClaimResponse, VerifyAgentClaimResponses, VerifyAgentSignupData, VerifyAgentSignupError, VerifyAgentSignupErrors, VerifyAgentSignupInput, VerifyAgentSignupResponse, VerifyAgentSignupResponses, VerifyCliSignupData, VerifyCliSignupError, VerifyCliSignupErrors, VerifyCliSignupInput, VerifyCliSignupResponse, VerifyCliSignupResponses, VerifyDomainData, VerifyDomainError, VerifyDomainErrors, VerifyDomainResponse, VerifyDomainResponses, VerifyOptions as VerifyWebhookSignatureOptions, WebhookSecret, WebhookVerificationError, WebhookVerificationErrorCode, addDomain, cliLogout, client, createAgentAccount, createAgentClaimLink, createClient, createConfig, createEndpoint, createFilter, createFunction, createFunctionSecret, createPrimitiveApiClient, createPrimitiveClient, deleteDomain, deleteEmail, deleteEndpoint, deleteFilter, deleteFunction, deleteFunctionSecret, discardEmailContent, downloadAttachments, downloadDomainZoneFile, downloadRawEmail, getAccount, getConversation, getEmail, getFunction, getFunctionRouting, getFunctionTestRunTrace, getInboxStatus, getOrgRoutingTopology, getSendPermissions, getSentEmail, getStorageStats, getThread, getWebhookSecret, listDeliveries, listDomains, listEmails, listEndpoints, listFilters, listFunctionLogs, listFunctionSecrets, listFunctions, listSentEmails, normalizeReceivedEmail, openapiDocument, operationManifest, sdk_gen_d_exports as operations, pollCliLogin, replayDelivery, replayEmailWebhooks, replyToEmail, resendAgentSignupVerification, resendCliSignupVerification, rotateWebhookSecret, searchEmails, semanticSearch, sendEmail, setFunctionRoute, setFunctionSecret, startAgentClaim, startAgentSignup, startCliLogin, startCliSignup, testEndpoint, testFunction, unsetFunctionRoute, updateAccount, updateDomain, updateEndpoint, updateFilter, updateFunction, verifyAgentClaim, verifyAgentSignup, verifyCliSignup, verifyDomain, verifyWebhookSignature };
|
|
3
|
+
import { f as EmailReceivedEvent } from "../types-QT2ss9ho.js";
|
|
4
|
+
import { b as normalizeReceivedEmail, f as WebhookVerificationError, g as ReceivedEmailThread, h as ReceivedEmailAddress, m as ReceivedEmail, p as WebhookVerificationErrorCode } from "../errors-DyuAXctD.js";
|
|
5
|
+
export { Account, AccountResource, AccountUpdated, AddDomainData, AddDomainError, AddDomainErrors, AddDomainInput, AddDomainResponse, AddDomainResponses, AgentAccountResult, AgentAccountUpgradeHint, AgentClaimLinkResult, AgentClaimResult, AgentClaimStartResult, AgentOrgRef, AgentResource, AgentSignupResendResult, AgentSignupStartResult, AgentSignupVerifyResult, Auth, CliLoginPollResult, CliLoginStartResult, CliLogoutData, CliLogoutError, CliLogoutErrors, CliLogoutInput, CliLogoutResponse, CliLogoutResponses, CliLogoutResult, CliSignupResendResult, CliSignupStartResult, CliSignupVerifyResult, Client, Client as PrimitiveGeneratedApiClient, ClientOptions, ClientOptions as PrimitiveGeneratedApiClientOptions, Config, Config as PrimitiveGeneratedApiConfig, Conversation, ConversationMessage, CreateAgentAccountData, CreateAgentAccountError, CreateAgentAccountErrors, CreateAgentAccountInput, CreateAgentAccountResponse, CreateAgentAccountResponses, CreateAgentClaimLinkData, CreateAgentClaimLinkError, CreateAgentClaimLinkErrors, CreateAgentClaimLinkInput, CreateAgentClaimLinkResponse, CreateAgentClaimLinkResponses, CreateAgentOptions, CreateClientConfig, CreateEndpointData, CreateEndpointError, CreateEndpointErrors, CreateEndpointInput, CreateEndpointResponse, CreateEndpointResponses, CreateFilterData, CreateFilterError, CreateFilterErrors, CreateFilterInput, CreateFilterResponse, CreateFilterResponses, CreateFunctionData, CreateFunctionError, CreateFunctionErrors, CreateFunctionInput, CreateFunctionResponse, CreateFunctionResponses, CreateFunctionResult, CreateFunctionSecretData, CreateFunctionSecretError, CreateFunctionSecretErrors, CreateFunctionSecretInput, CreateFunctionSecretResponse, CreateFunctionSecretResponses, CreateOrgSecretData, CreateOrgSecretError, CreateOrgSecretErrors, CreateOrgSecretInput, CreateOrgSecretResponse, CreateOrgSecretResponses, CreatedAgent, Cursor, DEFAULT_API_BASE_URL, DeleteDomainData, DeleteDomainError, DeleteDomainErrors, DeleteDomainResponse, DeleteDomainResponses, DeleteEmailData, DeleteEmailError, DeleteEmailErrors, DeleteEmailResponse, DeleteEmailResponses, DeleteEndpointData, DeleteEndpointError, DeleteEndpointErrors, DeleteEndpointResponse, DeleteEndpointResponses, DeleteFilterData, DeleteFilterError, DeleteFilterErrors, DeleteFilterResponse, DeleteFilterResponses, DeleteFunctionData, DeleteFunctionError, DeleteFunctionErrors, DeleteFunctionResponse, DeleteFunctionResponses, DeleteFunctionSecretData, DeleteFunctionSecretError, DeleteFunctionSecretErrors, DeleteFunctionSecretResponse, DeleteFunctionSecretResponses, DeleteOrgSecretData, DeleteOrgSecretError, DeleteOrgSecretErrors, DeleteOrgSecretResponse, DeleteOrgSecretResponses, DeliveryStatus, DeliverySummary, DiscardContentResult, DiscardEmailContentData, DiscardEmailContentError, DiscardEmailContentErrors, DiscardEmailContentResponse, DiscardEmailContentResponses, DkimSignature, Domain, DomainDnsRecord, DomainVerifyResult, DownloadAttachmentsData, DownloadAttachmentsError, DownloadAttachmentsErrors, DownloadAttachmentsResponse, DownloadAttachmentsResponses, DownloadDomainZoneFileData, DownloadDomainZoneFileError, DownloadDomainZoneFileErrors, DownloadDomainZoneFileResponse, DownloadDomainZoneFileResponses, DownloadRawEmailData, DownloadRawEmailError, DownloadRawEmailErrors, DownloadRawEmailResponse, DownloadRawEmailResponses, EmailAddress, EmailAttachment, EmailAuth, EmailDetail, EmailDetailReply, EmailReceivedEvent, EmailSearchFacetBucket, EmailSearchFacets, EmailSearchHighlights, EmailSearchMeta, EmailSearchResult, EmailStatus, EmailSummary, EmailWebhookStatus, Endpoint, ErrorResponse, Filter, ForwardInput, FunctionDeployStatus, FunctionDetail, FunctionListItem, FunctionLogRow, FunctionRouteBody, FunctionRouteResult, FunctionRouting, FunctionSecretListItem, FunctionSecretWriteResult, FunctionTestRun, FunctionTestRunDelivery, FunctionTestRunDeliveryEndpoint, FunctionTestRunInboundEmail, FunctionTestRunOutboundRequest, FunctionTestRunReply, FunctionTestRunSend, FunctionTestRunState, FunctionTestRunTrace, GateDenial, GateFix, GetAccountData, GetAccountError, GetAccountErrors, GetAccountResponse, GetAccountResponses, GetConversationData, GetConversationError, GetConversationErrors, GetConversationResponse, GetConversationResponses, GetEmailData, GetEmailError, GetEmailErrors, GetEmailResponse, GetEmailResponses, GetFunctionData, GetFunctionError, GetFunctionErrors, GetFunctionResponse, GetFunctionResponses, GetFunctionRoutingData, GetFunctionRoutingError, GetFunctionRoutingErrors, GetFunctionRoutingResponse, GetFunctionRoutingResponses, GetFunctionTestRunTraceData, GetFunctionTestRunTraceError, GetFunctionTestRunTraceErrors, GetFunctionTestRunTraceResponse, GetFunctionTestRunTraceResponses, GetInboxStatusData, GetInboxStatusError, GetInboxStatusErrors, GetInboxStatusResponse, GetInboxStatusResponses, GetOrgRoutingTopologyData, GetOrgRoutingTopologyError, GetOrgRoutingTopologyErrors, GetOrgRoutingTopologyResponse, GetOrgRoutingTopologyResponses, GetSendPermissionsData, GetSendPermissionsError, GetSendPermissionsErrors, GetSendPermissionsResponse, GetSendPermissionsResponses, GetSentEmailData, GetSentEmailError, GetSentEmailErrors, GetSentEmailResponse, GetSentEmailResponses, GetStorageStatsData, GetStorageStatsError, GetStorageStatsErrors, GetStorageStatsResponse, GetStorageStatsResponses, GetThreadData, GetThreadError, GetThreadErrors, GetThreadResponse, GetThreadResponses, GetWebhookSecretData, GetWebhookSecretError, GetWebhookSecretErrors, GetWebhookSecretResponse, GetWebhookSecretResponses, InboundEmail, InboxResource, InboxStatus, InboxStatusDomain, InboxStatusEndpointSummary, InboxStatusFunctionSummary, InboxStatusNextAction, InboxStatusRecentEmailSummary, InboxStreamOptions, 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, ListFunctionLogsData, ListFunctionLogsError, ListFunctionLogsErrors, ListFunctionLogsResponse, ListFunctionLogsResponses, ListFunctionSecretsData, ListFunctionSecretsError, ListFunctionSecretsErrors, ListFunctionSecretsResponse, ListFunctionSecretsResponses, ListFunctionsData, ListFunctionsError, ListFunctionsErrors, ListFunctionsResponse, ListFunctionsResponses, ListOrgSecretsData, ListOrgSecretsError, ListOrgSecretsErrors, ListOrgSecretsResponse, ListOrgSecretsResponses, ListSentEmailsData, ListSentEmailsError, ListSentEmailsErrors, ListSentEmailsResponse, ListSentEmailsResponses, Options, Options as PrimitiveGeneratedApiOptions, OrgSecretListItem, OrgSecretWriteResult, PRIMITIVE_SIGNATURE_HEADER, PaginationMeta, ParsedEmailData, PlanLimits, PollCliLoginData, PollCliLoginError, PollCliLoginErrors, PollCliLoginInput, PollCliLoginResponse, PollCliLoginResponses, PrimitiveApiClient, PrimitiveApiClientOptions, PrimitiveApiError, PrimitiveApiErrorDetails, PrimitiveClient, PrimitiveClientOptions, RequestOptions as PrimitiveGeneratedApiRequestOptions, RequestResult as PrimitiveGeneratedApiRequestResult, RequestResult, PrimitiveOperationManifest, PrimitiveParameterManifest, RequestOptions$1 as PrimitiveRequestOptions, ReceivedEmail, ReceivedEmailAddress, ReceivedEmailThread, ReplayDeliveryData, ReplayDeliveryError, ReplayDeliveryErrors, ReplayDeliveryResponse, ReplayDeliveryResponses, ReplayEmailWebhooksData, ReplayEmailWebhooksError, ReplayEmailWebhooksErrors, ReplayEmailWebhooksResponse, ReplayEmailWebhooksResponses, ReplayResult, ReplyInput, ReplyToEmailData, ReplyToEmailError, ReplyToEmailErrors, ReplyToEmailResponse, ReplyToEmailResponses, RequestOptions$2 as RequestOptions, ResendAgentSignupVerificationData, ResendAgentSignupVerificationError, ResendAgentSignupVerificationErrors, ResendAgentSignupVerificationInput, ResendAgentSignupVerificationResponse, ResendAgentSignupVerificationResponses, ResendCliSignupVerificationData, ResendCliSignupVerificationError, ResendCliSignupVerificationErrors, ResendCliSignupVerificationInput, ResendCliSignupVerificationResponse, ResendCliSignupVerificationResponses, ResourceId, ResponseStyle, RotateWebhookSecretData, RotateWebhookSecretError, RotateWebhookSecretErrors, RotateWebhookSecretResponse, RotateWebhookSecretResponses, RoutingTopology, SearchEmailsData, SearchEmailsError, SearchEmailsErrors, SearchEmailsResponse, SearchEmailsResponses, SemanticSearchCoverage, SemanticSearchData, SemanticSearchError, SemanticSearchErrors, SemanticSearchField, SemanticSearchInput, SemanticSearchMeta, SemanticSearchResponse, SemanticSearchResponses, SemanticSearchResult, SemanticSearchScoreBreakdown, SemanticSearchSnippet, SendAttachment, SendEmailData, SendEmailError, SendEmailErrors, SendEmailResponse, SendEmailResponses, SendInput, SendMailAttachment, SendMailInput, SendMailResult, SendPermissionAddress, SendPermissionAnyRecipient, SendPermissionManagedZone, SendPermissionRule, SendPermissionYourDomain, SendPermissionsMeta, SendResult, SendThreadInput, SentEmailDetail, SentEmailStatus, SentEmailSummary, SetFunctionRouteData, SetFunctionRouteError, SetFunctionRouteErrors, SetFunctionRouteResponse, SetFunctionRouteResponses, SetFunctionSecretData, SetFunctionSecretError, SetFunctionSecretErrors, SetFunctionSecretInput, SetFunctionSecretResponse, SetFunctionSecretResponses, SetOrgSecretData, SetOrgSecretError, SetOrgSecretErrors, SetOrgSecretInput, SetOrgSecretResponse, SetOrgSecretResponses, StartAgentClaimData, StartAgentClaimError, StartAgentClaimErrors, StartAgentClaimInput, StartAgentClaimResponse, StartAgentClaimResponses, StartAgentSignupData, StartAgentSignupError, StartAgentSignupErrors, StartAgentSignupInput, StartAgentSignupResponse, StartAgentSignupResponses, StartCliLoginData, StartCliLoginError, StartCliLoginErrors, StartCliLoginInput, StartCliLoginResponse, StartCliLoginResponses, StartCliSignupData, StartCliSignupError, StartCliSignupErrors, StartCliSignupInput, StartCliSignupResponse, StartCliSignupResponses, StorageStats, SuccessEnvelope, TestEndpointData, TestEndpointError, TestEndpointErrors, TestEndpointResponse, TestEndpointResponses, TestFunctionData, TestFunctionError, TestFunctionErrors, TestFunctionResponse, TestFunctionResponses, TestInvocationResult, TestResult, Thread, ThreadMessage, UnsetFunctionRouteData, UnsetFunctionRouteError, UnsetFunctionRouteErrors, UnsetFunctionRouteResponse, UnsetFunctionRouteResponses, 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, UpdateFunctionData, UpdateFunctionError, UpdateFunctionErrors, UpdateFunctionInput, UpdateFunctionResponse, UpdateFunctionResponses, VerifiedDomain, VerifyAgentClaimData, VerifyAgentClaimError, VerifyAgentClaimErrors, VerifyAgentClaimInput, VerifyAgentClaimResponse, VerifyAgentClaimResponses, VerifyAgentSignupData, VerifyAgentSignupError, VerifyAgentSignupErrors, VerifyAgentSignupInput, VerifyAgentSignupResponse, VerifyAgentSignupResponses, VerifyCliSignupData, VerifyCliSignupError, VerifyCliSignupErrors, VerifyCliSignupInput, VerifyCliSignupResponse, VerifyCliSignupResponses, VerifyDomainData, VerifyDomainError, VerifyDomainErrors, VerifyDomainResponse, VerifyDomainResponses, VerifyOptions as VerifyWebhookSignatureOptions, WaitForNextOptions, WebhookSecret, WebhookVerificationError, WebhookVerificationErrorCode, addDomain, cliLogout, client, createAgent, createAgentAccount, createAgentClaimLink, createClient, createConfig, createEndpoint, createFilter, createFunction, createFunctionSecret, createOrgSecret, createPrimitiveApiClient, createPrimitiveClient, deleteDomain, deleteEmail, deleteEndpoint, deleteFilter, deleteFunction, deleteFunctionSecret, deleteOrgSecret, discardEmailContent, downloadAttachments, downloadDomainZoneFile, downloadRawEmail, getAccount, getConversation, getEmail, getFunction, getFunctionRouting, getFunctionTestRunTrace, getInboxStatus, getOrgRoutingTopology, getSendPermissions, getSentEmail, getStorageStats, getThread, getWebhookSecret, listDeliveries, listDomains, listEmails, listEndpoints, listFilters, listFunctionLogs, listFunctionSecrets, listFunctions, listOrgSecrets, listSentEmails, normalizeReceivedEmail, openapiDocument, operationManifest, sdk_gen_d_exports as operations, pollCliLogin, replayDelivery, replayEmailWebhooks, replyToEmail, resendAgentSignupVerification, resendCliSignupVerification, rotateWebhookSecret, searchEmails, semanticSearch, sendEmail, setFunctionRoute, setFunctionSecret, setOrgSecret, startAgentClaim, startAgentSignup, startCliLogin, startCliSignup, testEndpoint, testFunction, unsetFunctionRoute, updateAccount, updateDomain, updateEndpoint, updateFilter, updateFunction, verifyAgentClaim, verifyAgentSignup, verifyCliSignup, verifyDomain, verifyWebhookSignature };
|
package/dist/api/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { n as openapiDocument, t as operationManifest } from "../operations.generated-
|
|
1
|
+
import { $ as listFunctionSecrets, A as discardEmailContent, At as verifyAgentSignup, B as getInboxStatus, C as deleteDomain, Ct as unsetFunctionRoute, D as deleteFunction, Dt as updateFilter, E as deleteFilter, Et as updateEndpoint, F as getConversation, G as getThread, H as getSendPermissions, I as getEmail, J as listDomains, K as getWebhookSecret, L as getFunction, M as downloadDomainZoneFile, Mt as verifyDomain, N as downloadRawEmail, Nt as createClient, O as deleteFunctionSecret, Ot as updateFunction, P as getAccount, Pt as createConfig, Q as listFunctionLogs, R as getFunctionRouting, S as createOrgSecret, St as testFunction, T as deleteEndpoint, Tt as updateDomain, U as getSentEmail, V as getOrgRoutingTopology, W as getStorageStats, X as listEndpoints, Y as listEmails, Z as listFilters, _ as createAgentClaimLink, _t as startAgentClaim, a as client, at as replayEmailWebhooks, b as createFunction, bt as startCliSignup, c as PRIMITIVE_SIGNATURE_HEADER, ct as resendCliSignupVerification, d as PrimitiveApiClient, dt as searchEmails, et as listFunctions, f as PrimitiveApiError, ft as semanticSearch, g as createAgentAccount, gt as setOrgSecret, h as cliLogout, ht as setFunctionSecret, i as PrimitiveClient, it as replayDelivery, j as downloadAttachments, jt as verifyCliSignup, k as deleteOrgSecret, kt as verifyAgentClaim, l as verifyWebhookSignature, lt as rotateWebhookSecret, m as addDomain, mt as setFunctionRoute, n as AgentResource, nt as listSentEmails, o as createAgent, ot as replyToEmail, p as createPrimitiveApiClient, pt as sendEmail, q as listDeliveries, r as InboxResource, rt as pollCliLogin, s as createPrimitiveClient, st as resendAgentSignupVerification, t as AccountResource, tt as listOrgSecrets, u as DEFAULT_API_BASE_URL, ut as sdk_gen_exports, v as createEndpoint, vt as startAgentSignup, w as deleteEmail, wt as updateAccount, x as createFunctionSecret, xt as testEndpoint, y as createFilter, yt as startCliLogin, z as getFunctionTestRunTrace } from "../api-DrrmrNDe.js";
|
|
2
|
+
import { n as openapiDocument, t as operationManifest } from "../operations.generated-CA3-eorF.js";
|
|
3
3
|
import { c as WebhookVerificationError, f as normalizeReceivedEmail } from "../errors-BPJGp9I6.js";
|
|
4
|
-
export { AgentResource, DEFAULT_API_BASE_URL, PRIMITIVE_SIGNATURE_HEADER, PrimitiveApiClient, PrimitiveApiError, PrimitiveClient, WebhookVerificationError, addDomain, cliLogout, client, createAgentAccount, createAgentClaimLink, createClient, createConfig, createEndpoint, createFilter, createFunction, createFunctionSecret, createPrimitiveApiClient, createPrimitiveClient, deleteDomain, deleteEmail, deleteEndpoint, deleteFilter, deleteFunction, deleteFunctionSecret, discardEmailContent, downloadAttachments, downloadDomainZoneFile, downloadRawEmail, getAccount, getConversation, getEmail, getFunction, getFunctionRouting, getFunctionTestRunTrace, getInboxStatus, getOrgRoutingTopology, getSendPermissions, getSentEmail, getStorageStats, getThread, getWebhookSecret, listDeliveries, listDomains, listEmails, listEndpoints, listFilters, listFunctionLogs, listFunctionSecrets, listFunctions, listSentEmails, normalizeReceivedEmail, openapiDocument, operationManifest, sdk_gen_exports as operations, pollCliLogin, replayDelivery, replayEmailWebhooks, replyToEmail, resendAgentSignupVerification, resendCliSignupVerification, rotateWebhookSecret, searchEmails, semanticSearch, sendEmail, setFunctionRoute, setFunctionSecret, startAgentClaim, startAgentSignup, startCliLogin, startCliSignup, testEndpoint, testFunction, unsetFunctionRoute, updateAccount, updateDomain, updateEndpoint, updateFilter, updateFunction, verifyAgentClaim, verifyAgentSignup, verifyCliSignup, verifyDomain, verifyWebhookSignature };
|
|
4
|
+
export { AccountResource, AgentResource, DEFAULT_API_BASE_URL, InboxResource, PRIMITIVE_SIGNATURE_HEADER, PrimitiveApiClient, PrimitiveApiError, PrimitiveClient, WebhookVerificationError, addDomain, cliLogout, client, createAgent, createAgentAccount, createAgentClaimLink, createClient, createConfig, createEndpoint, createFilter, createFunction, createFunctionSecret, createOrgSecret, createPrimitiveApiClient, createPrimitiveClient, deleteDomain, deleteEmail, deleteEndpoint, deleteFilter, deleteFunction, deleteFunctionSecret, deleteOrgSecret, discardEmailContent, downloadAttachments, downloadDomainZoneFile, downloadRawEmail, getAccount, getConversation, getEmail, getFunction, getFunctionRouting, getFunctionTestRunTrace, getInboxStatus, getOrgRoutingTopology, getSendPermissions, getSentEmail, getStorageStats, getThread, getWebhookSecret, listDeliveries, listDomains, listEmails, listEndpoints, listFilters, listFunctionLogs, listFunctionSecrets, listFunctions, listOrgSecrets, listSentEmails, normalizeReceivedEmail, openapiDocument, operationManifest, sdk_gen_exports as operations, pollCliLogin, replayDelivery, replayEmailWebhooks, replyToEmail, resendAgentSignupVerification, resendCliSignupVerification, rotateWebhookSecret, searchEmails, semanticSearch, sendEmail, setFunctionRoute, setFunctionSecret, setOrgSecret, startAgentClaim, startAgentSignup, startCliLogin, startCliSignup, testEndpoint, testFunction, unsetFunctionRoute, updateAccount, updateDomain, updateEndpoint, updateFilter, updateFunction, verifyAgentClaim, verifyAgentSignup, verifyCliSignup, verifyDomain, verifyWebhookSignature };
|
|
@@ -621,12 +621,14 @@ var sdk_gen_exports = /* @__PURE__ */ __exportAll({
|
|
|
621
621
|
createFilter: () => createFilter,
|
|
622
622
|
createFunction: () => createFunction,
|
|
623
623
|
createFunctionSecret: () => createFunctionSecret,
|
|
624
|
+
createOrgSecret: () => createOrgSecret,
|
|
624
625
|
deleteDomain: () => deleteDomain,
|
|
625
626
|
deleteEmail: () => deleteEmail,
|
|
626
627
|
deleteEndpoint: () => deleteEndpoint,
|
|
627
628
|
deleteFilter: () => deleteFilter,
|
|
628
629
|
deleteFunction: () => deleteFunction,
|
|
629
630
|
deleteFunctionSecret: () => deleteFunctionSecret,
|
|
631
|
+
deleteOrgSecret: () => deleteOrgSecret,
|
|
630
632
|
discardEmailContent: () => discardEmailContent,
|
|
631
633
|
downloadAttachments: () => downloadAttachments,
|
|
632
634
|
downloadDomainZoneFile: () => downloadDomainZoneFile,
|
|
@@ -652,6 +654,7 @@ var sdk_gen_exports = /* @__PURE__ */ __exportAll({
|
|
|
652
654
|
listFunctionLogs: () => listFunctionLogs,
|
|
653
655
|
listFunctionSecrets: () => listFunctionSecrets,
|
|
654
656
|
listFunctions: () => listFunctions,
|
|
657
|
+
listOrgSecrets: () => listOrgSecrets,
|
|
655
658
|
listSentEmails: () => listSentEmails,
|
|
656
659
|
pollCliLogin: () => pollCliLogin,
|
|
657
660
|
replayDelivery: () => replayDelivery,
|
|
@@ -665,6 +668,7 @@ var sdk_gen_exports = /* @__PURE__ */ __exportAll({
|
|
|
665
668
|
sendEmail: () => sendEmail,
|
|
666
669
|
setFunctionRoute: () => setFunctionRoute,
|
|
667
670
|
setFunctionSecret: () => setFunctionSecret,
|
|
671
|
+
setOrgSecret: () => setOrgSecret,
|
|
668
672
|
startAgentClaim: () => startAgentClaim,
|
|
669
673
|
startAgentSignup: () => startAgentSignup,
|
|
670
674
|
startCliLogin: () => startCliLogin,
|
|
@@ -1783,10 +1787,12 @@ const listFunctions = (options) => (options?.client ?? client$1).get({
|
|
|
1783
1787
|
* each delivery and forwards the `Primitive-Signature` header to
|
|
1784
1788
|
* the handler. Verify the raw request body with
|
|
1785
1789
|
* `PRIMITIVE_WEBHOOK_SECRET` before parsing JSON; after verification
|
|
1786
|
-
* the request body parses to
|
|
1787
|
-
* `
|
|
1788
|
-
*
|
|
1789
|
-
*
|
|
1790
|
+
* the request body parses to a webhook event whose `event` field is
|
|
1791
|
+
* `email.received` for normal inbound mail, or a machine-mail type
|
|
1792
|
+
* (`email.bounced`, `email.tls_report`, `email.dmarc_report`,
|
|
1793
|
+
* `email.dmarc_failure`) for bounces and reports. Code is bundled
|
|
1794
|
+
* before being uploaded; ship a single self-contained file rather
|
|
1795
|
+
* than relying on external imports.
|
|
1790
1796
|
*
|
|
1791
1797
|
* **Code limits.** `code` is capped at 1 MiB UTF-8. `sourceMap`
|
|
1792
1798
|
* (optional) is capped at 5 MiB UTF-8, stored with each deployment
|
|
@@ -2104,6 +2110,85 @@ const setFunctionSecret = (options) => (options.client ?? client$1).put({
|
|
|
2104
2110
|
}
|
|
2105
2111
|
});
|
|
2106
2112
|
/**
|
|
2113
|
+
* List org-level (global) secrets
|
|
2114
|
+
*
|
|
2115
|
+
* Returns metadata for every org-level secret. Org secrets apply
|
|
2116
|
+
* to every function in the org and are read as `env.<KEY>` in
|
|
2117
|
+
* handlers. **Values are never returned.** Secret writes are
|
|
2118
|
+
* write-only. A function-level secret of the same name overrides
|
|
2119
|
+
* the org-level value for that function.
|
|
2120
|
+
*
|
|
2121
|
+
*/
|
|
2122
|
+
const listOrgSecrets = (options) => (options?.client ?? client$1).get({
|
|
2123
|
+
security: [{
|
|
2124
|
+
scheme: "bearer",
|
|
2125
|
+
type: "http"
|
|
2126
|
+
}],
|
|
2127
|
+
url: "/org/secrets",
|
|
2128
|
+
...options
|
|
2129
|
+
});
|
|
2130
|
+
/**
|
|
2131
|
+
* Create or update an org secret
|
|
2132
|
+
*
|
|
2133
|
+
* Idempotent insert-or-update keyed on `(org_id, key)`. Returns
|
|
2134
|
+
* 201 the first time the key is set, 200 on subsequent updates.
|
|
2135
|
+
* Values are encrypted at rest. A changed value lands in a
|
|
2136
|
+
* function only on that function's next deploy.
|
|
2137
|
+
*
|
|
2138
|
+
* Keys must match `^[A-Z_][A-Z0-9_]*$` (uppercase letters,
|
|
2139
|
+
* digits, underscores; first character is a letter or
|
|
2140
|
+
* underscore). Values are at most 4096 UTF-8 bytes. System-
|
|
2141
|
+
* managed keys are reserved and rejected.
|
|
2142
|
+
*
|
|
2143
|
+
*/
|
|
2144
|
+
const createOrgSecret = (options) => (options.client ?? client$1).post({
|
|
2145
|
+
security: [{
|
|
2146
|
+
scheme: "bearer",
|
|
2147
|
+
type: "http"
|
|
2148
|
+
}],
|
|
2149
|
+
url: "/org/secrets",
|
|
2150
|
+
...options,
|
|
2151
|
+
headers: {
|
|
2152
|
+
...options.body !== void 0 && { "Content-Type": "application/json" },
|
|
2153
|
+
...options.headers
|
|
2154
|
+
}
|
|
2155
|
+
});
|
|
2156
|
+
/**
|
|
2157
|
+
* Delete an org secret
|
|
2158
|
+
*
|
|
2159
|
+
* Removes the org secret. Functions keep the previous value until
|
|
2160
|
+
* each is redeployed. Returns 404 if the key did not exist.
|
|
2161
|
+
*
|
|
2162
|
+
*/
|
|
2163
|
+
const deleteOrgSecret = (options) => (options.client ?? client$1).delete({
|
|
2164
|
+
security: [{
|
|
2165
|
+
scheme: "bearer",
|
|
2166
|
+
type: "http"
|
|
2167
|
+
}],
|
|
2168
|
+
url: "/org/secrets/{key}",
|
|
2169
|
+
...options
|
|
2170
|
+
});
|
|
2171
|
+
/**
|
|
2172
|
+
* Set an org secret by key
|
|
2173
|
+
*
|
|
2174
|
+
* Path-keyed companion to `POST /org/secrets`. Idempotent:
|
|
2175
|
+
* returns 201 the first time the key is set, 200 on subsequent
|
|
2176
|
+
* updates. Same validation and write-only guarantees as POST.
|
|
2177
|
+
*
|
|
2178
|
+
*/
|
|
2179
|
+
const setOrgSecret = (options) => (options.client ?? client$1).put({
|
|
2180
|
+
security: [{
|
|
2181
|
+
scheme: "bearer",
|
|
2182
|
+
type: "http"
|
|
2183
|
+
}],
|
|
2184
|
+
url: "/org/secrets/{key}",
|
|
2185
|
+
...options,
|
|
2186
|
+
headers: {
|
|
2187
|
+
...options.body !== void 0 && { "Content-Type": "application/json" },
|
|
2188
|
+
...options.headers
|
|
2189
|
+
}
|
|
2190
|
+
});
|
|
2191
|
+
/**
|
|
2107
2192
|
* List a function's execution logs
|
|
2108
2193
|
*
|
|
2109
2194
|
* Returns the most recent `function_logs` rows for the function,
|
|
@@ -2216,7 +2301,7 @@ const DEFAULT_TOLERANCE_SECONDS = 300;
|
|
|
2216
2301
|
const FUTURE_TOLERANCE_SECONDS = 60;
|
|
2217
2302
|
const HEX_PATTERN = /^[0-9a-f]+$/i;
|
|
2218
2303
|
const HEX_LENGTH = 64;
|
|
2219
|
-
const UNIX_SECONDS_PATTERN = /^\d
|
|
2304
|
+
const UNIX_SECONDS_PATTERN = /^\d+$/;
|
|
2220
2305
|
function parseSignatureHeader(signatureHeader) {
|
|
2221
2306
|
if (!signatureHeader || typeof signatureHeader !== "string") return null;
|
|
2222
2307
|
const parts = signatureHeader.split(",");
|
|
@@ -2531,9 +2616,153 @@ var AgentResource = class {
|
|
|
2531
2616
|
}), "claim link result");
|
|
2532
2617
|
}
|
|
2533
2618
|
};
|
|
2619
|
+
const INBOX_EPOCH_CURSOR = "1970-01-01T00:00:00.000000Z|00000000-0000-0000-0000-000000000000";
|
|
2620
|
+
const DEFAULT_WAIT_SECONDS = 30;
|
|
2621
|
+
function buildReplyBody(input) {
|
|
2622
|
+
const resolved = typeof input === "string" ? { text: input } : input;
|
|
2623
|
+
if ("subject" in resolved) throw new TypeError("reply does not support a subject override; the server prepends 'Re:' to the parent's subject for thread continuity");
|
|
2624
|
+
if (!resolved.text && !resolved.html) throw new TypeError("reply requires text or html");
|
|
2625
|
+
return {
|
|
2626
|
+
...resolved.text !== void 0 ? { body_text: resolved.text } : {},
|
|
2627
|
+
...resolved.html !== void 0 ? { body_html: resolved.html } : {},
|
|
2628
|
+
...resolved.from !== void 0 ? { from: resolved.from } : {},
|
|
2629
|
+
...resolved.attachments !== void 0 ? { attachments: resolved.attachments } : {},
|
|
2630
|
+
...resolved.wait !== void 0 ? { wait: resolved.wait } : {}
|
|
2631
|
+
};
|
|
2632
|
+
}
|
|
2633
|
+
async function replyById(client, id, input, options) {
|
|
2634
|
+
return unwrapSendResult(await replyToEmail({
|
|
2635
|
+
body: buildReplyBody(input),
|
|
2636
|
+
path: { id },
|
|
2637
|
+
...resolveRequestOptions(options),
|
|
2638
|
+
client,
|
|
2639
|
+
responseStyle: "fields"
|
|
2640
|
+
}));
|
|
2641
|
+
}
|
|
2642
|
+
function toInboundEmail(row, cursor, client) {
|
|
2643
|
+
return {
|
|
2644
|
+
id: row.id,
|
|
2645
|
+
messageId: row.message_id ?? null,
|
|
2646
|
+
from: row.sender,
|
|
2647
|
+
to: row.recipient,
|
|
2648
|
+
subject: row.subject ?? null,
|
|
2649
|
+
status: row.status,
|
|
2650
|
+
domain: row.domain,
|
|
2651
|
+
spamScore: row.spam_score ?? null,
|
|
2652
|
+
threadId: row.thread_id ?? null,
|
|
2653
|
+
createdAt: row.created_at,
|
|
2654
|
+
receivedAt: row.received_at,
|
|
2655
|
+
cursor,
|
|
2656
|
+
reply: (input, options) => replyById(client, row.id, input, options)
|
|
2657
|
+
};
|
|
2658
|
+
}
|
|
2659
|
+
/** Unwrap a `listEmails` page into rows + the next forward-tail cursor. */
|
|
2660
|
+
function unwrapInboxPage(result) {
|
|
2661
|
+
const response = result.response;
|
|
2662
|
+
if (result.error) {
|
|
2663
|
+
if (isAbortLikeError(result.error)) throw result.error;
|
|
2664
|
+
const parsed = parseApiErrorPayload(result.error);
|
|
2665
|
+
throw new PrimitiveApiError(parsed.message, {
|
|
2666
|
+
payload: result.error,
|
|
2667
|
+
status: response?.status,
|
|
2668
|
+
code: parsed.code,
|
|
2669
|
+
gates: parsed.gates,
|
|
2670
|
+
requestId: parsed.requestId,
|
|
2671
|
+
retryAfter: parseRetryAfterHeader(response),
|
|
2672
|
+
details: parsed.details,
|
|
2673
|
+
cause: result.error instanceof Error ? result.error : void 0
|
|
2674
|
+
});
|
|
2675
|
+
}
|
|
2676
|
+
return {
|
|
2677
|
+
emails: result.data?.data ?? [],
|
|
2678
|
+
cursor: result.data?.meta?.cursor ?? null
|
|
2679
|
+
};
|
|
2680
|
+
}
|
|
2681
|
+
/**
|
|
2682
|
+
* Inbound mail, grouped under `client.inbox`. Wraps the GET /v1/emails forward
|
|
2683
|
+
* tail (`?since` + `?wait` long-poll) so an agent's receive loop is a single
|
|
2684
|
+
* `for await`, with the cursor advanced for you.
|
|
2685
|
+
*/
|
|
2686
|
+
var InboxResource = class {
|
|
2687
|
+
constructor(client) {
|
|
2688
|
+
this.client = client;
|
|
2689
|
+
}
|
|
2690
|
+
/**
|
|
2691
|
+
* Stream inbound emails as they arrive. Long-polls the forward tail, yielding
|
|
2692
|
+
* one email at a time and advancing the cursor. Resumes from `since` (omit to
|
|
2693
|
+
* start oldest-first); stops when `signal` aborts.
|
|
2694
|
+
*
|
|
2695
|
+
* for await (const email of client.inbox.stream()) {
|
|
2696
|
+
* await email.reply("got it");
|
|
2697
|
+
* }
|
|
2698
|
+
*/
|
|
2699
|
+
async *stream(options = {}) {
|
|
2700
|
+
let since = options.since ?? INBOX_EPOCH_CURSOR;
|
|
2701
|
+
const wait = options.waitSeconds ?? DEFAULT_WAIT_SECONDS;
|
|
2702
|
+
while (!options.signal?.aborted) {
|
|
2703
|
+
const result = await listEmails({
|
|
2704
|
+
query: {
|
|
2705
|
+
since,
|
|
2706
|
+
wait,
|
|
2707
|
+
limit: 1
|
|
2708
|
+
},
|
|
2709
|
+
...resolveRequestOptions({ signal: options.signal }),
|
|
2710
|
+
client: this.client,
|
|
2711
|
+
responseStyle: "fields"
|
|
2712
|
+
});
|
|
2713
|
+
const { emails, cursor } = unwrapInboxPage(result);
|
|
2714
|
+
if (emails.length > 0 && cursor === null) throw new PrimitiveApiError("Forward tail returned emails without a continuation cursor; refusing to advance to avoid re-yielding the same mail.", { payload: result });
|
|
2715
|
+
for (const row of emails) yield toInboundEmail(row, cursor ?? since, this.client);
|
|
2716
|
+
if (cursor) since = cursor;
|
|
2717
|
+
}
|
|
2718
|
+
}
|
|
2719
|
+
/**
|
|
2720
|
+
* Resolve with the next inbound email after `since`, or null if none arrives
|
|
2721
|
+
* within the wait window. One-shot form of `stream`; pass your current cursor
|
|
2722
|
+
* as `since` to wait for genuinely new mail.
|
|
2723
|
+
*/
|
|
2724
|
+
async waitForNext(options = {}) {
|
|
2725
|
+
const result = await listEmails({
|
|
2726
|
+
query: {
|
|
2727
|
+
since: options.since ?? INBOX_EPOCH_CURSOR,
|
|
2728
|
+
wait: options.waitSeconds ?? DEFAULT_WAIT_SECONDS,
|
|
2729
|
+
limit: 1
|
|
2730
|
+
},
|
|
2731
|
+
...resolveRequestOptions({ signal: options.signal }),
|
|
2732
|
+
client: this.client,
|
|
2733
|
+
responseStyle: "fields"
|
|
2734
|
+
});
|
|
2735
|
+
const { emails, cursor } = unwrapInboxPage(result);
|
|
2736
|
+
if (emails.length === 0) return null;
|
|
2737
|
+
if (cursor === null) throw new PrimitiveApiError("Forward tail returned an email without a continuation cursor.", { payload: result });
|
|
2738
|
+
return toInboundEmail(emails[0], cursor, this.client);
|
|
2739
|
+
}
|
|
2740
|
+
};
|
|
2741
|
+
/** Account introspection, grouped under `client.account`. */
|
|
2742
|
+
var AccountResource = class {
|
|
2743
|
+
constructor(client) {
|
|
2744
|
+
this.client = client;
|
|
2745
|
+
}
|
|
2746
|
+
/**
|
|
2747
|
+
* The authenticated account: plan, limits, granted `entitlements` (e.g. an
|
|
2748
|
+
* emailless agent sees only reply-only keys), and `managed_inbox_address`
|
|
2749
|
+
* (the From address to reply as).
|
|
2750
|
+
*/
|
|
2751
|
+
async get(options) {
|
|
2752
|
+
return unwrapData(await getAccount({
|
|
2753
|
+
...resolveRequestOptions(options),
|
|
2754
|
+
client: this.client,
|
|
2755
|
+
responseStyle: "fields"
|
|
2756
|
+
}), "account");
|
|
2757
|
+
}
|
|
2758
|
+
};
|
|
2534
2759
|
var PrimitiveClient = class extends PrimitiveApiClient {
|
|
2535
2760
|
/** Agent-account lifecycle operations (create, claim/upgrade). */
|
|
2536
2761
|
agent = new AgentResource(this.client);
|
|
2762
|
+
/** Inbound mail: long-poll stream + waitForNext over the forward tail. */
|
|
2763
|
+
inbox = new InboxResource(this.client);
|
|
2764
|
+
/** Account introspection (plan, limits, entitlements, managed inbox). */
|
|
2765
|
+
account = new AccountResource(this.client);
|
|
2537
2766
|
async send(input, options) {
|
|
2538
2767
|
validateSendInput(input);
|
|
2539
2768
|
return unwrapSendResult(await sendEmail({
|
|
@@ -2587,22 +2816,7 @@ var PrimitiveClient = class extends PrimitiveApiClient {
|
|
|
2587
2816
|
* thread for half the recipient population.
|
|
2588
2817
|
*/
|
|
2589
2818
|
async reply(email, input, options) {
|
|
2590
|
-
|
|
2591
|
-
if ("subject" in resolved) throw new TypeError("reply does not support a subject override; the server prepends 'Re:' to the parent's subject for thread continuity");
|
|
2592
|
-
if (!resolved.text && !resolved.html) throw new TypeError("reply requires text or html");
|
|
2593
|
-
return unwrapSendResult(await replyToEmail({
|
|
2594
|
-
body: {
|
|
2595
|
-
...resolved.text !== void 0 ? { body_text: resolved.text } : {},
|
|
2596
|
-
...resolved.html !== void 0 ? { body_html: resolved.html } : {},
|
|
2597
|
-
...resolved.from !== void 0 ? { from: resolved.from } : {},
|
|
2598
|
-
...resolved.attachments !== void 0 ? { attachments: resolved.attachments } : {},
|
|
2599
|
-
...resolved.wait !== void 0 ? { wait: resolved.wait } : {}
|
|
2600
|
-
},
|
|
2601
|
-
path: { id: email.id },
|
|
2602
|
-
...resolveRequestOptions(options),
|
|
2603
|
-
client: this.client,
|
|
2604
|
-
responseStyle: "fields"
|
|
2605
|
-
}));
|
|
2819
|
+
return replyById(this.client, email.id, input, options);
|
|
2606
2820
|
}
|
|
2607
2821
|
async forward(email, input, options) {
|
|
2608
2822
|
validateForwardInput(input);
|
|
@@ -2659,6 +2873,7 @@ function mapSendResult(result) {
|
|
|
2659
2873
|
return {
|
|
2660
2874
|
id: result.id,
|
|
2661
2875
|
status: result.status,
|
|
2876
|
+
from: result.from,
|
|
2662
2877
|
queueId: result.queue_id,
|
|
2663
2878
|
accepted: result.accepted,
|
|
2664
2879
|
rejected: result.rejected,
|
|
@@ -2702,5 +2917,25 @@ function createPrimitiveClient(options = {}) {
|
|
|
2702
2917
|
function client(options = {}) {
|
|
2703
2918
|
return new PrimitiveClient(options);
|
|
2704
2919
|
}
|
|
2920
|
+
/**
|
|
2921
|
+
* Zero-to-receiving in one call: create an emailless agent account (no auth)
|
|
2922
|
+
* and return a PrimitiveClient already wired with its one-time API key, plus
|
|
2923
|
+
* the provisioned managed inbox. From here `result.client.inbox.stream()` and
|
|
2924
|
+
* `result.client.send(...)` work immediately.
|
|
2925
|
+
*
|
|
2926
|
+
* const { client, address } = await createAgent({ terms_accepted: true });
|
|
2927
|
+
*/
|
|
2928
|
+
async function createAgent(options) {
|
|
2929
|
+
const { client: clientOptions, ...input } = options;
|
|
2930
|
+
const account = await new PrimitiveClient(clientOptions).agent.createAccount(input);
|
|
2931
|
+
return {
|
|
2932
|
+
client: new PrimitiveClient({
|
|
2933
|
+
...clientOptions,
|
|
2934
|
+
apiKey: account.api_key
|
|
2935
|
+
}),
|
|
2936
|
+
address: account.address,
|
|
2937
|
+
account
|
|
2938
|
+
};
|
|
2939
|
+
}
|
|
2705
2940
|
//#endregion
|
|
2706
|
-
export {
|
|
2941
|
+
export { listFunctionSecrets as $, discardEmailContent as A, verifyAgentSignup as At, getInboxStatus as B, deleteDomain as C, unsetFunctionRoute as Ct, deleteFunction as D, updateFilter as Dt, deleteFilter as E, updateEndpoint as Et, getConversation as F, getThread as G, getSendPermissions as H, getEmail as I, listDomains as J, getWebhookSecret as K, getFunction as L, downloadDomainZoneFile as M, verifyDomain as Mt, downloadRawEmail as N, createClient as Nt, deleteFunctionSecret as O, updateFunction as Ot, getAccount as P, createConfig as Pt, listFunctionLogs as Q, getFunctionRouting as R, createOrgSecret as S, testFunction as St, deleteEndpoint as T, updateDomain as Tt, getSentEmail as U, getOrgRoutingTopology as V, getStorageStats as W, listEndpoints as X, listEmails as Y, listFilters as Z, createAgentClaimLink as _, startAgentClaim as _t, client as a, replayEmailWebhooks as at, createFunction as b, startCliSignup as bt, PRIMITIVE_SIGNATURE_HEADER as c, resendCliSignupVerification as ct, PrimitiveApiClient as d, searchEmails as dt, listFunctions as et, PrimitiveApiError as f, semanticSearch as ft, createAgentAccount as g, setOrgSecret as gt, cliLogout as h, setFunctionSecret as ht, PrimitiveClient as i, replayDelivery as it, downloadAttachments as j, verifyCliSignup as jt, deleteOrgSecret as k, verifyAgentClaim as kt, verifyWebhookSignature as l, rotateWebhookSecret as lt, addDomain as m, setFunctionRoute as mt, AgentResource as n, listSentEmails as nt, createAgent as o, replyToEmail as ot, createPrimitiveApiClient as p, sendEmail as pt, listDeliveries as q, InboxResource as r, pollCliLogin as rt, createPrimitiveClient as s, resendAgentSignupVerification as st, AccountResource as t, listOrgSecrets as tt, DEFAULT_API_BASE_URL as u, sdk_gen_exports as ut, createEndpoint as v, startAgentSignup as vt, deleteEmail as w, updateAccount as wt, createFunctionSecret as x, testEndpoint as xt, createFilter as y, startCliLogin as yt, getFunctionTestRunTrace as z };
|
package/dist/contract/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { C as signStandardWebhooksPayload, h as WEBHOOK_VERSION, j as signWebhookPayload, k as SignResult, x as StandardWebhooksSignResult } from "../index-
|
|
1
|
+
import { A as RawContentInline, E as ParsedError, F as WebhookAttachment, T as ParsedDataFailed, d as EmailAuth, f as EmailReceivedEvent, k as RawContentDownloadOnly, l as EmailAddress, u as EmailAnalysis, w as ParsedDataComplete } from "../types-QT2ss9ho.js";
|
|
2
|
+
import { C as signStandardWebhooksPayload, h as WEBHOOK_VERSION, j as signWebhookPayload, k as SignResult, x as StandardWebhooksSignResult } from "../index-iZWfb98V.js";
|
|
3
3
|
|
|
4
4
|
//#region src/contract/contract.d.ts
|
|
5
5
|
/** Maximum raw email size for inline inclusion (256 KB). */
|
package/dist/contract/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as signStandardWebhooksPayload, L as validateEmailReceivedEvent, M as signWebhookPayload, d as WEBHOOK_VERSION } from "../webhook-
|
|
1
|
+
import { E as signStandardWebhooksPayload, L as validateEmailReceivedEvent, M as signWebhookPayload, d as WEBHOOK_VERSION } from "../webhook-CwjCyFv-.js";
|
|
2
2
|
import { createHash } from "node:crypto";
|
|
3
3
|
//#region src/contract/contract.ts
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { F as WebhookAttachment, d as EmailAuth, f as EmailReceivedEvent, u as EmailAnalysis } from "./types-QT2ss9ho.js";
|
|
2
2
|
import { ErrorObject } from "ajv";
|
|
3
3
|
|
|
4
4
|
//#region src/webhook/received-email.d.ts
|