@usehercules/sdk 1.14.3 → 1.14.4
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/CHANGELOG.md +95 -0
- package/client.d.mts +3 -3
- package/client.d.mts.map +1 -1
- package/client.d.ts +3 -3
- package/client.d.ts.map +1 -1
- package/client.js +15 -7
- package/client.js.map +1 -1
- package/client.mjs +15 -7
- package/client.mjs.map +1 -1
- package/internal/tslib.js +17 -17
- package/internal/utils/query.d.mts +2 -0
- package/internal/utils/query.d.mts.map +1 -0
- package/internal/utils/query.d.ts +2 -0
- package/internal/utils/query.d.ts.map +1 -0
- package/internal/utils/query.js +10 -0
- package/internal/utils/query.js.map +1 -0
- package/internal/utils/query.mjs +6 -0
- package/internal/utils/query.mjs.map +1 -0
- package/internal/utils.d.mts +1 -0
- package/internal/utils.d.ts +1 -0
- package/internal/utils.js +1 -0
- package/internal/utils.js.map +1 -1
- package/internal/utils.mjs +1 -0
- package/package.json +7 -1
- package/resources/commerce/coupons.d.mts +1 -1
- package/resources/commerce/coupons.d.mts.map +1 -1
- package/resources/commerce/coupons.d.ts +1 -1
- package/resources/commerce/coupons.d.ts.map +1 -1
- package/resources/commerce/coupons.js +1 -1
- package/resources/commerce/coupons.js.map +1 -1
- package/resources/commerce/coupons.mjs +1 -1
- package/resources/commerce/coupons.mjs.map +1 -1
- package/resources/commerce/customers.d.mts +3 -3
- package/resources/commerce/customers.d.mts.map +1 -1
- package/resources/commerce/customers.d.ts +3 -3
- package/resources/commerce/customers.d.ts.map +1 -1
- package/resources/commerce/customers.js +3 -3
- package/resources/commerce/customers.js.map +1 -1
- package/resources/commerce/customers.mjs +3 -3
- package/resources/commerce/customers.mjs.map +1 -1
- package/resources/commerce/features.d.mts +1 -1
- package/resources/commerce/features.d.mts.map +1 -1
- package/resources/commerce/features.d.ts +1 -1
- package/resources/commerce/features.d.ts.map +1 -1
- package/resources/commerce/features.js +1 -1
- package/resources/commerce/features.js.map +1 -1
- package/resources/commerce/features.mjs +1 -1
- package/resources/commerce/features.mjs.map +1 -1
- package/resources/commerce/products/products.d.mts +1 -1
- package/resources/commerce/products/products.d.mts.map +1 -1
- package/resources/commerce/products/products.d.ts +1 -1
- package/resources/commerce/products/products.d.ts.map +1 -1
- package/resources/commerce/products/products.js +1 -1
- package/resources/commerce/products/products.js.map +1 -1
- package/resources/commerce/products/products.mjs +1 -1
- package/resources/commerce/products/products.mjs.map +1 -1
- package/resources/content/assets.d.mts +1 -1
- package/resources/content/assets.d.mts.map +1 -1
- package/resources/content/assets.d.ts +1 -1
- package/resources/content/assets.d.ts.map +1 -1
- package/resources/content/assets.js +1 -1
- package/resources/content/assets.js.map +1 -1
- package/resources/content/assets.mjs +1 -1
- package/resources/content/assets.mjs.map +1 -1
- package/resources/content/collections/collections.d.mts +1 -1
- package/resources/content/collections/collections.d.mts.map +1 -1
- package/resources/content/collections/collections.d.ts +1 -1
- package/resources/content/collections/collections.d.ts.map +1 -1
- package/resources/content/collections/collections.js +1 -1
- package/resources/content/collections/collections.js.map +1 -1
- package/resources/content/collections/collections.mjs +1 -1
- package/resources/content/collections/collections.mjs.map +1 -1
- package/resources/content/entries.d.mts +2 -2
- package/resources/content/entries.d.mts.map +1 -1
- package/resources/content/entries.d.ts +2 -2
- package/resources/content/entries.d.ts.map +1 -1
- package/resources/content/entries.js +2 -2
- package/resources/content/entries.js.map +1 -1
- package/resources/content/entries.mjs +2 -2
- package/resources/content/entries.mjs.map +1 -1
- package/resources/content/locales.d.mts +1 -1
- package/resources/content/locales.d.mts.map +1 -1
- package/resources/content/locales.d.ts +1 -1
- package/resources/content/locales.d.ts.map +1 -1
- package/resources/content/locales.js +1 -1
- package/resources/content/locales.js.map +1 -1
- package/resources/content/locales.mjs +1 -1
- package/resources/content/locales.mjs.map +1 -1
- package/resources/content/releases/releases.d.mts +1 -1
- package/resources/content/releases/releases.d.mts.map +1 -1
- package/resources/content/releases/releases.d.ts +1 -1
- package/resources/content/releases/releases.d.ts.map +1 -1
- package/resources/content/releases/releases.js +1 -1
- package/resources/content/releases/releases.js.map +1 -1
- package/resources/content/releases/releases.mjs +1 -1
- package/resources/content/releases/releases.mjs.map +1 -1
- package/resources/email/email.d.mts +53 -4
- package/resources/email/email.d.mts.map +1 -1
- package/resources/email/email.d.ts +53 -4
- package/resources/email/email.d.ts.map +1 -1
- package/resources/email/email.js.map +1 -1
- package/resources/email/email.mjs.map +1 -1
- package/resources/email/identities.d.mts +50 -12
- package/resources/email/identities.d.mts.map +1 -1
- package/resources/email/identities.d.ts +50 -12
- package/resources/email/identities.d.ts.map +1 -1
- package/resources/email/identities.js +2 -2
- package/resources/email/identities.js.map +1 -1
- package/resources/email/identities.mjs +2 -2
- package/resources/email/identities.mjs.map +1 -1
- package/resources/email/index.d.mts +2 -2
- package/resources/email/index.d.mts.map +1 -1
- package/resources/email/index.d.ts +2 -2
- package/resources/email/index.d.ts.map +1 -1
- package/resources/email/index.js.map +1 -1
- package/resources/email/index.mjs.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/src/client.ts +20 -9
- package/src/internal/utils/query.ts +7 -0
- package/src/internal/utils.ts +1 -0
- package/src/resources/commerce/coupons.ts +1 -5
- package/src/resources/commerce/customers.ts +3 -7
- package/src/resources/commerce/features.ts +1 -5
- package/src/resources/commerce/products/products.ts +1 -5
- package/src/resources/content/assets.ts +1 -5
- package/src/resources/content/collections/collections.ts +1 -1
- package/src/resources/content/entries.ts +2 -10
- package/src/resources/content/locales.ts +1 -5
- package/src/resources/content/releases/releases.ts +1 -5
- package/src/resources/email/email.ts +64 -1
- package/src/resources/email/identities.ts +59 -12
- package/src/resources/email/index.ts +2 -0
- package/src/resources/index.ts +1 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { APIResource } from "../../core/resource.js";
|
|
2
2
|
import * as IdentitiesAPI from "./identities.js";
|
|
3
|
-
import { Identities, IdentitiesCursorIDPage, Identity, IdentityCreateParams, IdentityListParams } from "./identities.js";
|
|
3
|
+
import { Identities, IdentitiesCursorIDPage, Identity, IdentityCreateParams, IdentityListParams, IdentityVerifyParams } from "./identities.js";
|
|
4
4
|
import { APIPromise } from "../../core/api-promise.js";
|
|
5
5
|
import { CursorIDPage, type CursorIDPageParams, PagePromise } from "../../core/pagination.js";
|
|
6
6
|
import { RequestOptions } from "../../internal/request-options.js";
|
|
@@ -18,7 +18,7 @@ export declare class EmailResource extends APIResource {
|
|
|
18
18
|
/**
|
|
19
19
|
* Retrieves a single email by its unique identifier.
|
|
20
20
|
*/
|
|
21
|
-
get(emailID: string, options?: RequestOptions): APIPromise<
|
|
21
|
+
get(emailID: string, options?: RequestOptions): APIPromise<EmailGetResponse>;
|
|
22
22
|
/**
|
|
23
23
|
* Sends a single email. The sender address must be a verified identity for this
|
|
24
24
|
* website.
|
|
@@ -84,6 +84,55 @@ export interface Email {
|
|
|
84
84
|
*/
|
|
85
85
|
reply_to?: Array<string> | null;
|
|
86
86
|
}
|
|
87
|
+
/**
|
|
88
|
+
* A sent email object with full body content
|
|
89
|
+
*/
|
|
90
|
+
export interface EmailGetResponse {
|
|
91
|
+
/**
|
|
92
|
+
* Unique identifier for the email
|
|
93
|
+
*/
|
|
94
|
+
id: string;
|
|
95
|
+
/**
|
|
96
|
+
* Timestamp when the email was sent
|
|
97
|
+
*/
|
|
98
|
+
created_at: string;
|
|
99
|
+
/**
|
|
100
|
+
* Sender email address
|
|
101
|
+
*/
|
|
102
|
+
from: string;
|
|
103
|
+
/**
|
|
104
|
+
* Email subject line
|
|
105
|
+
*/
|
|
106
|
+
subject: string;
|
|
107
|
+
/**
|
|
108
|
+
* Recipient email addresses
|
|
109
|
+
*/
|
|
110
|
+
to: Array<string>;
|
|
111
|
+
/**
|
|
112
|
+
* Blind carbon copy recipients
|
|
113
|
+
*/
|
|
114
|
+
bcc?: Array<string> | null;
|
|
115
|
+
/**
|
|
116
|
+
* Carbon copy recipients
|
|
117
|
+
*/
|
|
118
|
+
cc?: Array<string> | null;
|
|
119
|
+
/**
|
|
120
|
+
* The HTML version of the message body
|
|
121
|
+
*/
|
|
122
|
+
html?: string | null;
|
|
123
|
+
/**
|
|
124
|
+
* The most recent event for this email
|
|
125
|
+
*/
|
|
126
|
+
last_event?: 'sent' | 'delivered' | 'opened' | 'clicked' | 'bounced' | 'complained' | null;
|
|
127
|
+
/**
|
|
128
|
+
* Reply-to addresses
|
|
129
|
+
*/
|
|
130
|
+
reply_to?: Array<string> | null;
|
|
131
|
+
/**
|
|
132
|
+
* The plain text version of the message body
|
|
133
|
+
*/
|
|
134
|
+
text?: string | null;
|
|
135
|
+
}
|
|
87
136
|
/**
|
|
88
137
|
* Response after sending an email
|
|
89
138
|
*/
|
|
@@ -160,7 +209,7 @@ export declare namespace EmailSendParams {
|
|
|
160
209
|
}
|
|
161
210
|
}
|
|
162
211
|
export declare namespace EmailResource {
|
|
163
|
-
export { type Attachment as Attachment, type Email as Email, type EmailSendResponse as EmailSendResponse, type EmailsCursorIDPage as EmailsCursorIDPage, type EmailListParams as EmailListParams, type EmailSendParams as EmailSendParams, };
|
|
164
|
-
export { Identities as Identities, type Identity as Identity, type IdentitiesCursorIDPage as IdentitiesCursorIDPage, type IdentityCreateParams as IdentityCreateParams, type IdentityListParams as IdentityListParams, };
|
|
212
|
+
export { type Attachment as Attachment, type Email as Email, type EmailGetResponse as EmailGetResponse, type EmailSendResponse as EmailSendResponse, type EmailsCursorIDPage as EmailsCursorIDPage, type EmailListParams as EmailListParams, type EmailSendParams as EmailSendParams, };
|
|
213
|
+
export { Identities as Identities, type Identity as Identity, type IdentitiesCursorIDPage as IdentitiesCursorIDPage, type IdentityCreateParams as IdentityCreateParams, type IdentityListParams as IdentityListParams, type IdentityVerifyParams as IdentityVerifyParams, };
|
|
165
214
|
}
|
|
166
215
|
//# sourceMappingURL=email.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"email.d.ts","sourceRoot":"","sources":["../../src/resources/email/email.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,aAAa;OAClB,EACL,UAAU,EACV,sBAAsB,EACtB,QAAQ,EACR,oBAAoB,EACpB,kBAAkB,
|
|
1
|
+
{"version":3,"file":"email.d.ts","sourceRoot":"","sources":["../../src/resources/email/email.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,aAAa;OAClB,EACL,UAAU,EACV,sBAAsB,EACtB,QAAQ,EACR,oBAAoB,EACpB,kBAAkB,EAClB,oBAAoB,EACrB;OACM,EAAE,UAAU,EAAE;OACd,EAAE,YAAY,EAAE,KAAK,kBAAkB,EAAE,WAAW,EAAE;OACtD,EAAE,cAAc,EAAE;AAGzB;;;GAGG;AACH,qBAAa,aAAc,SAAQ,WAAW;IAC5C,UAAU,EAAE,aAAa,CAAC,UAAU,CAA8C;IAElF;;;OAGG;IACH,IAAI,CACF,KAAK,GAAE,eAAe,GAAG,IAAI,GAAG,SAAc,EAC9C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,kBAAkB,EAAE,KAAK,CAAC;IAIzC;;OAEG;IACH,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,gBAAgB,CAAC;IAI5E;;;OAGG;IACH,IAAI,CAAC,IAAI,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,iBAAiB,CAAC;CAGrF;AAED,MAAM,MAAM,kBAAkB,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;AAErD;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;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EAAE,MAAM,CAAC;QAEb;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;KACf;CACF;AAID,MAAM,CAAC,OAAO,WAAW,aAAa,CAAC;IACrC,OAAO,EACL,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,KAAK,IAAI,KAAK,EACnB,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,eAAe,IAAI,eAAe,GACxC,CAAC;IAEF,OAAO,EACL,UAAU,IAAI,UAAU,EACxB,KAAK,QAAQ,IAAI,QAAQ,EACzB,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;CACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"email.js","sourceRoot":"","sources":["../../src/resources/email/email.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,uEAA8C;AAC9C,
|
|
1
|
+
{"version":3,"file":"email.js","sourceRoot":"","sources":["../../src/resources/email/email.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,uEAA8C;AAC9C,gDAOsB;AAEtB,yDAA2F;AAE3F,uDAAiD;AAEjD;;;GAGG;AACH,MAAa,aAAc,SAAQ,sBAAW;IAA9C;;QACE,eAAU,GAA6B,IAAI,aAAa,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IA2BpF,CAAC;IAzBC;;;OAGG;IACH,IAAI,CACF,QAA4C,EAAE,EAC9C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,WAAW,EAAE,CAAA,yBAAmB,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1F,CAAC;IAED;;OAEG;IACH,GAAG,CAAC,OAAe,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,aAAa,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;IAC/D,CAAC;IAED;;;OAGG;IACH,IAAI,CAAC,IAAqB,EAAE,OAAwB;QAClD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9D,CAAC;CACF;AA5BD,sCA4BC;AA6ND,aAAa,CAAC,UAAU,GAAG,uBAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"email.mjs","sourceRoot":"","sources":["../../src/resources/email/email.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,aAAa;OAClB,EACL,UAAU,
|
|
1
|
+
{"version":3,"file":"email.mjs","sourceRoot":"","sources":["../../src/resources/email/email.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,aAAa;OAClB,EACL,UAAU,GAMX;OAEM,EAAE,YAAY,EAAwC;OAEtD,EAAE,IAAI,EAAE;AAEf;;;GAGG;AACH,MAAM,OAAO,aAAc,SAAQ,WAAW;IAA9C;;QACE,eAAU,GAA6B,IAAI,aAAa,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IA2BpF,CAAC;IAzBC;;;OAGG;IACH,IAAI,CACF,QAA4C,EAAE,EAC9C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,WAAW,EAAE,CAAA,YAAmB,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1F,CAAC;IAED;;OAEG;IACH,GAAG,CAAC,OAAe,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,aAAa,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;IAC/D,CAAC;IAED;;;OAGG;IACH,IAAI,CAAC,IAAqB,EAAE,OAAwB;QAClD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9D,CAAC;CACF;AA6ND,aAAa,CAAC,UAAU,GAAG,UAAU,CAAC"}
|
|
@@ -28,7 +28,7 @@ export declare class Identities extends APIResource {
|
|
|
28
28
|
* Triggers a manual recheck of the identity's verification status against AWS SES.
|
|
29
29
|
* Returns the identity with its updated status.
|
|
30
30
|
*/
|
|
31
|
-
verify(identityID: string, options?: RequestOptions): APIPromise<Identity>;
|
|
31
|
+
verify(identityID: string, body: IdentityVerifyParams, options?: RequestOptions): APIPromise<Identity>;
|
|
32
32
|
}
|
|
33
33
|
export type IdentitiesCursorIDPage = CursorIDPage<Identity>;
|
|
34
34
|
/**
|
|
@@ -43,6 +43,10 @@ export interface Identity {
|
|
|
43
43
|
* Timestamp when the identity was created
|
|
44
44
|
*/
|
|
45
45
|
created_at: string;
|
|
46
|
+
/**
|
|
47
|
+
* Whether a custom MAIL FROM domain is enabled for SPF alignment
|
|
48
|
+
*/
|
|
49
|
+
mail_from_enabled: boolean;
|
|
46
50
|
/**
|
|
47
51
|
* The verification status of the identity
|
|
48
52
|
*/
|
|
@@ -56,6 +60,11 @@ export interface Identity {
|
|
|
56
60
|
* The email address or domain name
|
|
57
61
|
*/
|
|
58
62
|
value: string;
|
|
63
|
+
/**
|
|
64
|
+
* The subdomain prefix used for the custom MAIL FROM domain (e.g. 'mail' for
|
|
65
|
+
* mail.yourdomain.com)
|
|
66
|
+
*/
|
|
67
|
+
mail_from_subdomain?: string | null;
|
|
59
68
|
/**
|
|
60
69
|
* DNS records required for verification (only present for domain identities)
|
|
61
70
|
*/
|
|
@@ -88,20 +97,49 @@ export declare namespace Identity {
|
|
|
88
97
|
priority?: number;
|
|
89
98
|
}
|
|
90
99
|
}
|
|
91
|
-
export
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
100
|
+
export type IdentityCreateParams = IdentityCreateParams.Variant0 | IdentityCreateParams.Variant1;
|
|
101
|
+
export declare namespace IdentityCreateParams {
|
|
102
|
+
interface Variant0 {
|
|
103
|
+
/**
|
|
104
|
+
* Create an email address identity
|
|
105
|
+
*/
|
|
106
|
+
type: 'email';
|
|
107
|
+
/**
|
|
108
|
+
* The email address to verify
|
|
109
|
+
*/
|
|
110
|
+
value: string;
|
|
111
|
+
}
|
|
112
|
+
interface Variant1 {
|
|
113
|
+
/**
|
|
114
|
+
* Create a domain identity
|
|
115
|
+
*/
|
|
116
|
+
type: 'domain';
|
|
117
|
+
/**
|
|
118
|
+
* The domain name to verify
|
|
119
|
+
*/
|
|
120
|
+
value: string;
|
|
121
|
+
/**
|
|
122
|
+
* Enable a custom MAIL FROM domain for SPF alignment. When enabled, additional DNS
|
|
123
|
+
* records are required.
|
|
124
|
+
*/
|
|
125
|
+
mail_from_enabled?: boolean;
|
|
126
|
+
/**
|
|
127
|
+
* The subdomain prefix for the custom MAIL FROM domain (e.g. 'mail' for
|
|
128
|
+
* mail.yourdomain.com). Defaults to 'mail'.
|
|
129
|
+
*/
|
|
130
|
+
mail_from_subdomain?: string;
|
|
131
|
+
}
|
|
101
132
|
}
|
|
102
133
|
export interface IdentityListParams extends CursorIDPageParams {
|
|
103
134
|
}
|
|
135
|
+
export interface IdentityVerifyParams {
|
|
136
|
+
/**
|
|
137
|
+
* If true and the identity is an unverified email address, resend the verification
|
|
138
|
+
* email.
|
|
139
|
+
*/
|
|
140
|
+
resend?: boolean;
|
|
141
|
+
}
|
|
104
142
|
export declare namespace Identities {
|
|
105
|
-
export { type Identity as Identity, type IdentitiesCursorIDPage as IdentitiesCursorIDPage, type IdentityCreateParams as IdentityCreateParams, type IdentityListParams as IdentityListParams, };
|
|
143
|
+
export { type Identity as Identity, type IdentitiesCursorIDPage as IdentitiesCursorIDPage, type IdentityCreateParams as IdentityCreateParams, type IdentityListParams as IdentityListParams, type IdentityVerifyParams as IdentityVerifyParams, };
|
|
106
144
|
}
|
|
107
145
|
//# sourceMappingURL=identities.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identities.d.mts","sourceRoot":"","sources":["../../src/resources/email/identities.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,YAAY,EAAE,KAAK,kBAAkB,EAAE,WAAW,EAAE;OAEtD,EAAE,cAAc,EAAE;AAGzB,qBAAa,UAAW,SAAQ,WAAW;IACzC;;;;OAIG;IACH,MAAM,CAAC,IAAI,EAAE,oBAAoB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,QAAQ,CAAC;IAIlF;;;OAGG;IACH,IAAI,CACF,KAAK,GAAE,kBAAkB,GAAG,IAAI,GAAG,SAAc,EACjD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,sBAAsB,EAAE,QAAQ,CAAC;IAIhD;;;OAGG;IACH,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAOtE;;;OAGG;IACH,GAAG,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,QAAQ,CAAC;IAIvE;;;OAGG;IACH,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"identities.d.mts","sourceRoot":"","sources":["../../src/resources/email/identities.ts"],"names":[],"mappings":"OAEO,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B,IAAI,kBAAkB,EAC7C,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;CACH"}
|
|
@@ -28,7 +28,7 @@ export declare class Identities extends APIResource {
|
|
|
28
28
|
* Triggers a manual recheck of the identity's verification status against AWS SES.
|
|
29
29
|
* Returns the identity with its updated status.
|
|
30
30
|
*/
|
|
31
|
-
verify(identityID: string, options?: RequestOptions): APIPromise<Identity>;
|
|
31
|
+
verify(identityID: string, body: IdentityVerifyParams, options?: RequestOptions): APIPromise<Identity>;
|
|
32
32
|
}
|
|
33
33
|
export type IdentitiesCursorIDPage = CursorIDPage<Identity>;
|
|
34
34
|
/**
|
|
@@ -43,6 +43,10 @@ export interface Identity {
|
|
|
43
43
|
* Timestamp when the identity was created
|
|
44
44
|
*/
|
|
45
45
|
created_at: string;
|
|
46
|
+
/**
|
|
47
|
+
* Whether a custom MAIL FROM domain is enabled for SPF alignment
|
|
48
|
+
*/
|
|
49
|
+
mail_from_enabled: boolean;
|
|
46
50
|
/**
|
|
47
51
|
* The verification status of the identity
|
|
48
52
|
*/
|
|
@@ -56,6 +60,11 @@ export interface Identity {
|
|
|
56
60
|
* The email address or domain name
|
|
57
61
|
*/
|
|
58
62
|
value: string;
|
|
63
|
+
/**
|
|
64
|
+
* The subdomain prefix used for the custom MAIL FROM domain (e.g. 'mail' for
|
|
65
|
+
* mail.yourdomain.com)
|
|
66
|
+
*/
|
|
67
|
+
mail_from_subdomain?: string | null;
|
|
59
68
|
/**
|
|
60
69
|
* DNS records required for verification (only present for domain identities)
|
|
61
70
|
*/
|
|
@@ -88,20 +97,49 @@ export declare namespace Identity {
|
|
|
88
97
|
priority?: number;
|
|
89
98
|
}
|
|
90
99
|
}
|
|
91
|
-
export
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
100
|
+
export type IdentityCreateParams = IdentityCreateParams.Variant0 | IdentityCreateParams.Variant1;
|
|
101
|
+
export declare namespace IdentityCreateParams {
|
|
102
|
+
interface Variant0 {
|
|
103
|
+
/**
|
|
104
|
+
* Create an email address identity
|
|
105
|
+
*/
|
|
106
|
+
type: 'email';
|
|
107
|
+
/**
|
|
108
|
+
* The email address to verify
|
|
109
|
+
*/
|
|
110
|
+
value: string;
|
|
111
|
+
}
|
|
112
|
+
interface Variant1 {
|
|
113
|
+
/**
|
|
114
|
+
* Create a domain identity
|
|
115
|
+
*/
|
|
116
|
+
type: 'domain';
|
|
117
|
+
/**
|
|
118
|
+
* The domain name to verify
|
|
119
|
+
*/
|
|
120
|
+
value: string;
|
|
121
|
+
/**
|
|
122
|
+
* Enable a custom MAIL FROM domain for SPF alignment. When enabled, additional DNS
|
|
123
|
+
* records are required.
|
|
124
|
+
*/
|
|
125
|
+
mail_from_enabled?: boolean;
|
|
126
|
+
/**
|
|
127
|
+
* The subdomain prefix for the custom MAIL FROM domain (e.g. 'mail' for
|
|
128
|
+
* mail.yourdomain.com). Defaults to 'mail'.
|
|
129
|
+
*/
|
|
130
|
+
mail_from_subdomain?: string;
|
|
131
|
+
}
|
|
101
132
|
}
|
|
102
133
|
export interface IdentityListParams extends CursorIDPageParams {
|
|
103
134
|
}
|
|
135
|
+
export interface IdentityVerifyParams {
|
|
136
|
+
/**
|
|
137
|
+
* If true and the identity is an unverified email address, resend the verification
|
|
138
|
+
* email.
|
|
139
|
+
*/
|
|
140
|
+
resend?: boolean;
|
|
141
|
+
}
|
|
104
142
|
export declare namespace Identities {
|
|
105
|
-
export { type Identity as Identity, type IdentitiesCursorIDPage as IdentitiesCursorIDPage, type IdentityCreateParams as IdentityCreateParams, type IdentityListParams as IdentityListParams, };
|
|
143
|
+
export { type Identity as Identity, type IdentitiesCursorIDPage as IdentitiesCursorIDPage, type IdentityCreateParams as IdentityCreateParams, type IdentityListParams as IdentityListParams, type IdentityVerifyParams as IdentityVerifyParams, };
|
|
106
144
|
}
|
|
107
145
|
//# sourceMappingURL=identities.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identities.d.ts","sourceRoot":"","sources":["../../src/resources/email/identities.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,YAAY,EAAE,KAAK,kBAAkB,EAAE,WAAW,EAAE;OAEtD,EAAE,cAAc,EAAE;AAGzB,qBAAa,UAAW,SAAQ,WAAW;IACzC;;;;OAIG;IACH,MAAM,CAAC,IAAI,EAAE,oBAAoB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,QAAQ,CAAC;IAIlF;;;OAGG;IACH,IAAI,CACF,KAAK,GAAE,kBAAkB,GAAG,IAAI,GAAG,SAAc,EACjD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,sBAAsB,EAAE,QAAQ,CAAC;IAIhD;;;OAGG;IACH,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAOtE;;;OAGG;IACH,GAAG,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,QAAQ,CAAC;IAIvE;;;OAGG;IACH,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"identities.d.ts","sourceRoot":"","sources":["../../src/resources/email/identities.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,YAAY,EAAE,KAAK,kBAAkB,EAAE,WAAW,EAAE;OAEtD,EAAE,cAAc,EAAE;AAGzB,qBAAa,UAAW,SAAQ,WAAW;IACzC;;;;OAIG;IACH,MAAM,CAAC,IAAI,EAAE,oBAAoB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,QAAQ,CAAC;I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AAU,GAAG,QAAQ,CAAC;QAE1C;;WAEG;QACH,IAAI,EAAE,KAAK,GAAG,OAAO,GAAG,IAAI,CAAC;QAE7B;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;QAEd;;WAEG;QACH,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB;CACF;AAED,MAAM,MAAM,oBAAoB,GAAG,oBAAoB,CAAC,QAAQ,GAAG,oBAAoB,CAAC,QAAQ,CAAC;AAEjG,MAAM,CAAC,OAAO,WAAW,oBAAoB,CAAC;IAC5C,UAAiB,QAAQ;QACvB;;WAEG;QACH,IAAI,EAAE,OAAO,CAAC;QAEd;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;KACf;IAED,UAAiB,QAAQ;QACvB;;WAEG;QACH,IAAI,EAAE,QAAQ,CAAC;QAEf;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;QAEd;;;WAGG;QACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;QAE5B;;;WAGG;QACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;KAC9B;CACF;AAED,MAAM,WAAW,kBAAmB,SAAQ,kBAAkB;CAAG;AAEjE,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,WAAW,UAAU,CAAC;IAClC,OAAO,EACL,KAAK,QAAQ,IAAI,QAAQ,EACzB,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;CACH"}
|
|
@@ -43,8 +43,8 @@ class Identities extends resource_1.APIResource {
|
|
|
43
43
|
* Triggers a manual recheck of the identity's verification status against AWS SES.
|
|
44
44
|
* Returns the identity with its updated status.
|
|
45
45
|
*/
|
|
46
|
-
verify(identityID, options) {
|
|
47
|
-
return this._client.post((0, path_1.path) `/v1/email/identities/${identityID}/verify`, options);
|
|
46
|
+
verify(identityID, body, options) {
|
|
47
|
+
return this._client.post((0, path_1.path) `/v1/email/identities/${identityID}/verify`, { body, ...options });
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
exports.Identities = Identities;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identities.js","sourceRoot":"","sources":["../../src/resources/email/identities.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAElD,yDAA2F;AAC3F,uDAAsD;AAEtD,uDAAiD;AAEjD,MAAa,UAAW,SAAQ,sBAAW;IACzC;;;;OAIG;IACH,MAAM,CAAC,IAA0B,EAAE,OAAwB;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzE,CAAC;IAED;;;OAGG;IACH,IAAI,CACF,QAA+C,EAAE,EACjD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,sBAAsB,EAAE,CAAA,yBAAsB,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxG,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,UAAkB,EAAE,OAAwB;QACjD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,wBAAwB,UAAU,EAAE,EAAE;YACnE,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACH,GAAG,CAAC,UAAkB,EAAE,OAAwB;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,wBAAwB,UAAU,EAAE,EAAE,OAAO,CAAC,CAAC;IAC7E,CAA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BAAwB,UAAU,SAAS,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClG,CAAC;CACF;AA/CD,gCA+CC"}
|
|
@@ -40,8 +40,8 @@ export class Identities extends APIResource {
|
|
|
40
40
|
* Triggers a manual recheck of the identity's verification status against AWS SES.
|
|
41
41
|
* Returns the identity with its updated status.
|
|
42
42
|
*/
|
|
43
|
-
verify(identityID, options) {
|
|
44
|
-
return this._client.post(path `/v1/email/identities/${identityID}/verify`, options);
|
|
43
|
+
verify(identityID, body, options) {
|
|
44
|
+
return this._client.post(path `/v1/email/identities/${identityID}/verify`, { body, ...options });
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
//# sourceMappingURL=identities.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identities.mjs","sourceRoot":"","sources":["../../src/resources/email/identities.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,YAAY,EAAwC;OACtD,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,UAAW,SAAQ,WAAW;IACzC;;;;OAIG;IACH,MAAM,CAAC,IAA0B,EAAE,OAAwB;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzE,CAAC;IAED;;;OAGG;IACH,IAAI,CACF,QAA+C,EAAE,EACjD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,sBAAsB,EAAE,CAAA,YAAsB,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxG,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,UAAkB,EAAE,OAAwB;QACjD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,wBAAwB,UAAU,EAAE,EAAE;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CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACH,GAAG,CAAC,UAAkB,EAAE,OAAwB;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,wBAAwB,UAAU,EAAE,EAAE,OAAO,CAAC,CAAC;IAC7E,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,UAAkB,EAAE,IAA0B,EAAE,OAAwB;QAC7E,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,wBAAwB,UAAU,SAAS,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClG,CAAC;CACF"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { EmailResource, type Attachment, type Email, type EmailSendResponse, type EmailListParams, type EmailSendParams, type EmailsCursorIDPage, } from "./email.mjs";
|
|
2
|
-
export { Identities, type Identity, type IdentityCreateParams, type IdentityListParams, type IdentitiesCursorIDPage, } from "./identities.mjs";
|
|
1
|
+
export { EmailResource, type Attachment, type Email, type EmailGetResponse, type EmailSendResponse, type EmailListParams, type EmailSendParams, type EmailsCursorIDPage, } from "./email.mjs";
|
|
2
|
+
export { Identities, type Identity, type IdentityCreateParams, type IdentityListParams, type IdentityVerifyParams, type IdentitiesCursorIDPage, } from "./identities.mjs";
|
|
3
3
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/email/index.ts"],"names":[],"mappings":"OAEO,EACL,aAAa,EACb,KAAK,UAAU,EACf,KAAK,KAAK,EACV,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,kBAAkB,GACxB;OACM,EACL,UAAU,EACV,KAAK,QAAQ,EACb,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,GAC5B"}
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/email/index.ts"],"names":[],"mappings":"OAEO,EACL,aAAa,EACb,KAAK,UAAU,EACf,KAAK,KAAK,EACV,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,kBAAkB,GACxB;OACM,EACL,UAAU,EACV,KAAK,QAAQ,EACb,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,GAC5B"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { EmailResource, type Attachment, type Email, type EmailSendResponse, type EmailListParams, type EmailSendParams, type EmailsCursorIDPage, } from "./email.js";
|
|
2
|
-
export { Identities, type Identity, type IdentityCreateParams, type IdentityListParams, type IdentitiesCursorIDPage, } from "./identities.js";
|
|
1
|
+
export { EmailResource, type Attachment, type Email, type EmailGetResponse, type EmailSendResponse, type EmailListParams, type EmailSendParams, type EmailsCursorIDPage, } from "./email.js";
|
|
2
|
+
export { Identities, type Identity, type IdentityCreateParams, type IdentityListParams, type IdentityVerifyParams, type IdentitiesCursorIDPage, } from "./identities.js";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/email/index.ts"],"names":[],"mappings":"OAEO,EACL,aAAa,EACb,KAAK,UAAU,EACf,KAAK,KAAK,EACV,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,kBAAkB,GACxB;OACM,EACL,UAAU,EACV,KAAK,QAAQ,EACb,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,GAC5B"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/email/index.ts"],"names":[],"mappings":"OAEO,EACL,aAAa,EACb,KAAK,UAAU,EACf,KAAK,KAAK,EACV,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,kBAAkB,GACxB;OACM,EACL,UAAU,EACV,KAAK,QAAQ,EACb,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,GAC5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/email/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/email/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,oCASiB;AARf,sGAAA,aAAa,OAAA;AASf,8CAOsB;AANpB,wGAAA,UAAU,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/email/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,aAAa,
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/email/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,aAAa,GAQd;OACM,EACL,UAAU,GAMX"}
|
package/resources/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { Commerce, type Currency, type CommerceCancelResponse, type CommerceCheckResponse, type CommerceCheckoutResponse, type CommerceCancelParams, type CommerceCheckParams, type CommerceCheckoutParams, } from "./commerce/commerce.mjs";
|
|
2
2
|
export { Content } from "./content/content.mjs";
|
|
3
3
|
export { Domains, type Domain, type DomainListParams, type DomainsCursorIDPage } from "./domains.mjs";
|
|
4
|
-
export { EmailResource, type Attachment, type Email, type EmailSendResponse, type EmailListParams, type EmailSendParams, type EmailsCursorIDPage, } from "./email/email.mjs";
|
|
4
|
+
export { EmailResource, type Attachment, type Email, type EmailGetResponse, type EmailSendResponse, type EmailListParams, type EmailSendParams, type EmailsCursorIDPage, } from "./email/email.mjs";
|
|
5
5
|
export { Files, type File, type Upload, type FileListParams, type FilesCursorIDPage } from "./files.mjs";
|
|
6
6
|
export { PushNotifications, type PushNotificationEnableResponse, type PushNotificationIdentifyResponse, type PushNotificationSendResponse, type PushNotificationSubscribeResponse, type PushNotificationUnsubscribeResponse, type PushNotificationIdentifyParams, type PushNotificationSendParams, type PushNotificationSubscribeParams, type PushNotificationUnsubscribeParams, } from "./push-notifications/push-notifications.mjs";
|
|
7
7
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"OAEO,EACL,QAAQ,EACR,KAAK,QAAQ,EACb,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,GAC5B;OACM,EAAE,OAAO,EAAE;OACX,EAAE,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,gBAAgB,EAAE,KAAK,mBAAmB,EAAE;OACzE,EACL,aAAa,EACb,KAAK,UAAU,EACf,KAAK,KAAK,EACV,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,kBAAkB,GACxB;OACM,EAAE,KAAK,EAAE,KAAK,IAAI,EAAE,KAAK,MAAM,EAAE,KAAK,cAAc,EAAE,KAAK,iBAAiB,EAAE;OAC9E,EACL,iBAAiB,EACjB,KAAK,8BAA8B,EACnC,KAAK,gCAAgC,EACrC,KAAK,4BAA4B,EACjC,KAAK,iCAAiC,EACtC,KAAK,mCAAmC,EACxC,KAAK,8BAA8B,EACnC,KAAK,0BAA0B,EAC/B,KAAK,+BAA+B,EACpC,KAAK,iCAAiC,GACvC"}
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"OAEO,EACL,QAAQ,EACR,KAAK,QAAQ,EACb,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,GAC5B;OACM,EAAE,OAAO,EAAE;OACX,EAAE,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,gBAAgB,EAAE,KAAK,mBAAmB,EAAE;OACzE,EACL,aAAa,EACb,KAAK,UAAU,EACf,KAAK,KAAK,EACV,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,kBAAkB,GACxB;OACM,EAAE,KAAK,EAAE,KAAK,IAAI,EAAE,KAAK,MAAM,EAAE,KAAK,cAAc,EAAE,KAAK,iBAAiB,EAAE;OAC9E,EACL,iBAAiB,EACjB,KAAK,8BAA8B,EACnC,KAAK,gCAAgC,EACrC,KAAK,4BAA4B,EACjC,KAAK,iCAAiC,EACtC,KAAK,mCAAmC,EACxC,KAAK,8BAA8B,EACnC,KAAK,0BAA0B,EAC/B,KAAK,+BAA+B,EACpC,KAAK,iCAAiC,GACvC"}
|
package/resources/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { Commerce, type Currency, type CommerceCancelResponse, type CommerceCheckResponse, type CommerceCheckoutResponse, type CommerceCancelParams, type CommerceCheckParams, type CommerceCheckoutParams, } from "./commerce/commerce.js";
|
|
2
2
|
export { Content } from "./content/content.js";
|
|
3
3
|
export { Domains, type Domain, type DomainListParams, type DomainsCursorIDPage } from "./domains.js";
|
|
4
|
-
export { EmailResource, type Attachment, type Email, type EmailSendResponse, type EmailListParams, type EmailSendParams, type EmailsCursorIDPage, } from "./email/email.js";
|
|
4
|
+
export { EmailResource, type Attachment, type Email, type EmailGetResponse, type EmailSendResponse, type EmailListParams, type EmailSendParams, type EmailsCursorIDPage, } from "./email/email.js";
|
|
5
5
|
export { Files, type File, type Upload, type FileListParams, type FilesCursorIDPage } from "./files.js";
|
|
6
6
|
export { PushNotifications, type PushNotificationEnableResponse, type PushNotificationIdentifyResponse, type PushNotificationSendResponse, type PushNotificationSubscribeResponse, type PushNotificationUnsubscribeResponse, type PushNotificationIdentifyParams, type PushNotificationSendParams, type PushNotificationSubscribeParams, type PushNotificationUnsubscribeParams, } from "./push-notifications/push-notifications.js";
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
package/resources/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"OAEO,EACL,QAAQ,EACR,KAAK,QAAQ,EACb,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,GAC5B;OACM,EAAE,OAAO,EAAE;OACX,EAAE,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,gBAAgB,EAAE,KAAK,mBAAmB,EAAE;OACzE,EACL,aAAa,EACb,KAAK,UAAU,EACf,KAAK,KAAK,EACV,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,kBAAkB,GACxB;OACM,EAAE,KAAK,EAAE,KAAK,IAAI,EAAE,KAAK,MAAM,EAAE,KAAK,cAAc,EAAE,KAAK,iBAAiB,EAAE;OAC9E,EACL,iBAAiB,EACjB,KAAK,8BAA8B,EACnC,KAAK,gCAAgC,EACrC,KAAK,4BAA4B,EACjC,KAAK,iCAAiC,EACtC,KAAK,mCAAmC,EACxC,KAAK,8BAA8B,EACnC,KAAK,0BAA0B,EAC/B,KAAK,+BAA+B,EACpC,KAAK,iCAAiC,GACvC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"OAEO,EACL,QAAQ,EACR,KAAK,QAAQ,EACb,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,GAC5B;OACM,EAAE,OAAO,EAAE;OACX,EAAE,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,gBAAgB,EAAE,KAAK,mBAAmB,EAAE;OACzE,EACL,aAAa,EACb,KAAK,UAAU,EACf,KAAK,KAAK,EACV,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,kBAAkB,GACxB;OACM,EAAE,KAAK,EAAE,KAAK,IAAI,EAAE,KAAK,MAAM,EAAE,KAAK,cAAc,EAAE,KAAK,iBAAiB,EAAE;OAC9E,EACL,iBAAiB,EACjB,KAAK,8BAA8B,EACnC,KAAK,gCAAgC,EACrC,KAAK,4BAA4B,EACjC,KAAK,iCAAiC,EACtC,KAAK,mCAAmC,EACxC,KAAK,8BAA8B,EACnC,KAAK,0BAA0B,EAC/B,KAAK,+BAA+B,EACpC,KAAK,iCAAiC,GACvC"}
|
package/resources/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,mDAS6B;AAR3B,oGAAA,QAAQ,OAAA;AASV,gDAA4C;AAAnC,kGAAA,OAAO,OAAA;AAChB,wCAAkG;AAAzF,kGAAA,OAAO,OAAA;AAChB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,mDAS6B;AAR3B,oGAAA,QAAQ,OAAA;AASV,gDAA4C;AAAnC,kGAAA,OAAO,OAAA;AAChB,wCAAkG;AAAzF,kGAAA,OAAO,OAAA;AAChB,0CASuB;AARrB,sGAAA,aAAa,OAAA;AASf,oCAAqG;AAA5F,8FAAA,KAAK,OAAA;AACd,iFAWiD;AAV/C,uHAAA,iBAAiB,OAAA"}
|
package/resources/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,QAAQ,GAQT;OACM,EAAE,OAAO,EAAE;OACX,EAAE,OAAO,EAAgE;OACzE,EACL,aAAa,
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,QAAQ,GAQT;OACM,EAAE,OAAO,EAAE;OACX,EAAE,OAAO,EAAgE;OACzE,EACL,aAAa,GAQd;OACM,EAAE,KAAK,EAAuE;OAC9E,EACL,iBAAiB,GAUlB"}
|
package/src/client.ts
CHANGED
|
@@ -11,7 +11,7 @@ import type { APIResponseProps } from './internal/parse';
|
|
|
11
11
|
import { getPlatformHeaders } from './internal/detect-platform';
|
|
12
12
|
import * as Shims from './internal/shims';
|
|
13
13
|
import * as Opts from './internal/request-options';
|
|
14
|
-
import
|
|
14
|
+
import { stringifyQuery } from './internal/utils/query';
|
|
15
15
|
import { VERSION } from './version';
|
|
16
16
|
import * as Errors from './core/error';
|
|
17
17
|
import * as Pagination from './core/pagination';
|
|
@@ -35,6 +35,7 @@ import { Content } from './resources/content/content';
|
|
|
35
35
|
import {
|
|
36
36
|
Attachment,
|
|
37
37
|
Email,
|
|
38
|
+
EmailGetResponse,
|
|
38
39
|
EmailListParams,
|
|
39
40
|
EmailResource,
|
|
40
41
|
EmailSendParams,
|
|
@@ -263,8 +264,8 @@ export class Hercules {
|
|
|
263
264
|
return buildHeaders([{ Authorization: `Bearer ${this.apiKey}` }]);
|
|
264
265
|
}
|
|
265
266
|
|
|
266
|
-
protected stringifyQuery(query: Record<string, unknown>): string {
|
|
267
|
-
return
|
|
267
|
+
protected stringifyQuery(query: object | Record<string, unknown>): string {
|
|
268
|
+
return stringifyQuery(query);
|
|
268
269
|
}
|
|
269
270
|
|
|
270
271
|
private getUserAgent(): string {
|
|
@@ -296,12 +297,13 @@ export class Hercules {
|
|
|
296
297
|
: new URL(baseURL + (baseURL.endsWith('/') && path.startsWith('/') ? path.slice(1) : path));
|
|
297
298
|
|
|
298
299
|
const defaultQuery = this.defaultQuery();
|
|
299
|
-
|
|
300
|
-
|
|
300
|
+
const pathQuery = Object.fromEntries(url.searchParams);
|
|
301
|
+
if (!isEmptyObj(defaultQuery) || !isEmptyObj(pathQuery)) {
|
|
302
|
+
query = { ...pathQuery, ...defaultQuery, ...query };
|
|
301
303
|
}
|
|
302
304
|
|
|
303
305
|
if (typeof query === 'object' && query && !Array.isArray(query)) {
|
|
304
|
-
url.search = this.stringifyQuery(query
|
|
306
|
+
url.search = this.stringifyQuery(query);
|
|
305
307
|
}
|
|
306
308
|
|
|
307
309
|
return url.toString();
|
|
@@ -630,9 +632,9 @@ export class Hercules {
|
|
|
630
632
|
}
|
|
631
633
|
}
|
|
632
634
|
|
|
633
|
-
// If the API asks us to wait a certain amount of time
|
|
634
|
-
//
|
|
635
|
-
if (
|
|
635
|
+
// If the API asks us to wait a certain amount of time, just do what it
|
|
636
|
+
// says, but otherwise calculate a default
|
|
637
|
+
if (timeoutMillis === undefined) {
|
|
636
638
|
const maxRetries = options.maxRetries ?? this.maxRetries;
|
|
637
639
|
timeoutMillis = this.calculateDefaultRetryTimeoutMillis(retriesRemaining, maxRetries);
|
|
638
640
|
}
|
|
@@ -759,6 +761,14 @@ export class Hercules {
|
|
|
759
761
|
(Symbol.iterator in body && 'next' in body && typeof body.next === 'function'))
|
|
760
762
|
) {
|
|
761
763
|
return { bodyHeaders: undefined, body: Shims.ReadableStreamFrom(body as AsyncIterable<Uint8Array>) };
|
|
764
|
+
} else if (
|
|
765
|
+
typeof body === 'object' &&
|
|
766
|
+
headers.values.get('content-type') === 'application/x-www-form-urlencoded'
|
|
767
|
+
) {
|
|
768
|
+
return {
|
|
769
|
+
bodyHeaders: { 'content-type': 'application/x-www-form-urlencoded' },
|
|
770
|
+
body: this.stringifyQuery(body),
|
|
771
|
+
};
|
|
762
772
|
} else {
|
|
763
773
|
return this.#encoder({ body, headers });
|
|
764
774
|
}
|
|
@@ -848,6 +858,7 @@ export declare namespace Hercules {
|
|
|
848
858
|
EmailResource as EmailResource,
|
|
849
859
|
type Attachment as Attachment,
|
|
850
860
|
type Email as Email,
|
|
861
|
+
type EmailGetResponse as EmailGetResponse,
|
|
851
862
|
type EmailSendResponse as EmailSendResponse,
|
|
852
863
|
type EmailsCursorIDPage as EmailsCursorIDPage,
|
|
853
864
|
type EmailListParams as EmailListParams,
|
package/src/internal/utils.ts
CHANGED
|
@@ -35,11 +35,7 @@ export class Coupons extends APIResource {
|
|
|
35
35
|
* );
|
|
36
36
|
* ```
|
|
37
37
|
*/
|
|
38
|
-
update(
|
|
39
|
-
couponID: string,
|
|
40
|
-
body: CouponUpdateParams | null | undefined = {},
|
|
41
|
-
options?: RequestOptions,
|
|
42
|
-
): APIPromise<Coupon> {
|
|
38
|
+
update(couponID: string, body: CouponUpdateParams, options?: RequestOptions): APIPromise<Coupon> {
|
|
43
39
|
return this._client.patch(path`/v1/commerce/coupons/${couponID}`, { body, ...options });
|
|
44
40
|
}
|
|
45
41
|
|
|
@@ -18,7 +18,7 @@ export class Customers extends APIResource {
|
|
|
18
18
|
* const customer = await client.commerce.customers.create();
|
|
19
19
|
* ```
|
|
20
20
|
*/
|
|
21
|
-
create(body: CustomerCreateParams
|
|
21
|
+
create(body: CustomerCreateParams, options?: RequestOptions): APIPromise<Customer> {
|
|
22
22
|
return this._client.post('/v1/commerce/customers', { body, ...options });
|
|
23
23
|
}
|
|
24
24
|
|
|
@@ -33,11 +33,7 @@ export class Customers extends APIResource {
|
|
|
33
33
|
* );
|
|
34
34
|
* ```
|
|
35
35
|
*/
|
|
36
|
-
update(
|
|
37
|
-
customerID: string,
|
|
38
|
-
body: CustomerUpdateParams | null | undefined = {},
|
|
39
|
-
options?: RequestOptions,
|
|
40
|
-
): APIPromise<Customer> {
|
|
36
|
+
update(customerID: string, body: CustomerUpdateParams, options?: RequestOptions): APIPromise<Customer> {
|
|
41
37
|
return this._client.patch(path`/v1/commerce/customers/${customerID}`, { body, ...options });
|
|
42
38
|
}
|
|
43
39
|
|
|
@@ -75,7 +71,7 @@ export class Customers extends APIResource {
|
|
|
75
71
|
*/
|
|
76
72
|
billingPortal(
|
|
77
73
|
customerID: string,
|
|
78
|
-
body: CustomerBillingPortalParams
|
|
74
|
+
body: CustomerBillingPortalParams,
|
|
79
75
|
options?: RequestOptions,
|
|
80
76
|
): APIPromise<CustomerBillingPortalResponse> {
|
|
81
77
|
return this._client.post(path`/v1/commerce/customers/${customerID}/billing_portal`, { body, ...options });
|
|
@@ -33,11 +33,7 @@ export class Features extends APIResource {
|
|
|
33
33
|
* );
|
|
34
34
|
* ```
|
|
35
35
|
*/
|
|
36
|
-
update(
|
|
37
|
-
featureID: string,
|
|
38
|
-
body: FeatureUpdateParams | null | undefined = {},
|
|
39
|
-
options?: RequestOptions,
|
|
40
|
-
): APIPromise<Feature> {
|
|
36
|
+
update(featureID: string, body: FeatureUpdateParams, options?: RequestOptions): APIPromise<Feature> {
|
|
41
37
|
return this._client.patch(path`/v1/commerce/features/${featureID}`, { body, ...options });
|
|
42
38
|
}
|
|
43
39
|
|
|
@@ -61,11 +61,7 @@ export class Products extends APIResource {
|
|
|
61
61
|
* );
|
|
62
62
|
* ```
|
|
63
63
|
*/
|
|
64
|
-
update(
|
|
65
|
-
productID: string,
|
|
66
|
-
body: ProductUpdateParams | null | undefined = {},
|
|
67
|
-
options?: RequestOptions,
|
|
68
|
-
): APIPromise<Product> {
|
|
64
|
+
update(productID: string, body: ProductUpdateParams, options?: RequestOptions): APIPromise<Product> {
|
|
69
65
|
return this._client.patch(path`/v1/commerce/products/${productID}`, { body, ...options });
|
|
70
66
|
}
|
|
71
67
|
|