@primitivedotdev/sdk 0.24.0 → 0.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/generated/sdk.gen.js +29 -17
- package/dist/api/index.d.ts +1 -1
- package/dist/{api-BjzvA2Fy.js → api-C3X14uId.js} +29 -17
- package/dist/{index-QTYQpSFt.d.ts → index-jLAAV6Sq.d.ts} +23 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/openapi/openapi.generated.js +21 -1
- package/dist/openapi/operations.generated.js +15 -3
- package/oclif.manifest.json +23 -2
- package/package.json +1 -1
|
@@ -28,7 +28,7 @@ export const pollCliLogin = (options) => (options.client ?? client).post({
|
|
|
28
28
|
url: '/cli/login/poll',
|
|
29
29
|
...options,
|
|
30
30
|
headers: {
|
|
31
|
-
'Content-Type': 'application/json',
|
|
31
|
+
...(options.body !== undefined && { 'Content-Type': 'application/json' }),
|
|
32
32
|
...options.headers
|
|
33
33
|
}
|
|
34
34
|
});
|
|
@@ -64,7 +64,7 @@ export const updateAccount = (options) => (options.client ?? client).patch({
|
|
|
64
64
|
url: '/account',
|
|
65
65
|
...options,
|
|
66
66
|
headers: {
|
|
67
|
-
'Content-Type': 'application/json',
|
|
67
|
+
...(options.body !== undefined && { 'Content-Type': 'application/json' }),
|
|
68
68
|
...options.headers
|
|
69
69
|
}
|
|
70
70
|
});
|
|
@@ -143,7 +143,7 @@ export const addDomain = (options) => (options.client ?? client).post({
|
|
|
143
143
|
url: '/domains',
|
|
144
144
|
...options,
|
|
145
145
|
headers: {
|
|
146
|
-
'Content-Type': 'application/json',
|
|
146
|
+
...(options.body !== undefined && { 'Content-Type': 'application/json' }),
|
|
147
147
|
...options.headers
|
|
148
148
|
}
|
|
149
149
|
});
|
|
@@ -169,7 +169,7 @@ export const updateDomain = (options) => (options.client ?? client).patch({
|
|
|
169
169
|
url: '/domains/{id}',
|
|
170
170
|
...options,
|
|
171
171
|
headers: {
|
|
172
|
-
'Content-Type': 'application/json',
|
|
172
|
+
...(options.body !== undefined && { 'Content-Type': 'application/json' }),
|
|
173
173
|
...options.headers
|
|
174
174
|
}
|
|
175
175
|
});
|
|
@@ -327,7 +327,7 @@ export const replyToEmail = (options) => (options.client ?? client).post({
|
|
|
327
327
|
url: '/emails/{id}/reply',
|
|
328
328
|
...options,
|
|
329
329
|
headers: {
|
|
330
|
-
'Content-Type': 'application/json',
|
|
330
|
+
...(options.body !== undefined && { 'Content-Type': 'application/json' }),
|
|
331
331
|
...options.headers
|
|
332
332
|
}
|
|
333
333
|
});
|
|
@@ -405,7 +405,7 @@ export const createEndpoint = (options) => (options.client ?? client).post({
|
|
|
405
405
|
url: '/endpoints',
|
|
406
406
|
...options,
|
|
407
407
|
headers: {
|
|
408
|
-
'Content-Type': 'application/json',
|
|
408
|
+
...(options.body !== undefined && { 'Content-Type': 'application/json' }),
|
|
409
409
|
...options.headers
|
|
410
410
|
}
|
|
411
411
|
});
|
|
@@ -434,7 +434,7 @@ export const updateEndpoint = (options) => (options.client ?? client).patch({
|
|
|
434
434
|
url: '/endpoints/{id}',
|
|
435
435
|
...options,
|
|
436
436
|
headers: {
|
|
437
|
-
'Content-Type': 'application/json',
|
|
437
|
+
...(options.body !== undefined && { 'Content-Type': 'application/json' }),
|
|
438
438
|
...options.headers
|
|
439
439
|
}
|
|
440
440
|
});
|
|
@@ -475,7 +475,7 @@ export const createFilter = (options) => (options.client ?? client).post({
|
|
|
475
475
|
url: '/filters',
|
|
476
476
|
...options,
|
|
477
477
|
headers: {
|
|
478
|
-
'Content-Type': 'application/json',
|
|
478
|
+
...(options.body !== undefined && { 'Content-Type': 'application/json' }),
|
|
479
479
|
...options.headers
|
|
480
480
|
}
|
|
481
481
|
});
|
|
@@ -497,7 +497,7 @@ export const updateFilter = (options) => (options.client ?? client).patch({
|
|
|
497
497
|
url: '/filters/{id}',
|
|
498
498
|
...options,
|
|
499
499
|
headers: {
|
|
500
|
-
'Content-Type': 'application/json',
|
|
500
|
+
...(options.body !== undefined && { 'Content-Type': 'application/json' }),
|
|
501
501
|
...options.headers
|
|
502
502
|
}
|
|
503
503
|
});
|
|
@@ -590,7 +590,7 @@ export const sendEmail = (options) => (options.client ?? client).post({
|
|
|
590
590
|
url: '/send-mail',
|
|
591
591
|
...options,
|
|
592
592
|
headers: {
|
|
593
|
-
'Content-Type': 'application/json',
|
|
593
|
+
...(options.body !== undefined && { 'Content-Type': 'application/json' }),
|
|
594
594
|
...options.headers
|
|
595
595
|
}
|
|
596
596
|
});
|
|
@@ -683,7 +683,7 @@ export const createFunction = (options) => (options.client ?? client).post({
|
|
|
683
683
|
url: '/functions',
|
|
684
684
|
...options,
|
|
685
685
|
headers: {
|
|
686
|
-
'Content-Type': 'application/json',
|
|
686
|
+
...(options.body !== undefined && { 'Content-Type': 'application/json' }),
|
|
687
687
|
...options.headers
|
|
688
688
|
}
|
|
689
689
|
});
|
|
@@ -739,7 +739,7 @@ export const updateFunction = (options) => (options.client ?? client).put({
|
|
|
739
739
|
url: '/functions/{id}',
|
|
740
740
|
...options,
|
|
741
741
|
headers: {
|
|
742
|
-
'Content-Type': 'application/json',
|
|
742
|
+
...(options.body !== undefined && { 'Content-Type': 'application/json' }),
|
|
743
743
|
...options.headers
|
|
744
744
|
}
|
|
745
745
|
});
|
|
@@ -747,8 +747,14 @@ export const updateFunction = (options) => (options.client ?? client).put({
|
|
|
747
747
|
* Send a test invocation
|
|
748
748
|
*
|
|
749
749
|
* Sends a real test email from a Primitive-controlled sender to a
|
|
750
|
-
*
|
|
751
|
-
*
|
|
750
|
+
* local-part on one of the org's verified inbound domains. By
|
|
751
|
+
* default the recipient is a synthetic
|
|
752
|
+
* `__primitive_function_test+<random>@<domain>` address that
|
|
753
|
+
* every handler's catch-all routing receives identically; pass
|
|
754
|
+
* `local_part` to override and exercise routing logic that
|
|
755
|
+
* branches on a specific recipient (the common pattern when one
|
|
756
|
+
* function handles multiple inboxes like `summarize@` and
|
|
757
|
+
* `action@`). The function fires through the normal MX delivery
|
|
752
758
|
* path, so reply / send-mail calls from inside the handler
|
|
753
759
|
* against the inbound's `email.id` work the same as in
|
|
754
760
|
* production. Returns immediately after the send is queued; the
|
|
@@ -758,12 +764,18 @@ export const updateFunction = (options) => (options.client ?? client).put({
|
|
|
758
764
|
* Requires that the function is currently `deployed`. Returns 422
|
|
759
765
|
* if the function is in `pending` or `failed` state, or if the
|
|
760
766
|
* org has no verified inbound domain to receive the test mail.
|
|
767
|
+
* Returns 400 if `local_part` is set to a value that does not
|
|
768
|
+
* match the local-part character set.
|
|
761
769
|
*
|
|
762
770
|
*/
|
|
763
771
|
export const testFunction = (options) => (options.client ?? client).post({
|
|
764
772
|
security: [{ scheme: 'bearer', type: 'http' }],
|
|
765
773
|
url: '/functions/{id}/test',
|
|
766
|
-
...options
|
|
774
|
+
...options,
|
|
775
|
+
headers: {
|
|
776
|
+
...(options.body !== undefined && { 'Content-Type': 'application/json' }),
|
|
777
|
+
...options.headers
|
|
778
|
+
}
|
|
767
779
|
});
|
|
768
780
|
/**
|
|
769
781
|
* List a function's secrets
|
|
@@ -804,7 +816,7 @@ export const createFunctionSecret = (options) => (options.client ?? client).post
|
|
|
804
816
|
url: '/functions/{id}/secrets',
|
|
805
817
|
...options,
|
|
806
818
|
headers: {
|
|
807
|
-
'Content-Type': 'application/json',
|
|
819
|
+
...(options.body !== undefined && { 'Content-Type': 'application/json' }),
|
|
808
820
|
...options.headers
|
|
809
821
|
}
|
|
810
822
|
});
|
|
@@ -838,7 +850,7 @@ export const setFunctionSecret = (options) => (options.client ?? client).put({
|
|
|
838
850
|
url: '/functions/{id}/secrets/{key}',
|
|
839
851
|
...options,
|
|
840
852
|
headers: {
|
|
841
|
-
'Content-Type': 'application/json',
|
|
853
|
+
...(options.body !== undefined && { 'Content-Type': 'application/json' }),
|
|
842
854
|
...options.headers
|
|
843
855
|
}
|
|
844
856
|
});
|
package/dist/api/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as replyToEmail, $a as TestEndpointError, $i as ReplayDeliveryResponses, $n as EmailDetail, $o as RequestOptions, $r as GetWebhookSecretResponses, $t as CreateFunctionSecretInput, A as deleteFunction, Aa as SendPermissionAnyRecipient, Ai as ListFunctionSecretsResponse, An as DeleteFunctionSecretErrors, Ao as UpdateFilterError, Ar as GetFunctionError, At as ClientOptions, B as getStorageStats, Ba as SetFunctionSecretErrors, Bi as ListSentEmailsResponse, Bn as DiscardEmailContentResponses, Bo as UpdateFunctionResponses, Br as GetSentEmailError, Bt as CreateFilterInput, C as createFilter, Ca as SendEmailError, Ci as ListFiltersError, Cn as DeleteFunctionData, Co as UpdateEndpointData, Cr as GetAccountResponses, Ct as CliLogoutData, D as deleteEmail, Da as SendMailInput, Di as ListFunctionSecretsData, Dn as DeleteFunctionResponses, Do as UpdateEndpointResponse, Dr as GetEmailResponse, Dt as CliLogoutResponse, E as deleteDomain, Ea as SendEmailResponses, Ei as ListFiltersResponses, En as DeleteFunctionResponse, Eo as UpdateEndpointInput, Er as GetEmailErrors, Et as CliLogoutInput, F as getAccount, Fa as SentEmailDetail, Fi as ListFunctionsResponse, Fn as DiscardContentResult, Fo as UpdateFunctionData, Fr as GetSendPermissionsError, Ft as CreateEndpointResponse, G as listEndpoints, Ga as StartCliLoginError, Gi as PollCliLoginErrors, Gn as DownloadAttachmentsErrors, Go as VerifyDomainResponse, Gr as GetStorageStatsError, Gt as CreateFunctionErrors, H as listDeliveries, Ha as SetFunctionSecretResponse, Hi as PaginationMeta, Hn as DomainVerifyResult, Ho as VerifyDomainData, Hr as GetSentEmailResponse, Ht as CreateFilterResponses, I as getEmail, Ia as SentEmailStatus, Ii as ListFunctionsResponses, In as DiscardEmailContentData, Io as UpdateFunctionError, Ir as GetSendPermissionsErrors, It as CreateEndpointResponses, J as listFunctions, Ja as StartCliLoginResponse, Ji as PollCliLoginResponses, Jn as DownloadRawEmailData, Jo as Client, Jr as GetStorageStatsResponses, Jt as CreateFunctionResponses, K as listFilters, Ka as StartCliLoginErrors, Ki as PollCliLoginInput, Kn as DownloadAttachmentsResponse, Ko as VerifyDomainResponses, Kr as GetStorageStatsErrors, Kt as CreateFunctionInput, L as getFunction, La as SentEmailSummary, Li as ListSentEmailsData, Ln as DiscardEmailContentError, Lo as UpdateFunctionErrors, Lr as GetSendPermissionsResponse, Lt as CreateFilterData, M as discardEmailContent, Ma as SendPermissionRule, Mi as ListFunctionsData, Mn as DeleteFunctionSecretResponses, Mo as UpdateFilterInput, Mr as GetFunctionResponse, Mt as CreateEndpointError, N as downloadAttachments, Na as SendPermissionYourDomain, Ni as ListFunctionsError, Nn as DeliveryStatus, No as UpdateFilterResponse, Nr as GetFunctionResponses, Nt as CreateEndpointErrors, O as deleteEndpoint, Oa as SendMailResult, Oi as ListFunctionSecretsError, On as DeleteFunctionSecretData, Oo as UpdateEndpointResponses, Or as GetEmailResponses, Ot as CliLogoutResponses, P as downloadRawEmail, Pa as SendPermissionsMeta, Pi as ListFunctionsErrors, Pn as DeliverySummary, Po as UpdateFilterResponses, Pr as GetSendPermissionsData, Pt as CreateEndpointInput, Q as replayEmailWebhooks, Qa as TestEndpointData, Qi as ReplayDeliveryResponse, Qn as DownloadRawEmailResponses, Qo as Options$1, Qr as GetWebhookSecretResponse, Qt as CreateFunctionSecretErrors, R as getSendPermissions, Ra as SetFunctionSecretData, Ri as ListSentEmailsError, Rn as DiscardEmailContentErrors, Ro as UpdateFunctionInput, Rr as GetSendPermissionsResponses, Rt as CreateFilterError, S as createEndpoint, Sa as SendEmailData, Si as ListFiltersData, Sn as DeleteFilterResponses, So as UpdateDomainResponses, Sr as GetAccountResponse, St as CliLoginStartResult, T as createFunctionSecret, Ta as SendEmailResponse, Ti as ListFiltersResponse, Tn as DeleteFunctionErrors, To as UpdateEndpointErrors, Tr as GetEmailError, Tt as CliLogoutErrors, U as listDomains, Ua as SetFunctionSecretResponses, Ui as PollCliLoginData, Un as DownloadAttachmentsData, Uo as VerifyDomainError, Ur as GetSentEmailResponses, Ut as CreateFunctionData, V as getWebhookSecret, Va as SetFunctionSecretInput, Vi as ListSentEmailsResponses, Vn as Domain, Vo as VerifiedDomain, Vr as GetSentEmailErrors, Vt as CreateFilterResponse, W as listEmails, Wa as StartCliLoginData, Wi as PollCliLoginError, Wn as DownloadAttachmentsError, Wo as VerifyDomainErrors, Wr as GetStorageStatsData, Wt as CreateFunctionError, X as pollCliLogin, Xa as StorageStats, Xi as ReplayDeliveryError, Xn as DownloadRawEmailErrors, Xo as Config, Xr as GetWebhookSecretError, Xt as CreateFunctionSecretData, Y as listSentEmails, Ya as StartCliLoginResponses, Yi as ReplayDeliveryData, Yn as DownloadRawEmailError, Yo as ClientOptions$1, Yr as GetWebhookSecretData, Yt as CreateFunctionResult, Z as replayDelivery, Za as SuccessEnvelope, Zi as ReplayDeliveryErrors, Zn as DownloadRawEmailResponse, Zo as CreateClientConfig, Zr as GetWebhookSecretErrors, Zt as CreateFunctionSecretError, _ as createPrimitiveClient, _a as SearchEmailsData, _i as ListEndpointsError, _n as DeleteEndpointResponses, _o as UpdateDomainData, _r as GateDenial, _t as AddDomainErrors, a as PrimitiveApiClientOptions, aa as ReplayResult, ai as ListDeliveriesResponses, an as DeleteDomainErrors, ao as TestFunctionErrors, ar as EmailSearchResult, at as testEndpoint, b as addDomain, ba as SearchEmailsResponse, bi as ListEndpointsResponses, bn as DeleteFilterErrors, bo as UpdateDomainInput, br as GetAccountError, bt as AddDomainResponses, c as PrimitiveClient, ca as ReplyToEmailErrors, ci as ListDomainsErrors, cn as DeleteEmailData, co as TestInvocationResult, cr as EmailWebhookStatus, ct as updateDomain, d as RequestOptions$1, da as ResourceId, di as ListEmailsData, dn as DeleteEmailResponse, do as UpdateAccountData, dr as Filter, dt as updateFunction, ea as ReplayEmailWebhooksData, ei as Limit, en as CreateFunctionSecretResponse, eo as TestEndpointErrors, er as EmailDetailReply, es as RequestResult, et as rotateWebhookSecret, f as SendInput, fa as RotateWebhookSecretData, fi as ListEmailsError, fn as DeleteEmailResponses, fo as UpdateAccountError, fr as FunctionDeployStatus, ft as verifyDomain, g as createPrimitiveApiClient, ga as RotateWebhookSecretResponses, gi as ListEndpointsData, gn as DeleteEndpointResponse, go as UpdateAccountResponses, gr as FunctionSecretWriteResult, gt as AddDomainError, h as client, ha as RotateWebhookSecretResponse, hi as ListEmailsResponses, hn as DeleteEndpointErrors, ho as UpdateAccountResponse, hr as FunctionSecretListItem, ht as AddDomainData, i as PrimitiveApiClient, ia as ReplayEmailWebhooksResponses, ii as ListDeliveriesResponse, in as DeleteDomainError, io as TestFunctionError, ir as EmailSearchMeta, it as startCliLogin, j as deleteFunctionSecret, ja as SendPermissionManagedZone, ji as ListFunctionSecretsResponses, jn as DeleteFunctionSecretResponse, jo as UpdateFilterErrors, jr as GetFunctionErrors, jt as CreateEndpointData, k as deleteFilter, ka as SendPermissionAddress, ki as ListFunctionSecretsErrors, kn as DeleteFunctionSecretError, ko as UpdateFilterData, kr as GetFunctionData, kt as CliLogoutResult, l as PrimitiveClientOptions, la as ReplyToEmailResponse, li as ListDomainsResponse, ln as DeleteEmailError, lo as TestResult, lr as Endpoint, lt as updateEndpoint, m as SendThreadInput, ma as RotateWebhookSecretErrors, mi as ListEmailsResponse, mn as DeleteEndpointError, mo as UpdateAccountInput, mr as FunctionListItem, mt as AccountUpdated, n as DEFAULT_API_BASE_URL_2, na as ReplayEmailWebhooksErrors, ni as ListDeliveriesError, nn as Cursor, no as TestEndpointResponses, nr as EmailSearchFacets, ns as Auth, nt as sendEmail, o as PrimitiveApiError, oa as ReplyToEmailData, oi as ListDomainsData, on as DeleteDomainResponse, oo as TestFunctionResponse, or as EmailStatus, ot as testFunction, p as SendResult, pa as RotateWebhookSecretError, pi as ListEmailsErrors, pn as DeleteEndpointData, po as UpdateAccountErrors, pr as FunctionDetail, pt as Account, q as listFunctionSecrets, qa as StartCliLoginInput, qi as PollCliLoginResponse, qn as DownloadAttachmentsResponses, qo as WebhookSecret, qr as GetStorageStatsResponse, qt as CreateFunctionResponse, r as ForwardInput, ra as ReplayEmailWebhooksResponse, ri as ListDeliveriesErrors, rn as DeleteDomainData, ro as TestFunctionData, rr as EmailSearchHighlights, rt as setFunctionSecret, s as PrimitiveApiErrorDetails, sa as ReplyToEmailError, si as ListDomainsError, sn as DeleteDomainResponses, so as TestFunctionResponses, sr as EmailSummary, st as updateAccount, t as DEFAULT_API_BASE_URL_1, ta as ReplayEmailWebhooksError, ti as ListDeliveriesData, tn as CreateFunctionSecretResponses, to as TestEndpointResponse, tr as EmailSearchFacetBucket, ts as ResponseStyle, tt as searchEmails, u as ReplyInput, ua as ReplyToEmailResponses, ui as ListDomainsResponses, un as DeleteEmailErrors, uo as UnverifiedDomain, ur as ErrorResponse, ut as updateFilter, v as operations, va as SearchEmailsError, vi as ListEndpointsErrors, vn as DeleteFilterData, vo as UpdateDomainError, vr as GateFix, vt as AddDomainInput, w as createFunction, wa as SendEmailErrors, wi as ListFiltersErrors, wn as DeleteFunctionError, wo as UpdateEndpointError, wr as GetEmailData, wt as CliLogoutError, x as cliLogout, xa as SearchEmailsResponses, xi as ListEnvelope, xn as DeleteFilterResponse, xo as UpdateDomainResponse, xr as GetAccountErrors, xt as CliLoginPollResult, y as Options, ya as SearchEmailsErrors, yi as ListEndpointsResponse, yn as DeleteFilterError, yo as UpdateDomainErrors, yr as GetAccountData, yt as AddDomainResponse, z as getSentEmail, za as SetFunctionSecretError, zi as ListSentEmailsErrors, zn as DiscardEmailContentResponse, zo as UpdateFunctionResponse, zr as GetSentEmailData, zt as CreateFilterErrors } from "../index-
|
|
1
|
+
import { $ as replyToEmail, $a as TestEndpointError, $i as ReplayDeliveryResponses, $n as EmailDetail, $o as RequestOptions, $r as GetWebhookSecretResponses, $t as CreateFunctionSecretInput, A as deleteFunction, Aa as SendPermissionAnyRecipient, Ai as ListFunctionSecretsResponse, An as DeleteFunctionSecretErrors, Ao as UpdateFilterError, Ar as GetFunctionError, At as ClientOptions, B as getStorageStats, Ba as SetFunctionSecretErrors, Bi as ListSentEmailsResponse, Bn as DiscardEmailContentResponses, Bo as UpdateFunctionResponses, Br as GetSentEmailError, Bt as CreateFilterInput, C as createFilter, Ca as SendEmailError, Ci as ListFiltersError, Cn as DeleteFunctionData, Co as UpdateEndpointData, Cr as GetAccountResponses, Ct as CliLogoutData, D as deleteEmail, Da as SendMailInput, Di as ListFunctionSecretsData, Dn as DeleteFunctionResponses, Do as UpdateEndpointResponse, Dr as GetEmailResponse, Dt as CliLogoutResponse, E as deleteDomain, Ea as SendEmailResponses, Ei as ListFiltersResponses, En as DeleteFunctionResponse, Eo as UpdateEndpointInput, Er as GetEmailErrors, Et as CliLogoutInput, F as getAccount, Fa as SentEmailDetail, Fi as ListFunctionsResponse, Fn as DiscardContentResult, Fo as UpdateFunctionData, Fr as GetSendPermissionsError, Ft as CreateEndpointResponse, G as listEndpoints, Ga as StartCliLoginError, Gi as PollCliLoginErrors, Gn as DownloadAttachmentsErrors, Go as VerifyDomainResponse, Gr as GetStorageStatsError, Gt as CreateFunctionErrors, H as listDeliveries, Ha as SetFunctionSecretResponse, Hi as PaginationMeta, Hn as DomainVerifyResult, Ho as VerifyDomainData, Hr as GetSentEmailResponse, Ht as CreateFilterResponses, I as getEmail, Ia as SentEmailStatus, Ii as ListFunctionsResponses, In as DiscardEmailContentData, Io as UpdateFunctionError, Ir as GetSendPermissionsErrors, It as CreateEndpointResponses, J as listFunctions, Ja as StartCliLoginResponse, Ji as PollCliLoginResponses, Jn as DownloadRawEmailData, Jo as Client, Jr as GetStorageStatsResponses, Jt as CreateFunctionResponses, K as listFilters, Ka as StartCliLoginErrors, Ki as PollCliLoginInput, Kn as DownloadAttachmentsResponse, Ko as VerifyDomainResponses, Kr as GetStorageStatsErrors, Kt as CreateFunctionInput, L as getFunction, La as SentEmailSummary, Li as ListSentEmailsData, Ln as DiscardEmailContentError, Lo as UpdateFunctionErrors, Lr as GetSendPermissionsResponse, Lt as CreateFilterData, M as discardEmailContent, Ma as SendPermissionRule, Mi as ListFunctionsData, Mn as DeleteFunctionSecretResponses, Mo as UpdateFilterInput, Mr as GetFunctionResponse, Mt as CreateEndpointError, N as downloadAttachments, Na as SendPermissionYourDomain, Ni as ListFunctionsError, Nn as DeliveryStatus, No as UpdateFilterResponse, Nr as GetFunctionResponses, Nt as CreateEndpointErrors, O as deleteEndpoint, Oa as SendMailResult, Oi as ListFunctionSecretsError, On as DeleteFunctionSecretData, Oo as UpdateEndpointResponses, Or as GetEmailResponses, Ot as CliLogoutResponses, P as downloadRawEmail, Pa as SendPermissionsMeta, Pi as ListFunctionsErrors, Pn as DeliverySummary, Po as UpdateFilterResponses, Pr as GetSendPermissionsData, Pt as CreateEndpointInput, Q as replayEmailWebhooks, Qa as TestEndpointData, Qi as ReplayDeliveryResponse, Qn as DownloadRawEmailResponses, Qo as Options$1, Qr as GetWebhookSecretResponse, Qt as CreateFunctionSecretErrors, R as getSendPermissions, Ra as SetFunctionSecretData, Ri as ListSentEmailsError, Rn as DiscardEmailContentErrors, Ro as UpdateFunctionInput, Rr as GetSendPermissionsResponses, Rt as CreateFilterError, S as createEndpoint, Sa as SendEmailData, Si as ListFiltersData, Sn as DeleteFilterResponses, So as UpdateDomainResponses, Sr as GetAccountResponse, St as CliLoginStartResult, T as createFunctionSecret, Ta as SendEmailResponse, Ti as ListFiltersResponse, Tn as DeleteFunctionErrors, To as UpdateEndpointErrors, Tr as GetEmailError, Tt as CliLogoutErrors, U as listDomains, Ua as SetFunctionSecretResponses, Ui as PollCliLoginData, Un as DownloadAttachmentsData, Uo as VerifyDomainError, Ur as GetSentEmailResponses, Ut as CreateFunctionData, V as getWebhookSecret, Va as SetFunctionSecretInput, Vi as ListSentEmailsResponses, Vn as Domain, Vo as VerifiedDomain, Vr as GetSentEmailErrors, Vt as CreateFilterResponse, W as listEmails, Wa as StartCliLoginData, Wi as PollCliLoginError, Wn as DownloadAttachmentsError, Wo as VerifyDomainErrors, Wr as GetStorageStatsData, Wt as CreateFunctionError, X as pollCliLogin, Xa as StorageStats, Xi as ReplayDeliveryError, Xn as DownloadRawEmailErrors, Xo as Config, Xr as GetWebhookSecretError, Xt as CreateFunctionSecretData, Y as listSentEmails, Ya as StartCliLoginResponses, Yi as ReplayDeliveryData, Yn as DownloadRawEmailError, Yo as ClientOptions$1, Yr as GetWebhookSecretData, Yt as CreateFunctionResult, Z as replayDelivery, Za as SuccessEnvelope, Zi as ReplayDeliveryErrors, Zn as DownloadRawEmailResponse, Zo as CreateClientConfig, Zr as GetWebhookSecretErrors, Zt as CreateFunctionSecretError, _ as createPrimitiveClient, _a as SearchEmailsData, _i as ListEndpointsError, _n as DeleteEndpointResponses, _o as UpdateDomainData, _r as GateDenial, _t as AddDomainErrors, a as PrimitiveApiClientOptions, aa as ReplayResult, ai as ListDeliveriesResponses, an as DeleteDomainErrors, ao as TestFunctionErrors, ar as EmailSearchResult, at as testEndpoint, b as addDomain, ba as SearchEmailsResponse, bi as ListEndpointsResponses, bn as DeleteFilterErrors, bo as UpdateDomainInput, br as GetAccountError, bt as AddDomainResponses, c as PrimitiveClient, ca as ReplyToEmailErrors, ci as ListDomainsErrors, cn as DeleteEmailData, co as TestInvocationResult, cr as EmailWebhookStatus, ct as updateDomain, d as RequestOptions$1, da as ResourceId, di as ListEmailsData, dn as DeleteEmailResponse, do as UpdateAccountData, dr as Filter, dt as updateFunction, ea as ReplayEmailWebhooksData, ei as Limit, en as CreateFunctionSecretResponse, eo as TestEndpointErrors, er as EmailDetailReply, es as RequestResult, et as rotateWebhookSecret, f as SendInput, fa as RotateWebhookSecretData, fi as ListEmailsError, fn as DeleteEmailResponses, fo as UpdateAccountError, fr as FunctionDeployStatus, ft as verifyDomain, g as createPrimitiveApiClient, ga as RotateWebhookSecretResponses, gi as ListEndpointsData, gn as DeleteEndpointResponse, go as UpdateAccountResponses, gr as FunctionSecretWriteResult, gt as AddDomainError, h as client, ha as RotateWebhookSecretResponse, hi as ListEmailsResponses, hn as DeleteEndpointErrors, ho as UpdateAccountResponse, hr as FunctionSecretListItem, ht as AddDomainData, i as PrimitiveApiClient, ia as ReplayEmailWebhooksResponses, ii as ListDeliveriesResponse, in as DeleteDomainError, io as TestFunctionError, ir as EmailSearchMeta, it as startCliLogin, j as deleteFunctionSecret, ja as SendPermissionManagedZone, ji as ListFunctionSecretsResponses, jn as DeleteFunctionSecretResponse, jo as UpdateFilterErrors, jr as GetFunctionErrors, jt as CreateEndpointData, k as deleteFilter, ka as SendPermissionAddress, ki as ListFunctionSecretsErrors, kn as DeleteFunctionSecretError, ko as UpdateFilterData, kr as GetFunctionData, kt as CliLogoutResult, l as PrimitiveClientOptions, la as ReplyToEmailResponse, li as ListDomainsResponse, ln as DeleteEmailError, lo as TestResult, lr as Endpoint, lt as updateEndpoint, m as SendThreadInput, ma as RotateWebhookSecretErrors, mi as ListEmailsResponse, mn as DeleteEndpointError, mo as UpdateAccountInput, mr as FunctionListItem, mt as AccountUpdated, n as DEFAULT_API_BASE_URL_2, na as ReplayEmailWebhooksErrors, ni as ListDeliveriesError, nn as Cursor, no as TestEndpointResponses, nr as EmailSearchFacets, ns as Auth, nt as sendEmail, o as PrimitiveApiError, oa as ReplyToEmailData, oi as ListDomainsData, on as DeleteDomainResponse, oo as TestFunctionResponse, or as EmailStatus, ot as testFunction, p as SendResult, pa as RotateWebhookSecretError, pi as ListEmailsErrors, pn as DeleteEndpointData, po as UpdateAccountErrors, pr as FunctionDetail, pt as Account, q as listFunctionSecrets, qa as StartCliLoginInput, qi as PollCliLoginResponse, qn as DownloadAttachmentsResponses, qo as WebhookSecret, qr as GetStorageStatsResponse, qt as CreateFunctionResponse, r as ForwardInput, ra as ReplayEmailWebhooksResponse, ri as ListDeliveriesErrors, rn as DeleteDomainData, ro as TestFunctionData, rr as EmailSearchHighlights, rt as setFunctionSecret, s as PrimitiveApiErrorDetails, sa as ReplyToEmailError, si as ListDomainsError, sn as DeleteDomainResponses, so as TestFunctionResponses, sr as EmailSummary, st as updateAccount, t as DEFAULT_API_BASE_URL_1, ta as ReplayEmailWebhooksError, ti as ListDeliveriesData, tn as CreateFunctionSecretResponses, to as TestEndpointResponse, tr as EmailSearchFacetBucket, ts as ResponseStyle, tt as searchEmails, u as ReplyInput, ua as ReplyToEmailResponses, ui as ListDomainsResponses, un as DeleteEmailErrors, uo as UnverifiedDomain, ur as ErrorResponse, ut as updateFilter, v as operations, va as SearchEmailsError, vi as ListEndpointsErrors, vn as DeleteFilterData, vo as UpdateDomainError, vr as GateFix, vt as AddDomainInput, w as createFunction, wa as SendEmailErrors, wi as ListFiltersErrors, wn as DeleteFunctionError, wo as UpdateEndpointError, wr as GetEmailData, wt as CliLogoutError, x as cliLogout, xa as SearchEmailsResponses, xi as ListEnvelope, xn as DeleteFilterResponse, xo as UpdateDomainResponse, xr as GetAccountErrors, xt as CliLoginPollResult, y as Options, ya as SearchEmailsErrors, yi as ListEndpointsResponse, yn as DeleteFilterError, yo as UpdateDomainErrors, yr as GetAccountData, yt as AddDomainResponse, z as getSentEmail, za as SetFunctionSecretError, zi as ListSentEmailsErrors, zn as DiscardEmailContentResponse, zo as UpdateFunctionResponse, zr as GetSentEmailData, zt as CreateFilterErrors } from "../index-jLAAV6Sq.js";
|
|
2
2
|
export { Account, AccountUpdated, AddDomainData, AddDomainError, AddDomainErrors, AddDomainInput, AddDomainResponse, AddDomainResponses, Auth, CliLoginPollResult, CliLoginStartResult, CliLogoutData, CliLogoutError, CliLogoutErrors, CliLogoutInput, CliLogoutResponse, CliLogoutResponses, CliLogoutResult, ClientOptions, 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, EmailSearchFacetBucket, EmailSearchFacets, EmailSearchHighlights, EmailSearchMeta, EmailSearchResult, EmailStatus, EmailSummary, EmailWebhookStatus, Endpoint, ErrorResponse, Filter, ForwardInput, FunctionDeployStatus, FunctionDetail, FunctionListItem, 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, ListFunctionSecretsData, ListFunctionSecretsError, ListFunctionSecretsErrors, ListFunctionSecretsResponse, ListFunctionSecretsResponses, ListFunctionsData, ListFunctionsError, ListFunctionsErrors, ListFunctionsResponse, ListFunctionsResponses, ListSentEmailsData, ListSentEmailsError, ListSentEmailsErrors, ListSentEmailsResponse, ListSentEmailsResponses, Options, PaginationMeta, PollCliLoginData, PollCliLoginError, PollCliLoginErrors, PollCliLoginInput, PollCliLoginResponse, PollCliLoginResponses, PrimitiveApiClient, PrimitiveApiClientOptions, PrimitiveApiError, PrimitiveApiErrorDetails, PrimitiveClient, PrimitiveClientOptions, Client as PrimitiveGeneratedApiClient, ClientOptions$1 as PrimitiveGeneratedApiClientOptions, Config as PrimitiveGeneratedApiConfig, Options$1 as PrimitiveGeneratedApiOptions, RequestOptions as PrimitiveGeneratedApiRequestOptions, RequestResult as PrimitiveGeneratedApiRequestResult, ReplayDeliveryData, ReplayDeliveryError, ReplayDeliveryErrors, ReplayDeliveryResponse, ReplayDeliveryResponses, ReplayEmailWebhooksData, ReplayEmailWebhooksError, ReplayEmailWebhooksErrors, ReplayEmailWebhooksResponse, ReplayEmailWebhooksResponses, ReplayResult, ReplyInput, ReplyToEmailData, ReplyToEmailError, ReplyToEmailErrors, ReplyToEmailResponse, ReplyToEmailResponses, RequestOptions$1 as RequestOptions, 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, 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, VerifyDomainData, VerifyDomainError, VerifyDomainErrors, VerifyDomainResponse, VerifyDomainResponses, WebhookSecret, addDomain, cliLogout, client, 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, listFunctionSecrets, listFunctions, listSentEmails, operations, pollCliLogin, replayDelivery, replayEmailWebhooks, replyToEmail, rotateWebhookSecret, searchEmails, sendEmail, setFunctionSecret, startCliLogin, testEndpoint, testFunction, updateAccount, updateDomain, updateEndpoint, updateFilter, updateFunction, verifyDomain };
|
|
@@ -689,7 +689,7 @@ const pollCliLogin = (options) => (options.client ?? client$1).post({
|
|
|
689
689
|
url: "/cli/login/poll",
|
|
690
690
|
...options,
|
|
691
691
|
headers: {
|
|
692
|
-
"Content-Type": "application/json",
|
|
692
|
+
...options.body !== void 0 && { "Content-Type": "application/json" },
|
|
693
693
|
...options.headers
|
|
694
694
|
}
|
|
695
695
|
});
|
|
@@ -734,7 +734,7 @@ const updateAccount = (options) => (options.client ?? client$1).patch({
|
|
|
734
734
|
url: "/account",
|
|
735
735
|
...options,
|
|
736
736
|
headers: {
|
|
737
|
-
"Content-Type": "application/json",
|
|
737
|
+
...options.body !== void 0 && { "Content-Type": "application/json" },
|
|
738
738
|
...options.headers
|
|
739
739
|
}
|
|
740
740
|
});
|
|
@@ -828,7 +828,7 @@ const addDomain = (options) => (options.client ?? client$1).post({
|
|
|
828
828
|
url: "/domains",
|
|
829
829
|
...options,
|
|
830
830
|
headers: {
|
|
831
|
-
"Content-Type": "application/json",
|
|
831
|
+
...options.body !== void 0 && { "Content-Type": "application/json" },
|
|
832
832
|
...options.headers
|
|
833
833
|
}
|
|
834
834
|
});
|
|
@@ -860,7 +860,7 @@ const updateDomain = (options) => (options.client ?? client$1).patch({
|
|
|
860
860
|
url: "/domains/{id}",
|
|
861
861
|
...options,
|
|
862
862
|
headers: {
|
|
863
|
-
"Content-Type": "application/json",
|
|
863
|
+
...options.body !== void 0 && { "Content-Type": "application/json" },
|
|
864
864
|
...options.headers
|
|
865
865
|
}
|
|
866
866
|
});
|
|
@@ -1042,7 +1042,7 @@ const replyToEmail = (options) => (options.client ?? client$1).post({
|
|
|
1042
1042
|
url: "/emails/{id}/reply",
|
|
1043
1043
|
...options,
|
|
1044
1044
|
headers: {
|
|
1045
|
-
"Content-Type": "application/json",
|
|
1045
|
+
...options.body !== void 0 && { "Content-Type": "application/json" },
|
|
1046
1046
|
...options.headers
|
|
1047
1047
|
}
|
|
1048
1048
|
});
|
|
@@ -1132,7 +1132,7 @@ const createEndpoint = (options) => (options.client ?? client$1).post({
|
|
|
1132
1132
|
url: "/endpoints",
|
|
1133
1133
|
...options,
|
|
1134
1134
|
headers: {
|
|
1135
|
-
"Content-Type": "application/json",
|
|
1135
|
+
...options.body !== void 0 && { "Content-Type": "application/json" },
|
|
1136
1136
|
...options.headers
|
|
1137
1137
|
}
|
|
1138
1138
|
});
|
|
@@ -1167,7 +1167,7 @@ const updateEndpoint = (options) => (options.client ?? client$1).patch({
|
|
|
1167
1167
|
url: "/endpoints/{id}",
|
|
1168
1168
|
...options,
|
|
1169
1169
|
headers: {
|
|
1170
|
-
"Content-Type": "application/json",
|
|
1170
|
+
...options.body !== void 0 && { "Content-Type": "application/json" },
|
|
1171
1171
|
...options.headers
|
|
1172
1172
|
}
|
|
1173
1173
|
});
|
|
@@ -1217,7 +1217,7 @@ const createFilter = (options) => (options.client ?? client$1).post({
|
|
|
1217
1217
|
url: "/filters",
|
|
1218
1218
|
...options,
|
|
1219
1219
|
headers: {
|
|
1220
|
-
"Content-Type": "application/json",
|
|
1220
|
+
...options.body !== void 0 && { "Content-Type": "application/json" },
|
|
1221
1221
|
...options.headers
|
|
1222
1222
|
}
|
|
1223
1223
|
});
|
|
@@ -1245,7 +1245,7 @@ const updateFilter = (options) => (options.client ?? client$1).patch({
|
|
|
1245
1245
|
url: "/filters/{id}",
|
|
1246
1246
|
...options,
|
|
1247
1247
|
headers: {
|
|
1248
|
-
"Content-Type": "application/json",
|
|
1248
|
+
...options.body !== void 0 && { "Content-Type": "application/json" },
|
|
1249
1249
|
...options.headers
|
|
1250
1250
|
}
|
|
1251
1251
|
});
|
|
@@ -1350,7 +1350,7 @@ const sendEmail = (options) => (options.client ?? client$1).post({
|
|
|
1350
1350
|
url: "/send-mail",
|
|
1351
1351
|
...options,
|
|
1352
1352
|
headers: {
|
|
1353
|
-
"Content-Type": "application/json",
|
|
1353
|
+
...options.body !== void 0 && { "Content-Type": "application/json" },
|
|
1354
1354
|
...options.headers
|
|
1355
1355
|
}
|
|
1356
1356
|
});
|
|
@@ -1455,7 +1455,7 @@ const createFunction = (options) => (options.client ?? client$1).post({
|
|
|
1455
1455
|
url: "/functions",
|
|
1456
1456
|
...options,
|
|
1457
1457
|
headers: {
|
|
1458
|
-
"Content-Type": "application/json",
|
|
1458
|
+
...options.body !== void 0 && { "Content-Type": "application/json" },
|
|
1459
1459
|
...options.headers
|
|
1460
1460
|
}
|
|
1461
1461
|
});
|
|
@@ -1520,7 +1520,7 @@ const updateFunction = (options) => (options.client ?? client$1).put({
|
|
|
1520
1520
|
url: "/functions/{id}",
|
|
1521
1521
|
...options,
|
|
1522
1522
|
headers: {
|
|
1523
|
-
"Content-Type": "application/json",
|
|
1523
|
+
...options.body !== void 0 && { "Content-Type": "application/json" },
|
|
1524
1524
|
...options.headers
|
|
1525
1525
|
}
|
|
1526
1526
|
});
|
|
@@ -1528,8 +1528,14 @@ const updateFunction = (options) => (options.client ?? client$1).put({
|
|
|
1528
1528
|
* Send a test invocation
|
|
1529
1529
|
*
|
|
1530
1530
|
* Sends a real test email from a Primitive-controlled sender to a
|
|
1531
|
-
*
|
|
1532
|
-
*
|
|
1531
|
+
* local-part on one of the org's verified inbound domains. By
|
|
1532
|
+
* default the recipient is a synthetic
|
|
1533
|
+
* `__primitive_function_test+<random>@<domain>` address that
|
|
1534
|
+
* every handler's catch-all routing receives identically; pass
|
|
1535
|
+
* `local_part` to override and exercise routing logic that
|
|
1536
|
+
* branches on a specific recipient (the common pattern when one
|
|
1537
|
+
* function handles multiple inboxes like `summarize@` and
|
|
1538
|
+
* `action@`). The function fires through the normal MX delivery
|
|
1533
1539
|
* path, so reply / send-mail calls from inside the handler
|
|
1534
1540
|
* against the inbound's `email.id` work the same as in
|
|
1535
1541
|
* production. Returns immediately after the send is queued; the
|
|
@@ -1539,6 +1545,8 @@ const updateFunction = (options) => (options.client ?? client$1).put({
|
|
|
1539
1545
|
* Requires that the function is currently `deployed`. Returns 422
|
|
1540
1546
|
* if the function is in `pending` or `failed` state, or if the
|
|
1541
1547
|
* org has no verified inbound domain to receive the test mail.
|
|
1548
|
+
* Returns 400 if `local_part` is set to a value that does not
|
|
1549
|
+
* match the local-part character set.
|
|
1542
1550
|
*
|
|
1543
1551
|
*/
|
|
1544
1552
|
const testFunction = (options) => (options.client ?? client$1).post({
|
|
@@ -1547,7 +1555,11 @@ const testFunction = (options) => (options.client ?? client$1).post({
|
|
|
1547
1555
|
type: "http"
|
|
1548
1556
|
}],
|
|
1549
1557
|
url: "/functions/{id}/test",
|
|
1550
|
-
...options
|
|
1558
|
+
...options,
|
|
1559
|
+
headers: {
|
|
1560
|
+
...options.body !== void 0 && { "Content-Type": "application/json" },
|
|
1561
|
+
...options.headers
|
|
1562
|
+
}
|
|
1551
1563
|
});
|
|
1552
1564
|
/**
|
|
1553
1565
|
* List a function's secrets
|
|
@@ -1594,7 +1606,7 @@ const createFunctionSecret = (options) => (options.client ?? client$1).post({
|
|
|
1594
1606
|
url: "/functions/{id}/secrets",
|
|
1595
1607
|
...options,
|
|
1596
1608
|
headers: {
|
|
1597
|
-
"Content-Type": "application/json",
|
|
1609
|
+
...options.body !== void 0 && { "Content-Type": "application/json" },
|
|
1598
1610
|
...options.headers
|
|
1599
1611
|
}
|
|
1600
1612
|
});
|
|
@@ -1634,7 +1646,7 @@ const setFunctionSecret = (options) => (options.client ?? client$1).put({
|
|
|
1634
1646
|
url: "/functions/{id}/secrets/{key}",
|
|
1635
1647
|
...options,
|
|
1636
1648
|
headers: {
|
|
1637
|
-
"Content-Type": "application/json",
|
|
1649
|
+
...options.body !== void 0 && { "Content-Type": "application/json" },
|
|
1638
1650
|
...options.headers
|
|
1639
1651
|
}
|
|
1640
1652
|
});
|
|
@@ -3369,7 +3369,19 @@ type UpdateFunctionResponses = {
|
|
|
3369
3369
|
};
|
|
3370
3370
|
type UpdateFunctionResponse = UpdateFunctionResponses[keyof UpdateFunctionResponses];
|
|
3371
3371
|
type TestFunctionData = {
|
|
3372
|
-
body?:
|
|
3372
|
+
body?: {
|
|
3373
|
+
/**
|
|
3374
|
+
* Override the synthetic local-part. When set, the
|
|
3375
|
+
* test email is sent to `<local_part>@<picked-domain>`
|
|
3376
|
+
* instead of the default
|
|
3377
|
+
* `__primitive_function_test+<random>@<picked-domain>`.
|
|
3378
|
+
* Must start with an alphanumeric and contain only
|
|
3379
|
+
* letters, digits, dots, plus signs, hyphens, or
|
|
3380
|
+
* underscores; 1-64 characters total.
|
|
3381
|
+
*
|
|
3382
|
+
*/
|
|
3383
|
+
local_part?: string;
|
|
3384
|
+
};
|
|
3373
3385
|
path: {
|
|
3374
3386
|
/**
|
|
3375
3387
|
* Resource UUID
|
|
@@ -4104,8 +4116,14 @@ declare const updateFunction: <ThrowOnError extends boolean = false>(options: Op
|
|
|
4104
4116
|
* Send a test invocation
|
|
4105
4117
|
*
|
|
4106
4118
|
* Sends a real test email from a Primitive-controlled sender to a
|
|
4107
|
-
*
|
|
4108
|
-
*
|
|
4119
|
+
* local-part on one of the org's verified inbound domains. By
|
|
4120
|
+
* default the recipient is a synthetic
|
|
4121
|
+
* `__primitive_function_test+<random>@<domain>` address that
|
|
4122
|
+
* every handler's catch-all routing receives identically; pass
|
|
4123
|
+
* `local_part` to override and exercise routing logic that
|
|
4124
|
+
* branches on a specific recipient (the common pattern when one
|
|
4125
|
+
* function handles multiple inboxes like `summarize@` and
|
|
4126
|
+
* `action@`). The function fires through the normal MX delivery
|
|
4109
4127
|
* path, so reply / send-mail calls from inside the handler
|
|
4110
4128
|
* against the inbound's `email.id` work the same as in
|
|
4111
4129
|
* production. Returns immediately after the send is queued; the
|
|
@@ -4115,6 +4133,8 @@ declare const updateFunction: <ThrowOnError extends boolean = false>(options: Op
|
|
|
4115
4133
|
* Requires that the function is currently `deployed`. Returns 422
|
|
4116
4134
|
* if the function is in `pending` or `failed` state, or if the
|
|
4117
4135
|
* org has no verified inbound domain to receive the test mail.
|
|
4136
|
+
* Returns 400 if `local_part` is set to a value that does not
|
|
4137
|
+
* match the local-part character set.
|
|
4118
4138
|
*
|
|
4119
4139
|
*/
|
|
4120
4140
|
declare const testFunction: <ThrowOnError extends boolean = false>(options: Options<TestFunctionData, ThrowOnError>) => RequestResult<TestFunctionResponses, TestFunctionErrors, ThrowOnError, "fields">;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { A as UnknownEvent, C as ParsedDataFailed, D as RawContentDownloadOnly, E as RawContent, M as WebhookAttachment, N as WebhookEvent, O as RawContentInline, S as ParsedDataComplete, T as ParsedStatus, _ as ForwardResultInline, a as DmarcPolicy, b as KnownWebhookEvent, c as EmailAnalysis, d as EventType, f as ForwardAnalysis, g as ForwardResultAttachmentSkipped, h as ForwardResultAttachmentAnalyzed, i as DkimSignature, j as ValidateEmailAuthResult, k as SpfResult, l as EmailAuth, m as ForwardResult, n as AuthVerdict, o as DmarcResult, p as ForwardOriginalSender, r as DkimResult, s as EmailAddress, t as AuthConfidence, u as EmailReceivedEvent, v as ForwardVerdict, w as ParsedError, x as ParsedData, y as ForwardVerification } from "./types-9vXGZjPd.js";
|
|
2
2
|
import { a as buildReplySubject, c as parseHeaderAddress, i as buildForwardSubject, n as ReceivedEmailAddress, o as formatAddress, r as ReceivedEmailThread, s as normalizeReceivedEmail, t as ReceivedEmail } from "./received-email-DNjpq_Wt.js";
|
|
3
|
-
import { _ as createPrimitiveClient, c as PrimitiveClient, f as SendInput, h as client, l as PrimitiveClientOptions, m as SendThreadInput, o as PrimitiveApiError, p as SendResult, r as ForwardInput, u as ReplyInput } from "./index-
|
|
3
|
+
import { _ as createPrimitiveClient, c as PrimitiveClient, f as SendInput, h as client, l as PrimitiveClientOptions, m as SendThreadInput, o as PrimitiveApiError, p as SendResult, r as ForwardInput, u as ReplyInput } from "./index-jLAAV6Sq.js";
|
|
4
4
|
import { A as VerifyOptions, B as PAYLOAD_ERRORS, C as signStandardWebhooksPayload, D as PRIMITIVE_CONFIRMED_HEADER, E as LEGACY_SIGNATURE_HEADER, F as VerifyDownloadTokenResult, G as VERIFICATION_ERRORS, H as RAW_EMAIL_ERRORS, I as generateDownloadToken, J as WebhookPayloadErrorCode, K as WebhookErrorCode, L as verifyDownloadToken, M as verifyWebhookSignature, N as GenerateDownloadTokenOptions, O as PRIMITIVE_SIGNATURE_HEADER, P as VerifyDownloadTokenOptions, Q as WebhookVerificationErrorCode, R as safeValidateEmailReceivedEvent, S as StandardWebhooksVerifyOptions, T as LEGACY_CONFIRMED_HEADER, U as RawEmailDecodeError, V as PrimitiveWebhookError, W as RawEmailDecodeErrorCode, X as WebhookValidationErrorCode, Y as WebhookValidationError, Z as WebhookVerificationError, _ as emailReceivedEventJsonSchema, a as confirmedHeaders, b as STANDARD_WEBHOOK_TIMESTAMP_HEADER, c as handleWebhook, d as isRawIncluded, f as parseWebhookEvent, g as validateEmailAuth, h as WEBHOOK_VERSION, i as WebhookHeaders, j as signWebhookPayload, k as SignResult, l as isDownloadExpired, m as verifyRawEmailDownload, n as HandleWebhookOptions, o as decodeRawEmail, p as receive, q as WebhookPayloadError, r as ReceiveRequestOptions, s as getDownloadTimeRemaining, t as DecodeRawEmailOptions, u as isEmailReceivedEvent, v as STANDARD_WEBHOOK_ID_HEADER, w as verifyStandardWebhooksSignature, x as StandardWebhooksSignResult, y as STANDARD_WEBHOOK_SIGNATURE_HEADER, z as validateEmailReceivedEvent } from "./index-CDlwyxdp.js";
|
|
5
5
|
|
|
6
6
|
//#region src/index.d.ts
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as parseHeaderAddress, i as normalizeReceivedEmail, n as buildReplySubject, r as formatAddress, t as buildForwardSubject } from "./received-email-D6tKtWwW.js";
|
|
2
|
-
import { a as PrimitiveClient, c as createPrimitiveClient, i as PrimitiveApiError, o as client } from "./api-
|
|
2
|
+
import { a as PrimitiveClient, c as createPrimitiveClient, i as PrimitiveApiError, o as client } from "./api-C3X14uId.js";
|
|
3
3
|
import { A as PRIMITIVE_CONFIRMED_HEADER, B as RAW_EMAIL_ERRORS, C as STANDARD_WEBHOOK_ID_HEADER, D as verifyStandardWebhooksSignature, E as signStandardWebhooksPayload, F as verifyDownloadToken, G as WebhookVerificationError, H as VERIFICATION_ERRORS, I as safeValidateEmailReceivedEvent, L as validateEmailReceivedEvent, M as signWebhookPayload, N as verifyWebhookSignature, O as LEGACY_CONFIRMED_HEADER, P as generateDownloadToken, R as PAYLOAD_ERRORS, S as emailReceivedEventJsonSchema, T as STANDARD_WEBHOOK_TIMESTAMP_HEADER, U as WebhookPayloadError, V as RawEmailDecodeError, W as WebhookValidationError, _ as DmarcResult, a as isDownloadExpired, b as ParsedStatus, c as parseWebhookEvent, d as WEBHOOK_VERSION, f as validateEmailAuth, g as DmarcPolicy, h as DkimResult, i as handleWebhook, j as PRIMITIVE_SIGNATURE_HEADER, k as LEGACY_SIGNATURE_HEADER, l as receive, m as AuthVerdict, n as decodeRawEmail, o as isEmailReceivedEvent, p as AuthConfidence, r as getDownloadTimeRemaining, s as isRawIncluded, t as confirmedHeaders, u as verifyRawEmailDownload, v as EventType, w as STANDARD_WEBHOOK_SIGNATURE_HEADER, x as SpfResult, y as ForwardVerdict, z as PrimitiveWebhookError } from "./webhook-rUjGV6Zu.js";
|
|
4
4
|
//#region src/index.ts
|
|
5
5
|
const primitive = {
|
|
@@ -2569,10 +2569,30 @@ export const openapiDocument = {
|
|
|
2569
2569
|
"post": {
|
|
2570
2570
|
"operationId": "testFunction",
|
|
2571
2571
|
"summary": "Send a test invocation",
|
|
2572
|
-
"description": "Sends a real test email from a Primitive-controlled sender to a\
|
|
2572
|
+
"description": "Sends a real test email from a Primitive-controlled sender to a\nlocal-part on one of the org's verified inbound domains. By\ndefault the recipient is a synthetic\n`__primitive_function_test+<random>@<domain>` address that\nevery handler's catch-all routing receives identically; pass\n`local_part` to override and exercise routing logic that\nbranches on a specific recipient (the common pattern when one\nfunction handles multiple inboxes like `summarize@` and\n`action@`). The function fires through the normal MX delivery\npath, so reply / send-mail calls from inside the handler\nagainst the inbound's `email.id` work the same as in\nproduction. Returns immediately after the send is queued; the\ninvocation appears on the function's invocations list within a\nfew seconds.\n\nRequires that the function is currently `deployed`. Returns 422\nif the function is in `pending` or `failed` state, or if the\norg has no verified inbound domain to receive the test mail.\nReturns 400 if `local_part` is set to a value that does not\nmatch the local-part character set.\n",
|
|
2573
2573
|
"tags": [
|
|
2574
2574
|
"Functions"
|
|
2575
2575
|
],
|
|
2576
|
+
"requestBody": {
|
|
2577
|
+
"required": false,
|
|
2578
|
+
"content": {
|
|
2579
|
+
"application/json": {
|
|
2580
|
+
"schema": {
|
|
2581
|
+
"type": "object",
|
|
2582
|
+
"properties": {
|
|
2583
|
+
"local_part": {
|
|
2584
|
+
"type": "string",
|
|
2585
|
+
"description": "Override the synthetic local-part. When set, the\ntest email is sent to `<local_part>@<picked-domain>`\ninstead of the default\n`__primitive_function_test+<random>@<picked-domain>`.\nMust start with an alphanumeric and contain only\nletters, digits, dots, plus signs, hyphens, or\nunderscores; 1-64 characters total.\n",
|
|
2586
|
+
"minLength": 1,
|
|
2587
|
+
"maxLength": 64,
|
|
2588
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._+-]{0,63}$",
|
|
2589
|
+
"example": "summarize"
|
|
2590
|
+
}
|
|
2591
|
+
}
|
|
2592
|
+
}
|
|
2593
|
+
}
|
|
2594
|
+
}
|
|
2595
|
+
},
|
|
2576
2596
|
"responses": {
|
|
2577
2597
|
"200": {
|
|
2578
2598
|
"description": "Test send queued",
|
|
@@ -3034,8 +3034,8 @@ export const operationManifest = [
|
|
|
3034
3034
|
"binaryResponse": false,
|
|
3035
3035
|
"bodyRequired": false,
|
|
3036
3036
|
"command": "test-function",
|
|
3037
|
-
"description": "Sends a real test email from a Primitive-controlled sender to a\
|
|
3038
|
-
"hasJsonBody":
|
|
3037
|
+
"description": "Sends a real test email from a Primitive-controlled sender to a\nlocal-part on one of the org's verified inbound domains. By\ndefault the recipient is a synthetic\n`__primitive_function_test+<random>@<domain>` address that\nevery handler's catch-all routing receives identically; pass\n`local_part` to override and exercise routing logic that\nbranches on a specific recipient (the common pattern when one\nfunction handles multiple inboxes like `summarize@` and\n`action@`). The function fires through the normal MX delivery\npath, so reply / send-mail calls from inside the handler\nagainst the inbound's `email.id` work the same as in\nproduction. Returns immediately after the send is queued; the\ninvocation appears on the function's invocations list within a\nfew seconds.\n\nRequires that the function is currently `deployed`. Returns 422\nif the function is in `pending` or `failed` state, or if the\norg has no verified inbound domain to receive the test mail.\nReturns 400 if `local_part` is set to a value that does not\nmatch the local-part character set.\n",
|
|
3038
|
+
"hasJsonBody": true,
|
|
3039
3039
|
"method": "POST",
|
|
3040
3040
|
"operationId": "testFunction",
|
|
3041
3041
|
"path": "/functions/{id}/test",
|
|
@@ -3049,7 +3049,19 @@ export const operationManifest = [
|
|
|
3049
3049
|
}
|
|
3050
3050
|
],
|
|
3051
3051
|
"queryParams": [],
|
|
3052
|
-
"requestSchema":
|
|
3052
|
+
"requestSchema": {
|
|
3053
|
+
"type": "object",
|
|
3054
|
+
"properties": {
|
|
3055
|
+
"local_part": {
|
|
3056
|
+
"type": "string",
|
|
3057
|
+
"description": "Override the synthetic local-part. When set, the\ntest email is sent to `<local_part>@<picked-domain>`\ninstead of the default\n`__primitive_function_test+<random>@<picked-domain>`.\nMust start with an alphanumeric and contain only\nletters, digits, dots, plus signs, hyphens, or\nunderscores; 1-64 characters total.\n",
|
|
3058
|
+
"minLength": 1,
|
|
3059
|
+
"maxLength": 64,
|
|
3060
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._+-]{0,63}$",
|
|
3061
|
+
"example": "summarize"
|
|
3062
|
+
}
|
|
3063
|
+
}
|
|
3064
|
+
},
|
|
3053
3065
|
"responseSchema": {
|
|
3054
3066
|
"type": "object",
|
|
3055
3067
|
"description": "Metadata returned by POST /functions/{id}/test. The send is\nqueued; the actual invocation lands on the function's\ninvocations list a few seconds later as the inbound mail\ntraverses the MX path.\n",
|
package/oclif.manifest.json
CHANGED
|
@@ -3565,7 +3565,7 @@
|
|
|
3565
3565
|
"functions:test-function": {
|
|
3566
3566
|
"aliases": [],
|
|
3567
3567
|
"args": {},
|
|
3568
|
-
"description": "Sends a real test email from a Primitive-controlled sender to a\
|
|
3568
|
+
"description": "Sends a real test email from a Primitive-controlled sender to a\nlocal-part on one of the org's verified inbound domains. By\ndefault the recipient is a synthetic\n`__primitive_function_test+<random>@<domain>` address that\nevery handler's catch-all routing receives identically; pass\n`local_part` to override and exercise routing logic that\nbranches on a specific recipient (the common pattern when one\nfunction handles multiple inboxes like `summarize@` and\n`action@`). The function fires through the normal MX delivery\npath, so reply / send-mail calls from inside the handler\nagainst the inbound's `email.id` work the same as in\nproduction. Returns immediately after the send is queued; the\ninvocation appears on the function's invocations list within a\nfew seconds.\n\nRequires that the function is currently `deployed`. Returns 422\nif the function is in `pending` or `failed` state, or if the\norg has no verified inbound domain to receive the test mail.\nReturns 400 if `local_part` is set to a value that does not\nmatch the local-part character set.\n",
|
|
3569
3569
|
"flags": {
|
|
3570
3570
|
"api-key": {
|
|
3571
3571
|
"description": "Primitive API key (defaults to PRIMITIVE_API_KEY or saved `primitive login` credentials)",
|
|
@@ -3606,6 +3606,27 @@
|
|
|
3606
3606
|
"hasDynamicHelp": false,
|
|
3607
3607
|
"multiple": false,
|
|
3608
3608
|
"type": "option"
|
|
3609
|
+
},
|
|
3610
|
+
"raw-body": {
|
|
3611
|
+
"description": "Full request body as raw JSON. Escape hatch for nested or complex fields (e.g. arrays); prefer per-field flags (e.g. --to, --from, --body-text) when available.",
|
|
3612
|
+
"name": "raw-body",
|
|
3613
|
+
"hasDynamicHelp": false,
|
|
3614
|
+
"multiple": false,
|
|
3615
|
+
"type": "option"
|
|
3616
|
+
},
|
|
3617
|
+
"body-file": {
|
|
3618
|
+
"description": "Path to a JSON file used as the request body. Same role as --raw-body for callers passing a saved payload.",
|
|
3619
|
+
"name": "body-file",
|
|
3620
|
+
"hasDynamicHelp": false,
|
|
3621
|
+
"multiple": false,
|
|
3622
|
+
"type": "option"
|
|
3623
|
+
},
|
|
3624
|
+
"local-part": {
|
|
3625
|
+
"description": "Override the synthetic local-part. When set, the test email is sent to `<local_part>@<picked-domain>` instead of the default `__primitive_function_test+<random>@<picked-domain>`. Must start with an alphanumeric and contain only letters, digits, dots, plus signs, hyphens, or underscores; 1-64 characters total.",
|
|
3626
|
+
"name": "local-part",
|
|
3627
|
+
"hasDynamicHelp": false,
|
|
3628
|
+
"multiple": false,
|
|
3629
|
+
"type": "option"
|
|
3609
3630
|
}
|
|
3610
3631
|
},
|
|
3611
3632
|
"hasDynamicHelp": false,
|
|
@@ -4283,5 +4304,5 @@
|
|
|
4283
4304
|
"enableJsonFlag": false
|
|
4284
4305
|
}
|
|
4285
4306
|
},
|
|
4286
|
-
"version": "0.
|
|
4307
|
+
"version": "0.25.0"
|
|
4287
4308
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@primitivedotdev/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.0",
|
|
4
4
|
"description": "Official Primitive Node.js SDK: webhook, api, openapi, contract, and parser runtime modules. The CLI moved to @primitivedotdev/cli; this package retains the CLI as a deprecated alias for a few minor releases.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./dist/index.js",
|