@primitivedotdev/sdk 0.27.0 → 0.28.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/index.d.ts +5 -3
- package/dist/api/index.js +4 -3
- package/dist/{api-CnUa6o4r.js → api-3znV8SSN.js} +176 -99
- package/dist/contract/index.d.ts +8 -2
- package/dist/contract/index.js +7 -2
- package/dist/{errors-x91I_yEt.js → errors-BPJGp9I6.js} +1 -1
- package/dist/{errors-C53fe686.d.ts → errors-CO-rv_nK.d.ts} +1 -1
- package/dist/{index-BbEVpN5e.d.ts → index-BKeS9sOb.d.ts} +294 -92
- package/dist/{index-Dbx9udpX.d.ts → index-D_v8-0zX.d.ts} +19 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +3 -3
- package/dist/openapi/index.d.ts +1 -52
- package/dist/openapi/index.js +1 -7631
- package/dist/operations.generated-BJERV_56.d.ts +53 -0
- package/dist/operations.generated-x1Go1Xkb.js +8106 -0
- package/dist/parser/index.d.ts +2 -1
- package/dist/parser/index.js +3 -1
- package/dist/{types-9vXGZjPd.d.ts → types-BRWDMD7H.d.ts} +8 -0
- package/dist/webhook/index.d.ts +3 -3
- package/dist/webhook/index.js +2 -2
- package/dist/{webhook-DJkfUnFZ.js → webhook-D4FTpj38.js} +644 -461
- package/package.json +5 -8
- /package/dist/{address-parser-BYn8oW5r.js → address-parser-CQbFjgRC.js} +0 -0
package/dist/api/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
import { f as WebhookVerificationError, p as WebhookVerificationErrorCode } from "../errors-C53fe686.js";
|
|
2
|
-
import { $ as listSentEmails, $a as SetFunctionSecretResponses, $i as PollCliLoginData, $n as DownloadRawEmailError, $o as VerifyDomainError, $r as GetStorageStatsResponses, $t as CreateFunctionResult, A as deleteEmail, Aa as SearchEmailsResponse, Ai as ListFiltersResponse, An as DeleteFunctionResponse, Ao as UpdateDomainInput, Ar as GetEmailError, At as CliLogoutInput, B as getFunction, Ba as SendPermissionAnyRecipient, Bi as ListFunctionSecretsResponse, Bn as DiscardEmailContentData, Bo as UpdateFilterError, Br as GetSendPermissionsError, Bt as CreateEndpointResponses, C as addDomain, Ca as RotateWebhookSecretError, Ci as ListEndpointsErrors, Cn as DeleteFilterError, Co as UpdateAccountErrors, Cr as GateFix, Ct as AddDomainResponse, D as createFunction, Da as SearchEmailsData, Di as ListFiltersData, Dn as DeleteFunctionData, Do as UpdateDomainData, Dr as GetAccountResponse, Dt as CliLogoutData, E as createFilter, Ea as RotateWebhookSecretResponses, Ei as ListEnvelope, En as DeleteFilterResponses, Eo as UpdateAccountResponses, Er as GetAccountErrors, Et as CliLoginStartResult, F as discardEmailContent, Fa as SendEmailResponse, Fi as ListFunctionLogsResponse, Fn as DeleteFunctionSecretResponse, Fo as UpdateEndpointErrors, Fr as GetFunctionError, Ft as CreateEndpointData, G as listDeliveries, Ga as SentEmailDetail, Gi as ListFunctionsResponse, Gn as Domain, Go as UpdateFunctionData, Gr as GetSentEmailError, Gt as CreateFilterResponse, H as getSentEmail, Ha as SendPermissionRule, Hi as ListFunctionsData, Hn as DiscardEmailContentErrors, Ho as UpdateFilterInput, Hr as GetSendPermissionsResponse, Ht as CreateFilterError, I as downloadAttachments, Ia as SendEmailResponses, Ii as ListFunctionLogsResponses, In as DeleteFunctionSecretResponses, Io as UpdateEndpointInput, Ir as GetFunctionErrors, It as CreateEndpointError, J as listEndpoints, Ja as SetFunctionSecretData, Ji as ListSentEmailsError, Jn as DownloadAttachmentsError, Jo as UpdateFunctionInput, Jr as GetSentEmailResponses, Jt as CreateFunctionError, K as listDomains, Ka as SentEmailStatus, Ki as ListFunctionsResponses, Kn as DomainVerifyResult, Ko as UpdateFunctionError, Kr as GetSentEmailErrors, Kt as CreateFilterResponses, L as downloadRawEmail, La as SendMailInput, Li as ListFunctionSecretsData, Ln as DeliveryStatus, Lo as UpdateEndpointResponse, Lr as GetFunctionResponse, Lt as CreateEndpointErrors, M as deleteFilter, Ma as SendEmailData, Mi as ListFunctionLogsData, Mn as DeleteFunctionSecretData, Mo as UpdateDomainResponses, Mr as GetEmailResponse, Mt as CliLogoutResponses, N as deleteFunction, Na as SendEmailError, Ni as ListFunctionLogsError, Nn as DeleteFunctionSecretError, No as UpdateEndpointData, Nr as GetEmailResponses, Nt as CliLogoutResult, O as createFunctionSecret, Oa as SearchEmailsError, Oi as ListFiltersError, On as DeleteFunctionError, Oo as UpdateDomainError, Or as GetAccountResponses, Ot as CliLogoutError, P as deleteFunctionSecret, Pa as SendEmailErrors, Pi as ListFunctionLogsErrors, Pn as DeleteFunctionSecretErrors, Po as UpdateEndpointError, Pr as GetFunctionData, Pt as ClientOptions, Q as listFunctions, Qa as SetFunctionSecretResponse, Qi as PaginationMeta, Qn as DownloadRawEmailData, Qo as VerifyDomainData, Qr as GetStorageStatsResponse, Qt as CreateFunctionResponses, R as getAccount, Ra as SendMailResult, Ri as ListFunctionSecretsError, Rn as DeliverySummary, Ro as UpdateEndpointResponses, Rr as GetFunctionResponses, Rt as CreateEndpointInput, S as Options, Sa as RotateWebhookSecretData, Si as ListEndpointsError, Sn as DeleteFilterData, So as UpdateAccountError, Sr as GateDenial, St as AddDomainInput, T as createEndpoint, Ta as RotateWebhookSecretResponse, Ti as ListEndpointsResponses, Tn as DeleteFilterResponse, To as UpdateAccountResponse, Tr as GetAccountError, Tt as CliLoginPollResult, U as getStorageStats, Ua as SendPermissionYourDomain, Ui as ListFunctionsError, Un as DiscardEmailContentResponse, Uo as UpdateFilterResponse, Ur as GetSendPermissionsResponses, Ut as CreateFilterErrors, V as getSendPermissions, Va as SendPermissionManagedZone, Vi as ListFunctionSecretsResponses, Vn as DiscardEmailContentError, Vo as UpdateFilterErrors, Vr as GetSendPermissionsErrors, Vt as CreateFilterData, W as getWebhookSecret, Wa as SendPermissionsMeta, Wi as ListFunctionsErrors, Wn as DiscardEmailContentResponses, Wo as UpdateFilterResponses, Wr as GetSentEmailData, Wt as CreateFilterInput, X as listFunctionLogs, Xa as SetFunctionSecretErrors, Xi as ListSentEmailsResponse, Xn as DownloadAttachmentsResponse, Xo as UpdateFunctionResponses, Xr as GetStorageStatsError, Xt as CreateFunctionInput, Y as listFilters, Ya as SetFunctionSecretError, Yi as ListSentEmailsErrors, Yn as DownloadAttachmentsErrors, Yo as UpdateFunctionResponse, Yr as GetStorageStatsData, Yt as CreateFunctionErrors, Z as listFunctionSecrets, Za as SetFunctionSecretInput, Zi as ListSentEmailsResponses, Zn as DownloadAttachmentsResponses, Zo as VerifiedDomain, Zr as GetStorageStatsErrors, Zt as CreateFunctionResponse, _ as createPrimitiveClient, _a as ReplyToEmailError, _i as ListEmailsError, _n as DeleteEndpointData, _o as TestFunctionResponses, _r as FunctionDetail, _t as Account, a as PrimitiveApiClientOptions, aa as ReplayDeliveryData, ai as Limit, an as CreateFunctionSecretResponses, ao as StartCliLoginResponses, ar as EmailSearchFacetBucket, as as ClientOptions$1, at as searchEmails, b as VerifyOptions, ba as ReplyToEmailResponses, bi as ListEmailsResponses, bn as DeleteEndpointResponse, bo as UnverifiedDomain, br as FunctionSecretListItem, bt as AddDomainError, c as PrimitiveClient, ca as ReplayDeliveryResponse, ci as ListDeliveriesErrors, cn as DeleteDomainError, co as TestEndpointData, cr as EmailSearchMeta, cs as Options$1, ct as startCliLogin, d as RequestOptions$1, da as ReplayEmailWebhooksError, di as ListDomainsData, dn as DeleteDomainResponses, do as TestEndpointResponse, dr as EmailSummary, ds as ResponseStyle, dt as updateAccount, ea as PollCliLoginError, ei as GetWebhookSecretData, en as CreateFunctionSecretData, eo as StartCliLoginData, er as DownloadRawEmailErrors, es as VerifyDomainErrors, et as pollCliLogin, f as SendInput, fa as ReplayEmailWebhooksErrors, fi as ListDomainsError, fn as DeleteEmailData, fo as TestEndpointResponses, fr as EmailWebhookStatus, fs as Auth, ft as updateDomain, g as createPrimitiveApiClient, ga as ReplyToEmailData, gi as ListEmailsData, gn as DeleteEmailResponses, go as TestFunctionResponse, gr as FunctionDeployStatus, gt as verifyDomain, h as client, ha as ReplayResult, hi as ListDomainsResponses, hn as DeleteEmailResponse, ho as TestFunctionErrors, hr as Filter, ht as updateFunction, i as PrimitiveApiClient, ia as PollCliLoginResponses, ii as GetWebhookSecretResponses, in as CreateFunctionSecretResponse, io as StartCliLoginResponse, ir as EmailDetailReply, is as Client, it as rotateWebhookSecret, j as deleteEndpoint, ja as SearchEmailsResponses, ji as ListFiltersResponses, jn as DeleteFunctionResponses, jo as UpdateDomainResponse, jr as GetEmailErrors, jt as CliLogoutResponse, k as deleteDomain, ka as SearchEmailsErrors, ki as ListFiltersErrors, kn as DeleteFunctionErrors, ko as UpdateDomainErrors, kr as GetEmailData, kt as CliLogoutErrors, l as PrimitiveClientOptions, la as ReplayDeliveryResponses, li as ListDeliveriesResponse, ln as DeleteDomainErrors, lo as TestEndpointError, lr as EmailSearchResult, ls as RequestOptions, lt as testEndpoint, m as SendThreadInput, ma as ReplayEmailWebhooksResponses, mi as ListDomainsResponse, mn as DeleteEmailErrors, mo as TestFunctionError, mr as ErrorResponse, mt as updateFilter, n as DEFAULT_API_BASE_URL_2, na as PollCliLoginInput, ni as GetWebhookSecretErrors, nn as CreateFunctionSecretErrors, no as StartCliLoginErrors, nr as DownloadRawEmailResponses, ns as VerifyDomainResponses, nt as replayEmailWebhooks, o as PrimitiveApiError, oa as ReplayDeliveryError, oi as ListDeliveriesData, on as Cursor, oo as StorageStats, or as EmailSearchFacets, os as Config, ot as sendEmail, p as SendResult, pa as ReplayEmailWebhooksResponse, pi as ListDomainsErrors, pn as DeleteEmailError, po as TestFunctionData, pr as Endpoint, pt as updateEndpoint, q as listEmails, qa as SentEmailSummary, qi as ListSentEmailsData, qn as DownloadAttachmentsData, qo as UpdateFunctionErrors, qr as GetSentEmailResponse, qt as CreateFunctionData, r as ForwardInput, ra as PollCliLoginResponse, ri as GetWebhookSecretResponse, rn as CreateFunctionSecretInput, ro as StartCliLoginInput, rr as EmailDetail, rs as WebhookSecret, rt as replyToEmail, s as PrimitiveApiErrorDetails, sa as ReplayDeliveryErrors, si as ListDeliveriesError, sn as DeleteDomainData, so as SuccessEnvelope, sr as EmailSearchHighlights, ss as CreateClientConfig, st as setFunctionSecret, t as DEFAULT_API_BASE_URL_1, ta as PollCliLoginErrors, ti as GetWebhookSecretError, tn as CreateFunctionSecretError, to as StartCliLoginError, tr as DownloadRawEmailResponse, ts as VerifyDomainResponse, tt as replayDelivery, u as ReplyInput, ua as ReplayEmailWebhooksData, ui as ListDeliveriesResponses, un as DeleteDomainResponse, uo as TestEndpointErrors, ur as EmailStatus, us as RequestResult, ut as testFunction, v as operations, va as ReplyToEmailErrors, vi as ListEmailsErrors, vn as DeleteEndpointError, vo as TestInvocationResult, vr as FunctionListItem, vt as AccountUpdated, w as cliLogout, wa as RotateWebhookSecretErrors, wi as ListEndpointsResponse, wn as DeleteFilterErrors, wo as UpdateAccountInput, wr as GetAccountData, wt as AddDomainResponses, x as verifyWebhookSignature, xa as ResourceId, xi as ListEndpointsData, xn as DeleteEndpointResponses, xo as UpdateAccountData, xr as FunctionSecretWriteResult, xt as AddDomainErrors, y as PRIMITIVE_SIGNATURE_HEADER, ya as ReplyToEmailResponse, yi as ListEmailsResponse, yn as DeleteEndpointErrors, yo as TestResult, yr as FunctionLogRow, yt as AddDomainData, z as getEmail, za as SendPermissionAddress, zi as ListFunctionSecretsErrors, zn as DiscardContentResult, zo as UpdateFilterData, zr as GetSendPermissionsData, zt as CreateEndpointResponse } from "../index-BbEVpN5e.js";
|
|
3
|
-
|
|
1
|
+
import { $ as pollCliLogin, $a as SendPermissionRule, $i as ListSentEmailsError, $n as DownloadAttachmentsError, $o as UpdateEndpointInput, $r as GetSentEmailResponses, $t as CreateFunctionError, A as deleteEndpoint, Aa as ResendCliSignupVerificationResponse, Ai as ListEndpointsResponses, An as DeleteFilterResponse, Ao as TestFunctionData, Ar as GetAccountError, As as Config, At as CliLogoutData, B as getSendPermissions, Ba as SearchEmailsErrors, Bi as ListFunctionLogsResponse, Bn as DeleteFunctionSecretResponse, Bo as UpdateAccountErrors, Br as GetFunctionError, Bt as CreateEndpointData, C as cliLogout, Ca as ReplyToEmailErrors, Ci as ListEmailsErrors, Cn as DeleteEndpointError, Co as StorageStats, Cr as FunctionListItem, Cs as VerifyDomainErrors, Ct as AddDomainError, D as createFunctionSecret, Da as ResendCliSignupVerificationError, Di as ListEndpointsError, Dn as DeleteFilterData, Do as TestEndpointErrors, Dr as GateDenial, Ds as createClient, Dt as AddDomainResponses, E as createFunction, Ea as ResendCliSignupVerificationData, Ei as ListEndpointsData, En as DeleteEndpointResponses, Eo as TestEndpointError, Er as FunctionSecretWriteResult, Es as WebhookSecret, Et as AddDomainResponse, F as downloadAttachments, Fa as RotateWebhookSecretErrors, Fi as ListFiltersResponse, Fn as DeleteFunctionResponse, Fo as TestInvocationResult, Fr as GetEmailError, Fs as ResponseStyle, Ft as CliLogoutResponses, G as listDomains, Ga as SendEmailErrors, Gi as ListFunctionSecretsResponse, Gn as DiscardEmailContentData, Go as UpdateDomainError, Gr as GetSendPermissionsError, Gt as CreateEndpointResponses, H as getStorageStats, Ha as SearchEmailsResponses, Hi as ListFunctionSecretsData, Hn as DeliveryStatus, Ho as UpdateAccountResponse, Hr as GetFunctionResponse, Ht as CreateEndpointErrors, I as downloadRawEmail, Ia as RotateWebhookSecretResponse, Ii as ListFiltersResponses, In as DeleteFunctionResponses, Io as TestResult, Ir as GetEmailErrors, Is as createConfig, It as CliLogoutResult, J as listFilters, Ja as SendMailInput, Ji as ListFunctionsError, Jn as DiscardEmailContentResponse, Jo as UpdateDomainResponse, Jr as GetSendPermissionsResponses, Jt as CreateFilterErrors, K as listEmails, Ka as SendEmailResponse, Ki as ListFunctionSecretsResponses, Kn as DiscardEmailContentError, Ko as UpdateDomainErrors, Kr as GetSendPermissionsErrors, Kt as CreateFilterData, L as getAccount, La as RotateWebhookSecretResponses, Li as ListFunctionLogsData, Ln as DeleteFunctionSecretData, Lo as UnverifiedDomain, Lr as GetEmailResponse, Ls as Auth, Lt as CliSignupResendResult, M as deleteFunction, Ma as ResourceId, Mi as ListFiltersData, Mn as DeleteFunctionData, Mo as TestFunctionErrors, Mr as GetAccountResponse, Ms as Options, Mt as CliLogoutErrors, N as deleteFunctionSecret, Na as RotateWebhookSecretData, Ni as ListFiltersError, Nn as DeleteFunctionError, No as TestFunctionResponse, Nr as GetAccountResponses, Ns as RequestOptions, Nt as CliLogoutInput, O as deleteDomain, Oa as ResendCliSignupVerificationErrors, Oi as ListEndpointsErrors, On as DeleteFilterError, Oo as TestEndpointResponse, Or as GateFix, Os as Client, Ot as CliLoginPollResult, P as discardEmailContent, Pa as RotateWebhookSecretError, Pi as ListFiltersErrors, Pn as DeleteFunctionErrors, Po as TestFunctionResponses, Pr as GetEmailData, Ps as RequestResult, Pt as CliLogoutResponse, Q as listSentEmails, Qa as SendPermissionManagedZone, Qi as ListSentEmailsData, Qn as DownloadAttachmentsData, Qo as UpdateEndpointErrors, Qr as GetSentEmailResponse, Qt as CreateFunctionData, R as getEmail, Ra as SearchEmailsData, Ri as ListFunctionLogsError, Rn as DeleteFunctionSecretError, Ro as UpdateAccountData, Rr as GetEmailResponses, Rt as CliSignupStartResult, S as addDomain, Sa as ReplyToEmailError, Si as ListEmailsError, Sn as DeleteEndpointData, So as StartCliSignupResponses, Sr as FunctionDetail, Ss as VerifyDomainError, St as AddDomainData, T as createFilter, Ta as ReplyToEmailResponses, Ti as ListEmailsResponses, Tn as DeleteEndpointResponse, To as TestEndpointData, Tr as FunctionSecretListItem, Ts as VerifyDomainResponses, Tt as AddDomainInput, U as getWebhookSecret, Ua as SendEmailData, Ui as ListFunctionSecretsError, Un as DeliverySummary, Uo as UpdateAccountResponses, Ur as GetFunctionResponses, Ut as CreateEndpointInput, V as getSentEmail, Va as SearchEmailsResponse, Vi as ListFunctionLogsResponses, Vn as DeleteFunctionSecretResponses, Vo as UpdateAccountInput, Vr as GetFunctionErrors, Vt as CreateEndpointError, W as listDeliveries, Wa as SendEmailError, Wi as ListFunctionSecretsErrors, Wn as DiscardContentResult, Wo as UpdateDomainData, Wr as GetSendPermissionsData, Wt as CreateEndpointResponse, X as listFunctionSecrets, Xa as SendPermissionAddress, Xi as ListFunctionsResponse, Xn as Domain, Xo as UpdateEndpointData, Xr as GetSentEmailError, Xt as CreateFilterResponse, Y as listFunctionLogs, Ya as SendMailResult, Yi as ListFunctionsErrors, Yn as DiscardEmailContentResponses, Yo as UpdateDomainResponses, Yr as GetSentEmailData, Yt as CreateFilterInput, Z as listFunctions, Za as SendPermissionAnyRecipient, Zi as ListFunctionsResponses, Zn as DomainVerifyResult, Zo as UpdateEndpointError, Zr as GetSentEmailErrors, Zt as CreateFilterResponses, _ as PrimitiveApiClientOptions, _a as ReplayEmailWebhooksErrors, _i as ListDomainsError, _n as DeleteEmailData, _o as StartCliSignupData, _r as EmailWebhookStatus, _s as VerifyCliSignupErrors, _t as updateFunction, a as RequestOptions$2, aa as PollCliLoginError, ai as GetWebhookSecretData, an as CreateFunctionSecretData, ao as SetFunctionSecretData, ar as DownloadRawEmailErrors, as as UpdateFilterInput, at as sdk_gen_d_exports, b as RequestOptions$1, ba as ReplayResult, bi as ListDomainsResponses, bn as DeleteEmailResponse, bo as StartCliSignupInput, br as Filter, bs as VerifyCliSignupResponses, bt as Account, c as SendThreadInput, ca as PollCliLoginResponse, ci as GetWebhookSecretResponse, cn as CreateFunctionSecretInput, co as SetFunctionSecretInput, cr as EmailDetail, cs as UpdateFunctionData, ct as setFunctionSecret, d as PRIMITIVE_SIGNATURE_HEADER, da as ReplayDeliveryError, di as ListDeliveriesData, dn as Cursor, do as StartCliLoginData, dr as EmailSearchFacets, ds as UpdateFunctionInput, dt as testEndpoint, ea as ListSentEmailsErrors, ei as GetStorageStatsData, en as CreateFunctionErrors, eo as SendPermissionYourDomain, er as DownloadAttachmentsErrors, es as UpdateEndpointResponse, et as replayDelivery, f as VerifyOptions, fa as ReplayDeliveryErrors, fi as ListDeliveriesError, fn as DeleteDomainData, fo as StartCliLoginError, fr as EmailSearchHighlights, fs as UpdateFunctionResponse, ft as testFunction, g as PrimitiveApiClient, ga as ReplayEmailWebhooksError, gi as ListDomainsData, gn as DeleteDomainResponses, go as StartCliLoginResponses, gr as EmailSummary, gs as VerifyCliSignupError, gt as updateFilter, h as DEFAULT_API_BASE_URL_2, ha as ReplayEmailWebhooksData, hi as ListDeliveriesResponses, hn as DeleteDomainResponse, ho as StartCliLoginResponse, hr as EmailStatus, hs as VerifyCliSignupData, ht as updateEndpoint, i as ReplyInput, ia as PollCliLoginData, ii as GetStorageStatsResponses, in as CreateFunctionResult, io as SentEmailSummary, ir as DownloadRawEmailError, is as UpdateFilterErrors, it as rotateWebhookSecret, j as deleteFilter, ja as ResendCliSignupVerificationResponses, ji as ListEnvelope, jn as DeleteFilterResponses, jo as TestFunctionError, jr as GetAccountErrors, js as CreateClientConfig, jt as CliLogoutError, k as deleteEmail, ka as ResendCliSignupVerificationInput, ki as ListEndpointsResponse, kn as DeleteFilterErrors, ko as TestEndpointResponses, kr as GetAccountData, ks as ClientOptions, kt as CliLoginStartResult, l as client, la as PollCliLoginResponses, li as GetWebhookSecretResponses, ln as CreateFunctionSecretResponse, lo as SetFunctionSecretResponse, lr as EmailDetailReply, ls as UpdateFunctionError, lt as startCliLogin, m as DEFAULT_API_BASE_URL_1, ma as ReplayDeliveryResponses, mi as ListDeliveriesResponse, mn as DeleteDomainErrors, mo as StartCliLoginInput, mr as EmailSearchResult, ms as VerifiedDomain, mt as updateDomain, n as PrimitiveClient, na as ListSentEmailsResponses, ni as GetStorageStatsErrors, nn as CreateFunctionResponse, no as SentEmailDetail, nr as DownloadAttachmentsResponses, ns as UpdateFilterData, nt as replyToEmail, o as SendInput, oa as PollCliLoginErrors, oi as GetWebhookSecretError, on as CreateFunctionSecretError, oo as SetFunctionSecretError, or as DownloadRawEmailResponse, os as UpdateFilterResponse, ot as searchEmails, p as verifyWebhookSignature, pa as ReplayDeliveryResponse, pi as ListDeliveriesErrors, pn as DeleteDomainError, po as StartCliLoginErrors, pr as EmailSearchMeta, ps as UpdateFunctionResponses, pt as updateAccount, q as listEndpoints, qa as SendEmailResponses, qi as ListFunctionsData, qn as DiscardEmailContentErrors, qo as UpdateDomainInput, qr as GetSendPermissionsResponse, qt as CreateFilterError, r as PrimitiveClientOptions, ra as PaginationMeta, ri as GetStorageStatsResponse, rn as CreateFunctionResponses, ro as SentEmailStatus, rr as DownloadRawEmailData, rs as UpdateFilterError, rt as resendCliSignupVerification, s as SendResult, sa as PollCliLoginInput, si as GetWebhookSecretErrors, sn as CreateFunctionSecretErrors, so as SetFunctionSecretErrors, sr as DownloadRawEmailResponses, ss as UpdateFilterResponses, st as sendEmail, t as ForwardInput, ta as ListSentEmailsResponse, ti as GetStorageStatsError, tn as CreateFunctionInput, to as SendPermissionsMeta, tr as DownloadAttachmentsResponse, ts as UpdateEndpointResponses, tt as replayEmailWebhooks, u as createPrimitiveClient, ua as ReplayDeliveryData, ui as Limit, un as CreateFunctionSecretResponses, uo as SetFunctionSecretResponses, ur as EmailSearchFacetBucket, us as UpdateFunctionErrors, ut as startCliSignup, v as PrimitiveApiError, va as ReplayEmailWebhooksResponse, vi as ListDomainsErrors, vn as DeleteEmailError, vo as StartCliSignupError, vr as Endpoint, vs as VerifyCliSignupInput, vt as verifyCliSignup, w as createEndpoint, wa as ReplyToEmailResponse, wi as ListEmailsResponse, wn as DeleteEndpointErrors, wo as SuccessEnvelope, wr as FunctionLogRow, ws as VerifyDomainResponse, wt as AddDomainErrors, x as createPrimitiveApiClient, xa as ReplyToEmailData, xi as ListEmailsData, xn as DeleteEmailResponses, xo as StartCliSignupResponse, xr as FunctionDeployStatus, xs as VerifyDomainData, xt as AccountUpdated, y as PrimitiveApiErrorDetails, ya as ReplayEmailWebhooksResponses, yi as ListDomainsResponse, yn as DeleteEmailErrors, yo as StartCliSignupErrors, yr as ErrorResponse, ys as VerifyCliSignupResponse, yt as verifyDomain, z as getFunction, za as SearchEmailsError, zi as ListFunctionLogsErrors, zn as DeleteFunctionSecretErrors, zo as UpdateAccountError, zr as GetFunctionData, zt as CliSignupVerifyResult } from "../index-BKeS9sOb.js";
|
|
2
|
+
import { i as openapiDocument, n as PrimitiveParameterManifest, r as operationManifest, t as PrimitiveOperationManifest } from "../operations.generated-BJERV_56.js";
|
|
3
|
+
import { u as EmailReceivedEvent } from "../types-BRWDMD7H.js";
|
|
4
|
+
import { b as normalizeReceivedEmail, f as WebhookVerificationError, g as ReceivedEmailThread, h as ReceivedEmailAddress, m as ReceivedEmail, p as WebhookVerificationErrorCode } from "../errors-CO-rv_nK.js";
|
|
5
|
+
export { Account, AccountUpdated, AddDomainData, AddDomainError, AddDomainErrors, AddDomainInput, AddDomainResponse, AddDomainResponses, 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, 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_1, DEFAULT_API_BASE_URL_2, 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, Domain, DomainVerifyResult, DownloadAttachmentsData, DownloadAttachmentsError, DownloadAttachmentsErrors, DownloadAttachmentsResponse, DownloadAttachmentsResponses, DownloadRawEmailData, DownloadRawEmailError, DownloadRawEmailErrors, DownloadRawEmailResponse, DownloadRawEmailResponses, EmailDetail, EmailDetailReply, EmailReceivedEvent, EmailSearchFacetBucket, EmailSearchFacets, EmailSearchHighlights, EmailSearchMeta, EmailSearchResult, EmailStatus, EmailSummary, EmailWebhookStatus, Endpoint, ErrorResponse, Filter, ForwardInput, FunctionDeployStatus, FunctionDetail, FunctionListItem, FunctionLogRow, FunctionSecretListItem, FunctionSecretWriteResult, GateDenial, GateFix, GetAccountData, GetAccountError, GetAccountErrors, GetAccountResponse, GetAccountResponses, GetEmailData, GetEmailError, GetEmailErrors, GetEmailResponse, GetEmailResponses, GetFunctionData, GetFunctionError, GetFunctionErrors, GetFunctionResponse, GetFunctionResponses, 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, 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, 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, ResendCliSignupVerificationData, ResendCliSignupVerificationError, ResendCliSignupVerificationErrors, ResendCliSignupVerificationInput, ResendCliSignupVerificationResponse, ResendCliSignupVerificationResponses, ResourceId, ResponseStyle, RotateWebhookSecretData, RotateWebhookSecretError, RotateWebhookSecretErrors, RotateWebhookSecretResponse, RotateWebhookSecretResponses, SearchEmailsData, SearchEmailsError, SearchEmailsErrors, SearchEmailsResponse, SearchEmailsResponses, SendEmailData, SendEmailError, SendEmailErrors, SendEmailResponse, SendEmailResponses, SendInput, SendMailInput, SendMailResult, SendPermissionAddress, SendPermissionAnyRecipient, SendPermissionManagedZone, SendPermissionRule, SendPermissionYourDomain, SendPermissionsMeta, SendResult, SendThreadInput, SentEmailDetail, SentEmailStatus, SentEmailSummary, SetFunctionSecretData, SetFunctionSecretError, SetFunctionSecretErrors, SetFunctionSecretInput, SetFunctionSecretResponse, SetFunctionSecretResponses, 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, 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, VerifyCliSignupData, VerifyCliSignupError, VerifyCliSignupErrors, VerifyCliSignupInput, VerifyCliSignupResponse, VerifyCliSignupResponses, VerifyDomainData, VerifyDomainError, VerifyDomainErrors, VerifyDomainResponse, VerifyDomainResponses, VerifyOptions as VerifyWebhookSignatureOptions, WebhookSecret, WebhookVerificationError, WebhookVerificationErrorCode, addDomain, cliLogout, client, createClient, createConfig, createEndpoint, createFilter, createFunction, createFunctionSecret, createPrimitiveApiClient, createPrimitiveClient, deleteDomain, deleteEmail, deleteEndpoint, deleteFilter, deleteFunction, deleteFunctionSecret, discardEmailContent, downloadAttachments, downloadRawEmail, getAccount, getEmail, getFunction, getSendPermissions, getSentEmail, getStorageStats, getWebhookSecret, listDeliveries, listDomains, listEmails, listEndpoints, listFilters, listFunctionLogs, listFunctionSecrets, listFunctions, listSentEmails, normalizeReceivedEmail, openapiDocument, operationManifest, sdk_gen_d_exports as operations, pollCliLogin, replayDelivery, replayEmailWebhooks, replyToEmail, resendCliSignupVerification, rotateWebhookSecret, searchEmails, sendEmail, setFunctionSecret, startCliLogin, startCliSignup, testEndpoint, testFunction, updateAccount, updateDomain, updateEndpoint, updateFilter, updateFunction, verifyCliSignup, verifyDomain, verifyWebhookSignature };
|
package/dist/api/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { $ as startCliSignup, A as getSentEmail, B as listFunctions, C as discardEmailContent, D as getEmail, E as getAccount, F as listEmails, G as replyToEmail, H as pollCliLogin, I as listEndpoints, J as sdk_gen_exports, K as resendCliSignupVerification, L as listFilters, M as getWebhookSecret, N as listDeliveries, O as getFunction, P as listDomains, Q as startCliLogin, R as listFunctionLogs, S as deleteFunctionSecret, T as downloadRawEmail, U as replayDelivery, V as listSentEmails, W as replayEmailWebhooks, X as sendEmail, Y as searchEmails, Z as setFunctionSecret, _ as deleteDomain, a as verifyWebhookSignature, at as updateFilter, b as deleteFilter, c as PrimitiveApiClient, ct as verifyDomain, d as addDomain, et as testEndpoint, f as cliLogout, g as createFunctionSecret, h as createFunction, i as PRIMITIVE_SIGNATURE_HEADER, it as updateEndpoint, j as getStorageStats, k as getSendPermissions, l as PrimitiveApiError, lt as createClient, m as createFilter, n as client, nt as updateAccount, o as DEFAULT_API_BASE_URL_1, ot as updateFunction, p as createEndpoint, q as rotateWebhookSecret, r as createPrimitiveClient, rt as updateDomain, s as DEFAULT_API_BASE_URL_2, st as verifyCliSignup, t as PrimitiveClient, tt as testFunction, u as createPrimitiveApiClient, ut as createConfig, v as deleteEmail, w as downloadAttachments, x as deleteFunction, y as deleteEndpoint, z as listFunctionSecrets } from "../api-3znV8SSN.js";
|
|
2
|
+
import { n as openapiDocument, t as operationManifest } from "../operations.generated-x1Go1Xkb.js";
|
|
3
|
+
import { c as WebhookVerificationError, f as normalizeReceivedEmail } from "../errors-BPJGp9I6.js";
|
|
4
|
+
export { DEFAULT_API_BASE_URL_1, DEFAULT_API_BASE_URL_2, PRIMITIVE_SIGNATURE_HEADER, PrimitiveApiClient, PrimitiveApiError, PrimitiveClient, WebhookVerificationError, addDomain, cliLogout, client, createClient, createConfig, createEndpoint, createFilter, createFunction, createFunctionSecret, createPrimitiveApiClient, createPrimitiveClient, deleteDomain, deleteEmail, deleteEndpoint, deleteFilter, deleteFunction, deleteFunctionSecret, discardEmailContent, downloadAttachments, downloadRawEmail, getAccount, getEmail, getFunction, getSendPermissions, getSentEmail, getStorageStats, getWebhookSecret, listDeliveries, listDomains, listEmails, listEndpoints, listFilters, listFunctionLogs, listFunctionSecrets, listFunctions, listSentEmails, normalizeReceivedEmail, openapiDocument, operationManifest, sdk_gen_exports as operations, pollCliLogin, replayDelivery, replayEmailWebhooks, replyToEmail, resendCliSignupVerification, rotateWebhookSecret, searchEmails, sendEmail, setFunctionSecret, startCliLogin, startCliSignup, testEndpoint, testFunction, updateAccount, updateDomain, updateEndpoint, updateFilter, updateFunction, verifyCliSignup, verifyDomain, verifyWebhookSignature };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as __exportAll } from "./chunk-pbuEa-1d.js";
|
|
2
|
-
import { c as WebhookVerificationError, d as formatAddress } from "./errors-
|
|
3
|
-
//#region src/api/
|
|
2
|
+
import { c as WebhookVerificationError, d as formatAddress } from "./errors-BPJGp9I6.js";
|
|
3
|
+
//#region ../packages/api-core/src/api/core/bodySerializer.gen.ts
|
|
4
4
|
const jsonBodySerializer = { bodySerializer: (body) => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value) };
|
|
5
5
|
//#endregion
|
|
6
|
-
//#region src/api/
|
|
6
|
+
//#region ../packages/api-core/src/api/core/serverSentEvents.gen.ts
|
|
7
7
|
function createSseClient({ onRequest, onSseError, onSseEvent, responseTransformer, responseValidator, sseDefaultRetryDelay, sseMaxRetryAttempts, sseMaxRetryDelay, sseSleepFn, url, ...options }) {
|
|
8
8
|
let lastEventId;
|
|
9
9
|
const sleep = sseSleepFn ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
|
|
@@ -95,7 +95,7 @@ function createSseClient({ onRequest, onSseError, onSseEvent, responseTransforme
|
|
|
95
95
|
return { stream: createStream() };
|
|
96
96
|
}
|
|
97
97
|
//#endregion
|
|
98
|
-
//#region src/api/
|
|
98
|
+
//#region ../packages/api-core/src/api/core/pathSerializer.gen.ts
|
|
99
99
|
const separatorArrayExplode = (style) => {
|
|
100
100
|
switch (style) {
|
|
101
101
|
case "label": return ".";
|
|
@@ -174,7 +174,7 @@ const serializeObjectParam = ({ allowReserved, explode, name, style, value, valu
|
|
|
174
174
|
return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues;
|
|
175
175
|
};
|
|
176
176
|
//#endregion
|
|
177
|
-
//#region src/api/
|
|
177
|
+
//#region ../packages/api-core/src/api/core/utils.gen.ts
|
|
178
178
|
const PATH_PARAM_RE = /\{[^{}]+\}/g;
|
|
179
179
|
const defaultPathSerializer = ({ path, url: _url }) => {
|
|
180
180
|
let url = _url;
|
|
@@ -248,7 +248,7 @@ function getValidRequestBody(options) {
|
|
|
248
248
|
if (hasBody) return options.body;
|
|
249
249
|
}
|
|
250
250
|
//#endregion
|
|
251
|
-
//#region src/api/
|
|
251
|
+
//#region ../packages/api-core/src/api/core/auth.gen.ts
|
|
252
252
|
const getAuthToken = async (auth, callback) => {
|
|
253
253
|
const token = typeof callback === "function" ? await callback(auth) : callback;
|
|
254
254
|
if (!token) return;
|
|
@@ -257,7 +257,7 @@ const getAuthToken = async (auth, callback) => {
|
|
|
257
257
|
return token;
|
|
258
258
|
};
|
|
259
259
|
//#endregion
|
|
260
|
-
//#region src/api/
|
|
260
|
+
//#region ../packages/api-core/src/api/client/utils.gen.ts
|
|
261
261
|
const createQuerySerializer = ({ parameters = {}, ...args } = {}) => {
|
|
262
262
|
const querySerializer = (queryParams) => {
|
|
263
263
|
const search = [];
|
|
@@ -429,7 +429,7 @@ const createConfig = (override = {}) => ({
|
|
|
429
429
|
...override
|
|
430
430
|
});
|
|
431
431
|
//#endregion
|
|
432
|
-
//#region src/api/
|
|
432
|
+
//#region ../packages/api-core/src/api/client/client.gen.ts
|
|
433
433
|
const createClient = (config = {}) => {
|
|
434
434
|
let _config = mergeConfigs(createConfig(), config);
|
|
435
435
|
const getConfig = () => ({ ..._config });
|
|
@@ -608,10 +608,10 @@ const createClient = (config = {}) => {
|
|
|
608
608
|
};
|
|
609
609
|
};
|
|
610
610
|
//#endregion
|
|
611
|
-
//#region src/api/
|
|
611
|
+
//#region ../packages/api-core/src/api/client.gen.ts
|
|
612
612
|
const client$1 = createClient(createConfig({ baseUrl: "https://www.primitive.dev/api/v1" }));
|
|
613
613
|
//#endregion
|
|
614
|
-
//#region src/api/
|
|
614
|
+
//#region ../packages/api-core/src/api/sdk.gen.ts
|
|
615
615
|
var sdk_gen_exports = /* @__PURE__ */ __exportAll({
|
|
616
616
|
addDomain: () => addDomain,
|
|
617
617
|
cliLogout: () => cliLogout,
|
|
@@ -648,11 +648,13 @@ var sdk_gen_exports = /* @__PURE__ */ __exportAll({
|
|
|
648
648
|
replayDelivery: () => replayDelivery,
|
|
649
649
|
replayEmailWebhooks: () => replayEmailWebhooks,
|
|
650
650
|
replyToEmail: () => replyToEmail,
|
|
651
|
+
resendCliSignupVerification: () => resendCliSignupVerification,
|
|
651
652
|
rotateWebhookSecret: () => rotateWebhookSecret,
|
|
652
653
|
searchEmails: () => searchEmails,
|
|
653
654
|
sendEmail: () => sendEmail,
|
|
654
655
|
setFunctionSecret: () => setFunctionSecret,
|
|
655
656
|
startCliLogin: () => startCliLogin,
|
|
657
|
+
startCliSignup: () => startCliSignup,
|
|
656
658
|
testEndpoint: () => testEndpoint,
|
|
657
659
|
testFunction: () => testFunction,
|
|
658
660
|
updateAccount: () => updateAccount,
|
|
@@ -660,6 +662,7 @@ var sdk_gen_exports = /* @__PURE__ */ __exportAll({
|
|
|
660
662
|
updateEndpoint: () => updateEndpoint,
|
|
661
663
|
updateFilter: () => updateFilter,
|
|
662
664
|
updateFunction: () => updateFunction,
|
|
665
|
+
verifyCliSignup: () => verifyCliSignup,
|
|
663
666
|
verifyDomain: () => verifyDomain
|
|
664
667
|
});
|
|
665
668
|
/**
|
|
@@ -695,6 +698,54 @@ const pollCliLogin = (options) => (options.client ?? client$1).post({
|
|
|
695
698
|
}
|
|
696
699
|
});
|
|
697
700
|
/**
|
|
701
|
+
* Start CLI account signup
|
|
702
|
+
*
|
|
703
|
+
* Starts a terminal-native CLI signup. The API validates the signup code,
|
|
704
|
+
* creates a pending signup session, sends an email verification code, and
|
|
705
|
+
* returns an opaque signup token used by the resend and verify steps. This
|
|
706
|
+
* endpoint does not require an API key.
|
|
707
|
+
*
|
|
708
|
+
*/
|
|
709
|
+
const startCliSignup = (options) => (options.client ?? client$1).post({
|
|
710
|
+
url: "/cli/signup/start",
|
|
711
|
+
...options,
|
|
712
|
+
headers: {
|
|
713
|
+
...options.body !== void 0 && { "Content-Type": "application/json" },
|
|
714
|
+
...options.headers
|
|
715
|
+
}
|
|
716
|
+
});
|
|
717
|
+
/**
|
|
718
|
+
* Resend CLI signup verification code
|
|
719
|
+
*
|
|
720
|
+
* Sends a new email verification code for a pending CLI signup session.
|
|
721
|
+
* This endpoint does not require an API key.
|
|
722
|
+
*
|
|
723
|
+
*/
|
|
724
|
+
const resendCliSignupVerification = (options) => (options.client ?? client$1).post({
|
|
725
|
+
url: "/cli/signup/resend",
|
|
726
|
+
...options,
|
|
727
|
+
headers: {
|
|
728
|
+
...options.body !== void 0 && { "Content-Type": "application/json" },
|
|
729
|
+
...options.headers
|
|
730
|
+
}
|
|
731
|
+
});
|
|
732
|
+
/**
|
|
733
|
+
* Verify CLI signup and create API key
|
|
734
|
+
*
|
|
735
|
+
* Verifies the email code for a CLI signup session, creates the account,
|
|
736
|
+
* redeems the reserved signup code, mints an org-scoped CLI API key, and
|
|
737
|
+
* returns the raw key exactly once. This endpoint does not require an API key.
|
|
738
|
+
*
|
|
739
|
+
*/
|
|
740
|
+
const verifyCliSignup = (options) => (options.client ?? client$1).post({
|
|
741
|
+
url: "/cli/signup/verify",
|
|
742
|
+
...options,
|
|
743
|
+
headers: {
|
|
744
|
+
...options.body !== void 0 && { "Content-Type": "application/json" },
|
|
745
|
+
...options.headers
|
|
746
|
+
}
|
|
747
|
+
});
|
|
748
|
+
/**
|
|
698
749
|
* Revoke the current CLI API key
|
|
699
750
|
*
|
|
700
751
|
* Revokes the API key used to authenticate the request. CLI clients use
|
|
@@ -1435,8 +1486,9 @@ const listFunctions = (options) => (options?.client ?? client$1).get({
|
|
|
1435
1486
|
* than relying on external imports.
|
|
1436
1487
|
*
|
|
1437
1488
|
* **Code limits.** `code` is capped at 1 MiB UTF-8. `sourceMap`
|
|
1438
|
-
* (optional) is capped at 5 MiB UTF-8
|
|
1439
|
-
*
|
|
1489
|
+
* (optional) is capped at 5 MiB UTF-8, stored with each deployment
|
|
1490
|
+
* attempt, and sent to the runtime so stack traces can resolve to
|
|
1491
|
+
* original source files.
|
|
1440
1492
|
*
|
|
1441
1493
|
* **Auto-wiring.** On successful deploy, Primitive automatically
|
|
1442
1494
|
* creates a webhook endpoint that delivers inbound mail to the
|
|
@@ -1509,11 +1561,10 @@ const getFunction = (options) => (options.client ?? client$1).get({
|
|
|
1509
1561
|
* passing the same `code` re-runs the deploy and refreshes the
|
|
1510
1562
|
* binding set with the latest values from the secrets table.
|
|
1511
1563
|
*
|
|
1512
|
-
* On
|
|
1513
|
-
*
|
|
1514
|
-
* `
|
|
1515
|
-
*
|
|
1516
|
-
* without polling.
|
|
1564
|
+
* On deploy failure, the previously-deployed code stays live; the
|
|
1565
|
+
* runtime never serves a half-built bundle. The response uses
|
|
1566
|
+
* `error.code` `deploy_failed`, and the function's `deploy_error`
|
|
1567
|
+
* field carries the latest deploy error for dashboard/API reads.
|
|
1517
1568
|
*
|
|
1518
1569
|
*/
|
|
1519
1570
|
const updateFunction = (options) => (options.client ?? client$1).put({
|
|
@@ -1677,6 +1728,86 @@ const listFunctionLogs = (options) => (options.client ?? client$1).get({
|
|
|
1677
1728
|
...options
|
|
1678
1729
|
});
|
|
1679
1730
|
//#endregion
|
|
1731
|
+
//#region ../packages/api-core/src/client.ts
|
|
1732
|
+
/**
|
|
1733
|
+
* Host-aware Primitive API client and shared error type.
|
|
1734
|
+
*
|
|
1735
|
+
* Lives in api-core (instead of sdk-node) so the CLI can build a
|
|
1736
|
+
* configured request client without taking a dependency on sdk-node.
|
|
1737
|
+
* The higher-level `PrimitiveClient` (with `.send`, `.reply`,
|
|
1738
|
+
* `.forward`) still lives in sdk-node because it needs the
|
|
1739
|
+
* `ReceivedEmail` type from the webhook parsing surface.
|
|
1740
|
+
*/
|
|
1741
|
+
const DEFAULT_API_BASE_URL_1 = "https://www.primitive.dev/api/v1";
|
|
1742
|
+
const DEFAULT_API_BASE_URL_2 = "https://api.primitive.dev/v1";
|
|
1743
|
+
function createDefaultAuth(apiKey) {
|
|
1744
|
+
return (security) => {
|
|
1745
|
+
if (security.type === "http" && security.scheme === "bearer") return apiKey;
|
|
1746
|
+
};
|
|
1747
|
+
}
|
|
1748
|
+
var PrimitiveApiError = class extends Error {
|
|
1749
|
+
status;
|
|
1750
|
+
code;
|
|
1751
|
+
gates;
|
|
1752
|
+
requestId;
|
|
1753
|
+
retryAfter;
|
|
1754
|
+
details;
|
|
1755
|
+
payload;
|
|
1756
|
+
constructor(message, options) {
|
|
1757
|
+
super(message);
|
|
1758
|
+
this.name = "PrimitiveApiError";
|
|
1759
|
+
this.payload = options.payload;
|
|
1760
|
+
this.status = options.status;
|
|
1761
|
+
this.code = options.code;
|
|
1762
|
+
this.gates = options.gates;
|
|
1763
|
+
this.requestId = options.requestId;
|
|
1764
|
+
this.retryAfter = options.retryAfter;
|
|
1765
|
+
this.details = options.details;
|
|
1766
|
+
}
|
|
1767
|
+
};
|
|
1768
|
+
var PrimitiveApiClient = class {
|
|
1769
|
+
/**
|
|
1770
|
+
* Generated client targeting the primary API host (apiBaseUrl1). Use
|
|
1771
|
+
* this when passing `client: ...` to a generated operation function
|
|
1772
|
+
* for every endpoint EXCEPT /send-mail. The hand-written
|
|
1773
|
+
* PrimitiveClient.send / .reply / .forward methods on the subclass
|
|
1774
|
+
* route /send-mail to the host-2 client internally.
|
|
1775
|
+
*/
|
|
1776
|
+
client;
|
|
1777
|
+
/**
|
|
1778
|
+
* @internal Generated client targeting the attachments-supporting
|
|
1779
|
+
* send host (apiBaseUrl2). Used by PrimitiveClient.send() under the
|
|
1780
|
+
* hood. Exposed for the CLI's hand-rolled send command, which calls
|
|
1781
|
+
* the generated sendEmail directly; not part of the publicly-
|
|
1782
|
+
* documented SDK surface. Customer code should call .send() on the
|
|
1783
|
+
* subclass instead.
|
|
1784
|
+
*/
|
|
1785
|
+
_sendClient;
|
|
1786
|
+
constructor(options = {}) {
|
|
1787
|
+
const { apiKey, auth, apiBaseUrl1 = DEFAULT_API_BASE_URL_1, apiBaseUrl2 = DEFAULT_API_BASE_URL_2, ...config } = options;
|
|
1788
|
+
const resolvedAuth = auth ?? createDefaultAuth(apiKey);
|
|
1789
|
+
this.client = createClient(createConfig({
|
|
1790
|
+
...config,
|
|
1791
|
+
auth: resolvedAuth,
|
|
1792
|
+
baseUrl: apiBaseUrl1
|
|
1793
|
+
}));
|
|
1794
|
+
this._sendClient = createClient(createConfig({
|
|
1795
|
+
...config,
|
|
1796
|
+
auth: resolvedAuth,
|
|
1797
|
+
baseUrl: apiBaseUrl2
|
|
1798
|
+
}));
|
|
1799
|
+
}
|
|
1800
|
+
getConfig() {
|
|
1801
|
+
return this.client.getConfig();
|
|
1802
|
+
}
|
|
1803
|
+
setConfig(config) {
|
|
1804
|
+
return this.client.setConfig(config);
|
|
1805
|
+
}
|
|
1806
|
+
};
|
|
1807
|
+
function createPrimitiveApiClient(options = {}) {
|
|
1808
|
+
return new PrimitiveApiClient(options);
|
|
1809
|
+
}
|
|
1810
|
+
//#endregion
|
|
1680
1811
|
//#region src/api/verify-signature.ts
|
|
1681
1812
|
/**
|
|
1682
1813
|
* Workers-safe webhook signature verification.
|
|
@@ -1817,18 +1948,27 @@ async function verifyWebhookSignature(opts) {
|
|
|
1817
1948
|
}
|
|
1818
1949
|
//#endregion
|
|
1819
1950
|
//#region src/api/index.ts
|
|
1820
|
-
|
|
1821
|
-
|
|
1951
|
+
/**
|
|
1952
|
+
* Primitive API client module.
|
|
1953
|
+
*
|
|
1954
|
+
* The generated API surface (operations, types, host-aware client,
|
|
1955
|
+
* shared error type) lives in the workspace-internal
|
|
1956
|
+
* `@primitivedotdev/api-core` package. The bundler inlines that
|
|
1957
|
+
* code into the published `@primitivedotdev/sdk` tarball, so
|
|
1958
|
+
* consumers see a single package; the split exists only to keep
|
|
1959
|
+
* sdk-node and cli-node decoupled at the source level.
|
|
1960
|
+
*
|
|
1961
|
+
* This module re-exports the api-core surface and adds the
|
|
1962
|
+
* higher-level `PrimitiveClient` (send / reply / forward) on top.
|
|
1963
|
+
* Those high-level methods depend on the parsed `ReceivedEmail`
|
|
1964
|
+
* shape from sdk-node's webhook module, which is why they live
|
|
1965
|
+
* here rather than in api-core.
|
|
1966
|
+
*/
|
|
1822
1967
|
const EMAIL_REGEX = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
1823
1968
|
const MAX_THREAD_REFERENCES = 100;
|
|
1824
1969
|
const MAX_THREAD_HEADER_BYTES = 8 * 1024;
|
|
1825
1970
|
const MAX_FROM_HEADER_LENGTH = 998;
|
|
1826
1971
|
const MAX_TO_HEADER_LENGTH = 320;
|
|
1827
|
-
function createDefaultAuth(apiKey) {
|
|
1828
|
-
return (security) => {
|
|
1829
|
-
if (security.type === "http" && security.scheme === "bearer") return apiKey;
|
|
1830
|
-
};
|
|
1831
|
-
}
|
|
1832
1972
|
function validateAddressHeader(field, value) {
|
|
1833
1973
|
const trimmed = value.trim();
|
|
1834
1974
|
const maxLength = field === "from" ? MAX_FROM_HEADER_LENGTH : MAX_TO_HEADER_LENGTH;
|
|
@@ -1867,6 +2007,17 @@ function validateForwardInput(input) {
|
|
|
1867
2007
|
validateEmailAddress("to", input.to);
|
|
1868
2008
|
if (input.subject !== void 0 && input.subject.trim().length === 0) throw new TypeError("subject must be a non-empty string");
|
|
1869
2009
|
}
|
|
2010
|
+
function isAbortLikeError(error) {
|
|
2011
|
+
if (!(error instanceof Error)) return false;
|
|
2012
|
+
return error.name === "AbortError" || error.name === "TimeoutError";
|
|
2013
|
+
}
|
|
2014
|
+
function parseRetryAfterHeader(response) {
|
|
2015
|
+
if (!response) return void 0;
|
|
2016
|
+
const raw = response.headers.get("retry-after");
|
|
2017
|
+
if (!raw) return void 0;
|
|
2018
|
+
const seconds = Number.parseInt(raw, 10);
|
|
2019
|
+
return Number.isFinite(seconds) ? seconds : void 0;
|
|
2020
|
+
}
|
|
1870
2021
|
function parseApiErrorPayload(payload) {
|
|
1871
2022
|
const fallback = {
|
|
1872
2023
|
message: "Primitive API request failed",
|
|
@@ -1892,76 +2043,6 @@ function parseApiErrorPayload(payload) {
|
|
|
1892
2043
|
};
|
|
1893
2044
|
return fallback;
|
|
1894
2045
|
}
|
|
1895
|
-
var PrimitiveApiError = class extends Error {
|
|
1896
|
-
status;
|
|
1897
|
-
code;
|
|
1898
|
-
gates;
|
|
1899
|
-
requestId;
|
|
1900
|
-
retryAfter;
|
|
1901
|
-
details;
|
|
1902
|
-
payload;
|
|
1903
|
-
constructor(message, options) {
|
|
1904
|
-
super(message);
|
|
1905
|
-
this.name = "PrimitiveApiError";
|
|
1906
|
-
this.payload = options.payload;
|
|
1907
|
-
this.status = options.status;
|
|
1908
|
-
this.code = options.code;
|
|
1909
|
-
this.gates = options.gates;
|
|
1910
|
-
this.requestId = options.requestId;
|
|
1911
|
-
this.retryAfter = options.retryAfter;
|
|
1912
|
-
this.details = options.details;
|
|
1913
|
-
}
|
|
1914
|
-
};
|
|
1915
|
-
function isAbortLikeError(error) {
|
|
1916
|
-
if (!(error instanceof Error)) return false;
|
|
1917
|
-
return error.name === "AbortError" || error.name === "TimeoutError";
|
|
1918
|
-
}
|
|
1919
|
-
function parseRetryAfterHeader(response) {
|
|
1920
|
-
if (!response) return void 0;
|
|
1921
|
-
const raw = response.headers.get("retry-after");
|
|
1922
|
-
if (!raw) return void 0;
|
|
1923
|
-
const seconds = Number.parseInt(raw, 10);
|
|
1924
|
-
return Number.isFinite(seconds) ? seconds : void 0;
|
|
1925
|
-
}
|
|
1926
|
-
var PrimitiveApiClient = class {
|
|
1927
|
-
/**
|
|
1928
|
-
* Generated client targeting the primary API host (apiBaseUrl1). Use
|
|
1929
|
-
* this when passing `client: ...` to a generated operation function
|
|
1930
|
-
* for every endpoint EXCEPT /send-mail. The hand-written
|
|
1931
|
-
* PrimitiveClient.send / .reply / .forward methods on the subclass
|
|
1932
|
-
* route /send-mail to the host-2 client internally.
|
|
1933
|
-
*/
|
|
1934
|
-
client;
|
|
1935
|
-
/**
|
|
1936
|
-
* @internal Generated client targeting the attachments-supporting
|
|
1937
|
-
* send host (apiBaseUrl2). Used by PrimitiveClient.send() under the
|
|
1938
|
-
* hood. Exposed for the CLI's hand-rolled send command, which calls
|
|
1939
|
-
* the generated sendEmail directly; not part of the publicly-
|
|
1940
|
-
* documented SDK surface. Customer code should call .send() on the
|
|
1941
|
-
* subclass instead.
|
|
1942
|
-
*/
|
|
1943
|
-
_sendClient;
|
|
1944
|
-
constructor(options = {}) {
|
|
1945
|
-
const { apiKey, auth, apiBaseUrl1 = DEFAULT_API_BASE_URL_1, apiBaseUrl2 = DEFAULT_API_BASE_URL_2, ...config } = options;
|
|
1946
|
-
const resolvedAuth = auth ?? createDefaultAuth(apiKey);
|
|
1947
|
-
this.client = createClient(createConfig({
|
|
1948
|
-
...config,
|
|
1949
|
-
auth: resolvedAuth,
|
|
1950
|
-
baseUrl: apiBaseUrl1
|
|
1951
|
-
}));
|
|
1952
|
-
this._sendClient = createClient(createConfig({
|
|
1953
|
-
...config,
|
|
1954
|
-
auth: resolvedAuth,
|
|
1955
|
-
baseUrl: apiBaseUrl2
|
|
1956
|
-
}));
|
|
1957
|
-
}
|
|
1958
|
-
getConfig() {
|
|
1959
|
-
return this.client.getConfig();
|
|
1960
|
-
}
|
|
1961
|
-
setConfig(config) {
|
|
1962
|
-
return this.client.setConfig(config);
|
|
1963
|
-
}
|
|
1964
|
-
};
|
|
1965
2046
|
function resolveRequestOptions(options) {
|
|
1966
2047
|
const signals = [];
|
|
1967
2048
|
if (options?.signal) signals.push(options.signal);
|
|
@@ -2093,15 +2174,11 @@ function mapSendResult(result) {
|
|
|
2093
2174
|
...result.smtp_response_text !== void 0 ? { smtpResponseText: result.smtp_response_text } : {}
|
|
2094
2175
|
};
|
|
2095
2176
|
}
|
|
2096
|
-
function createPrimitiveApiClient(options = {}) {
|
|
2097
|
-
return new PrimitiveApiClient(options);
|
|
2098
|
-
}
|
|
2099
2177
|
function createPrimitiveClient(options = {}) {
|
|
2100
2178
|
return new PrimitiveClient(options);
|
|
2101
2179
|
}
|
|
2102
2180
|
function client(options = {}) {
|
|
2103
2181
|
return new PrimitiveClient(options);
|
|
2104
2182
|
}
|
|
2105
|
-
const operations = sdk_gen_exports;
|
|
2106
2183
|
//#endregion
|
|
2107
|
-
export {
|
|
2184
|
+
export { startCliSignup as $, getSentEmail as A, listFunctions as B, discardEmailContent as C, getEmail as D, getAccount as E, listEmails as F, replyToEmail as G, pollCliLogin as H, listEndpoints as I, sdk_gen_exports as J, resendCliSignupVerification as K, listFilters as L, getWebhookSecret as M, listDeliveries as N, getFunction as O, listDomains as P, startCliLogin as Q, listFunctionLogs as R, deleteFunctionSecret as S, downloadRawEmail as T, replayDelivery as U, listSentEmails as V, replayEmailWebhooks as W, sendEmail as X, searchEmails as Y, setFunctionSecret as Z, deleteDomain as _, verifyWebhookSignature as a, updateFilter as at, deleteFilter as b, PrimitiveApiClient as c, verifyDomain as ct, addDomain as d, testEndpoint as et, cliLogout as f, createFunctionSecret as g, createFunction as h, PRIMITIVE_SIGNATURE_HEADER as i, updateEndpoint as it, getStorageStats as j, getSendPermissions as k, PrimitiveApiError as l, createClient as lt, createFilter as m, client as n, updateAccount as nt, DEFAULT_API_BASE_URL_1 as o, updateFunction as ot, createEndpoint as p, rotateWebhookSecret as q, createPrimitiveClient as r, updateDomain as rt, DEFAULT_API_BASE_URL_2 as s, verifyCliSignup as st, PrimitiveClient as t, testFunction as tt, createPrimitiveApiClient as u, createConfig as ut, deleteEmail as v, downloadAttachments as w, deleteFunction as x, deleteEndpoint as y, listFunctionSecrets as z };
|
package/dist/contract/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as ParsedDataFailed, D as RawContentDownloadOnly, M as WebhookAttachment, O as RawContentInline, S as ParsedDataComplete, c as EmailAnalysis, l as EmailAuth, s as EmailAddress, u as EmailReceivedEvent, w as ParsedError } from "../types-
|
|
2
|
-
import { C as signStandardWebhooksPayload, h as WEBHOOK_VERSION, j as signWebhookPayload, k as SignResult, x as StandardWebhooksSignResult } from "../index-
|
|
1
|
+
import { C as ParsedDataFailed, D as RawContentDownloadOnly, M as WebhookAttachment, O as RawContentInline, S as ParsedDataComplete, c as EmailAnalysis, l as EmailAuth, s as EmailAddress, u as EmailReceivedEvent, w as ParsedError } from "../types-BRWDMD7H.js";
|
|
2
|
+
import { C as signStandardWebhooksPayload, h as WEBHOOK_VERSION, j as signWebhookPayload, k as SignResult, x as StandardWebhooksSignResult } from "../index-D_v8-0zX.js";
|
|
3
3
|
|
|
4
4
|
//#region src/contract/contract.d.ts
|
|
5
5
|
/** Maximum raw email size for inline inclusion (256 KB). */
|
|
@@ -15,6 +15,8 @@ interface ParsedInputComplete {
|
|
|
15
15
|
cc?: EmailAddress[] | null;
|
|
16
16
|
/** Parsed BCC header addresses. Defaults to `null` when omitted. */
|
|
17
17
|
bcc?: EmailAddress[] | null;
|
|
18
|
+
/** Parsed To header addresses. Defaults to `null` when omitted. */
|
|
19
|
+
to_addresses?: EmailAddress[] | null;
|
|
18
20
|
/** In-Reply-To header values. Defaults to `null` when omitted. */
|
|
19
21
|
in_reply_to?: string[] | null;
|
|
20
22
|
/** References header values. Defaults to `null` when omitted. */
|
|
@@ -47,6 +49,8 @@ interface EmailReceivedEventInput {
|
|
|
47
49
|
sender: string;
|
|
48
50
|
/** To header value. */
|
|
49
51
|
recipient: string;
|
|
52
|
+
/** Full RFC 5322 To header value. Defaults to `recipient` for backwards compatibility. */
|
|
53
|
+
to_header?: string | null;
|
|
50
54
|
/** Subject header value, if present. */
|
|
51
55
|
subject: string | null;
|
|
52
56
|
/** ISO 8601 timestamp when Primitive received the email. */
|
|
@@ -160,6 +164,8 @@ interface BuildEventFromParsedDataOptions {
|
|
|
160
164
|
sender: string;
|
|
161
165
|
/** To header value. */
|
|
162
166
|
recipient: string;
|
|
167
|
+
/** Full RFC 5322 To header value. Defaults to `recipient` for backwards compatibility. */
|
|
168
|
+
toHeader?: string | null;
|
|
163
169
|
/** Subject header value, or null. */
|
|
164
170
|
subject: string | null;
|
|
165
171
|
/** ISO 8601 timestamp when the producer accepted the email. */
|
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-D4FTpj38.js";
|
|
2
2
|
import { createHash } from "node:crypto";
|
|
3
3
|
//#region src/contract/contract.ts
|
|
4
4
|
/**
|
|
@@ -137,6 +137,7 @@ function buildEmailReceivedEvent(input, options) {
|
|
|
137
137
|
reply_to: input.parsed.reply_to ?? null,
|
|
138
138
|
cc: input.parsed.cc ?? null,
|
|
139
139
|
bcc: input.parsed.bcc ?? null,
|
|
140
|
+
to_addresses: input.parsed.to_addresses ?? null,
|
|
140
141
|
in_reply_to: input.parsed.in_reply_to ?? null,
|
|
141
142
|
references: input.parsed.references ?? null,
|
|
142
143
|
attachments: input.parsed.attachments,
|
|
@@ -150,6 +151,7 @@ function buildEmailReceivedEvent(input, options) {
|
|
|
150
151
|
reply_to: null,
|
|
151
152
|
cc: null,
|
|
152
153
|
bcc: null,
|
|
154
|
+
to_addresses: null,
|
|
153
155
|
in_reply_to: null,
|
|
154
156
|
references: null,
|
|
155
157
|
attachments: [],
|
|
@@ -167,6 +169,7 @@ function buildEmailReceivedEvent(input, options) {
|
|
|
167
169
|
reply_to: null,
|
|
168
170
|
cc: null,
|
|
169
171
|
bcc: null,
|
|
172
|
+
to_addresses: null,
|
|
170
173
|
in_reply_to: null,
|
|
171
174
|
references: null,
|
|
172
175
|
attachments: [],
|
|
@@ -193,7 +196,7 @@ function buildEmailReceivedEvent(input, options) {
|
|
|
193
196
|
message_id: input.message_id,
|
|
194
197
|
subject: input.subject,
|
|
195
198
|
from: input.sender,
|
|
196
|
-
to: input.recipient,
|
|
199
|
+
to: input.to_header ?? input.recipient,
|
|
197
200
|
date: input.date_header
|
|
198
201
|
},
|
|
199
202
|
content: {
|
|
@@ -250,6 +253,7 @@ function buildEventFromParsedData(params) {
|
|
|
250
253
|
reply_to: parsed.reply_to,
|
|
251
254
|
cc: parsed.cc,
|
|
252
255
|
bcc: parsed.bcc,
|
|
256
|
+
to_addresses: parsed.to_addresses,
|
|
253
257
|
in_reply_to: parsed.in_reply_to,
|
|
254
258
|
references: parsed.references,
|
|
255
259
|
attachments: parsed.attachments
|
|
@@ -260,6 +264,7 @@ function buildEventFromParsedData(params) {
|
|
|
260
264
|
message_id: params.messageId,
|
|
261
265
|
sender: params.sender,
|
|
262
266
|
recipient: params.recipient,
|
|
267
|
+
to_header: params.toHeader,
|
|
263
268
|
subject: params.subject,
|
|
264
269
|
received_at: params.receivedAt,
|
|
265
270
|
smtp_helo: params.smtpHelo,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as parseFromHeaderLoose } from "./address-parser-
|
|
1
|
+
import { n as parseFromHeaderLoose } from "./address-parser-CQbFjgRC.js";
|
|
2
2
|
//#region src/webhook/received-email.ts
|
|
3
3
|
const REPLY_PREFIX_RE = /^re\s*:/i;
|
|
4
4
|
const FORWARD_PREFIX_RE = /^(fwd?|fw)\s*:/i;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as WebhookAttachment, c as EmailAnalysis, l as EmailAuth, u as EmailReceivedEvent } from "./types-
|
|
1
|
+
import { M as WebhookAttachment, c as EmailAnalysis, l as EmailAuth, u as EmailReceivedEvent } from "./types-BRWDMD7H.js";
|
|
2
2
|
import { ErrorObject } from "ajv";
|
|
3
3
|
|
|
4
4
|
//#region src/webhook/received-email.d.ts
|