@usehercules/sdk 1.14.2 → 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 +111 -0
- package/client.d.mts +8 -1
- package/client.d.mts.map +1 -1
- package/client.d.ts +8 -1
- package/client.d.ts.map +1 -1
- package/client.js +22 -7
- package/client.js.map +1 -1
- package/client.mjs +22 -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 +215 -0
- package/resources/email/email.d.mts.map +1 -0
- package/resources/email/email.d.ts +215 -0
- package/resources/email/email.d.ts.map +1 -0
- package/resources/email/email.js +43 -0
- package/resources/email/email.js.map +1 -0
- package/resources/email/email.mjs +38 -0
- package/resources/email/email.mjs.map +1 -0
- package/resources/email/identities.d.mts +145 -0
- package/resources/email/identities.d.mts.map +1 -0
- package/resources/email/identities.d.ts +145 -0
- package/resources/email/identities.d.ts.map +1 -0
- package/resources/email/identities.js +51 -0
- package/resources/email/identities.js.map +1 -0
- package/resources/email/identities.mjs +47 -0
- package/resources/email/identities.mjs.map +1 -0
- package/resources/email/index.d.mts +3 -0
- package/resources/email/index.d.mts.map +1 -0
- package/resources/email/index.d.ts +3 -0
- package/resources/email/index.d.ts.map +1 -0
- package/resources/email/index.js +9 -0
- package/resources/email/index.js.map +1 -0
- package/resources/email/index.mjs +4 -0
- package/resources/email/index.mjs.map +1 -0
- package/resources/email.d.mts +2 -0
- package/resources/email.d.mts.map +1 -0
- package/resources/email.d.ts +2 -0
- package/resources/email.d.ts.map +1 -0
- package/resources/email.js +6 -0
- package/resources/email.js.map +1 -0
- package/resources/email.mjs +3 -0
- package/resources/email.mjs.map +1 -0
- package/resources/index.d.mts +1 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/src/client.ts +46 -10
- 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 +292 -0
- package/src/resources/email/identities.ts +198 -0
- package/src/resources/email/index.ts +20 -0
- package/src/resources/email.ts +3 -0
- package/src/resources/index.ts +10 -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
|
@@ -14,7 +14,7 @@ export declare class Releases extends APIResource {
|
|
|
14
14
|
/**
|
|
15
15
|
* Updates a release name and description. Only draft releases can be updated.
|
|
16
16
|
*/
|
|
17
|
-
update(releaseID: string, body
|
|
17
|
+
update(releaseID: string, body: ReleaseUpdateParams, options?: RequestOptions): APIPromise<Release>;
|
|
18
18
|
/**
|
|
19
19
|
* Retrieves a paginated list of releases. Releases group entries and assets for
|
|
20
20
|
* atomic publishing.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"releases.d.ts","sourceRoot":"","sources":["../../../src/resources/content/releases/releases.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,QAAQ;OACb,EAAE,aAAa,EAAE,gBAAgB,EAAE,KAAK,EAAE;OAC1C,EAAE,UAAU,EAAE;OACd,EAAE,YAAY,EAAE,KAAK,kBAAkB,EAAE,WAAW,EAAE;OAEtD,EAAE,cAAc,EAAE;AAGzB,qBAAa,QAAS,SAAQ,WAAW;IACvC,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAoC;IAEzD;;;OAGG;IACH,MAAM,CAAC,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,OAAO,CAAC;IAIhF;;OAEG;IACH,MAAM,
|
|
1
|
+
{"version":3,"file":"releases.d.ts","sourceRoot":"","sources":["../../../src/resources/content/releases/releases.ts"],"names":[],"mappings":"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AAG,QAAQ,CAAC;CACzD;AAED,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;CACtB;AAID,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,OAAO,IAAI,OAAO,EACvB,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,qBAAqB,IAAI,qBAAqB,GACpD,CAAC;IAEF,OAAO,EAAE,KAAK,IAAI,KAAK,EAAE,KAAK,aAAa,IAAI,aAAa,EAAE,KAAK,gBAAgB,IAAI,gBAAgB,EAAE,CAAC;CAC3G"}
|
|
@@ -24,7 +24,7 @@ class Releases extends resource_1.APIResource {
|
|
|
24
24
|
/**
|
|
25
25
|
* Updates a release name and description. Only draft releases can be updated.
|
|
26
26
|
*/
|
|
27
|
-
update(releaseID, body
|
|
27
|
+
update(releaseID, body, options) {
|
|
28
28
|
return this._client.patch((0, path_1.path) `/v1/content/releases/${releaseID}`, { body, ...options });
|
|
29
29
|
}
|
|
30
30
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"releases.js","sourceRoot":"","sources":["../../../src/resources/content/releases/releases.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,wDAAqD;AACrD,6DAAoC;AACpC,sCAAiE;AAEjE,4DAA8F;AAC9F,0DAAyD;AAEzD,0DAAoD;AAEpD,MAAa,QAAS,SAAQ,sBAAW;IAAzC;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"releases.js","sourceRoot":"","sources":["../../../src/resources/content/releases/releases.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,wD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BAAwB,SAAS,EAAE,EAAE,OAAO,CAAC,CAAC;IAC5E,CAAC;IAED;;;OAGG;IACH,OAAO,CAAC,SAAiB,EAAE,OAAwB;QACjD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,wBAAwB,SAAS,UAAU,EAAE,OAAO,CAAC,CAAC;IACrF,CAAC;IAED;;;OAGG;IACH,QAAQ,CAAC,SAAiB,EAAE,IAA2B,EAAE,OAAwB;QAC/E,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,wBAAwB,SAAS,WAAW,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnG,CAAC;CACF;AA7DD,4BA6DC;AAiID,QAAQ,CAAC,KAAK,GAAG,aAAK,CAAC"}
|
|
@@ -20,7 +20,7 @@ export class Releases extends APIResource {
|
|
|
20
20
|
/**
|
|
21
21
|
* Updates a release name and description. Only draft releases can be updated.
|
|
22
22
|
*/
|
|
23
|
-
update(releaseID, body
|
|
23
|
+
update(releaseID, body, options) {
|
|
24
24
|
return this._client.patch(path `/v1/content/releases/${releaseID}`, { body, ...options });
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"releases.mjs","sourceRoot":"","sources":["../../../src/resources/content/releases/releases.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,QAAQ;OACb,EAAmC,KAAK,EAAE;OAE1C,EAAE,YAAY,EAAwC;OACtD,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,QAAS,SAAQ,WAAW;IAAzC;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"releases.mjs","sourceRoot":"","sources":["../../../src/resources/content/releases/releases.ts"],"names":[],"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7C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,wBAAwB,SAAS,EAAE,EAAE,OAAO,CAAC,CAAC;IAC5E,CAAC;IAED;;;OAGG;IACH,OAAO,CAAC,SAAiB,EAAE,OAAwB;QACjD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,wBAAwB,SAAS,UAAU,EAAE,OAAO,CAAC,CAAC;IACrF,CAAC;IAED;;;OAGG;IACH,QAAQ,CAAC,SAAiB,EAAE,IAA2B,EAAE,OAAwB;QAC/E,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,wBAAwB,SAAS,WAAW,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnG,CAAC;CACF;AAiID,QAAQ,CAAC,KAAK,GAAG,KAAK,CAAC"}
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
+
import * as IdentitiesAPI from "./identities.mjs";
|
|
3
|
+
import { Identities, IdentitiesCursorIDPage, Identity, IdentityCreateParams, IdentityListParams, IdentityVerifyParams } from "./identities.mjs";
|
|
4
|
+
import { APIPromise } from "../../core/api-promise.mjs";
|
|
5
|
+
import { CursorIDPage, type CursorIDPageParams, PagePromise } from "../../core/pagination.mjs";
|
|
6
|
+
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
7
|
+
/**
|
|
8
|
+
* Send transactional emails, send batch emails, and retrieve sent email
|
|
9
|
+
* history with delivery status tracking.
|
|
10
|
+
*/
|
|
11
|
+
export declare class EmailResource extends APIResource {
|
|
12
|
+
identities: IdentitiesAPI.Identities;
|
|
13
|
+
/**
|
|
14
|
+
* Retrieves a paginated list of sent emails. Returns email metadata including
|
|
15
|
+
* delivery status.
|
|
16
|
+
*/
|
|
17
|
+
list(query?: EmailListParams | null | undefined, options?: RequestOptions): PagePromise<EmailsCursorIDPage, Email>;
|
|
18
|
+
/**
|
|
19
|
+
* Retrieves a single email by its unique identifier.
|
|
20
|
+
*/
|
|
21
|
+
get(emailID: string, options?: RequestOptions): APIPromise<EmailGetResponse>;
|
|
22
|
+
/**
|
|
23
|
+
* Sends a single email. The sender address must be a verified identity for this
|
|
24
|
+
* website.
|
|
25
|
+
*/
|
|
26
|
+
send(body: EmailSendParams, options?: RequestOptions): APIPromise<EmailSendResponse>;
|
|
27
|
+
}
|
|
28
|
+
export type EmailsCursorIDPage = CursorIDPage<Email>;
|
|
29
|
+
/**
|
|
30
|
+
* A file attachment
|
|
31
|
+
*/
|
|
32
|
+
export interface Attachment {
|
|
33
|
+
/**
|
|
34
|
+
* The Base64-encoded content of the attachment. Max 40MB total per email.
|
|
35
|
+
*/
|
|
36
|
+
content: string;
|
|
37
|
+
/**
|
|
38
|
+
* The name of the attached file
|
|
39
|
+
*/
|
|
40
|
+
filename: string;
|
|
41
|
+
/**
|
|
42
|
+
* The MIME type of the attachment
|
|
43
|
+
*/
|
|
44
|
+
content_type?: string;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* A sent email object
|
|
48
|
+
*/
|
|
49
|
+
export interface Email {
|
|
50
|
+
/**
|
|
51
|
+
* Unique identifier for the email
|
|
52
|
+
*/
|
|
53
|
+
id: string;
|
|
54
|
+
/**
|
|
55
|
+
* Timestamp when the email was sent
|
|
56
|
+
*/
|
|
57
|
+
created_at: string;
|
|
58
|
+
/**
|
|
59
|
+
* Sender email address
|
|
60
|
+
*/
|
|
61
|
+
from: string;
|
|
62
|
+
/**
|
|
63
|
+
* Email subject line
|
|
64
|
+
*/
|
|
65
|
+
subject: string;
|
|
66
|
+
/**
|
|
67
|
+
* Recipient email addresses
|
|
68
|
+
*/
|
|
69
|
+
to: Array<string>;
|
|
70
|
+
/**
|
|
71
|
+
* Blind carbon copy recipients
|
|
72
|
+
*/
|
|
73
|
+
bcc?: Array<string> | null;
|
|
74
|
+
/**
|
|
75
|
+
* Carbon copy recipients
|
|
76
|
+
*/
|
|
77
|
+
cc?: Array<string> | null;
|
|
78
|
+
/**
|
|
79
|
+
* The most recent event for this email
|
|
80
|
+
*/
|
|
81
|
+
last_event?: 'sent' | 'delivered' | 'opened' | 'clicked' | 'bounced' | 'complained' | null;
|
|
82
|
+
/**
|
|
83
|
+
* Reply-to addresses
|
|
84
|
+
*/
|
|
85
|
+
reply_to?: Array<string> | null;
|
|
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
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Response after sending an email
|
|
138
|
+
*/
|
|
139
|
+
export interface EmailSendResponse {
|
|
140
|
+
/**
|
|
141
|
+
* The unique identifier of the sent email
|
|
142
|
+
*/
|
|
143
|
+
id: string;
|
|
144
|
+
}
|
|
145
|
+
export interface EmailListParams extends CursorIDPageParams {
|
|
146
|
+
}
|
|
147
|
+
export interface EmailSendParams {
|
|
148
|
+
/**
|
|
149
|
+
* Sender email address. To include a friendly name, use the format 'Your Name
|
|
150
|
+
* <sender@domain.com>'.
|
|
151
|
+
*/
|
|
152
|
+
from: string;
|
|
153
|
+
/**
|
|
154
|
+
* Email subject line
|
|
155
|
+
*/
|
|
156
|
+
subject: string;
|
|
157
|
+
/**
|
|
158
|
+
* Recipient email address(es). Maximum 50.
|
|
159
|
+
*/
|
|
160
|
+
to: string | Array<string>;
|
|
161
|
+
/**
|
|
162
|
+
* List of file attachments. Total size must not exceed 40MB after Base64 encoding.
|
|
163
|
+
*/
|
|
164
|
+
attachments?: Array<Attachment>;
|
|
165
|
+
/**
|
|
166
|
+
* Blind carbon copy recipient(s)
|
|
167
|
+
*/
|
|
168
|
+
bcc?: string | Array<string>;
|
|
169
|
+
/**
|
|
170
|
+
* Carbon copy recipient(s)
|
|
171
|
+
*/
|
|
172
|
+
cc?: string | Array<string>;
|
|
173
|
+
/**
|
|
174
|
+
* Custom email headers as key-value pairs
|
|
175
|
+
*/
|
|
176
|
+
headers?: {
|
|
177
|
+
[key: string]: string;
|
|
178
|
+
};
|
|
179
|
+
/**
|
|
180
|
+
* The HTML version of the message body
|
|
181
|
+
*/
|
|
182
|
+
html?: string;
|
|
183
|
+
/**
|
|
184
|
+
* Reply-to email address(es)
|
|
185
|
+
*/
|
|
186
|
+
reply_to?: string | Array<string>;
|
|
187
|
+
/**
|
|
188
|
+
* Custom metadata tags for the email (max 50)
|
|
189
|
+
*/
|
|
190
|
+
tags?: Array<EmailSendParams.Tag>;
|
|
191
|
+
/**
|
|
192
|
+
* The plain text version of the message body
|
|
193
|
+
*/
|
|
194
|
+
text?: string;
|
|
195
|
+
}
|
|
196
|
+
export declare namespace EmailSendParams {
|
|
197
|
+
/**
|
|
198
|
+
* A custom metadata tag for the email
|
|
199
|
+
*/
|
|
200
|
+
interface Tag {
|
|
201
|
+
/**
|
|
202
|
+
* The name of the tag
|
|
203
|
+
*/
|
|
204
|
+
name: string;
|
|
205
|
+
/**
|
|
206
|
+
* The value of the tag
|
|
207
|
+
*/
|
|
208
|
+
value: string;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
export declare namespace EmailResource {
|
|
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, };
|
|
214
|
+
}
|
|
215
|
+
//# sourceMappingURL=email.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"email.d.mts","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,GA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M,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IAE5B;;OAEG;IACH,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAEpC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IAElC;;OAEG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC;IAElC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,yBAAiB,eAAe,CAAC;IAC/B;;OAEG;IACH,UAAiB,GAAG;QAClB;;WAEG;QACH,IAAI,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"}
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.js";
|
|
2
|
+
import * as IdentitiesAPI from "./identities.js";
|
|
3
|
+
import { Identities, IdentitiesCursorIDPage, Identity, IdentityCreateParams, IdentityListParams, IdentityVerifyParams } from "./identities.js";
|
|
4
|
+
import { APIPromise } from "../../core/api-promise.js";
|
|
5
|
+
import { CursorIDPage, type CursorIDPageParams, PagePromise } from "../../core/pagination.js";
|
|
6
|
+
import { RequestOptions } from "../../internal/request-options.js";
|
|
7
|
+
/**
|
|
8
|
+
* Send transactional emails, send batch emails, and retrieve sent email
|
|
9
|
+
* history with delivery status tracking.
|
|
10
|
+
*/
|
|
11
|
+
export declare class EmailResource extends APIResource {
|
|
12
|
+
identities: IdentitiesAPI.Identities;
|
|
13
|
+
/**
|
|
14
|
+
* Retrieves a paginated list of sent emails. Returns email metadata including
|
|
15
|
+
* delivery status.
|
|
16
|
+
*/
|
|
17
|
+
list(query?: EmailListParams | null | undefined, options?: RequestOptions): PagePromise<EmailsCursorIDPage, Email>;
|
|
18
|
+
/**
|
|
19
|
+
* Retrieves a single email by its unique identifier.
|
|
20
|
+
*/
|
|
21
|
+
get(emailID: string, options?: RequestOptions): APIPromise<EmailGetResponse>;
|
|
22
|
+
/**
|
|
23
|
+
* Sends a single email. The sender address must be a verified identity for this
|
|
24
|
+
* website.
|
|
25
|
+
*/
|
|
26
|
+
send(body: EmailSendParams, options?: RequestOptions): APIPromise<EmailSendResponse>;
|
|
27
|
+
}
|
|
28
|
+
export type EmailsCursorIDPage = CursorIDPage<Email>;
|
|
29
|
+
/**
|
|
30
|
+
* A file attachment
|
|
31
|
+
*/
|
|
32
|
+
export interface Attachment {
|
|
33
|
+
/**
|
|
34
|
+
* The Base64-encoded content of the attachment. Max 40MB total per email.
|
|
35
|
+
*/
|
|
36
|
+
content: string;
|
|
37
|
+
/**
|
|
38
|
+
* The name of the attached file
|
|
39
|
+
*/
|
|
40
|
+
filename: string;
|
|
41
|
+
/**
|
|
42
|
+
* The MIME type of the attachment
|
|
43
|
+
*/
|
|
44
|
+
content_type?: string;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* A sent email object
|
|
48
|
+
*/
|
|
49
|
+
export interface Email {
|
|
50
|
+
/**
|
|
51
|
+
* Unique identifier for the email
|
|
52
|
+
*/
|
|
53
|
+
id: string;
|
|
54
|
+
/**
|
|
55
|
+
* Timestamp when the email was sent
|
|
56
|
+
*/
|
|
57
|
+
created_at: string;
|
|
58
|
+
/**
|
|
59
|
+
* Sender email address
|
|
60
|
+
*/
|
|
61
|
+
from: string;
|
|
62
|
+
/**
|
|
63
|
+
* Email subject line
|
|
64
|
+
*/
|
|
65
|
+
subject: string;
|
|
66
|
+
/**
|
|
67
|
+
* Recipient email addresses
|
|
68
|
+
*/
|
|
69
|
+
to: Array<string>;
|
|
70
|
+
/**
|
|
71
|
+
* Blind carbon copy recipients
|
|
72
|
+
*/
|
|
73
|
+
bcc?: Array<string> | null;
|
|
74
|
+
/**
|
|
75
|
+
* Carbon copy recipients
|
|
76
|
+
*/
|
|
77
|
+
cc?: Array<string> | null;
|
|
78
|
+
/**
|
|
79
|
+
* The most recent event for this email
|
|
80
|
+
*/
|
|
81
|
+
last_event?: 'sent' | 'delivered' | 'opened' | 'clicked' | 'bounced' | 'complained' | null;
|
|
82
|
+
/**
|
|
83
|
+
* Reply-to addresses
|
|
84
|
+
*/
|
|
85
|
+
reply_to?: Array<string> | null;
|
|
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
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Response after sending an email
|
|
138
|
+
*/
|
|
139
|
+
export interface EmailSendResponse {
|
|
140
|
+
/**
|
|
141
|
+
* The unique identifier of the sent email
|
|
142
|
+
*/
|
|
143
|
+
id: string;
|
|
144
|
+
}
|
|
145
|
+
export interface EmailListParams extends CursorIDPageParams {
|
|
146
|
+
}
|
|
147
|
+
export interface EmailSendParams {
|
|
148
|
+
/**
|
|
149
|
+
* Sender email address. To include a friendly name, use the format 'Your Name
|
|
150
|
+
* <sender@domain.com>'.
|
|
151
|
+
*/
|
|
152
|
+
from: string;
|
|
153
|
+
/**
|
|
154
|
+
* Email subject line
|
|
155
|
+
*/
|
|
156
|
+
subject: string;
|
|
157
|
+
/**
|
|
158
|
+
* Recipient email address(es). Maximum 50.
|
|
159
|
+
*/
|
|
160
|
+
to: string | Array<string>;
|
|
161
|
+
/**
|
|
162
|
+
* List of file attachments. Total size must not exceed 40MB after Base64 encoding.
|
|
163
|
+
*/
|
|
164
|
+
attachments?: Array<Attachment>;
|
|
165
|
+
/**
|
|
166
|
+
* Blind carbon copy recipient(s)
|
|
167
|
+
*/
|
|
168
|
+
bcc?: string | Array<string>;
|
|
169
|
+
/**
|
|
170
|
+
* Carbon copy recipient(s)
|
|
171
|
+
*/
|
|
172
|
+
cc?: string | Array<string>;
|
|
173
|
+
/**
|
|
174
|
+
* Custom email headers as key-value pairs
|
|
175
|
+
*/
|
|
176
|
+
headers?: {
|
|
177
|
+
[key: string]: string;
|
|
178
|
+
};
|
|
179
|
+
/**
|
|
180
|
+
* The HTML version of the message body
|
|
181
|
+
*/
|
|
182
|
+
html?: string;
|
|
183
|
+
/**
|
|
184
|
+
* Reply-to email address(es)
|
|
185
|
+
*/
|
|
186
|
+
reply_to?: string | Array<string>;
|
|
187
|
+
/**
|
|
188
|
+
* Custom metadata tags for the email (max 50)
|
|
189
|
+
*/
|
|
190
|
+
tags?: Array<EmailSendParams.Tag>;
|
|
191
|
+
/**
|
|
192
|
+
* The plain text version of the message body
|
|
193
|
+
*/
|
|
194
|
+
text?: string;
|
|
195
|
+
}
|
|
196
|
+
export declare namespace EmailSendParams {
|
|
197
|
+
/**
|
|
198
|
+
* A custom metadata tag for the email
|
|
199
|
+
*/
|
|
200
|
+
interface Tag {
|
|
201
|
+
/**
|
|
202
|
+
* The name of the tag
|
|
203
|
+
*/
|
|
204
|
+
name: string;
|
|
205
|
+
/**
|
|
206
|
+
* The value of the tag
|
|
207
|
+
*/
|
|
208
|
+
value: string;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
export declare namespace EmailResource {
|
|
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, };
|
|
214
|
+
}
|
|
215
|
+
//# sourceMappingURL=email.d.ts.map
|
|
@@ -0,0 +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,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;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,KAAK;IACpB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,IAAI,EAAE,MAAM,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AiB,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"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.EmailResource = void 0;
|
|
5
|
+
const tslib_1 = require("../../internal/tslib.js");
|
|
6
|
+
const resource_1 = require("../../core/resource.js");
|
|
7
|
+
const IdentitiesAPI = tslib_1.__importStar(require("./identities.js"));
|
|
8
|
+
const identities_1 = require("./identities.js");
|
|
9
|
+
const pagination_1 = require("../../core/pagination.js");
|
|
10
|
+
const path_1 = require("../../internal/utils/path.js");
|
|
11
|
+
/**
|
|
12
|
+
* Send transactional emails, send batch emails, and retrieve sent email
|
|
13
|
+
* history with delivery status tracking.
|
|
14
|
+
*/
|
|
15
|
+
class EmailResource extends resource_1.APIResource {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments);
|
|
18
|
+
this.identities = new IdentitiesAPI.Identities(this._client);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Retrieves a paginated list of sent emails. Returns email metadata including
|
|
22
|
+
* delivery status.
|
|
23
|
+
*/
|
|
24
|
+
list(query = {}, options) {
|
|
25
|
+
return this._client.getAPIList('/v1/email', (pagination_1.CursorIDPage), { query, ...options });
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Retrieves a single email by its unique identifier.
|
|
29
|
+
*/
|
|
30
|
+
get(emailID, options) {
|
|
31
|
+
return this._client.get((0, path_1.path) `/v1/email/${emailID}`, options);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Sends a single email. The sender address must be a verified identity for this
|
|
35
|
+
* website.
|
|
36
|
+
*/
|
|
37
|
+
send(body, options) {
|
|
38
|
+
return this._client.post('/v1/email', { body, ...options });
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.EmailResource = EmailResource;
|
|
42
|
+
EmailResource.Identities = identities_1.Identities;
|
|
43
|
+
//# sourceMappingURL=email.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
import * as IdentitiesAPI from "./identities.mjs";
|
|
4
|
+
import { Identities, } from "./identities.mjs";
|
|
5
|
+
import { CursorIDPage } from "../../core/pagination.mjs";
|
|
6
|
+
import { path } from "../../internal/utils/path.mjs";
|
|
7
|
+
/**
|
|
8
|
+
* Send transactional emails, send batch emails, and retrieve sent email
|
|
9
|
+
* history with delivery status tracking.
|
|
10
|
+
*/
|
|
11
|
+
export class EmailResource extends APIResource {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments);
|
|
14
|
+
this.identities = new IdentitiesAPI.Identities(this._client);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Retrieves a paginated list of sent emails. Returns email metadata including
|
|
18
|
+
* delivery status.
|
|
19
|
+
*/
|
|
20
|
+
list(query = {}, options) {
|
|
21
|
+
return this._client.getAPIList('/v1/email', (CursorIDPage), { query, ...options });
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Retrieves a single email by its unique identifier.
|
|
25
|
+
*/
|
|
26
|
+
get(emailID, options) {
|
|
27
|
+
return this._client.get(path `/v1/email/${emailID}`, options);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Sends a single email. The sender address must be a verified identity for this
|
|
31
|
+
* website.
|
|
32
|
+
*/
|
|
33
|
+
send(body, options) {
|
|
34
|
+
return this._client.post('/v1/email', { body, ...options });
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
EmailResource.Identities = Identities;
|
|
38
|
+
//# sourceMappingURL=email.mjs.map
|
|
@@ -0,0 +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,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"}
|