@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
|
@@ -21,11 +21,7 @@ export class Assets extends APIResource {
|
|
|
21
21
|
* Updates asset metadata including URL, folder, title, description, and custom
|
|
22
22
|
* metadata.
|
|
23
23
|
*/
|
|
24
|
-
update(
|
|
25
|
-
assetID: string,
|
|
26
|
-
body: AssetUpdateParams | null | undefined = {},
|
|
27
|
-
options?: RequestOptions,
|
|
28
|
-
): APIPromise<Asset> {
|
|
24
|
+
update(assetID: string, body: AssetUpdateParams, options?: RequestOptions): APIPromise<Asset> {
|
|
29
25
|
return this._client.patch(path`/v1/content/assets/${assetID}`, { body, ...options });
|
|
30
26
|
}
|
|
31
27
|
|
|
@@ -26,7 +26,7 @@ export class Collections extends APIResource {
|
|
|
26
26
|
*/
|
|
27
27
|
update(
|
|
28
28
|
collectionID: string,
|
|
29
|
-
body: CollectionUpdateParams
|
|
29
|
+
body: CollectionUpdateParams,
|
|
30
30
|
options?: RequestOptions,
|
|
31
31
|
): APIPromise<Collection> {
|
|
32
32
|
return this._client.patch(path`/v1/content/collections/${collectionID}`, { body, ...options });
|
|
@@ -20,11 +20,7 @@ export class Entries extends APIResource {
|
|
|
20
20
|
* fields are modified. Use the version parameter for optimistic locking to prevent
|
|
21
21
|
* concurrent update conflicts.
|
|
22
22
|
*/
|
|
23
|
-
update(
|
|
24
|
-
entryID: string,
|
|
25
|
-
body: EntryUpdateParams | null | undefined = {},
|
|
26
|
-
options?: RequestOptions,
|
|
27
|
-
): APIPromise<Entry> {
|
|
23
|
+
update(entryID: string, body: EntryUpdateParams, options?: RequestOptions): APIPromise<Entry> {
|
|
28
24
|
return this._client.patch(path`/v1/content/entries/${entryID}`, { body, ...options });
|
|
29
25
|
}
|
|
30
26
|
|
|
@@ -61,11 +57,7 @@ export class Entries extends APIResource {
|
|
|
61
57
|
* publishing for a future time. Publishing validates that all required fields have
|
|
62
58
|
* values.
|
|
63
59
|
*/
|
|
64
|
-
publish(
|
|
65
|
-
entryID: string,
|
|
66
|
-
body: EntryPublishParams | null | undefined = {},
|
|
67
|
-
options?: RequestOptions,
|
|
68
|
-
): APIPromise<Entry> {
|
|
60
|
+
publish(entryID: string, body: EntryPublishParams, options?: RequestOptions): APIPromise<Entry> {
|
|
69
61
|
return this._client.post(path`/v1/content/entries/${entryID}/publish`, { body, ...options });
|
|
70
62
|
}
|
|
71
63
|
|
|
@@ -20,11 +20,7 @@ export class Locales extends APIResource {
|
|
|
20
20
|
* Updates a locale's configuration including name, fallback, default status, and
|
|
21
21
|
* active status.
|
|
22
22
|
*/
|
|
23
|
-
update(
|
|
24
|
-
localeCode: string,
|
|
25
|
-
body: LocaleUpdateParams | null | undefined = {},
|
|
26
|
-
options?: RequestOptions,
|
|
27
|
-
): APIPromise<Locale> {
|
|
23
|
+
update(localeCode: string, body: LocaleUpdateParams, options?: RequestOptions): APIPromise<Locale> {
|
|
28
24
|
return this._client.patch(path`/v1/content/locales/${localeCode}`, { body, ...options });
|
|
29
25
|
}
|
|
30
26
|
|
|
@@ -23,11 +23,7 @@ export class Releases extends APIResource {
|
|
|
23
23
|
/**
|
|
24
24
|
* Updates a release name and description. Only draft releases can be updated.
|
|
25
25
|
*/
|
|
26
|
-
update(
|
|
27
|
-
releaseID: string,
|
|
28
|
-
body: ReleaseUpdateParams | null | undefined = {},
|
|
29
|
-
options?: RequestOptions,
|
|
30
|
-
): APIPromise<Release> {
|
|
26
|
+
update(releaseID: string, body: ReleaseUpdateParams, options?: RequestOptions): APIPromise<Release> {
|
|
31
27
|
return this._client.patch(path`/v1/content/releases/${releaseID}`, { body, ...options });
|
|
32
28
|
}
|
|
33
29
|
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
Identity,
|
|
9
9
|
IdentityCreateParams,
|
|
10
10
|
IdentityListParams,
|
|
11
|
+
IdentityVerifyParams,
|
|
11
12
|
} from './identities';
|
|
12
13
|
import { APIPromise } from '../../core/api-promise';
|
|
13
14
|
import { CursorIDPage, type CursorIDPageParams, PagePromise } from '../../core/pagination';
|
|
@@ -35,7 +36,7 @@ export class EmailResource extends APIResource {
|
|
|
35
36
|
/**
|
|
36
37
|
* Retrieves a single email by its unique identifier.
|
|
37
38
|
*/
|
|
38
|
-
get(emailID: string, options?: RequestOptions): APIPromise<
|
|
39
|
+
get(emailID: string, options?: RequestOptions): APIPromise<EmailGetResponse> {
|
|
39
40
|
return this._client.get(path`/v1/email/${emailID}`, options);
|
|
40
41
|
}
|
|
41
42
|
|
|
@@ -120,6 +121,66 @@ export interface Email {
|
|
|
120
121
|
reply_to?: Array<string> | null;
|
|
121
122
|
}
|
|
122
123
|
|
|
124
|
+
/**
|
|
125
|
+
* A sent email object with full body content
|
|
126
|
+
*/
|
|
127
|
+
export interface EmailGetResponse {
|
|
128
|
+
/**
|
|
129
|
+
* Unique identifier for the email
|
|
130
|
+
*/
|
|
131
|
+
id: string;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Timestamp when the email was sent
|
|
135
|
+
*/
|
|
136
|
+
created_at: string;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Sender email address
|
|
140
|
+
*/
|
|
141
|
+
from: string;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Email subject line
|
|
145
|
+
*/
|
|
146
|
+
subject: string;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Recipient email addresses
|
|
150
|
+
*/
|
|
151
|
+
to: Array<string>;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Blind carbon copy recipients
|
|
155
|
+
*/
|
|
156
|
+
bcc?: Array<string> | null;
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Carbon copy recipients
|
|
160
|
+
*/
|
|
161
|
+
cc?: Array<string> | null;
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* The HTML version of the message body
|
|
165
|
+
*/
|
|
166
|
+
html?: string | null;
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* The most recent event for this email
|
|
170
|
+
*/
|
|
171
|
+
last_event?: 'sent' | 'delivered' | 'opened' | 'clicked' | 'bounced' | 'complained' | null;
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Reply-to addresses
|
|
175
|
+
*/
|
|
176
|
+
reply_to?: Array<string> | null;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* The plain text version of the message body
|
|
180
|
+
*/
|
|
181
|
+
text?: string | null;
|
|
182
|
+
}
|
|
183
|
+
|
|
123
184
|
/**
|
|
124
185
|
* Response after sending an email
|
|
125
186
|
*/
|
|
@@ -213,6 +274,7 @@ export declare namespace EmailResource {
|
|
|
213
274
|
export {
|
|
214
275
|
type Attachment as Attachment,
|
|
215
276
|
type Email as Email,
|
|
277
|
+
type EmailGetResponse as EmailGetResponse,
|
|
216
278
|
type EmailSendResponse as EmailSendResponse,
|
|
217
279
|
type EmailsCursorIDPage as EmailsCursorIDPage,
|
|
218
280
|
type EmailListParams as EmailListParams,
|
|
@@ -225,5 +287,6 @@ export declare namespace EmailResource {
|
|
|
225
287
|
type IdentitiesCursorIDPage as IdentitiesCursorIDPage,
|
|
226
288
|
type IdentityCreateParams as IdentityCreateParams,
|
|
227
289
|
type IdentityListParams as IdentityListParams,
|
|
290
|
+
type IdentityVerifyParams as IdentityVerifyParams,
|
|
228
291
|
};
|
|
229
292
|
}
|
|
@@ -51,8 +51,8 @@ export class Identities extends APIResource {
|
|
|
51
51
|
* Triggers a manual recheck of the identity's verification status against AWS SES.
|
|
52
52
|
* Returns the identity with its updated status.
|
|
53
53
|
*/
|
|
54
|
-
verify(identityID: string, options?: RequestOptions): APIPromise<Identity> {
|
|
55
|
-
return this._client.post(path`/v1/email/identities/${identityID}/verify`, options);
|
|
54
|
+
verify(identityID: string, body: IdentityVerifyParams, options?: RequestOptions): APIPromise<Identity> {
|
|
55
|
+
return this._client.post(path`/v1/email/identities/${identityID}/verify`, { body, ...options });
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
|
|
@@ -72,6 +72,11 @@ export interface Identity {
|
|
|
72
72
|
*/
|
|
73
73
|
created_at: string;
|
|
74
74
|
|
|
75
|
+
/**
|
|
76
|
+
* Whether a custom MAIL FROM domain is enabled for SPF alignment
|
|
77
|
+
*/
|
|
78
|
+
mail_from_enabled: boolean;
|
|
79
|
+
|
|
75
80
|
/**
|
|
76
81
|
* The verification status of the identity
|
|
77
82
|
*/
|
|
@@ -88,6 +93,12 @@ export interface Identity {
|
|
|
88
93
|
*/
|
|
89
94
|
value: string;
|
|
90
95
|
|
|
96
|
+
/**
|
|
97
|
+
* The subdomain prefix used for the custom MAIL FROM domain (e.g. 'mail' for
|
|
98
|
+
* mail.yourdomain.com)
|
|
99
|
+
*/
|
|
100
|
+
mail_from_subdomain?: string | null;
|
|
101
|
+
|
|
91
102
|
/**
|
|
92
103
|
* DNS records required for verification (only present for domain identities)
|
|
93
104
|
*/
|
|
@@ -126,26 +137,62 @@ export namespace Identity {
|
|
|
126
137
|
}
|
|
127
138
|
}
|
|
128
139
|
|
|
129
|
-
export
|
|
130
|
-
/**
|
|
131
|
-
* The type of identity to create. Use 'email' for a single address or 'domain' for
|
|
132
|
-
* an entire domain.
|
|
133
|
-
*/
|
|
134
|
-
type: 'email' | 'domain';
|
|
140
|
+
export type IdentityCreateParams = IdentityCreateParams.Variant0 | IdentityCreateParams.Variant1;
|
|
135
141
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
142
|
+
export declare namespace IdentityCreateParams {
|
|
143
|
+
export interface Variant0 {
|
|
144
|
+
/**
|
|
145
|
+
* Create an email address identity
|
|
146
|
+
*/
|
|
147
|
+
type: 'email';
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* The email address to verify
|
|
151
|
+
*/
|
|
152
|
+
value: string;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export interface Variant1 {
|
|
156
|
+
/**
|
|
157
|
+
* Create a domain identity
|
|
158
|
+
*/
|
|
159
|
+
type: 'domain';
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* The domain name to verify
|
|
163
|
+
*/
|
|
164
|
+
value: string;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Enable a custom MAIL FROM domain for SPF alignment. When enabled, additional DNS
|
|
168
|
+
* records are required.
|
|
169
|
+
*/
|
|
170
|
+
mail_from_enabled?: boolean;
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* The subdomain prefix for the custom MAIL FROM domain (e.g. 'mail' for
|
|
174
|
+
* mail.yourdomain.com). Defaults to 'mail'.
|
|
175
|
+
*/
|
|
176
|
+
mail_from_subdomain?: string;
|
|
177
|
+
}
|
|
140
178
|
}
|
|
141
179
|
|
|
142
180
|
export interface IdentityListParams extends CursorIDPageParams {}
|
|
143
181
|
|
|
182
|
+
export interface IdentityVerifyParams {
|
|
183
|
+
/**
|
|
184
|
+
* If true and the identity is an unverified email address, resend the verification
|
|
185
|
+
* email.
|
|
186
|
+
*/
|
|
187
|
+
resend?: boolean;
|
|
188
|
+
}
|
|
189
|
+
|
|
144
190
|
export declare namespace Identities {
|
|
145
191
|
export {
|
|
146
192
|
type Identity as Identity,
|
|
147
193
|
type IdentitiesCursorIDPage as IdentitiesCursorIDPage,
|
|
148
194
|
type IdentityCreateParams as IdentityCreateParams,
|
|
149
195
|
type IdentityListParams as IdentityListParams,
|
|
196
|
+
type IdentityVerifyParams as IdentityVerifyParams,
|
|
150
197
|
};
|
|
151
198
|
}
|
|
@@ -4,6 +4,7 @@ export {
|
|
|
4
4
|
EmailResource,
|
|
5
5
|
type Attachment,
|
|
6
6
|
type Email,
|
|
7
|
+
type EmailGetResponse,
|
|
7
8
|
type EmailSendResponse,
|
|
8
9
|
type EmailListParams,
|
|
9
10
|
type EmailSendParams,
|
|
@@ -14,5 +15,6 @@ export {
|
|
|
14
15
|
type Identity,
|
|
15
16
|
type IdentityCreateParams,
|
|
16
17
|
type IdentityListParams,
|
|
18
|
+
type IdentityVerifyParams,
|
|
17
19
|
type IdentitiesCursorIDPage,
|
|
18
20
|
} from './identities';
|
package/src/resources/index.ts
CHANGED
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '1.14.
|
|
1
|
+
export const VERSION = '1.14.4'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "1.14.
|
|
1
|
+
export declare const VERSION = "1.14.4";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "1.14.
|
|
1
|
+
export declare const VERSION = "1.14.4";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '1.14.
|
|
1
|
+
export const VERSION = '1.14.4'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|