mailchannels-sdk 0.7.1 → 0.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mailchannels.d.mts +991 -1031
- package/dist/mailchannels.d.ts +991 -1031
- package/dist/mailchannels.mjs +1 -0
- package/package.json +7 -7
package/dist/mailchannels.d.mts
CHANGED
|
@@ -13,216 +13,224 @@ declare class MailChannelsClient {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
interface ErrorResponse {
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
message: string;
|
|
17
|
+
statusCode: number | null;
|
|
18
18
|
}
|
|
19
|
-
|
|
20
19
|
interface SuccessResponse {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
20
|
+
/**
|
|
21
|
+
* Whether the operation was successful.
|
|
22
|
+
*/
|
|
23
|
+
success: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Error information if the operation failed.
|
|
26
|
+
*/
|
|
27
|
+
error: ErrorResponse | null;
|
|
29
28
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
error: null;
|
|
29
|
+
type DataResponse<T> = {
|
|
30
|
+
/**
|
|
31
|
+
* The response data.
|
|
32
|
+
*/
|
|
33
|
+
data: T;
|
|
34
|
+
/**
|
|
35
|
+
* Error information if the operation failed.
|
|
36
|
+
*/
|
|
37
|
+
error: null;
|
|
40
38
|
} | {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
39
|
+
/**
|
|
40
|
+
* The response data.
|
|
41
|
+
*/
|
|
42
|
+
data: null;
|
|
43
|
+
/**
|
|
44
|
+
* Error information if the operation failed.
|
|
45
|
+
*/
|
|
46
|
+
error: ErrorResponse;
|
|
49
47
|
};
|
|
50
48
|
|
|
51
49
|
interface EmailsSendRecipient {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
50
|
+
/**
|
|
51
|
+
* The email address of the recipient.
|
|
52
|
+
*/
|
|
53
|
+
email: string;
|
|
54
|
+
/**
|
|
55
|
+
* The name of the recipient. Display name in raw text, e.g. John Doe, 张三.
|
|
56
|
+
*/
|
|
57
|
+
name?: string;
|
|
60
58
|
}
|
|
61
|
-
|
|
62
59
|
interface EmailsSendAttachment {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
60
|
+
/**
|
|
61
|
+
* The attachment data, encoded in base64.
|
|
62
|
+
*/
|
|
63
|
+
content: string;
|
|
64
|
+
/**
|
|
65
|
+
* The name of the attachment file.
|
|
66
|
+
*/
|
|
67
|
+
filename: string;
|
|
68
|
+
/**
|
|
69
|
+
* The MIME type of the attachment.
|
|
70
|
+
*/
|
|
71
|
+
type: string;
|
|
75
72
|
}
|
|
76
|
-
|
|
77
73
|
interface EmailsSendTracking {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
74
|
+
/**
|
|
75
|
+
* Track when a recipient clicks a link in your email.
|
|
76
|
+
* @default false
|
|
77
|
+
*/
|
|
78
|
+
click?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Track when a recipient opens your email. Please note that some email clients may not support open tracking.
|
|
81
|
+
* @default false
|
|
82
|
+
*/
|
|
83
|
+
open?: boolean;
|
|
88
84
|
}
|
|
89
|
-
|
|
90
85
|
interface EmailsSendOptionsBase {
|
|
91
|
-
/**
|
|
92
|
-
* An array of attachments to be sent with the email.
|
|
93
|
-
*/
|
|
94
|
-
attachments?: EmailsSendAttachment[];
|
|
95
|
-
/**
|
|
96
|
-
* The campaign identifier. If specified, this ID will be included in all relevant webhooks. It can be up to 48 UTF-8 characters long and must not contain spaces.
|
|
97
|
-
*/
|
|
98
|
-
campaignId?: string;
|
|
99
|
-
/**
|
|
100
|
-
* The BCC recipients of the email. Can be an array of email addresses or an array of objects with email and name properties or a single email address string or an object with email and name properties.
|
|
101
|
-
* @example
|
|
102
|
-
* [
|
|
103
|
-
* { email: 'email1@example.com', name: 'Example1' },
|
|
104
|
-
* { email: 'email2@example.com', name: 'Example2' }
|
|
105
|
-
* ]
|
|
106
|
-
* @example
|
|
107
|
-
* { email: 'email@example.com', name: 'Example' }
|
|
108
|
-
* @example
|
|
109
|
-
* ['email1@example.com', 'email2@example.com']
|
|
110
|
-
* @example
|
|
111
|
-
* 'email@example.com'
|
|
112
|
-
* @example
|
|
113
|
-
* 'Name <email@example.com>'
|
|
114
|
-
*/
|
|
115
|
-
bcc?: EmailsSendRecipient[] | EmailsSendRecipient | string[] | string;
|
|
116
|
-
/**
|
|
117
|
-
* The CC recipients of the email. Can be an array of email addresses or an array of objects with email and name properties or a single email address string or an object with email and name properties.
|
|
118
|
-
* @example
|
|
119
|
-
* [
|
|
120
|
-
* { email: 'email1@example.com', name: 'Example1' },
|
|
121
|
-
* { email: 'email2@example.com', name: 'Example2' }
|
|
122
|
-
* ]
|
|
123
|
-
* @example
|
|
124
|
-
* { email: 'email@example.com', name: 'Example' }
|
|
125
|
-
* @example
|
|
126
|
-
* ['email1@example.com', 'email2@example.com']
|
|
127
|
-
* @example
|
|
128
|
-
* 'email@example.com'
|
|
129
|
-
* @example
|
|
130
|
-
* 'Name <email@example.com>'
|
|
131
|
-
*/
|
|
132
|
-
cc?: EmailsSendRecipient[] | EmailsSendRecipient | string[] | string;
|
|
133
|
-
/**
|
|
134
|
-
* The DKIM settings for the email.
|
|
135
|
-
*/
|
|
136
|
-
dkim?: {
|
|
137
86
|
/**
|
|
138
|
-
*
|
|
87
|
+
* An array of attachments to be sent with the email.
|
|
139
88
|
*/
|
|
140
|
-
|
|
89
|
+
attachments?: EmailsSendAttachment[];
|
|
141
90
|
/**
|
|
142
|
-
*
|
|
91
|
+
* The campaign identifier. If specified, this ID will be included in all relevant webhooks. It can be up to 48 UTF-8 characters long and must not contain spaces.
|
|
143
92
|
*/
|
|
144
|
-
|
|
93
|
+
campaignId?: string;
|
|
145
94
|
/**
|
|
146
|
-
*
|
|
95
|
+
* The BCC recipients of the email. Can be an array of email addresses or an array of objects with email and name properties or a single email address string or an object with email and name properties.
|
|
96
|
+
* @example
|
|
97
|
+
* [
|
|
98
|
+
* { email: 'email1@example.com', name: 'Example1' },
|
|
99
|
+
* { email: 'email2@example.com', name: 'Example2' }
|
|
100
|
+
* ]
|
|
101
|
+
* @example
|
|
102
|
+
* { email: 'email@example.com', name: 'Example' }
|
|
103
|
+
* @example
|
|
104
|
+
* ['email1@example.com', 'email2@example.com']
|
|
105
|
+
* @example
|
|
106
|
+
* 'email@example.com'
|
|
107
|
+
* @example
|
|
108
|
+
* 'Name <email@example.com>'
|
|
147
109
|
*/
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
110
|
+
bcc?: EmailsSendRecipient[] | EmailsSendRecipient | string[] | string;
|
|
111
|
+
/**
|
|
112
|
+
* The CC recipients of the email. Can be an array of email addresses or an array of objects with email and name properties or a single email address string or an object with email and name properties.
|
|
113
|
+
* @example
|
|
114
|
+
* [
|
|
115
|
+
* { email: 'email1@example.com', name: 'Example1' },
|
|
116
|
+
* { email: 'email2@example.com', name: 'Example2' }
|
|
117
|
+
* ]
|
|
118
|
+
* @example
|
|
119
|
+
* { email: 'email@example.com', name: 'Example' }
|
|
120
|
+
* @example
|
|
121
|
+
* ['email1@example.com', 'email2@example.com']
|
|
122
|
+
* @example
|
|
123
|
+
* 'email@example.com'
|
|
124
|
+
* @example
|
|
125
|
+
* 'Name <email@example.com>'
|
|
126
|
+
*/
|
|
127
|
+
cc?: EmailsSendRecipient[] | EmailsSendRecipient | string[] | string;
|
|
128
|
+
/**
|
|
129
|
+
* The DKIM settings for the email.
|
|
130
|
+
*/
|
|
131
|
+
dkim?: {
|
|
132
|
+
/**
|
|
133
|
+
* Domain used for DKIM signing.
|
|
134
|
+
*/
|
|
135
|
+
domain: string;
|
|
136
|
+
/**
|
|
137
|
+
* DKIM private key encoded in Base64.
|
|
138
|
+
*/
|
|
139
|
+
privateKey?: string;
|
|
140
|
+
/**
|
|
141
|
+
* DKIM selector in the domain DNS records.
|
|
142
|
+
*/
|
|
143
|
+
selector: string;
|
|
144
|
+
};
|
|
145
|
+
/**
|
|
146
|
+
* Optional envelope sender address. If not set, the envelope sender defaults to the `from.email` field. Can be overridden per-personalization. Only the email portion is used; the name field is ignored.
|
|
147
|
+
* @example
|
|
148
|
+
* { email: 'email@example.com', name: 'Example' }
|
|
149
|
+
* @example
|
|
150
|
+
* 'email@example.com'
|
|
151
|
+
* @example
|
|
152
|
+
* 'Name <email@example.com>'
|
|
153
|
+
*/
|
|
154
|
+
envelopeFrom?: EmailsSendRecipient | string;
|
|
155
|
+
/**
|
|
156
|
+
* The sender of the email. Can be a string or an object with email and name properties.
|
|
157
|
+
* @example
|
|
158
|
+
* { email: 'email@example.com', name: 'Example' }
|
|
159
|
+
* @example
|
|
160
|
+
* 'email@example.com'
|
|
161
|
+
* @example
|
|
162
|
+
* 'Name <email@example.com>'
|
|
163
|
+
*/
|
|
164
|
+
from: EmailsSendRecipient | string;
|
|
165
|
+
/**
|
|
166
|
+
* An object containing key-value pairs, where both keys (header names) and values must be strings. These pairs represent custom headers to be substituted.
|
|
167
|
+
*
|
|
168
|
+
* Please note the following restrictions and behavior:
|
|
169
|
+
* - **Reserved headers**: The following headers cannot be modified: `Authentication-Results`, `BCC`, `CC`, `Content-Transfer-Encoding`, `Content-Type`, `DKIM-Signature`, `From`, `Message-ID`, `Received`, `Reply-To`, `Subject`, `To`.
|
|
170
|
+
* - **Header precedence**: If a header is defined in both the personalizations object and the root headers, the value from personalizations will be used.
|
|
171
|
+
* - **Case sensitivity**: Headers are treated as case-insensitive. If multiple headers differ only by case, only one will be used, with no guarantee of which one.
|
|
172
|
+
*/
|
|
173
|
+
headers?: Record<string, string>;
|
|
174
|
+
/**
|
|
175
|
+
* The recipient of the email. Can be an array of email addresses or an array of objects with `email` and `name` properties or a single email address string or an object with `email` and `name` properties.
|
|
176
|
+
* @example
|
|
177
|
+
* [
|
|
178
|
+
* { email: 'email1@example.com', name: 'Example1' },
|
|
179
|
+
* { email: 'email2@example.com', name: 'Example2' },
|
|
180
|
+
* ]
|
|
181
|
+
* @example
|
|
182
|
+
* { email: 'email@example.com', name: 'Example' }
|
|
183
|
+
* @example
|
|
184
|
+
* ['email1@example.com', 'email2@example.com']
|
|
185
|
+
* @example
|
|
186
|
+
* 'email@example.com'
|
|
187
|
+
* @example
|
|
188
|
+
* 'Name <email@example.com>'
|
|
189
|
+
*/
|
|
190
|
+
to: EmailsSendRecipient[] | EmailsSendRecipient | string[] | string;
|
|
191
|
+
/**
|
|
192
|
+
* Adjust open and click tracking for the message. Please note that enabling tracking for your messages requires a subscription that supports open and click tracking.
|
|
193
|
+
*
|
|
194
|
+
* Only links (`<a>` tags) meeting all of the following conditions are processed for click tracking:
|
|
195
|
+
* - The URL is non-empty.
|
|
196
|
+
* - The URL starts with `http` or `https`.
|
|
197
|
+
* - The link does not have a `clicktracking` attribute set to `off`.
|
|
198
|
+
*/
|
|
199
|
+
tracking?: EmailsSendTracking;
|
|
200
|
+
/**
|
|
201
|
+
* A single `replyTo` recipient object, or a single email address.
|
|
202
|
+
* @example
|
|
203
|
+
* { email: 'email@example.com', name: 'Example' }
|
|
204
|
+
* @example
|
|
205
|
+
* 'email@example.com'
|
|
206
|
+
* @example
|
|
207
|
+
* 'Name <email@example.com>'
|
|
208
|
+
*/
|
|
209
|
+
replyTo?: EmailsSendRecipient | string;
|
|
210
|
+
/**
|
|
211
|
+
* The subject of the email.
|
|
212
|
+
*/
|
|
213
|
+
subject: string;
|
|
214
|
+
/**
|
|
215
|
+
* Data to be used if the email is a mustache template, key-value pairs of variables to set for template rendering. Keys must be strings.
|
|
216
|
+
*
|
|
217
|
+
* the values can be one of the following types:
|
|
218
|
+
* - string
|
|
219
|
+
* - number
|
|
220
|
+
* - boolean
|
|
221
|
+
* - list, whose values are all of permitted types
|
|
222
|
+
* - map, whose keys must be strings, and whose values are all of permitted types
|
|
223
|
+
*/
|
|
224
|
+
mustaches?: Record<string, unknown>;
|
|
225
|
+
/**
|
|
226
|
+
* Mark these messages as transactional or non-transactional. In order for a message to be marked as non-transactional, it must have exactly one recipient per personalization, and it must be DKIM signed. 400 Bad Request will be returned if there are more than one recipient in any personalization for non-transactional messages. If a message is marked as non-transactional, it changes the sending process as follows:
|
|
227
|
+
*
|
|
228
|
+
* List-Unsubscribe headers will be added.
|
|
229
|
+
* @default true
|
|
230
|
+
*/
|
|
231
|
+
transactional?: boolean;
|
|
222
232
|
}
|
|
223
|
-
|
|
224
|
-
type EmailsSendOptions = EmailsSendOptionsBase & (
|
|
225
|
-
| {
|
|
233
|
+
type EmailsSendOptions = EmailsSendOptionsBase & ({
|
|
226
234
|
/**
|
|
227
235
|
* The HTML content of the email.
|
|
228
236
|
* @example
|
|
@@ -235,8 +243,7 @@ type EmailsSendOptions = EmailsSendOptionsBase & (
|
|
|
235
243
|
* 'Hello World'
|
|
236
244
|
*/
|
|
237
245
|
text?: string;
|
|
238
|
-
|
|
239
|
-
| {
|
|
246
|
+
} | {
|
|
240
247
|
/**
|
|
241
248
|
* The HTML content of the email (optional when text is provided).
|
|
242
249
|
* @example
|
|
@@ -249,266 +256,255 @@ type EmailsSendOptions = EmailsSendOptionsBase & (
|
|
|
249
256
|
* 'Hello World'
|
|
250
257
|
*/
|
|
251
258
|
text: string;
|
|
252
|
-
|
|
253
|
-
|
|
259
|
+
});
|
|
260
|
+
type EmailsSendResponse = SuccessResponse & DataResponse<{
|
|
261
|
+
/**
|
|
262
|
+
* Fully rendered message if `dryRun` was set to `true`. A string representation of a rendered message, one per personalization in the request.
|
|
263
|
+
*/
|
|
264
|
+
rendered?: string[];
|
|
265
|
+
/**
|
|
266
|
+
* The Request ID is a unique identifier generated by the service to track the HTTP request. It will also be included in all webhooks for reference.
|
|
267
|
+
*/
|
|
268
|
+
requestId?: string;
|
|
269
|
+
results?: {
|
|
270
|
+
/**
|
|
271
|
+
* The index of the personalization in the request. Starts at 0.
|
|
272
|
+
*/
|
|
273
|
+
index?: number;
|
|
274
|
+
/**
|
|
275
|
+
* The Message ID is a unique identifier generated by the service. Each personalization has a distinct Message ID, which is also used in the `Message-Id` header and included in webhooks.
|
|
276
|
+
*/
|
|
277
|
+
messageId: string;
|
|
278
|
+
/**
|
|
279
|
+
* A human-readable explanation of the status.
|
|
280
|
+
*/
|
|
281
|
+
reason?: string;
|
|
282
|
+
/**
|
|
283
|
+
* The status of the message. Note that 'sent' is a temporary status; the final status will be provided through webhooks, if configured.
|
|
284
|
+
*/
|
|
285
|
+
status: "sent" | "failed";
|
|
286
|
+
}[];
|
|
287
|
+
}>;
|
|
254
288
|
|
|
255
|
-
type
|
|
256
|
-
/**
|
|
257
|
-
* Fully rendered message if `dryRun` was set to `true`. A string representation of a rendered message, one per personalization in the request.
|
|
258
|
-
*/
|
|
259
|
-
rendered?: string[];
|
|
260
|
-
/**
|
|
261
|
-
* The Request ID is a unique identifier generated by the service to track the HTTP request. It will also be included in all webhooks for reference.
|
|
262
|
-
*/
|
|
263
|
-
requestId?: string;
|
|
264
|
-
results?: {
|
|
289
|
+
type EmailsSendAsyncResponse = DataResponse<{
|
|
265
290
|
/**
|
|
266
|
-
*
|
|
291
|
+
* ISO 8601 timestamp when the request was queued for processing.
|
|
267
292
|
*/
|
|
268
|
-
|
|
293
|
+
queuedAt: string;
|
|
269
294
|
/**
|
|
270
|
-
*
|
|
295
|
+
* Unique identifier for tracking this async request. Will be included in all webhook events for this request.
|
|
271
296
|
*/
|
|
272
|
-
|
|
297
|
+
requestId: string;
|
|
298
|
+
}>;
|
|
299
|
+
|
|
300
|
+
interface EmailsCreateDkimKeyOptions {
|
|
273
301
|
/**
|
|
274
|
-
*
|
|
302
|
+
* Algorithm used for the new key pair Currently, only RSA is supported.
|
|
303
|
+
* @default "rsa"
|
|
275
304
|
*/
|
|
276
|
-
|
|
305
|
+
algorithm?: "rsa";
|
|
277
306
|
/**
|
|
278
|
-
*
|
|
307
|
+
* Key length in bits. For RSA, must be a multiple of 1024. Common values: 1024 or 2048.
|
|
308
|
+
* @default 2048
|
|
279
309
|
*/
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
/**
|
|
286
|
-
* ISO 8601 timestamp when the request was queued for processing.
|
|
287
|
-
*/
|
|
288
|
-
queuedAt: string[];
|
|
289
|
-
/**
|
|
290
|
-
* Unique identifier for tracking this async request. Will be included in all webhook events for this request.
|
|
291
|
-
*/
|
|
292
|
-
requestId: string;
|
|
293
|
-
}>;
|
|
294
|
-
|
|
295
|
-
interface EmailsCreateDkimKeyOptions {
|
|
296
|
-
/**
|
|
297
|
-
* Algorithm used for the new key pair Currently, only RSA is supported.
|
|
298
|
-
* @default "rsa"
|
|
299
|
-
*/
|
|
300
|
-
algorithm?: "rsa";
|
|
301
|
-
/**
|
|
302
|
-
* Key length in bits. For RSA, must be a multiple of 1024. Common values: 1024 or 2048.
|
|
303
|
-
* @default 2048
|
|
304
|
-
*/
|
|
305
|
-
length?: 1024 | 2048 | 3072 | 4096;
|
|
306
|
-
/**
|
|
307
|
-
* Selector for the new key pair. Must be a maximum of 63 characters.
|
|
308
|
-
*/
|
|
309
|
-
selector: string;
|
|
310
|
+
length?: 1024 | 2048 | 3072 | 4096;
|
|
311
|
+
/**
|
|
312
|
+
* Selector for the new key pair. Must be a maximum of 63 characters.
|
|
313
|
+
*/
|
|
314
|
+
selector: string;
|
|
310
315
|
}
|
|
311
|
-
|
|
312
316
|
type EmailsDkimKeyStatus = "active" | "retired" | "revoked" | "rotated";
|
|
313
|
-
|
|
314
317
|
interface EmailsDkimKey {
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
318
|
+
/**
|
|
319
|
+
* Algorithm used for the key pair.
|
|
320
|
+
*/
|
|
321
|
+
algorithm: string;
|
|
322
|
+
/**
|
|
323
|
+
* Timestamp when the key pair was created.
|
|
324
|
+
*/
|
|
325
|
+
createdAt?: string;
|
|
326
|
+
/**
|
|
327
|
+
* Suggested DNS records for the DKIM key.
|
|
328
|
+
*/
|
|
329
|
+
dnsRecords: {
|
|
330
|
+
name: string;
|
|
331
|
+
type: string;
|
|
332
|
+
value: string;
|
|
333
|
+
}[];
|
|
334
|
+
/**
|
|
335
|
+
* Domain associated with the key pair.
|
|
336
|
+
*/
|
|
337
|
+
domain: string;
|
|
338
|
+
/**
|
|
339
|
+
* UTC timestamp after which you can no longer use the rotated key for signing.
|
|
340
|
+
*/
|
|
341
|
+
gracePeriodExpiresAt?: string;
|
|
342
|
+
/**
|
|
343
|
+
* Key length in bits.
|
|
344
|
+
*/
|
|
345
|
+
length: 1024 | 2048 | 3072 | 4096;
|
|
346
|
+
publicKey: string;
|
|
347
|
+
/**
|
|
348
|
+
* UTC timestamp when a rotated key pair is retired.
|
|
349
|
+
*/
|
|
350
|
+
retiresAt?: string;
|
|
351
|
+
/**
|
|
352
|
+
* Selector assigned to the key pair.
|
|
353
|
+
*/
|
|
354
|
+
selector: string;
|
|
355
|
+
/**
|
|
356
|
+
* Status of the key.
|
|
357
|
+
*/
|
|
358
|
+
status: EmailsDkimKeyStatus;
|
|
359
|
+
/**
|
|
360
|
+
* Timestamp when the key was last modified.
|
|
361
|
+
*/
|
|
362
|
+
statusModifiedAt?: string;
|
|
360
363
|
}
|
|
361
|
-
|
|
362
|
-
type EmailsCreateDkimKeyResponse = DataResponse$1<EmailsDkimKey>;
|
|
364
|
+
type EmailsCreateDkimKeyResponse = DataResponse<EmailsDkimKey>;
|
|
363
365
|
|
|
364
366
|
interface EmailsCheckDomainDkim {
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
367
|
+
/**
|
|
368
|
+
* Domain used for DKIM signing.
|
|
369
|
+
*/
|
|
370
|
+
domain?: string;
|
|
371
|
+
/**
|
|
372
|
+
* DKIM private key encoded in Base64.
|
|
373
|
+
*/
|
|
374
|
+
privateKey?: string;
|
|
375
|
+
/**
|
|
376
|
+
* DKIM selector in the domain DNS records.
|
|
377
|
+
*/
|
|
378
|
+
selector?: string;
|
|
377
379
|
}
|
|
378
|
-
|
|
379
380
|
interface EmailsCheckDomainOptions {
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
domain: string;
|
|
394
|
-
/**
|
|
395
|
-
* Used exclusively for [Domain Lockdown](https://support.mailchannels.com/hc/en-us/articles/16918954360845-Secure-your-domain-name-against-spoofing-with-Domain-Lockdown) verification. If you're not using senderid to associate your domain with your account, you can disregard this field. The corresponding value is included in the `X-MailChannels-SenderId` header of emails sent via MailChannels.
|
|
396
|
-
*/
|
|
397
|
-
senderId?: string;
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
type EmailsCheckDomainVerdict = "passed" | "failed" | "soft failed" | "temporary error" | "permanent error" | "neutral" | "none" | "unknown";
|
|
401
|
-
|
|
402
|
-
type EmailsCheckDomainResponse = DataResponse$1<{
|
|
403
|
-
dkim: {
|
|
381
|
+
/**
|
|
382
|
+
* Each item may include DKIM `domain`, `selector` and `privateKey`. Up to 10 items are allowed. The absence or presence of these fields affects how DKIM settings are validated:
|
|
383
|
+
* 1. If `domain`, `selector`, and `privateKey` are all present, verify using the provided domain, selector, and key.
|
|
384
|
+
* 2. If `domain` and `selector` are present, use the stored private key for the given domain and selector.
|
|
385
|
+
* 3. If only `domain` is present, use all stored keys for the given domain.
|
|
386
|
+
* 4. If none are present, use all stored keys for the `domain` provided in the domain field of the request.
|
|
387
|
+
* 5. If `privateKey` is present, `selector` must be present.
|
|
388
|
+
* 6. If `selector` is present and `domain` is not, the domain will be taken from the domain field of the request.
|
|
389
|
+
*/
|
|
390
|
+
dkim?: EmailsCheckDomainDkim[] | EmailsCheckDomainDkim;
|
|
391
|
+
/**
|
|
392
|
+
* Domain used for sending emails. If `dkim` settings are not provided, or `dkim` settings are provided with no `domain`, the stored dkim settings for this domain will be used.
|
|
393
|
+
*/
|
|
404
394
|
domain: string;
|
|
405
395
|
/**
|
|
406
|
-
* The
|
|
396
|
+
* Used exclusively for [Domain Lockdown](https://support.mailchannels.com/hc/en-us/articles/16918954360845-Secure-your-domain-name-against-spoofing-with-Domain-Lockdown) verification. If you're not using senderid to associate your domain with your account, you can disregard this field. The corresponding value is included in the `X-MailChannels-SenderId` header of emails sent via MailChannels.
|
|
407
397
|
*/
|
|
408
|
-
|
|
409
|
-
|
|
398
|
+
senderId?: string;
|
|
399
|
+
}
|
|
400
|
+
type EmailsCheckDomainVerdict = "passed" | "failed" | "soft failed" | "temporary error" | "permanent error" | "neutral" | "none" | "unknown";
|
|
401
|
+
type EmailsCheckDomainResponse = DataResponse<{
|
|
402
|
+
dkim: {
|
|
403
|
+
domain: string;
|
|
404
|
+
/**
|
|
405
|
+
* The human readable status of the DKIM key used for verification.
|
|
406
|
+
*/
|
|
407
|
+
keyStatus?: EmailsDkimKey["status"] | "provided";
|
|
408
|
+
selector: string;
|
|
409
|
+
/**
|
|
410
|
+
* A human-readable explanation of DKIM check.
|
|
411
|
+
*/
|
|
412
|
+
reason?: string;
|
|
413
|
+
verdict: Extract<EmailsCheckDomainVerdict, "passed" | "failed">;
|
|
414
|
+
}[];
|
|
415
|
+
domainLockdown: {
|
|
416
|
+
/**
|
|
417
|
+
* A human-readable explanation of Domain Lockdown check.
|
|
418
|
+
*/
|
|
419
|
+
reason?: string;
|
|
420
|
+
verdict: Extract<EmailsCheckDomainVerdict, "passed" | "failed">;
|
|
421
|
+
};
|
|
410
422
|
/**
|
|
411
|
-
*
|
|
412
|
-
*/
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
verdict: Extract<EmailsCheckDomainVerdict, "passed" | "failed">;
|
|
423
|
+
* These results are here to help avoid [SDNF](https://support.mailchannels.com/hc/en-us/articles/203155500-550-5-2-1-SDNF-Sender-Domain-Not-Found) (Sender Domain Not Found) blocks. For messages not to get blocked by SDNF, we require either an MX or A record to exist for the sender domain.
|
|
424
|
+
*/
|
|
425
|
+
senderDomain: {
|
|
426
|
+
a: {
|
|
427
|
+
/**
|
|
428
|
+
* A human-readable explanation of A record check.
|
|
429
|
+
*/
|
|
430
|
+
reason?: string;
|
|
431
|
+
verdict: Extract<EmailsCheckDomainVerdict, "passed" | "failed">;
|
|
432
|
+
};
|
|
433
|
+
mx: {
|
|
434
|
+
/**
|
|
435
|
+
* A human-readable explanation of MX record check.
|
|
436
|
+
*/
|
|
437
|
+
reason?: string;
|
|
438
|
+
verdict: Extract<EmailsCheckDomainVerdict, "passed" | "failed">;
|
|
439
|
+
};
|
|
440
|
+
/**
|
|
441
|
+
* Overall verdict. Passed if either A or MX record check passed.
|
|
442
|
+
*/
|
|
443
|
+
verdict: Extract<EmailsCheckDomainVerdict, "passed" | "failed">;
|
|
433
444
|
};
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
445
|
+
spf: {
|
|
446
|
+
/**
|
|
447
|
+
* A human-readable explanation of SPF check.
|
|
448
|
+
*/
|
|
449
|
+
reason?: string;
|
|
450
|
+
verdict: EmailsCheckDomainVerdict;
|
|
440
451
|
};
|
|
452
|
+
references?: string[];
|
|
453
|
+
}>;
|
|
454
|
+
|
|
455
|
+
interface EmailsGetDkimKeysOptions {
|
|
441
456
|
/**
|
|
442
|
-
*
|
|
457
|
+
* Selector to filter keys by. Must be a maximum of 63 characters.
|
|
443
458
|
*/
|
|
444
|
-
|
|
445
|
-
};
|
|
446
|
-
spf: {
|
|
459
|
+
selector?: string;
|
|
447
460
|
/**
|
|
448
|
-
*
|
|
461
|
+
* Status to filter keys by.
|
|
449
462
|
*/
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
* Number of keys to skip before returning results.
|
|
467
|
-
* @default 0
|
|
468
|
-
*/
|
|
469
|
-
offset?: number;
|
|
470
|
-
/**
|
|
471
|
-
* Maximum number of keys to return. Maximum is `100` and minimum is `1`.
|
|
472
|
-
* @default 10
|
|
473
|
-
*/
|
|
474
|
-
limit?: number;
|
|
475
|
-
/**
|
|
476
|
-
* If `true`, includes the suggested DKIM DNS record for each returned key.
|
|
477
|
-
* @default false
|
|
478
|
-
*/
|
|
479
|
-
includeDnsRecord?: boolean;
|
|
463
|
+
status?: EmailsDkimKey["status"];
|
|
464
|
+
/**
|
|
465
|
+
* Number of keys to skip before returning results.
|
|
466
|
+
* @default 0
|
|
467
|
+
*/
|
|
468
|
+
offset?: number;
|
|
469
|
+
/**
|
|
470
|
+
* Maximum number of keys to return. Maximum is `100` and minimum is `1`.
|
|
471
|
+
* @default 10
|
|
472
|
+
*/
|
|
473
|
+
limit?: number;
|
|
474
|
+
/**
|
|
475
|
+
* If `true`, includes the suggested DKIM DNS record for each returned key.
|
|
476
|
+
* @default false
|
|
477
|
+
*/
|
|
478
|
+
includeDnsRecord?: boolean;
|
|
480
479
|
}
|
|
481
|
-
|
|
482
480
|
type Optional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
483
|
-
|
|
484
|
-
type EmailsGetDkimKeysResponse = DataResponse$1<Optional<EmailsDkimKey, "dnsRecords">[]>;
|
|
481
|
+
type EmailsGetDkimKeysResponse = DataResponse<Optional<EmailsDkimKey, "dnsRecords">[]>;
|
|
485
482
|
|
|
486
483
|
interface EmailsUpdateDkimKeyOptions {
|
|
487
|
-
/**
|
|
488
|
-
* Selector of the DKIM key pair to update. Must be a maximum of 63 characters.
|
|
489
|
-
*/
|
|
490
|
-
selector: string;
|
|
491
|
-
/**
|
|
492
|
-
* New status of the DKIM key pair.
|
|
493
|
-
* - `revoked`: Indicates that the key is compromised and should not be used.
|
|
494
|
-
* - `retired`: Indicates that the key has been rotated and is no longer in use.
|
|
495
|
-
* - `rotated`: Indicates that the key is going through the rotation process. Only active key pairs can be updated to this status, and no new key pair is created. The rotated key can be used to sign emails for 3 days after the status update, and will automatically change to `retired` 2 weeks after update. For a smooth key transition, it is recommended to create and publish a new key pair before signing is disabled for the rotated key.
|
|
496
|
-
*/
|
|
497
|
-
status: Exclude<EmailsDkimKey["status"], "active">;
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
interface EmailsRotateDkimKeyOptions {
|
|
501
|
-
newKey: {
|
|
502
484
|
/**
|
|
503
|
-
* Selector
|
|
485
|
+
* Selector of the DKIM key pair to update. Must be a maximum of 63 characters.
|
|
504
486
|
*/
|
|
505
487
|
selector: string;
|
|
506
|
-
|
|
488
|
+
/**
|
|
489
|
+
* New status of the DKIM key pair.
|
|
490
|
+
* - `revoked`: Indicates that the key is compromised and should not be used.
|
|
491
|
+
* - `retired`: Indicates that the key has been rotated and is no longer in use.
|
|
492
|
+
* - `rotated`: Indicates that the key is going through the rotation process. Only active key pairs can be updated to this status, and no new key pair is created. The rotated key can be used to sign emails for 3 days after the status update, and will automatically change to `retired` 2 weeks after update. For a smooth key transition, it is recommended to create and publish a new key pair before signing is disabled for the rotated key.
|
|
493
|
+
*/
|
|
494
|
+
status: Exclude<EmailsDkimKey["status"], "active">;
|
|
507
495
|
}
|
|
508
496
|
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
497
|
+
interface EmailsRotateDkimKeyOptions {
|
|
498
|
+
newKey: {
|
|
499
|
+
/**
|
|
500
|
+
* Selector for the new key pair. Must be a maximum of 63 characters.
|
|
501
|
+
*/
|
|
502
|
+
selector: string;
|
|
503
|
+
};
|
|
504
|
+
}
|
|
505
|
+
type EmailsRotateDkimKeyResponse = DataResponse<{
|
|
506
|
+
new: EmailsDkimKey;
|
|
507
|
+
rotated: EmailsDkimKey;
|
|
512
508
|
}>;
|
|
513
509
|
|
|
514
510
|
declare class Emails {
|
|
@@ -626,43 +622,43 @@ declare class Emails {
|
|
|
626
622
|
rotateDkimKey(domain: string, selector: string, options: EmailsRotateDkimKeyOptions): Promise<EmailsRotateDkimKeyResponse>;
|
|
627
623
|
}
|
|
628
624
|
|
|
629
|
-
type WebhooksListResponse = DataResponse
|
|
625
|
+
type WebhooksListResponse = DataResponse<string[]>;
|
|
630
626
|
|
|
631
|
-
type WebhooksSigningKeyResponse = DataResponse
|
|
632
|
-
|
|
627
|
+
type WebhooksSigningKeyResponse = DataResponse<{
|
|
628
|
+
key: string;
|
|
633
629
|
}>;
|
|
634
630
|
|
|
635
|
-
type WebhooksValidateResponse = DataResponse
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
631
|
+
type WebhooksValidateResponse = DataResponse<{
|
|
632
|
+
/**
|
|
633
|
+
* Indicates whether all webhook validations passed.
|
|
634
|
+
*/
|
|
635
|
+
allPassed: boolean;
|
|
636
|
+
/**
|
|
637
|
+
* Detailed results for each tested webhook, including whether it returned a 2xx status code, along with its response status code and body.
|
|
638
|
+
*/
|
|
639
|
+
results: {
|
|
640
|
+
/**
|
|
641
|
+
* Indicates whether the webhook responded with a 2xx HTTP status code.
|
|
642
|
+
*/
|
|
643
|
+
result: "passed" | "failed";
|
|
644
|
+
/**
|
|
645
|
+
* The webhook that was validated.
|
|
646
|
+
*/
|
|
647
|
+
webhook: string;
|
|
648
|
+
/**
|
|
649
|
+
* The HTTP response returned by the webhook, including status code and response body. A null value indicates no response was received. Possible reasons include timeouts, connection failures, or other network-related issues.
|
|
650
|
+
*/
|
|
651
|
+
response: {
|
|
652
|
+
/**
|
|
653
|
+
* Response body from webhook. Returns an error if unprocessable or too large.
|
|
654
|
+
*/
|
|
655
|
+
body?: string;
|
|
656
|
+
/**
|
|
657
|
+
* HTTP status code returned by the webhook.
|
|
658
|
+
*/
|
|
659
|
+
status: number;
|
|
660
|
+
} | null;
|
|
661
|
+
}[];
|
|
666
662
|
}>;
|
|
667
663
|
|
|
668
664
|
declare class Webhooks {
|
|
@@ -719,108 +715,99 @@ declare class Webhooks {
|
|
|
719
715
|
}
|
|
720
716
|
|
|
721
717
|
interface SubAccountsAccount {
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
718
|
+
/**
|
|
719
|
+
* The name of the company associated with the sub-account.
|
|
720
|
+
*/
|
|
721
|
+
companyName: string;
|
|
722
|
+
/**
|
|
723
|
+
* If the sub-account is enabled.
|
|
724
|
+
*/
|
|
725
|
+
enabled: boolean;
|
|
726
|
+
/**
|
|
727
|
+
* The handle for the sub-account.
|
|
728
|
+
*/
|
|
729
|
+
handle: string;
|
|
734
730
|
}
|
|
735
|
-
|
|
736
|
-
type SubAccountsCreateResponse = DataResponse$1<SubAccountsAccount>;
|
|
731
|
+
type SubAccountsCreateResponse = DataResponse<SubAccountsAccount>;
|
|
737
732
|
|
|
738
733
|
interface SubAccountsListOptions {
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
734
|
+
/**
|
|
735
|
+
* Possible values are `1` to `1000`.
|
|
736
|
+
* @default 1000
|
|
737
|
+
*/
|
|
738
|
+
limit?: number;
|
|
739
|
+
/**
|
|
740
|
+
* The offset for pagination.
|
|
741
|
+
* @default 0
|
|
742
|
+
*/
|
|
743
|
+
offset?: number;
|
|
749
744
|
}
|
|
750
|
-
|
|
751
|
-
type SubAccountsListResponse = DataResponse$1<SubAccountsAccount[]>;
|
|
745
|
+
type SubAccountsListResponse = DataResponse<SubAccountsAccount[]>;
|
|
752
746
|
|
|
753
747
|
interface SubAccountsApiKey {
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
748
|
+
/**
|
|
749
|
+
* The API key ID for the sub-account.
|
|
750
|
+
*/
|
|
751
|
+
id: number;
|
|
752
|
+
/**
|
|
753
|
+
* API key for the sub-account.
|
|
754
|
+
*/
|
|
755
|
+
value: string;
|
|
762
756
|
}
|
|
763
|
-
|
|
764
|
-
type SubAccountsCreateApiKeyResponse = DataResponse$1<SubAccountsApiKey>;
|
|
765
|
-
|
|
757
|
+
type SubAccountsCreateApiKeyResponse = DataResponse<SubAccountsApiKey>;
|
|
766
758
|
interface SubAccountsListApiKeyOptions {
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
759
|
+
/**
|
|
760
|
+
* The maximum number of API keys included in the response. Possible values are `1` to `1000`.
|
|
761
|
+
* @default 100
|
|
762
|
+
*/
|
|
763
|
+
limit?: number;
|
|
764
|
+
/**
|
|
765
|
+
* Offset into the list of API keys to return.
|
|
766
|
+
* @default 0
|
|
767
|
+
*/
|
|
768
|
+
offset?: number;
|
|
777
769
|
}
|
|
778
|
-
|
|
779
|
-
type SubAccountsListApiKeyResponse = DataResponse$1<SubAccountsApiKey[]>;
|
|
770
|
+
type SubAccountsListApiKeyResponse = DataResponse<SubAccountsApiKey[]>;
|
|
780
771
|
|
|
781
772
|
interface SubAccountsSmtpPassword {
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
773
|
+
/**
|
|
774
|
+
* Whether the SMTP password is enabled.
|
|
775
|
+
*/
|
|
776
|
+
enabled: boolean;
|
|
777
|
+
/**
|
|
778
|
+
* The SMTP password ID for the sub-account.
|
|
779
|
+
*/
|
|
780
|
+
id: number;
|
|
781
|
+
/**
|
|
782
|
+
* SMTP password for the sub-account.
|
|
783
|
+
*/
|
|
784
|
+
value: string;
|
|
794
785
|
}
|
|
795
|
-
|
|
796
|
-
type
|
|
797
|
-
|
|
798
|
-
type SubAccountsListSmtpPasswordResponse = DataResponse$1<SubAccountsSmtpPassword[]>;
|
|
786
|
+
type SubAccountsCreateSmtpPasswordResponse = DataResponse<SubAccountsSmtpPassword>;
|
|
787
|
+
type SubAccountsListSmtpPasswordResponse = DataResponse<SubAccountsSmtpPassword[]>;
|
|
799
788
|
|
|
800
789
|
interface SubAccountsLimit {
|
|
801
|
-
|
|
790
|
+
sends: number;
|
|
802
791
|
}
|
|
803
|
-
|
|
804
|
-
type SubAccountsLimitResponse = DataResponse$1<SubAccountsLimit>;
|
|
792
|
+
type SubAccountsLimitResponse = DataResponse<SubAccountsLimit>;
|
|
805
793
|
|
|
806
794
|
interface SubAccountsUsage {
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
795
|
+
/**
|
|
796
|
+
* The end date of the current billing period (ISO 8601 format).
|
|
797
|
+
* @example "2025-04-11"
|
|
798
|
+
*/
|
|
799
|
+
endDate?: string;
|
|
800
|
+
/**
|
|
801
|
+
* The start date of the current billing period (ISO 8601 format).
|
|
802
|
+
* @example "2025-03-12"
|
|
803
|
+
*/
|
|
804
|
+
startDate?: string;
|
|
805
|
+
/**
|
|
806
|
+
* The total usage for the current billing period.
|
|
807
|
+
*/
|
|
808
|
+
total: number;
|
|
821
809
|
}
|
|
822
|
-
|
|
823
|
-
type SubAccountsUsageResponse = DataResponse$1<SubAccountsUsage>;
|
|
810
|
+
type SubAccountsUsageResponse = DataResponse<SubAccountsUsage>;
|
|
824
811
|
|
|
825
812
|
declare class SubAccounts {
|
|
826
813
|
protected mailchannels: MailChannelsClient;
|
|
@@ -984,220 +971,212 @@ declare class SubAccounts {
|
|
|
984
971
|
}
|
|
985
972
|
|
|
986
973
|
interface MetricsEngagement {
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
974
|
+
/**
|
|
975
|
+
* A series of metrics aggregations bucketed by time interval (e.g. hour, day).
|
|
976
|
+
*/
|
|
977
|
+
buckets: {
|
|
978
|
+
click: MetricsBucket[];
|
|
979
|
+
clickTrackingDelivered: MetricsBucket[];
|
|
980
|
+
open: MetricsBucket[];
|
|
981
|
+
openTrackingDelivered: MetricsBucket[];
|
|
982
|
+
};
|
|
983
|
+
click: number;
|
|
984
|
+
clickTrackingDelivered: number;
|
|
985
|
+
endTime: string;
|
|
986
|
+
open: number;
|
|
987
|
+
openTrackingDelivered: number;
|
|
988
|
+
startTime: string;
|
|
1002
989
|
}
|
|
1003
|
-
|
|
1004
|
-
type MetricsEngagementResponse = DataResponse$1<MetricsEngagement>;
|
|
990
|
+
type MetricsEngagementResponse = DataResponse<MetricsEngagement>;
|
|
1005
991
|
|
|
1006
992
|
interface MetricsPerformance {
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
993
|
+
/**
|
|
994
|
+
* Count of messages bounced during the specified time range.
|
|
995
|
+
*/
|
|
996
|
+
bounced: number;
|
|
997
|
+
/**
|
|
998
|
+
* A series of metrics aggregations bucketed by time interval (e.g. hour, day).
|
|
999
|
+
*/
|
|
1000
|
+
buckets: {
|
|
1001
|
+
bounced: MetricsBucket[];
|
|
1002
|
+
delivered: MetricsBucket[];
|
|
1003
|
+
processed: MetricsBucket[];
|
|
1004
|
+
};
|
|
1005
|
+
/**
|
|
1006
|
+
* Count of messages delivered during the specified time range.
|
|
1007
|
+
*/
|
|
1008
|
+
delivered: number;
|
|
1009
|
+
/**
|
|
1010
|
+
* The end of the time range for retrieving message performance metrics (exclusive).
|
|
1011
|
+
*/
|
|
1012
|
+
endTime: string;
|
|
1013
|
+
/**
|
|
1014
|
+
* Count of messages processed during the specified time range.
|
|
1015
|
+
*/
|
|
1016
|
+
processed: number;
|
|
1017
|
+
/**
|
|
1018
|
+
* The beginning of the time range for retrieving message performance metrics (inclusive).
|
|
1019
|
+
*/
|
|
1020
|
+
startTime: string;
|
|
1035
1021
|
}
|
|
1036
|
-
|
|
1037
|
-
type MetricsPerformanceResponse = DataResponse$1<MetricsPerformance>;
|
|
1022
|
+
type MetricsPerformanceResponse = DataResponse<MetricsPerformance>;
|
|
1038
1023
|
|
|
1039
1024
|
interface MetricsRecipientBehaviour {
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1025
|
+
/**
|
|
1026
|
+
* A series of metrics aggregations bucketed by time interval (e.g. hour, day).
|
|
1027
|
+
*/
|
|
1028
|
+
buckets: {
|
|
1029
|
+
unsubscribeDelivered: MetricsBucket[];
|
|
1030
|
+
unsubscribed: MetricsBucket[];
|
|
1031
|
+
};
|
|
1032
|
+
/**
|
|
1033
|
+
* The end of the time range for retrieving recipient behaviour metrics (exclusive).
|
|
1034
|
+
*/
|
|
1035
|
+
endTime: string;
|
|
1036
|
+
/**
|
|
1037
|
+
* The beginning of the time range for retrieving recipient behaviour metrics (inclusive).
|
|
1038
|
+
*/
|
|
1039
|
+
startTime: string;
|
|
1040
|
+
/**
|
|
1041
|
+
* Count of recipients of delivered messages that include at least one of the unsubscribe link or unsubscribe headers. Since the unsubscribe feature requires exactly one recipient per message, this count also represents the total number of delivered messages.
|
|
1042
|
+
*/
|
|
1043
|
+
unsubscribeDelivered: number;
|
|
1044
|
+
/**
|
|
1045
|
+
* Count of unsubscribed events by recipients.
|
|
1046
|
+
*/
|
|
1047
|
+
unsubscribed: number;
|
|
1063
1048
|
}
|
|
1064
|
-
|
|
1065
|
-
type MetricsRecipientBehaviourResponse = DataResponse$1<MetricsRecipientBehaviour>;
|
|
1049
|
+
type MetricsRecipientBehaviourResponse = DataResponse<MetricsRecipientBehaviour>;
|
|
1066
1050
|
|
|
1067
1051
|
interface MetricsVolume {
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1052
|
+
/**
|
|
1053
|
+
* A series of metrics aggregations bucketed by time interval (e.g. hour, day).
|
|
1054
|
+
*/
|
|
1055
|
+
buckets: {
|
|
1056
|
+
delivered: MetricsBucket[];
|
|
1057
|
+
dropped: MetricsBucket[];
|
|
1058
|
+
processed: MetricsBucket[];
|
|
1059
|
+
};
|
|
1060
|
+
/**
|
|
1061
|
+
* Count of messages delivered during the specified time range.
|
|
1062
|
+
*/
|
|
1063
|
+
delivered: number;
|
|
1064
|
+
/**
|
|
1065
|
+
* Count of messages dropped during the specified time range.
|
|
1066
|
+
*/
|
|
1067
|
+
dropped: number;
|
|
1068
|
+
/**
|
|
1069
|
+
* The end of the time range for retrieving message volume metrics (exclusive).
|
|
1070
|
+
*/
|
|
1071
|
+
endTime: string;
|
|
1072
|
+
/**
|
|
1073
|
+
* Count of messages processed during the specified time range.
|
|
1074
|
+
*/
|
|
1075
|
+
processed: number;
|
|
1076
|
+
/**
|
|
1077
|
+
* The beginning of the time range for retrieving message volume metrics (inclusive).
|
|
1078
|
+
*/
|
|
1079
|
+
startTime: string;
|
|
1096
1080
|
}
|
|
1081
|
+
type MetricsVolumeResponse = DataResponse<MetricsVolume>;
|
|
1097
1082
|
|
|
1098
|
-
type
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
*/
|
|
1114
|
-
total: number;
|
|
1083
|
+
type MetricsUsageResponse = DataResponse<{
|
|
1084
|
+
/**
|
|
1085
|
+
* The end date of the current billing period (ISO 8601 format).
|
|
1086
|
+
* @example "2025-04-11"
|
|
1087
|
+
*/
|
|
1088
|
+
endDate: string;
|
|
1089
|
+
/**
|
|
1090
|
+
* The start date of the current billing period (ISO 8601 format).
|
|
1091
|
+
* @example "2025-03-12"
|
|
1092
|
+
*/
|
|
1093
|
+
startDate: string;
|
|
1094
|
+
/**
|
|
1095
|
+
* The total usage for the current billing period.
|
|
1096
|
+
*/
|
|
1097
|
+
total: number;
|
|
1115
1098
|
}>;
|
|
1116
1099
|
|
|
1117
1100
|
type MetricsSendersType = "sub-accounts" | "campaigns";
|
|
1118
|
-
|
|
1119
1101
|
interface MetricsSendersOptions {
|
|
1120
|
-
/**
|
|
1121
|
-
* The beginning of the time range for retrieving top senders metrics (inclusive). Formats: `YYYY-MM-DD` or `YYYY-MM-DDTHH:MM:SSZ`. Defaults to one month ago if not provided.
|
|
1122
|
-
* @example "2025-11-02T03:13:35.761763554Z"
|
|
1123
|
-
*/
|
|
1124
|
-
startTime?: string;
|
|
1125
|
-
/**
|
|
1126
|
-
* The end of the time range for retrieving top senders metrics (exclusive). Formats: `YYYY-MM-DD` or `YYYY-MM-DDTHH:MM:SSZ`. Defaults to the current time if not provided.
|
|
1127
|
-
* @example "2025-12-02T03:13:35.761763554Z"
|
|
1128
|
-
*/
|
|
1129
|
-
endTime?: string;
|
|
1130
|
-
/**
|
|
1131
|
-
* The maximum number of senders to return. Possible values are 1 to 1000.
|
|
1132
|
-
* @default 10
|
|
1133
|
-
*/
|
|
1134
|
-
limit?: number;
|
|
1135
|
-
/**
|
|
1136
|
-
* The number of senders to skip before returning results.
|
|
1137
|
-
* @default 0
|
|
1138
|
-
*/
|
|
1139
|
-
offset?: number;
|
|
1140
|
-
/**
|
|
1141
|
-
* The order in which to sort the results, based on total messages (processed + dropped).
|
|
1142
|
-
* @default "desc"
|
|
1143
|
-
*/
|
|
1144
|
-
sortOrder?: "asc" | "desc";
|
|
1145
|
-
}
|
|
1146
|
-
|
|
1147
|
-
interface MetricsSenders {
|
|
1148
|
-
endTime: string;
|
|
1149
|
-
limit: number;
|
|
1150
|
-
offset: number;
|
|
1151
|
-
senders: {
|
|
1152
|
-
bounced: number;
|
|
1153
|
-
delivered: number;
|
|
1154
|
-
dropped: number;
|
|
1155
1102
|
/**
|
|
1156
|
-
*
|
|
1103
|
+
* The beginning of the time range for retrieving top senders metrics (inclusive). Formats: `YYYY-MM-DD` or `YYYY-MM-DDTHH:MM:SSZ`. Defaults to one month ago if not provided.
|
|
1104
|
+
* @example "2025-11-02T03:13:35.761763554Z"
|
|
1157
1105
|
*/
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1106
|
+
startTime?: string;
|
|
1107
|
+
/**
|
|
1108
|
+
* The end of the time range for retrieving top senders metrics (exclusive). Formats: `YYYY-MM-DD` or `YYYY-MM-DDTHH:MM:SSZ`. Defaults to the current time if not provided.
|
|
1109
|
+
* @example "2025-12-02T03:13:35.761763554Z"
|
|
1110
|
+
*/
|
|
1111
|
+
endTime?: string;
|
|
1112
|
+
/**
|
|
1113
|
+
* The maximum number of senders to return. Possible values are 1 to 1000.
|
|
1114
|
+
* @default 10
|
|
1115
|
+
*/
|
|
1116
|
+
limit?: number;
|
|
1117
|
+
/**
|
|
1118
|
+
* The number of senders to skip before returning results.
|
|
1119
|
+
* @default 0
|
|
1120
|
+
*/
|
|
1121
|
+
offset?: number;
|
|
1122
|
+
/**
|
|
1123
|
+
* The order in which to sort the results, based on total messages (processed + dropped).
|
|
1124
|
+
* @default "desc"
|
|
1125
|
+
*/
|
|
1126
|
+
sortOrder?: "asc" | "desc";
|
|
1166
1127
|
}
|
|
1167
|
-
|
|
1168
|
-
|
|
1128
|
+
interface MetricsSenders {
|
|
1129
|
+
endTime: string;
|
|
1130
|
+
limit: number;
|
|
1131
|
+
offset: number;
|
|
1132
|
+
senders: {
|
|
1133
|
+
bounced: number;
|
|
1134
|
+
delivered: number;
|
|
1135
|
+
dropped: number;
|
|
1136
|
+
/**
|
|
1137
|
+
* Maximum character length: 255
|
|
1138
|
+
*/
|
|
1139
|
+
name: string;
|
|
1140
|
+
processed: number;
|
|
1141
|
+
}[];
|
|
1142
|
+
startTime: string;
|
|
1143
|
+
/**
|
|
1144
|
+
* The total number of senders in this category that sent messages in the given time range.
|
|
1145
|
+
*/
|
|
1146
|
+
total: number;
|
|
1147
|
+
}
|
|
1148
|
+
type MetricsSendersResponse = DataResponse<MetricsSenders>;
|
|
1169
1149
|
|
|
1170
1150
|
interface MetricsBucket {
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1151
|
+
/**
|
|
1152
|
+
* The number of events or occurrences aggregated within this time period.
|
|
1153
|
+
*/
|
|
1154
|
+
count: number;
|
|
1155
|
+
/**
|
|
1156
|
+
* The starting date and time of the time period this bucket represents.
|
|
1157
|
+
*/
|
|
1158
|
+
periodStart: string;
|
|
1179
1159
|
}
|
|
1180
|
-
|
|
1181
1160
|
interface MetricsOptions {
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1161
|
+
/**
|
|
1162
|
+
* The beginning of the time range for retrieving message metrics (inclusive). Formats: `YYYY-MM-DD` or `YYYY-MM-DDTHH:MM:SSZ`. Defaults to one month ago if not provided.
|
|
1163
|
+
* @example "2025-05-26"
|
|
1164
|
+
*/
|
|
1165
|
+
startTime?: string;
|
|
1166
|
+
/**
|
|
1167
|
+
* The end of the time range for retrieving message metrics (exclusive). Formats: `YYYY-MM-DD` or `YYYY-MM-DDTHH:MM:SSZ`. Defaults to the current time if not provided.
|
|
1168
|
+
* @example "2025-05-31T15:16:17Z"
|
|
1169
|
+
*/
|
|
1170
|
+
endTime?: string;
|
|
1171
|
+
/**
|
|
1172
|
+
* The ID of the campaign to filter metrics by. If not provided, metrics for all campaigns will be returned.
|
|
1173
|
+
*/
|
|
1174
|
+
campaignId?: string;
|
|
1175
|
+
/**
|
|
1176
|
+
* The interval for aggregating metrics data.
|
|
1177
|
+
* @default "day"
|
|
1178
|
+
*/
|
|
1179
|
+
interval?: "hour" | "day" | "week" | "month";
|
|
1201
1180
|
}
|
|
1202
1181
|
|
|
1203
1182
|
declare class Metrics {
|
|
@@ -1266,77 +1245,73 @@ declare class Metrics {
|
|
|
1266
1245
|
}
|
|
1267
1246
|
|
|
1268
1247
|
type SuppressionsTypes = "transactional" | "non-transactional";
|
|
1269
|
-
|
|
1270
1248
|
interface SuppressionsCreateOptions {
|
|
1271
|
-
/**
|
|
1272
|
-
* If true, the parent account creates suppression entries for all associated sub-accounts. This field is only applicable to parent accounts. Sub-accounts cannot create entries for other sub-accounts.
|
|
1273
|
-
* @default false
|
|
1274
|
-
*/
|
|
1275
|
-
addToSubAccounts?: boolean;
|
|
1276
|
-
/**
|
|
1277
|
-
* The total number of suppression entries to create, for the parent and/or its sub-accounts, must not exceed `1000`.
|
|
1278
|
-
*/
|
|
1279
|
-
entries: {
|
|
1280
|
-
/**
|
|
1281
|
-
* Must be less than `1024` characters.
|
|
1282
|
-
*/
|
|
1283
|
-
notes?: string;
|
|
1284
1249
|
/**
|
|
1285
|
-
*
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
*
|
|
1291
|
-
*/
|
|
1292
|
-
|
|
1293
|
-
|
|
1250
|
+
* If true, the parent account creates suppression entries for all associated sub-accounts. This field is only applicable to parent accounts. Sub-accounts cannot create entries for other sub-accounts.
|
|
1251
|
+
* @default false
|
|
1252
|
+
*/
|
|
1253
|
+
addToSubAccounts?: boolean;
|
|
1254
|
+
/**
|
|
1255
|
+
* The total number of suppression entries to create, for the parent and/or its sub-accounts, must not exceed `1000`.
|
|
1256
|
+
*/
|
|
1257
|
+
entries: {
|
|
1258
|
+
/**
|
|
1259
|
+
* Must be less than `1024` characters.
|
|
1260
|
+
*/
|
|
1261
|
+
notes?: string;
|
|
1262
|
+
/**
|
|
1263
|
+
* The email address to suppress. Must be a valid email address format and less than `255` characters.
|
|
1264
|
+
*/
|
|
1265
|
+
recipient: string;
|
|
1266
|
+
/**
|
|
1267
|
+
* An array of types of suppression to apply to the recipient.
|
|
1268
|
+
* @default ["non-transactional"]
|
|
1269
|
+
*/
|
|
1270
|
+
types?: SuppressionsTypes[];
|
|
1271
|
+
}[];
|
|
1294
1272
|
}
|
|
1295
1273
|
|
|
1296
1274
|
type SuppressionsSource = "api" | "unsubscribe_link" | "list_unsubscribe" | "hard_bounce" | "spam_complaint" | "all";
|
|
1297
|
-
|
|
1298
1275
|
interface SuppressionsListOptions {
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1276
|
+
/**
|
|
1277
|
+
* The email address of the suppression entry to search for. If provided, the search will return the suppression entry associated with this recipient. If not provided, the search will return all suppression entries for the account.
|
|
1278
|
+
*/
|
|
1279
|
+
recipient?: string;
|
|
1280
|
+
/**
|
|
1281
|
+
* The source of the suppression entries to filter by. If not provided, suppression entries from all sources will be returned.
|
|
1282
|
+
*/
|
|
1283
|
+
source?: Exclude<SuppressionsSource, "all">;
|
|
1284
|
+
/**
|
|
1285
|
+
* The date and/or time before which the suppression entries were created. Format: `YYYY-MM-DD` or `YYYY-MM-DDTHH:MM:SSZ`.
|
|
1286
|
+
*/
|
|
1287
|
+
createdBefore?: string;
|
|
1288
|
+
/**
|
|
1289
|
+
* The date and/or time after which the suppression entries were created. Format: `YYYY-MM-DD` or `YYYY-MM-DDTHH:MM:SSZ`.
|
|
1290
|
+
*/
|
|
1291
|
+
createdAfter?: string;
|
|
1292
|
+
/**
|
|
1293
|
+
* The maximum number of suppression entries to return. Must be between `1` and `1000`.
|
|
1294
|
+
* @default 1000
|
|
1295
|
+
*/
|
|
1296
|
+
limit?: number;
|
|
1297
|
+
/**
|
|
1298
|
+
* The number of suppression entries to skip before returning results.
|
|
1299
|
+
* @default 0
|
|
1300
|
+
*/
|
|
1301
|
+
offset?: number;
|
|
1325
1302
|
}
|
|
1326
|
-
|
|
1327
1303
|
interface SuppressionsListEntry {
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1304
|
+
createdAt: string;
|
|
1305
|
+
notes?: string;
|
|
1306
|
+
/**
|
|
1307
|
+
* The email address that is suppressed.
|
|
1308
|
+
*/
|
|
1309
|
+
recipient: string;
|
|
1310
|
+
sender?: string;
|
|
1311
|
+
source: SuppressionsSource;
|
|
1312
|
+
types: SuppressionsTypes[];
|
|
1337
1313
|
}
|
|
1338
|
-
|
|
1339
|
-
type SuppressionsListResponse = DataResponse$1<SuppressionsListEntry[]>;
|
|
1314
|
+
type SuppressionsListResponse = DataResponse<SuppressionsListEntry[]>;
|
|
1340
1315
|
|
|
1341
1316
|
declare class Suppressions {
|
|
1342
1317
|
protected mailchannels: MailChannelsClient;
|
|
@@ -1376,222 +1351,208 @@ declare class Suppressions {
|
|
|
1376
1351
|
}
|
|
1377
1352
|
|
|
1378
1353
|
type ListNames = "blocklist" | "safelist" | "blacklist" | "whitelist";
|
|
1379
|
-
|
|
1380
1354
|
interface ListEntryOptions {
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1355
|
+
/**
|
|
1356
|
+
* This can be a `blocklist`, `safelist`, `blacklist`, or `whitelist`.
|
|
1357
|
+
*/
|
|
1358
|
+
listName: ListNames;
|
|
1359
|
+
/**
|
|
1360
|
+
* This can be a domain, email address, or IP address. The type of the entry is automatically determined based on the value.
|
|
1361
|
+
*/
|
|
1362
|
+
item: string;
|
|
1389
1363
|
}
|
|
1390
|
-
|
|
1391
1364
|
interface ListEntry {
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1365
|
+
action: Extract<ListNames, "blocklist" | "safelist">;
|
|
1366
|
+
item: string;
|
|
1367
|
+
type: "domain" | "email_address" | "ip_address";
|
|
1395
1368
|
}
|
|
1396
|
-
|
|
1397
|
-
type
|
|
1398
|
-
|
|
1399
|
-
type ListEntriesResponse = DataResponse$1<ListEntry[]>;
|
|
1369
|
+
type ListEntryResponse = DataResponse<ListEntry>;
|
|
1370
|
+
type ListEntriesResponse = DataResponse<ListEntry[]>;
|
|
1400
1371
|
|
|
1401
1372
|
interface DomainsData {
|
|
1402
|
-
/**
|
|
1403
|
-
* The domain name.
|
|
1404
|
-
*/
|
|
1405
|
-
domain: string;
|
|
1406
|
-
/**
|
|
1407
|
-
* The abuse policy settings for the domain. These settings determine how spam messages are handled.
|
|
1408
|
-
*/
|
|
1409
|
-
settings?: Partial<{
|
|
1410
1373
|
/**
|
|
1411
|
-
* The
|
|
1374
|
+
* The domain name.
|
|
1412
1375
|
*/
|
|
1413
|
-
|
|
1414
|
-
/**
|
|
1415
|
-
* If `true`, this abuse policy overrides the recipient abuse policy.
|
|
1416
|
-
*/
|
|
1417
|
-
abusePolicyOverride: boolean;
|
|
1376
|
+
domain: string;
|
|
1418
1377
|
/**
|
|
1419
|
-
* The
|
|
1420
|
-
*/
|
|
1421
|
-
|
|
1378
|
+
* The abuse policy settings for the domain. These settings determine how spam messages are handled.
|
|
1379
|
+
*/
|
|
1380
|
+
settings?: Partial<{
|
|
1381
|
+
/**
|
|
1382
|
+
* The abuse policy.
|
|
1383
|
+
*/
|
|
1384
|
+
abusePolicy: "block" | "flag" | "quarantine";
|
|
1385
|
+
/**
|
|
1386
|
+
* If `true`, this abuse policy overrides the recipient abuse policy.
|
|
1387
|
+
*/
|
|
1388
|
+
abusePolicyOverride: boolean;
|
|
1389
|
+
/**
|
|
1390
|
+
* The spam header name to use if the abuse policy is set to `flag`.
|
|
1391
|
+
*/
|
|
1392
|
+
spamHeaderName: string;
|
|
1393
|
+
/**
|
|
1394
|
+
* The spam header value to use if the abuse policy is set to `flag`.
|
|
1395
|
+
*/
|
|
1396
|
+
spamHeaderValue: string;
|
|
1397
|
+
}>;
|
|
1398
|
+
/**
|
|
1399
|
+
* A list of email addresses that are the domain admins for the domain.
|
|
1400
|
+
*/
|
|
1401
|
+
admins?: string[] | null;
|
|
1402
|
+
/**
|
|
1403
|
+
* The locations of mail servers to which messages will be delivered after filtering.
|
|
1404
|
+
*/
|
|
1405
|
+
downstreamAddresses?: {
|
|
1406
|
+
/**
|
|
1407
|
+
* The priority of the downstream address. Only addresses with the highest priority (the lowest numerical value) are selected.
|
|
1408
|
+
*/
|
|
1409
|
+
priority: number;
|
|
1410
|
+
/**
|
|
1411
|
+
* Downstream addresses are selected in proportion to their weights. For example, if there are two downstream addresses, A with weight 40, and B with weight 10, then A is selected 80% of the time and B is selected 20% of the time.
|
|
1412
|
+
*/
|
|
1413
|
+
weight: number;
|
|
1414
|
+
/**
|
|
1415
|
+
* TCP port on which the downstream mail server is listening.
|
|
1416
|
+
*/
|
|
1417
|
+
port: number;
|
|
1418
|
+
/**
|
|
1419
|
+
* The canonical hostname of the host providing the service, ending in a dot.
|
|
1420
|
+
*/
|
|
1421
|
+
target: string;
|
|
1422
|
+
}[] | null;
|
|
1423
|
+
/**
|
|
1424
|
+
* A list of aliases for the domain. Mail is accepted for these domains and routed to the `downstreamAddresses` defined for the domain. Must be <= 255 characters.
|
|
1425
|
+
*/
|
|
1426
|
+
aliases?: string[] | null;
|
|
1427
|
+
/**
|
|
1428
|
+
* The subscription `handle` that identifies the subscription that this domain should be provisioned against. Subscription handles can be retrieved from the `subscriptions` service method.
|
|
1429
|
+
*/
|
|
1430
|
+
subscriptionHandle: string;
|
|
1431
|
+
}
|
|
1432
|
+
interface DomainsProvisionOptions extends DomainsData {
|
|
1422
1433
|
/**
|
|
1423
|
-
*
|
|
1434
|
+
* If present and set to true, the domain will be associated with the api-key that created it. This means that this api-key must be used for inbound-api actions involving this domain (for example adding safe/block list entries, etc).
|
|
1424
1435
|
*/
|
|
1425
|
-
|
|
1426
|
-
}>;
|
|
1427
|
-
/**
|
|
1428
|
-
* A list of email addresses that are the domain admins for the domain.
|
|
1429
|
-
*/
|
|
1430
|
-
admins?: string[] | null;
|
|
1431
|
-
/**
|
|
1432
|
-
* The locations of mail servers to which messages will be delivered after filtering.
|
|
1433
|
-
*/
|
|
1434
|
-
downstreamAddresses?: {
|
|
1436
|
+
associateKey?: boolean;
|
|
1435
1437
|
/**
|
|
1436
|
-
*
|
|
1438
|
+
* If present and set to true, the settings (domain settings, downstream addresses, aliases and admins) for the domain will be overwritten with the ones in the request if the domain already exists, unless a section is not included in the request or there is problem updating a setting in which case the previous settings are carried forward.
|
|
1437
1439
|
*/
|
|
1438
|
-
|
|
1440
|
+
overwrite?: boolean;
|
|
1441
|
+
}
|
|
1442
|
+
type DomainsBulkProvisionOptions = Pick<DomainsProvisionOptions, "subscriptionHandle" | "associateKey" | "overwrite">;
|
|
1443
|
+
type DomainsProvisionResponse = DataResponse<DomainsData>;
|
|
1444
|
+
type DomainsBulkProvisionResponse = DataResponse<{
|
|
1445
|
+
/**
|
|
1446
|
+
* Domains that were successfully provisioned or updated.
|
|
1447
|
+
*/
|
|
1448
|
+
successes: {
|
|
1449
|
+
/**
|
|
1450
|
+
* The provisioned domain data.
|
|
1451
|
+
*/
|
|
1452
|
+
domain: DomainsData;
|
|
1453
|
+
code: number;
|
|
1454
|
+
comment?: string;
|
|
1455
|
+
}[];
|
|
1456
|
+
/**
|
|
1457
|
+
* Domains that were not successfully provisioned.
|
|
1458
|
+
*/
|
|
1459
|
+
errors: {
|
|
1460
|
+
/**
|
|
1461
|
+
* The failed to provision domain data.
|
|
1462
|
+
*/
|
|
1463
|
+
domain: DomainsData;
|
|
1464
|
+
code: number;
|
|
1465
|
+
comment?: string;
|
|
1466
|
+
}[];
|
|
1467
|
+
}>;
|
|
1468
|
+
|
|
1469
|
+
interface DomainsListOptions {
|
|
1439
1470
|
/**
|
|
1440
|
-
*
|
|
1471
|
+
* A list of domains to fetch. If this parameter is present, only domains whose name matches an item in this list are returned.
|
|
1441
1472
|
*/
|
|
1442
|
-
|
|
1473
|
+
domains?: string[];
|
|
1443
1474
|
/**
|
|
1444
|
-
*
|
|
1475
|
+
* The maximum number of domains included in the response. Possible values are 1 to 5000.
|
|
1476
|
+
* @default 10
|
|
1445
1477
|
*/
|
|
1446
|
-
|
|
1478
|
+
limit?: number;
|
|
1447
1479
|
/**
|
|
1448
|
-
*
|
|
1480
|
+
* Offset into the list of domains to return.
|
|
1481
|
+
* @default 0
|
|
1449
1482
|
*/
|
|
1450
|
-
|
|
1451
|
-
}[] | null;
|
|
1452
|
-
/**
|
|
1453
|
-
* A list of aliases for the domain. Mail is accepted for these domains and routed to the `downstreamAddresses` defined for the domain. Must be <= 255 characters.
|
|
1454
|
-
*/
|
|
1455
|
-
aliases?: string[] | null;
|
|
1456
|
-
/**
|
|
1457
|
-
* The subscription `handle` that identifies the subscription that this domain should be provisioned against. Subscription handles can be retrieved from the `subscriptions` service method.
|
|
1458
|
-
*/
|
|
1459
|
-
subscriptionHandle: string;
|
|
1483
|
+
offset?: number;
|
|
1460
1484
|
}
|
|
1461
|
-
|
|
1462
|
-
interface DomainsProvisionOptions {
|
|
1463
|
-
/**
|
|
1464
|
-
* If present and set to true, the domain will be associated with the api-key that created it. This means that this api-key must be used for inbound-api actions involving this domain (for example adding safe/block list entries, etc).
|
|
1465
|
-
*/
|
|
1466
|
-
associateKey?: boolean;
|
|
1467
|
-
/**
|
|
1468
|
-
* If present and set to true, the settings (domain settings, downstream addresses, aliases and admins) for the domain will be overwritten with the ones in the request if the domain already exists, unless a section is not included in the request or there is problem updating a setting in which case the previous settings are carried forward.
|
|
1469
|
-
*/
|
|
1470
|
-
overwrite?: boolean;
|
|
1471
|
-
}
|
|
1472
|
-
|
|
1473
|
-
type DomainsBulkProvisionOptions = DomainsProvisionOptions & Pick<DomainsData, "subscriptionHandle">;
|
|
1474
|
-
|
|
1475
|
-
type DomainsProvisionResponse = DataResponse$1<DomainsData>;
|
|
1476
|
-
|
|
1477
|
-
type DomainsBulkProvisionResponse = DataResponse$1<{
|
|
1478
|
-
/**
|
|
1479
|
-
* Domains that were successfully provisioned or updated.
|
|
1480
|
-
*/
|
|
1481
|
-
successes: {
|
|
1485
|
+
type DomainsListResponse = DataResponse<{
|
|
1482
1486
|
/**
|
|
1483
|
-
*
|
|
1487
|
+
* A list of domains.
|
|
1484
1488
|
*/
|
|
1485
|
-
|
|
1486
|
-
code: number;
|
|
1487
|
-
comment?: string;
|
|
1488
|
-
}[];
|
|
1489
|
-
/**
|
|
1490
|
-
* Domains that were not successfully provisioned.
|
|
1491
|
-
*/
|
|
1492
|
-
errors: {
|
|
1489
|
+
domains: DomainsData[];
|
|
1493
1490
|
/**
|
|
1494
|
-
* The
|
|
1491
|
+
* The total number of domains that are accessible with the given API key that match the list of domains in the 'domains' parameter. If there is no 'domains' parameter, this field is the total number of domains that are accessible with with this API key. A domain is accessible with a given API key if it is associated with that API key, or if it is not associated with any API key.
|
|
1495
1492
|
*/
|
|
1496
|
-
|
|
1497
|
-
code: number;
|
|
1498
|
-
comment?: string;
|
|
1499
|
-
}[];
|
|
1500
|
-
}>;
|
|
1501
|
-
|
|
1502
|
-
interface DomainsListOptions {
|
|
1503
|
-
/**
|
|
1504
|
-
* A list of domains to fetch. If this parameter is present, only domains whose name matches an item in this list are returned.
|
|
1505
|
-
*/
|
|
1506
|
-
domains?: string[];
|
|
1507
|
-
/**
|
|
1508
|
-
* The maximum number of domains included in the response. Possible values are 1 to 5000.
|
|
1509
|
-
* @default 10
|
|
1510
|
-
*/
|
|
1511
|
-
limit?: number;
|
|
1512
|
-
/**
|
|
1513
|
-
* Offset into the list of domains to return.
|
|
1514
|
-
* @default 0
|
|
1515
|
-
*/
|
|
1516
|
-
offset?: number;
|
|
1517
|
-
}
|
|
1518
|
-
|
|
1519
|
-
type DomainsListResponse = DataResponse$1<{
|
|
1520
|
-
/**
|
|
1521
|
-
* A list of domains.
|
|
1522
|
-
*/
|
|
1523
|
-
domains: DomainsData[];
|
|
1524
|
-
/**
|
|
1525
|
-
* The total number of domains that are accessible with the given API key that match the list of domains in the 'domains' parameter. If there is no 'domains' parameter, this field is the total number of domains that are accessible with with this API key. A domain is accessible with a given API key if it is associated with that API key, or if it is not associated with any API key.
|
|
1526
|
-
*/
|
|
1527
|
-
total: number;
|
|
1493
|
+
total: number;
|
|
1528
1494
|
}>;
|
|
1529
1495
|
|
|
1530
1496
|
interface DomainsCreateLoginLink {
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1497
|
+
/**
|
|
1498
|
+
* If a user browses to this URL, they will be automatically logged in as a domain admin.
|
|
1499
|
+
*/
|
|
1500
|
+
link: string;
|
|
1535
1501
|
}
|
|
1536
|
-
|
|
1537
|
-
type DomainsCreateLoginLinkResponse = DataResponse$1<DomainsCreateLoginLink>;
|
|
1502
|
+
type DomainsCreateLoginLinkResponse = DataResponse<DomainsCreateLoginLink>;
|
|
1538
1503
|
|
|
1539
1504
|
interface DomainsListDownstreamAddressesOptions {
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1505
|
+
/**
|
|
1506
|
+
* The number of records to return.
|
|
1507
|
+
* @default 10
|
|
1508
|
+
*/
|
|
1509
|
+
limit?: number;
|
|
1510
|
+
/**
|
|
1511
|
+
* The offset into the records to return.
|
|
1512
|
+
* @default 0
|
|
1513
|
+
*/
|
|
1514
|
+
offset?: number;
|
|
1550
1515
|
}
|
|
1551
|
-
|
|
1552
1516
|
interface DomainsDownstreamAddress {
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1517
|
+
/**
|
|
1518
|
+
* TCP port on which the downstream mail server is listening.
|
|
1519
|
+
*/
|
|
1520
|
+
port: number;
|
|
1521
|
+
/**
|
|
1522
|
+
* The priority of the downstream address. Only addresses with the highest priority (the lowest numerical value) are selected.
|
|
1523
|
+
*/
|
|
1524
|
+
priority: number;
|
|
1525
|
+
/**
|
|
1526
|
+
* The canonical hostname of the host providing the service, ending in a dot.
|
|
1527
|
+
*/
|
|
1528
|
+
target: string;
|
|
1529
|
+
/**
|
|
1530
|
+
* Downstream addresses are selected in proportion to their weights. For example, if there are two downstream addresses, A with weight 40, and B with weight 10, then A is selected 80% of the time and B is selected 20% of the time.
|
|
1531
|
+
*/
|
|
1532
|
+
weight: number;
|
|
1569
1533
|
}
|
|
1570
|
-
|
|
1571
|
-
type DomainsListDownstreamAddressesResponse = DataResponse$1<DomainsDownstreamAddress[]>;
|
|
1534
|
+
type DomainsListDownstreamAddressesResponse = DataResponse<DomainsDownstreamAddress[]>;
|
|
1572
1535
|
|
|
1573
1536
|
interface DomainsBulkCreateLoginLinkResult {
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1537
|
+
/**
|
|
1538
|
+
* The domain the request was for.
|
|
1539
|
+
*/
|
|
1540
|
+
domain: string;
|
|
1541
|
+
code: 200 | 400 | 401 | 403 | 404 | 500;
|
|
1542
|
+
/**
|
|
1543
|
+
* More information about the result of creating the login link.
|
|
1544
|
+
*/
|
|
1545
|
+
comment?: string;
|
|
1546
|
+
/**
|
|
1547
|
+
* If a user browses to this URL, they will be automatically logged in as a domain admin.
|
|
1548
|
+
*/
|
|
1549
|
+
loginLink: string;
|
|
1587
1550
|
}
|
|
1588
|
-
|
|
1589
1551
|
interface DomainsBulkCreateLoginLinks {
|
|
1590
|
-
|
|
1591
|
-
|
|
1552
|
+
successes: DomainsBulkCreateLoginLinkResult[];
|
|
1553
|
+
errors: Omit<DomainsBulkCreateLoginLinkResult, "loginLink">[];
|
|
1592
1554
|
}
|
|
1593
|
-
|
|
1594
|
-
type DomainsBulkCreateLoginLinksResponse = DataResponse$1<DomainsBulkCreateLoginLinks>;
|
|
1555
|
+
type DomainsBulkCreateLoginLinksResponse = DataResponse<DomainsBulkCreateLoginLinks>;
|
|
1595
1556
|
|
|
1596
1557
|
declare class Domains {
|
|
1597
1558
|
protected mailchannels: MailChannelsClient;
|
|
@@ -1608,7 +1569,7 @@ declare class Domains {
|
|
|
1608
1569
|
* })
|
|
1609
1570
|
* ```
|
|
1610
1571
|
*/
|
|
1611
|
-
provision(options: DomainsProvisionOptions
|
|
1572
|
+
provision(options: DomainsProvisionOptions): Promise<DomainsProvisionResponse>;
|
|
1612
1573
|
/**
|
|
1613
1574
|
* Provision up to 1000 domains to use MailChannels Inbound.
|
|
1614
1575
|
* @param options - The options to provision the domains.
|
|
@@ -1793,37 +1754,36 @@ declare class Lists {
|
|
|
1793
1754
|
}
|
|
1794
1755
|
|
|
1795
1756
|
interface UsersCreateOptions {
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1757
|
+
/**
|
|
1758
|
+
* Flag to indicate if the user is a domain admin or a regular user.
|
|
1759
|
+
* @default false
|
|
1760
|
+
*/
|
|
1761
|
+
admin?: boolean;
|
|
1762
|
+
/**
|
|
1763
|
+
* Whether or not to filter mail for this recipient. There are three valid values.
|
|
1764
|
+
* - `false` - Filtering policy will be applied to messages intended for this recipient. If this would exceed the protected-addresses limit, return an error.
|
|
1765
|
+
* - `true` - Filtering policy will not be applied to messages intended for this recipient.
|
|
1766
|
+
* - `compute` - Filtering policy will be applied to messages intended for this recipient. If this would exceed the protected-addresses limit, filtering policy will not be applied, and no error will be returned.
|
|
1767
|
+
* @default 'compute'
|
|
1768
|
+
*/
|
|
1769
|
+
filter?: boolean | "compute";
|
|
1770
|
+
/**
|
|
1771
|
+
* safelist and blocklist entries to be added.
|
|
1772
|
+
*/
|
|
1773
|
+
listEntries?: {
|
|
1774
|
+
blocklist?: string[];
|
|
1775
|
+
safelist?: string[];
|
|
1776
|
+
};
|
|
1816
1777
|
}
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
}[];
|
|
1778
|
+
type UsersCreateResponse = DataResponse<{
|
|
1779
|
+
email: string;
|
|
1780
|
+
roles: string[];
|
|
1781
|
+
filter?: boolean;
|
|
1782
|
+
listEntries: {
|
|
1783
|
+
item: string;
|
|
1784
|
+
type: "domain" | "email_address" | "ip_address";
|
|
1785
|
+
action: "safelist" | "blocklist";
|
|
1786
|
+
}[];
|
|
1827
1787
|
}>;
|
|
1828
1788
|
|
|
1829
1789
|
declare class Users {
|
|
@@ -1883,43 +1843,43 @@ declare class Users {
|
|
|
1883
1843
|
deleteListEntry(email: string, options: ListEntryOptions): Promise<SuccessResponse>;
|
|
1884
1844
|
}
|
|
1885
1845
|
|
|
1886
|
-
type ServiceSubscriptionsResponse = DataResponse
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
handle: string;
|
|
1890
|
-
limits: {
|
|
1891
|
-
featureHandle: string;
|
|
1892
|
-
value: string;
|
|
1893
|
-
}[];
|
|
1894
|
-
plan: {
|
|
1846
|
+
type ServiceSubscriptionsResponse = DataResponse<{
|
|
1847
|
+
active: boolean;
|
|
1848
|
+
activeAccountsCount: number;
|
|
1895
1849
|
handle: string;
|
|
1896
|
-
|
|
1897
|
-
|
|
1850
|
+
limits: {
|
|
1851
|
+
featureHandle: string;
|
|
1852
|
+
value: string;
|
|
1853
|
+
}[];
|
|
1854
|
+
plan: {
|
|
1855
|
+
handle: string;
|
|
1856
|
+
name: string;
|
|
1857
|
+
};
|
|
1898
1858
|
}[]>;
|
|
1899
1859
|
|
|
1900
1860
|
interface ServiceReportOptions {
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1861
|
+
/**
|
|
1862
|
+
* The report type. It can be either `false_negative` or `false_positive`.
|
|
1863
|
+
*/
|
|
1864
|
+
type: "false_negative" | "false_positive";
|
|
1865
|
+
/**
|
|
1866
|
+
* The full, unaltered message content in accordance with the RFC 2822 specifications without dot stuffing.
|
|
1867
|
+
*/
|
|
1868
|
+
messageContent: string;
|
|
1869
|
+
/**
|
|
1870
|
+
* The SMTP envelope information.
|
|
1871
|
+
*/
|
|
1872
|
+
smtpEnvelopeInformation?: {
|
|
1873
|
+
ehlo: string;
|
|
1874
|
+
mailFrom: string;
|
|
1875
|
+
rcptTo: string;
|
|
1876
|
+
};
|
|
1877
|
+
/**
|
|
1878
|
+
* The sending host information.
|
|
1879
|
+
*/
|
|
1880
|
+
sendingHostInformation?: {
|
|
1881
|
+
name: string;
|
|
1882
|
+
};
|
|
1923
1883
|
}
|
|
1924
1884
|
|
|
1925
1885
|
declare class Service {
|
|
@@ -1971,4 +1931,4 @@ declare class MailChannels extends MailChannelsClient {
|
|
|
1971
1931
|
}
|
|
1972
1932
|
|
|
1973
1933
|
export { Domains, Emails, Lists, MailChannels, MailChannelsClient, Metrics, Service, SubAccounts, Suppressions, Users, Webhooks };
|
|
1974
|
-
export type { DataResponse
|
|
1934
|
+
export type { DataResponse, DomainsBulkCreateLoginLinks, DomainsBulkCreateLoginLinksResponse, DomainsBulkProvisionOptions, DomainsBulkProvisionResponse, DomainsCreateLoginLink, DomainsCreateLoginLinkResponse, DomainsData, DomainsDownstreamAddress, DomainsListDownstreamAddressesOptions, DomainsListDownstreamAddressesResponse, DomainsListOptions, DomainsListResponse, DomainsProvisionOptions, DomainsProvisionResponse, EmailsCheckDomainOptions, EmailsCheckDomainResponse, EmailsCheckDomainVerdict, EmailsCreateDkimKeyOptions, EmailsCreateDkimKeyResponse, EmailsDkimKey, EmailsDkimKeyStatus, EmailsGetDkimKeysOptions, EmailsGetDkimKeysResponse, EmailsRotateDkimKeyOptions, EmailsRotateDkimKeyResponse, EmailsSendAsyncResponse, EmailsSendAttachment, EmailsSendOptions, EmailsSendRecipient, EmailsSendResponse, EmailsSendTracking, EmailsUpdateDkimKeyOptions, ErrorResponse, ListEntriesResponse, ListEntry, ListEntryOptions, ListEntryResponse, ListNames, MetricsBucket, MetricsEngagement, MetricsEngagementResponse, MetricsOptions, MetricsPerformance, MetricsPerformanceResponse, MetricsRecipientBehaviour, MetricsRecipientBehaviourResponse, MetricsSenders, MetricsSendersOptions, MetricsSendersResponse, MetricsSendersType, MetricsUsageResponse, MetricsVolume, MetricsVolumeResponse, ServiceReportOptions, ServiceSubscriptionsResponse, SubAccountsAccount, SubAccountsApiKey, SubAccountsCreateApiKeyResponse, SubAccountsCreateResponse, SubAccountsCreateSmtpPasswordResponse, SubAccountsLimit, SubAccountsLimitResponse, SubAccountsListApiKeyOptions, SubAccountsListApiKeyResponse, SubAccountsListOptions, SubAccountsListResponse, SubAccountsListSmtpPasswordResponse, SubAccountsSmtpPassword, SubAccountsUsage, SubAccountsUsageResponse, SuccessResponse, SuppressionsCreateOptions, SuppressionsListEntry, SuppressionsListOptions, SuppressionsListResponse, SuppressionsSource, SuppressionsTypes, UsersCreateOptions, UsersCreateResponse, WebhooksListResponse, WebhooksSigningKeyResponse, WebhooksValidateResponse };
|