mailchannels-sdk 0.7.2 → 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 -1046
- package/dist/mailchannels.d.ts +991 -1046
- package/package.json +1 -1
package/dist/mailchannels.d.mts
CHANGED
|
@@ -13,231 +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
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
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;
|
|
237
232
|
}
|
|
238
|
-
|
|
239
|
-
type EmailsSendOptions = EmailsSendOptionsBase & (
|
|
240
|
-
| {
|
|
233
|
+
type EmailsSendOptions = EmailsSendOptionsBase & ({
|
|
241
234
|
/**
|
|
242
235
|
* The HTML content of the email.
|
|
243
236
|
* @example
|
|
@@ -250,8 +243,7 @@ type EmailsSendOptions = EmailsSendOptionsBase & (
|
|
|
250
243
|
* 'Hello World'
|
|
251
244
|
*/
|
|
252
245
|
text?: string;
|
|
253
|
-
|
|
254
|
-
| {
|
|
246
|
+
} | {
|
|
255
247
|
/**
|
|
256
248
|
* The HTML content of the email (optional when text is provided).
|
|
257
249
|
* @example
|
|
@@ -264,266 +256,255 @@ type EmailsSendOptions = EmailsSendOptionsBase & (
|
|
|
264
256
|
* 'Hello World'
|
|
265
257
|
*/
|
|
266
258
|
text: string;
|
|
267
|
-
|
|
268
|
-
|
|
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
|
+
}>;
|
|
269
288
|
|
|
270
|
-
type
|
|
271
|
-
/**
|
|
272
|
-
* Fully rendered message if `dryRun` was set to `true`. A string representation of a rendered message, one per personalization in the request.
|
|
273
|
-
*/
|
|
274
|
-
rendered?: string[];
|
|
275
|
-
/**
|
|
276
|
-
* 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.
|
|
277
|
-
*/
|
|
278
|
-
requestId?: string;
|
|
279
|
-
results?: {
|
|
289
|
+
type EmailsSendAsyncResponse = DataResponse<{
|
|
280
290
|
/**
|
|
281
|
-
*
|
|
291
|
+
* ISO 8601 timestamp when the request was queued for processing.
|
|
282
292
|
*/
|
|
283
|
-
|
|
293
|
+
queuedAt: string;
|
|
284
294
|
/**
|
|
285
|
-
*
|
|
295
|
+
* Unique identifier for tracking this async request. Will be included in all webhook events for this request.
|
|
286
296
|
*/
|
|
287
|
-
|
|
297
|
+
requestId: string;
|
|
298
|
+
}>;
|
|
299
|
+
|
|
300
|
+
interface EmailsCreateDkimKeyOptions {
|
|
288
301
|
/**
|
|
289
|
-
*
|
|
302
|
+
* Algorithm used for the new key pair Currently, only RSA is supported.
|
|
303
|
+
* @default "rsa"
|
|
290
304
|
*/
|
|
291
|
-
|
|
305
|
+
algorithm?: "rsa";
|
|
292
306
|
/**
|
|
293
|
-
*
|
|
307
|
+
* Key length in bits. For RSA, must be a multiple of 1024. Common values: 1024 or 2048.
|
|
308
|
+
* @default 2048
|
|
294
309
|
*/
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
/**
|
|
301
|
-
* ISO 8601 timestamp when the request was queued for processing.
|
|
302
|
-
*/
|
|
303
|
-
queuedAt: string[];
|
|
304
|
-
/**
|
|
305
|
-
* Unique identifier for tracking this async request. Will be included in all webhook events for this request.
|
|
306
|
-
*/
|
|
307
|
-
requestId: string;
|
|
308
|
-
}>;
|
|
309
|
-
|
|
310
|
-
interface EmailsCreateDkimKeyOptions {
|
|
311
|
-
/**
|
|
312
|
-
* Algorithm used for the new key pair Currently, only RSA is supported.
|
|
313
|
-
* @default "rsa"
|
|
314
|
-
*/
|
|
315
|
-
algorithm?: "rsa";
|
|
316
|
-
/**
|
|
317
|
-
* Key length in bits. For RSA, must be a multiple of 1024. Common values: 1024 or 2048.
|
|
318
|
-
* @default 2048
|
|
319
|
-
*/
|
|
320
|
-
length?: 1024 | 2048 | 3072 | 4096;
|
|
321
|
-
/**
|
|
322
|
-
* Selector for the new key pair. Must be a maximum of 63 characters.
|
|
323
|
-
*/
|
|
324
|
-
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;
|
|
325
315
|
}
|
|
326
|
-
|
|
327
316
|
type EmailsDkimKeyStatus = "active" | "retired" | "revoked" | "rotated";
|
|
328
|
-
|
|
329
317
|
interface EmailsDkimKey {
|
|
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
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
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;
|
|
375
363
|
}
|
|
376
|
-
|
|
377
|
-
type EmailsCreateDkimKeyResponse = DataResponse$1<EmailsDkimKey>;
|
|
364
|
+
type EmailsCreateDkimKeyResponse = DataResponse<EmailsDkimKey>;
|
|
378
365
|
|
|
379
366
|
interface EmailsCheckDomainDkim {
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
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;
|
|
392
379
|
}
|
|
393
|
-
|
|
394
380
|
interface EmailsCheckDomainOptions {
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
domain: string;
|
|
409
|
-
/**
|
|
410
|
-
* 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.
|
|
411
|
-
*/
|
|
412
|
-
senderId?: string;
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
type EmailsCheckDomainVerdict = "passed" | "failed" | "soft failed" | "temporary error" | "permanent error" | "neutral" | "none" | "unknown";
|
|
416
|
-
|
|
417
|
-
type EmailsCheckDomainResponse = DataResponse$1<{
|
|
418
|
-
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
|
+
*/
|
|
419
394
|
domain: string;
|
|
420
395
|
/**
|
|
421
|
-
* 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.
|
|
422
397
|
*/
|
|
423
|
-
|
|
424
|
-
|
|
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
|
+
};
|
|
425
422
|
/**
|
|
426
|
-
*
|
|
427
|
-
*/
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
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">;
|
|
448
444
|
};
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
445
|
+
spf: {
|
|
446
|
+
/**
|
|
447
|
+
* A human-readable explanation of SPF check.
|
|
448
|
+
*/
|
|
449
|
+
reason?: string;
|
|
450
|
+
verdict: EmailsCheckDomainVerdict;
|
|
455
451
|
};
|
|
452
|
+
references?: string[];
|
|
453
|
+
}>;
|
|
454
|
+
|
|
455
|
+
interface EmailsGetDkimKeysOptions {
|
|
456
456
|
/**
|
|
457
|
-
*
|
|
457
|
+
* Selector to filter keys by. Must be a maximum of 63 characters.
|
|
458
458
|
*/
|
|
459
|
-
|
|
460
|
-
};
|
|
461
|
-
spf: {
|
|
459
|
+
selector?: string;
|
|
462
460
|
/**
|
|
463
|
-
*
|
|
461
|
+
* Status to filter keys by.
|
|
464
462
|
*/
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
* Number of keys to skip before returning results.
|
|
482
|
-
* @default 0
|
|
483
|
-
*/
|
|
484
|
-
offset?: number;
|
|
485
|
-
/**
|
|
486
|
-
* Maximum number of keys to return. Maximum is `100` and minimum is `1`.
|
|
487
|
-
* @default 10
|
|
488
|
-
*/
|
|
489
|
-
limit?: number;
|
|
490
|
-
/**
|
|
491
|
-
* If `true`, includes the suggested DKIM DNS record for each returned key.
|
|
492
|
-
* @default false
|
|
493
|
-
*/
|
|
494
|
-
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;
|
|
495
479
|
}
|
|
496
|
-
|
|
497
480
|
type Optional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
498
|
-
|
|
499
|
-
type EmailsGetDkimKeysResponse = DataResponse$1<Optional<EmailsDkimKey, "dnsRecords">[]>;
|
|
481
|
+
type EmailsGetDkimKeysResponse = DataResponse<Optional<EmailsDkimKey, "dnsRecords">[]>;
|
|
500
482
|
|
|
501
483
|
interface EmailsUpdateDkimKeyOptions {
|
|
502
|
-
/**
|
|
503
|
-
* Selector of the DKIM key pair to update. Must be a maximum of 63 characters.
|
|
504
|
-
*/
|
|
505
|
-
selector: string;
|
|
506
|
-
/**
|
|
507
|
-
* New status of the DKIM key pair.
|
|
508
|
-
* - `revoked`: Indicates that the key is compromised and should not be used.
|
|
509
|
-
* - `retired`: Indicates that the key has been rotated and is no longer in use.
|
|
510
|
-
* - `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.
|
|
511
|
-
*/
|
|
512
|
-
status: Exclude<EmailsDkimKey["status"], "active">;
|
|
513
|
-
}
|
|
514
|
-
|
|
515
|
-
interface EmailsRotateDkimKeyOptions {
|
|
516
|
-
newKey: {
|
|
517
484
|
/**
|
|
518
|
-
* Selector
|
|
485
|
+
* Selector of the DKIM key pair to update. Must be a maximum of 63 characters.
|
|
519
486
|
*/
|
|
520
487
|
selector: string;
|
|
521
|
-
|
|
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">;
|
|
522
495
|
}
|
|
523
496
|
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
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;
|
|
527
508
|
}>;
|
|
528
509
|
|
|
529
510
|
declare class Emails {
|
|
@@ -641,43 +622,43 @@ declare class Emails {
|
|
|
641
622
|
rotateDkimKey(domain: string, selector: string, options: EmailsRotateDkimKeyOptions): Promise<EmailsRotateDkimKeyResponse>;
|
|
642
623
|
}
|
|
643
624
|
|
|
644
|
-
type WebhooksListResponse = DataResponse
|
|
625
|
+
type WebhooksListResponse = DataResponse<string[]>;
|
|
645
626
|
|
|
646
|
-
type WebhooksSigningKeyResponse = DataResponse
|
|
647
|
-
|
|
627
|
+
type WebhooksSigningKeyResponse = DataResponse<{
|
|
628
|
+
key: string;
|
|
648
629
|
}>;
|
|
649
630
|
|
|
650
|
-
type WebhooksValidateResponse = DataResponse
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
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
|
+
}[];
|
|
681
662
|
}>;
|
|
682
663
|
|
|
683
664
|
declare class Webhooks {
|
|
@@ -734,108 +715,99 @@ declare class Webhooks {
|
|
|
734
715
|
}
|
|
735
716
|
|
|
736
717
|
interface SubAccountsAccount {
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
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;
|
|
749
730
|
}
|
|
750
|
-
|
|
751
|
-
type SubAccountsCreateResponse = DataResponse$1<SubAccountsAccount>;
|
|
731
|
+
type SubAccountsCreateResponse = DataResponse<SubAccountsAccount>;
|
|
752
732
|
|
|
753
733
|
interface SubAccountsListOptions {
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
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;
|
|
764
744
|
}
|
|
765
|
-
|
|
766
|
-
type SubAccountsListResponse = DataResponse$1<SubAccountsAccount[]>;
|
|
745
|
+
type SubAccountsListResponse = DataResponse<SubAccountsAccount[]>;
|
|
767
746
|
|
|
768
747
|
interface SubAccountsApiKey {
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
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;
|
|
777
756
|
}
|
|
778
|
-
|
|
779
|
-
type SubAccountsCreateApiKeyResponse = DataResponse$1<SubAccountsApiKey>;
|
|
780
|
-
|
|
757
|
+
type SubAccountsCreateApiKeyResponse = DataResponse<SubAccountsApiKey>;
|
|
781
758
|
interface SubAccountsListApiKeyOptions {
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
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;
|
|
792
769
|
}
|
|
793
|
-
|
|
794
|
-
type SubAccountsListApiKeyResponse = DataResponse$1<SubAccountsApiKey[]>;
|
|
770
|
+
type SubAccountsListApiKeyResponse = DataResponse<SubAccountsApiKey[]>;
|
|
795
771
|
|
|
796
772
|
interface SubAccountsSmtpPassword {
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
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;
|
|
809
785
|
}
|
|
810
|
-
|
|
811
|
-
type
|
|
812
|
-
|
|
813
|
-
type SubAccountsListSmtpPasswordResponse = DataResponse$1<SubAccountsSmtpPassword[]>;
|
|
786
|
+
type SubAccountsCreateSmtpPasswordResponse = DataResponse<SubAccountsSmtpPassword>;
|
|
787
|
+
type SubAccountsListSmtpPasswordResponse = DataResponse<SubAccountsSmtpPassword[]>;
|
|
814
788
|
|
|
815
789
|
interface SubAccountsLimit {
|
|
816
|
-
|
|
790
|
+
sends: number;
|
|
817
791
|
}
|
|
818
|
-
|
|
819
|
-
type SubAccountsLimitResponse = DataResponse$1<SubAccountsLimit>;
|
|
792
|
+
type SubAccountsLimitResponse = DataResponse<SubAccountsLimit>;
|
|
820
793
|
|
|
821
794
|
interface SubAccountsUsage {
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
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;
|
|
836
809
|
}
|
|
837
|
-
|
|
838
|
-
type SubAccountsUsageResponse = DataResponse$1<SubAccountsUsage>;
|
|
810
|
+
type SubAccountsUsageResponse = DataResponse<SubAccountsUsage>;
|
|
839
811
|
|
|
840
812
|
declare class SubAccounts {
|
|
841
813
|
protected mailchannels: MailChannelsClient;
|
|
@@ -999,220 +971,212 @@ declare class SubAccounts {
|
|
|
999
971
|
}
|
|
1000
972
|
|
|
1001
973
|
interface MetricsEngagement {
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
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;
|
|
1017
989
|
}
|
|
1018
|
-
|
|
1019
|
-
type MetricsEngagementResponse = DataResponse$1<MetricsEngagement>;
|
|
990
|
+
type MetricsEngagementResponse = DataResponse<MetricsEngagement>;
|
|
1020
991
|
|
|
1021
992
|
interface MetricsPerformance {
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
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;
|
|
1050
1021
|
}
|
|
1051
|
-
|
|
1052
|
-
type MetricsPerformanceResponse = DataResponse$1<MetricsPerformance>;
|
|
1022
|
+
type MetricsPerformanceResponse = DataResponse<MetricsPerformance>;
|
|
1053
1023
|
|
|
1054
1024
|
interface MetricsRecipientBehaviour {
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
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;
|
|
1078
1048
|
}
|
|
1079
|
-
|
|
1080
|
-
type MetricsRecipientBehaviourResponse = DataResponse$1<MetricsRecipientBehaviour>;
|
|
1049
|
+
type MetricsRecipientBehaviourResponse = DataResponse<MetricsRecipientBehaviour>;
|
|
1081
1050
|
|
|
1082
1051
|
interface MetricsVolume {
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
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;
|
|
1111
1080
|
}
|
|
1081
|
+
type MetricsVolumeResponse = DataResponse<MetricsVolume>;
|
|
1112
1082
|
|
|
1113
|
-
type
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
*/
|
|
1129
|
-
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;
|
|
1130
1098
|
}>;
|
|
1131
1099
|
|
|
1132
1100
|
type MetricsSendersType = "sub-accounts" | "campaigns";
|
|
1133
|
-
|
|
1134
1101
|
interface MetricsSendersOptions {
|
|
1135
|
-
/**
|
|
1136
|
-
* 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.
|
|
1137
|
-
* @example "2025-11-02T03:13:35.761763554Z"
|
|
1138
|
-
*/
|
|
1139
|
-
startTime?: string;
|
|
1140
|
-
/**
|
|
1141
|
-
* 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.
|
|
1142
|
-
* @example "2025-12-02T03:13:35.761763554Z"
|
|
1143
|
-
*/
|
|
1144
|
-
endTime?: string;
|
|
1145
|
-
/**
|
|
1146
|
-
* The maximum number of senders to return. Possible values are 1 to 1000.
|
|
1147
|
-
* @default 10
|
|
1148
|
-
*/
|
|
1149
|
-
limit?: number;
|
|
1150
|
-
/**
|
|
1151
|
-
* The number of senders to skip before returning results.
|
|
1152
|
-
* @default 0
|
|
1153
|
-
*/
|
|
1154
|
-
offset?: number;
|
|
1155
|
-
/**
|
|
1156
|
-
* The order in which to sort the results, based on total messages (processed + dropped).
|
|
1157
|
-
* @default "desc"
|
|
1158
|
-
*/
|
|
1159
|
-
sortOrder?: "asc" | "desc";
|
|
1160
|
-
}
|
|
1161
|
-
|
|
1162
|
-
interface MetricsSenders {
|
|
1163
|
-
endTime: string;
|
|
1164
|
-
limit: number;
|
|
1165
|
-
offset: number;
|
|
1166
|
-
senders: {
|
|
1167
|
-
bounced: number;
|
|
1168
|
-
delivered: number;
|
|
1169
|
-
dropped: number;
|
|
1170
1102
|
/**
|
|
1171
|
-
*
|
|
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"
|
|
1172
1105
|
*/
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
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";
|
|
1181
1127
|
}
|
|
1182
|
-
|
|
1183
|
-
|
|
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>;
|
|
1184
1149
|
|
|
1185
1150
|
interface MetricsBucket {
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
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;
|
|
1194
1159
|
}
|
|
1195
|
-
|
|
1196
1160
|
interface MetricsOptions {
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
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";
|
|
1216
1180
|
}
|
|
1217
1181
|
|
|
1218
1182
|
declare class Metrics {
|
|
@@ -1281,77 +1245,73 @@ declare class Metrics {
|
|
|
1281
1245
|
}
|
|
1282
1246
|
|
|
1283
1247
|
type SuppressionsTypes = "transactional" | "non-transactional";
|
|
1284
|
-
|
|
1285
1248
|
interface SuppressionsCreateOptions {
|
|
1286
|
-
/**
|
|
1287
|
-
* 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.
|
|
1288
|
-
* @default false
|
|
1289
|
-
*/
|
|
1290
|
-
addToSubAccounts?: boolean;
|
|
1291
|
-
/**
|
|
1292
|
-
* The total number of suppression entries to create, for the parent and/or its sub-accounts, must not exceed `1000`.
|
|
1293
|
-
*/
|
|
1294
|
-
entries: {
|
|
1295
|
-
/**
|
|
1296
|
-
* Must be less than `1024` characters.
|
|
1297
|
-
*/
|
|
1298
|
-
notes?: string;
|
|
1299
1249
|
/**
|
|
1300
|
-
*
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
*
|
|
1306
|
-
*/
|
|
1307
|
-
|
|
1308
|
-
|
|
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
|
+
}[];
|
|
1309
1272
|
}
|
|
1310
1273
|
|
|
1311
1274
|
type SuppressionsSource = "api" | "unsubscribe_link" | "list_unsubscribe" | "hard_bounce" | "spam_complaint" | "all";
|
|
1312
|
-
|
|
1313
1275
|
interface SuppressionsListOptions {
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
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;
|
|
1340
1302
|
}
|
|
1341
|
-
|
|
1342
1303
|
interface SuppressionsListEntry {
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
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[];
|
|
1352
1313
|
}
|
|
1353
|
-
|
|
1354
|
-
type SuppressionsListResponse = DataResponse$1<SuppressionsListEntry[]>;
|
|
1314
|
+
type SuppressionsListResponse = DataResponse<SuppressionsListEntry[]>;
|
|
1355
1315
|
|
|
1356
1316
|
declare class Suppressions {
|
|
1357
1317
|
protected mailchannels: MailChannelsClient;
|
|
@@ -1391,222 +1351,208 @@ declare class Suppressions {
|
|
|
1391
1351
|
}
|
|
1392
1352
|
|
|
1393
1353
|
type ListNames = "blocklist" | "safelist" | "blacklist" | "whitelist";
|
|
1394
|
-
|
|
1395
1354
|
interface ListEntryOptions {
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
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;
|
|
1404
1363
|
}
|
|
1405
|
-
|
|
1406
1364
|
interface ListEntry {
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1365
|
+
action: Extract<ListNames, "blocklist" | "safelist">;
|
|
1366
|
+
item: string;
|
|
1367
|
+
type: "domain" | "email_address" | "ip_address";
|
|
1410
1368
|
}
|
|
1411
|
-
|
|
1412
|
-
type
|
|
1413
|
-
|
|
1414
|
-
type ListEntriesResponse = DataResponse$1<ListEntry[]>;
|
|
1369
|
+
type ListEntryResponse = DataResponse<ListEntry>;
|
|
1370
|
+
type ListEntriesResponse = DataResponse<ListEntry[]>;
|
|
1415
1371
|
|
|
1416
1372
|
interface DomainsData {
|
|
1417
|
-
/**
|
|
1418
|
-
* The domain name.
|
|
1419
|
-
*/
|
|
1420
|
-
domain: string;
|
|
1421
|
-
/**
|
|
1422
|
-
* The abuse policy settings for the domain. These settings determine how spam messages are handled.
|
|
1423
|
-
*/
|
|
1424
|
-
settings?: Partial<{
|
|
1425
1373
|
/**
|
|
1426
|
-
* The
|
|
1374
|
+
* The domain name.
|
|
1427
1375
|
*/
|
|
1428
|
-
|
|
1429
|
-
/**
|
|
1430
|
-
* If `true`, this abuse policy overrides the recipient abuse policy.
|
|
1431
|
-
*/
|
|
1432
|
-
abusePolicyOverride: boolean;
|
|
1376
|
+
domain: string;
|
|
1433
1377
|
/**
|
|
1434
|
-
* The
|
|
1435
|
-
*/
|
|
1436
|
-
|
|
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 {
|
|
1437
1433
|
/**
|
|
1438
|
-
*
|
|
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).
|
|
1439
1435
|
*/
|
|
1440
|
-
|
|
1441
|
-
}>;
|
|
1442
|
-
/**
|
|
1443
|
-
* A list of email addresses that are the domain admins for the domain.
|
|
1444
|
-
*/
|
|
1445
|
-
admins?: string[] | null;
|
|
1446
|
-
/**
|
|
1447
|
-
* The locations of mail servers to which messages will be delivered after filtering.
|
|
1448
|
-
*/
|
|
1449
|
-
downstreamAddresses?: {
|
|
1436
|
+
associateKey?: boolean;
|
|
1450
1437
|
/**
|
|
1451
|
-
*
|
|
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.
|
|
1452
1439
|
*/
|
|
1453
|
-
|
|
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 {
|
|
1454
1470
|
/**
|
|
1455
|
-
*
|
|
1471
|
+
* A list of domains to fetch. If this parameter is present, only domains whose name matches an item in this list are returned.
|
|
1456
1472
|
*/
|
|
1457
|
-
|
|
1473
|
+
domains?: string[];
|
|
1458
1474
|
/**
|
|
1459
|
-
*
|
|
1475
|
+
* The maximum number of domains included in the response. Possible values are 1 to 5000.
|
|
1476
|
+
* @default 10
|
|
1460
1477
|
*/
|
|
1461
|
-
|
|
1478
|
+
limit?: number;
|
|
1462
1479
|
/**
|
|
1463
|
-
*
|
|
1480
|
+
* Offset into the list of domains to return.
|
|
1481
|
+
* @default 0
|
|
1464
1482
|
*/
|
|
1465
|
-
|
|
1466
|
-
}[] | null;
|
|
1467
|
-
/**
|
|
1468
|
-
* 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.
|
|
1469
|
-
*/
|
|
1470
|
-
aliases?: string[] | null;
|
|
1471
|
-
/**
|
|
1472
|
-
* The subscription `handle` that identifies the subscription that this domain should be provisioned against. Subscription handles can be retrieved from the `subscriptions` service method.
|
|
1473
|
-
*/
|
|
1474
|
-
subscriptionHandle: string;
|
|
1483
|
+
offset?: number;
|
|
1475
1484
|
}
|
|
1476
|
-
|
|
1477
|
-
interface DomainsProvisionOptions {
|
|
1478
|
-
/**
|
|
1479
|
-
* 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).
|
|
1480
|
-
*/
|
|
1481
|
-
associateKey?: boolean;
|
|
1482
|
-
/**
|
|
1483
|
-
* 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.
|
|
1484
|
-
*/
|
|
1485
|
-
overwrite?: boolean;
|
|
1486
|
-
}
|
|
1487
|
-
|
|
1488
|
-
type DomainsBulkProvisionOptions = DomainsProvisionOptions & Pick<DomainsData, "subscriptionHandle">;
|
|
1489
|
-
|
|
1490
|
-
type DomainsProvisionResponse = DataResponse$1<DomainsData>;
|
|
1491
|
-
|
|
1492
|
-
type DomainsBulkProvisionResponse = DataResponse$1<{
|
|
1493
|
-
/**
|
|
1494
|
-
* Domains that were successfully provisioned or updated.
|
|
1495
|
-
*/
|
|
1496
|
-
successes: {
|
|
1485
|
+
type DomainsListResponse = DataResponse<{
|
|
1497
1486
|
/**
|
|
1498
|
-
*
|
|
1487
|
+
* A list of domains.
|
|
1499
1488
|
*/
|
|
1500
|
-
|
|
1501
|
-
code: number;
|
|
1502
|
-
comment?: string;
|
|
1503
|
-
}[];
|
|
1504
|
-
/**
|
|
1505
|
-
* Domains that were not successfully provisioned.
|
|
1506
|
-
*/
|
|
1507
|
-
errors: {
|
|
1489
|
+
domains: DomainsData[];
|
|
1508
1490
|
/**
|
|
1509
|
-
* 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.
|
|
1510
1492
|
*/
|
|
1511
|
-
|
|
1512
|
-
code: number;
|
|
1513
|
-
comment?: string;
|
|
1514
|
-
}[];
|
|
1515
|
-
}>;
|
|
1516
|
-
|
|
1517
|
-
interface DomainsListOptions {
|
|
1518
|
-
/**
|
|
1519
|
-
* A list of domains to fetch. If this parameter is present, only domains whose name matches an item in this list are returned.
|
|
1520
|
-
*/
|
|
1521
|
-
domains?: string[];
|
|
1522
|
-
/**
|
|
1523
|
-
* The maximum number of domains included in the response. Possible values are 1 to 5000.
|
|
1524
|
-
* @default 10
|
|
1525
|
-
*/
|
|
1526
|
-
limit?: number;
|
|
1527
|
-
/**
|
|
1528
|
-
* Offset into the list of domains to return.
|
|
1529
|
-
* @default 0
|
|
1530
|
-
*/
|
|
1531
|
-
offset?: number;
|
|
1532
|
-
}
|
|
1533
|
-
|
|
1534
|
-
type DomainsListResponse = DataResponse$1<{
|
|
1535
|
-
/**
|
|
1536
|
-
* A list of domains.
|
|
1537
|
-
*/
|
|
1538
|
-
domains: DomainsData[];
|
|
1539
|
-
/**
|
|
1540
|
-
* 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.
|
|
1541
|
-
*/
|
|
1542
|
-
total: number;
|
|
1493
|
+
total: number;
|
|
1543
1494
|
}>;
|
|
1544
1495
|
|
|
1545
1496
|
interface DomainsCreateLoginLink {
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1497
|
+
/**
|
|
1498
|
+
* If a user browses to this URL, they will be automatically logged in as a domain admin.
|
|
1499
|
+
*/
|
|
1500
|
+
link: string;
|
|
1550
1501
|
}
|
|
1551
|
-
|
|
1552
|
-
type DomainsCreateLoginLinkResponse = DataResponse$1<DomainsCreateLoginLink>;
|
|
1502
|
+
type DomainsCreateLoginLinkResponse = DataResponse<DomainsCreateLoginLink>;
|
|
1553
1503
|
|
|
1554
1504
|
interface DomainsListDownstreamAddressesOptions {
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
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;
|
|
1565
1515
|
}
|
|
1566
|
-
|
|
1567
1516
|
interface DomainsDownstreamAddress {
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
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;
|
|
1584
1533
|
}
|
|
1585
|
-
|
|
1586
|
-
type DomainsListDownstreamAddressesResponse = DataResponse$1<DomainsDownstreamAddress[]>;
|
|
1534
|
+
type DomainsListDownstreamAddressesResponse = DataResponse<DomainsDownstreamAddress[]>;
|
|
1587
1535
|
|
|
1588
1536
|
interface DomainsBulkCreateLoginLinkResult {
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
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;
|
|
1602
1550
|
}
|
|
1603
|
-
|
|
1604
1551
|
interface DomainsBulkCreateLoginLinks {
|
|
1605
|
-
|
|
1606
|
-
|
|
1552
|
+
successes: DomainsBulkCreateLoginLinkResult[];
|
|
1553
|
+
errors: Omit<DomainsBulkCreateLoginLinkResult, "loginLink">[];
|
|
1607
1554
|
}
|
|
1608
|
-
|
|
1609
|
-
type DomainsBulkCreateLoginLinksResponse = DataResponse$1<DomainsBulkCreateLoginLinks>;
|
|
1555
|
+
type DomainsBulkCreateLoginLinksResponse = DataResponse<DomainsBulkCreateLoginLinks>;
|
|
1610
1556
|
|
|
1611
1557
|
declare class Domains {
|
|
1612
1558
|
protected mailchannels: MailChannelsClient;
|
|
@@ -1623,7 +1569,7 @@ declare class Domains {
|
|
|
1623
1569
|
* })
|
|
1624
1570
|
* ```
|
|
1625
1571
|
*/
|
|
1626
|
-
provision(options: DomainsProvisionOptions
|
|
1572
|
+
provision(options: DomainsProvisionOptions): Promise<DomainsProvisionResponse>;
|
|
1627
1573
|
/**
|
|
1628
1574
|
* Provision up to 1000 domains to use MailChannels Inbound.
|
|
1629
1575
|
* @param options - The options to provision the domains.
|
|
@@ -1808,37 +1754,36 @@ declare class Lists {
|
|
|
1808
1754
|
}
|
|
1809
1755
|
|
|
1810
1756
|
interface UsersCreateOptions {
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
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
|
+
};
|
|
1831
1777
|
}
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
}[];
|
|
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
|
+
}[];
|
|
1842
1787
|
}>;
|
|
1843
1788
|
|
|
1844
1789
|
declare class Users {
|
|
@@ -1898,43 +1843,43 @@ declare class Users {
|
|
|
1898
1843
|
deleteListEntry(email: string, options: ListEntryOptions): Promise<SuccessResponse>;
|
|
1899
1844
|
}
|
|
1900
1845
|
|
|
1901
|
-
type ServiceSubscriptionsResponse = DataResponse
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
handle: string;
|
|
1905
|
-
limits: {
|
|
1906
|
-
featureHandle: string;
|
|
1907
|
-
value: string;
|
|
1908
|
-
}[];
|
|
1909
|
-
plan: {
|
|
1846
|
+
type ServiceSubscriptionsResponse = DataResponse<{
|
|
1847
|
+
active: boolean;
|
|
1848
|
+
activeAccountsCount: number;
|
|
1910
1849
|
handle: string;
|
|
1911
|
-
|
|
1912
|
-
|
|
1850
|
+
limits: {
|
|
1851
|
+
featureHandle: string;
|
|
1852
|
+
value: string;
|
|
1853
|
+
}[];
|
|
1854
|
+
plan: {
|
|
1855
|
+
handle: string;
|
|
1856
|
+
name: string;
|
|
1857
|
+
};
|
|
1913
1858
|
}[]>;
|
|
1914
1859
|
|
|
1915
1860
|
interface ServiceReportOptions {
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
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
|
+
};
|
|
1938
1883
|
}
|
|
1939
1884
|
|
|
1940
1885
|
declare class Service {
|
|
@@ -1986,4 +1931,4 @@ declare class MailChannels extends MailChannelsClient {
|
|
|
1986
1931
|
}
|
|
1987
1932
|
|
|
1988
1933
|
export { Domains, Emails, Lists, MailChannels, MailChannelsClient, Metrics, Service, SubAccounts, Suppressions, Users, Webhooks };
|
|
1989
|
-
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 };
|