mailchannels-sdk 0.4.1 → 0.4.2
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/README.md +3 -0
- package/dist/mailchannels.d.mts +2 -2
- package/dist/mailchannels.d.ts +2 -2
- package/dist/mailchannels.mjs +3 -0
- package/dist/modules.d.mts +1 -1
- package/dist/modules.d.ts +1 -1
- package/dist/modules.mjs +139 -1
- package/dist/shared/{mailchannels-sdk.Bakg_aFG.d.mts → mailchannels-sdk.ug4M5nbx.d.mts} +171 -18
- package/dist/shared/{mailchannels-sdk.Bakg_aFG.d.ts → mailchannels-sdk.ug4M5nbx.d.ts} +171 -18
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -75,6 +75,9 @@ Already implemented features are marked with a checkmark. Please open an issue i
|
|
|
75
75
|
- 📧 Emails
|
|
76
76
|
- ✅ [Send an Email](https://docs.mailchannels.net/email-api/api-reference/send-an-email)
|
|
77
77
|
- ✅ [DKIM, SPF & Domain Lockdown Check](https://docs.mailchannels.net/email-api/api-reference/dkim-spf-domain-lockdown-check)
|
|
78
|
+
- ✅ [Create DKIM Key Pair](https://docs.mailchannels.net/email-api/api-reference/create-dkim-key-pair)
|
|
79
|
+
- ✅ [Retrieve DKIM Keys](https://docs.mailchannels.net/email-api/api-reference/retrieve-dkim-keys)
|
|
80
|
+
- ✅ [Update DKIM Key Status](https://docs.mailchannels.net/email-api/api-reference/update-dkim-key-status)
|
|
78
81
|
- 📢 Webhooks
|
|
79
82
|
- ✅ [Enroll for Webhook Notifications](https://docs.mailchannels.net/email-api/api-reference/enroll-for-webhook-notifications)
|
|
80
83
|
- ✅ [Retrieve Customer Webhooks](https://docs.mailchannels.net/email-api/api-reference/retrieve-customer-webhooks)
|
package/dist/mailchannels.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { M as MailChannelsClient, E as Emails, W as Webhooks, S as SubAccounts, a as Metrics, b as Suppressions, D as Domains, L as Lists, U as Users, c as Service } from './shared/mailchannels-sdk.
|
|
2
|
-
export {
|
|
1
|
+
import { M as MailChannelsClient, E as Emails, W as Webhooks, S as SubAccounts, a as Metrics, b as Suppressions, D as Domains, L as Lists, U as Users, c as Service } from './shared/mailchannels-sdk.ug4M5nbx.mjs';
|
|
2
|
+
export { ai as DomainsBulkCreateLoginLinkResult, aj as DomainsBulkCreateLoginLinks, ak as DomainsBulkCreateLoginLinksResponse, a9 as DomainsBulkProvisionOptions, ab as DomainsBulkProvisionResponse, ae as DomainsCreateLoginLinkResponse, a7 as DomainsData, ag as DomainsDownstreamAddress, af as DomainsListDownstreamAddressesOptions, ah as DomainsListDownstreamAddressesResponse, ac as DomainsListOptions, ad as DomainsListResponse, a8 as DomainsProvisionOptions, aa as DomainsProvisionResponse, j as EmailsCheckDomainDkim, k as EmailsCheckDomainOptions, m as EmailsCheckDomainResponse, l as EmailsCheckDomainVerdict, n as EmailsCreateDkimKeyOptions, p as EmailsCreateDkimKeyResponse, o as EmailsDkimKey, q as EmailsGetDkimKeysOptions, r as EmailsGetDkimKeysResponse, e as EmailsSendAttachment, h as EmailsSendOptions, g as EmailsSendOptionsBase, d as EmailsSendRecipient, i as EmailsSendResponse, f as EmailsSendTracking, s as EmailsUpdateDkimKeyOptions, ap as ListEntriesResponse, an as ListEntry, am as ListEntryOptions, ao as ListEntryResponse, al as ListNames, P as MetricsBucket, R as MetricsEngagement, T as MetricsEngagementResponse, Q as MetricsOptions, V as MetricsPerformance, X as MetricsPerformanceResponse, Y as MetricsRecipientBehaviour, Z as MetricsRecipientBehaviourResponse, a0 as MetricsUsageResponse, _ as MetricsVolume, $ as MetricsVolumeResponse, O as Optional, at as ServiceReportOptions, as as ServiceSubscriptionsResponse, w as SubAccountsAccount, A as SubAccountsApiKey, B as SubAccountsCreateApiKeyResponse, x as SubAccountsCreateResponse, G as SubAccountsCreateSmtpPasswordResponse, I as SubAccountsLimit, J as SubAccountsLimitResponse, C as SubAccountsListApiKeyResponse, y as SubAccountsListOptions, z as SubAccountsListResponse, H as SubAccountsListSmtpPasswordResponse, F as SubAccountsSmtpPassword, K as SubAccountsUsage, N as SubAccountsUsageResponse, au as SuccessResponse, a2 as SuppressionsCreateOptions, a5 as SuppressionsListEntry, a4 as SuppressionsListOptions, a6 as SuppressionsListResponse, a3 as SuppressionsSource, a1 as SuppressionsTypes, aq as UsersCreateOptions, ar as UsersCreateResponse, t as WebhooksListResponse, u as WebhooksSigningKeyResponse, v as WebhooksValidateResponse } from './shared/mailchannels-sdk.ug4M5nbx.mjs';
|
|
3
3
|
import 'ofetch';
|
|
4
4
|
|
|
5
5
|
declare class MailChannels extends MailChannelsClient {
|
package/dist/mailchannels.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { M as MailChannelsClient, E as Emails, W as Webhooks, S as SubAccounts, a as Metrics, b as Suppressions, D as Domains, L as Lists, U as Users, c as Service } from './shared/mailchannels-sdk.
|
|
2
|
-
export {
|
|
1
|
+
import { M as MailChannelsClient, E as Emails, W as Webhooks, S as SubAccounts, a as Metrics, b as Suppressions, D as Domains, L as Lists, U as Users, c as Service } from './shared/mailchannels-sdk.ug4M5nbx.js';
|
|
2
|
+
export { ai as DomainsBulkCreateLoginLinkResult, aj as DomainsBulkCreateLoginLinks, ak as DomainsBulkCreateLoginLinksResponse, a9 as DomainsBulkProvisionOptions, ab as DomainsBulkProvisionResponse, ae as DomainsCreateLoginLinkResponse, a7 as DomainsData, ag as DomainsDownstreamAddress, af as DomainsListDownstreamAddressesOptions, ah as DomainsListDownstreamAddressesResponse, ac as DomainsListOptions, ad as DomainsListResponse, a8 as DomainsProvisionOptions, aa as DomainsProvisionResponse, j as EmailsCheckDomainDkim, k as EmailsCheckDomainOptions, m as EmailsCheckDomainResponse, l as EmailsCheckDomainVerdict, n as EmailsCreateDkimKeyOptions, p as EmailsCreateDkimKeyResponse, o as EmailsDkimKey, q as EmailsGetDkimKeysOptions, r as EmailsGetDkimKeysResponse, e as EmailsSendAttachment, h as EmailsSendOptions, g as EmailsSendOptionsBase, d as EmailsSendRecipient, i as EmailsSendResponse, f as EmailsSendTracking, s as EmailsUpdateDkimKeyOptions, ap as ListEntriesResponse, an as ListEntry, am as ListEntryOptions, ao as ListEntryResponse, al as ListNames, P as MetricsBucket, R as MetricsEngagement, T as MetricsEngagementResponse, Q as MetricsOptions, V as MetricsPerformance, X as MetricsPerformanceResponse, Y as MetricsRecipientBehaviour, Z as MetricsRecipientBehaviourResponse, a0 as MetricsUsageResponse, _ as MetricsVolume, $ as MetricsVolumeResponse, O as Optional, at as ServiceReportOptions, as as ServiceSubscriptionsResponse, w as SubAccountsAccount, A as SubAccountsApiKey, B as SubAccountsCreateApiKeyResponse, x as SubAccountsCreateResponse, G as SubAccountsCreateSmtpPasswordResponse, I as SubAccountsLimit, J as SubAccountsLimitResponse, C as SubAccountsListApiKeyResponse, y as SubAccountsListOptions, z as SubAccountsListResponse, H as SubAccountsListSmtpPasswordResponse, F as SubAccountsSmtpPassword, K as SubAccountsUsage, N as SubAccountsUsageResponse, au as SuccessResponse, a2 as SuppressionsCreateOptions, a5 as SuppressionsListEntry, a4 as SuppressionsListOptions, a6 as SuppressionsListResponse, a3 as SuppressionsSource, a1 as SuppressionsTypes, aq as UsersCreateOptions, ar as UsersCreateResponse, t as WebhooksListResponse, u as WebhooksSigningKeyResponse, v as WebhooksValidateResponse } from './shared/mailchannels-sdk.ug4M5nbx.js';
|
|
3
3
|
import 'ofetch';
|
|
4
4
|
|
|
5
5
|
declare class MailChannels extends MailChannelsClient {
|
package/dist/mailchannels.mjs
CHANGED
|
@@ -36,6 +36,9 @@ class MailChannelsClient {
|
|
|
36
36
|
async put(path, options) {
|
|
37
37
|
return this._fetch(path, { method: "PUT", ...options });
|
|
38
38
|
}
|
|
39
|
+
async patch(path, options) {
|
|
40
|
+
return this._fetch(path, { method: "PATCH", ...options });
|
|
41
|
+
}
|
|
39
42
|
}
|
|
40
43
|
|
|
41
44
|
class MailChannels extends MailChannelsClient {
|
package/dist/modules.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { D as Domains,
|
|
1
|
+
export { D as Domains, ai as DomainsBulkCreateLoginLinkResult, aj as DomainsBulkCreateLoginLinks, ak as DomainsBulkCreateLoginLinksResponse, a9 as DomainsBulkProvisionOptions, ab as DomainsBulkProvisionResponse, ae as DomainsCreateLoginLinkResponse, a7 as DomainsData, ag as DomainsDownstreamAddress, af as DomainsListDownstreamAddressesOptions, ah as DomainsListDownstreamAddressesResponse, ac as DomainsListOptions, ad as DomainsListResponse, a8 as DomainsProvisionOptions, aa as DomainsProvisionResponse, E as Emails, j as EmailsCheckDomainDkim, k as EmailsCheckDomainOptions, m as EmailsCheckDomainResponse, l as EmailsCheckDomainVerdict, n as EmailsCreateDkimKeyOptions, p as EmailsCreateDkimKeyResponse, o as EmailsDkimKey, q as EmailsGetDkimKeysOptions, r as EmailsGetDkimKeysResponse, e as EmailsSendAttachment, h as EmailsSendOptions, g as EmailsSendOptionsBase, d as EmailsSendRecipient, i as EmailsSendResponse, f as EmailsSendTracking, s as EmailsUpdateDkimKeyOptions, ap as ListEntriesResponse, an as ListEntry, am as ListEntryOptions, ao as ListEntryResponse, al as ListNames, L as Lists, a as Metrics, P as MetricsBucket, R as MetricsEngagement, T as MetricsEngagementResponse, Q as MetricsOptions, V as MetricsPerformance, X as MetricsPerformanceResponse, Y as MetricsRecipientBehaviour, Z as MetricsRecipientBehaviourResponse, a0 as MetricsUsageResponse, _ as MetricsVolume, $ as MetricsVolumeResponse, O as Optional, c as Service, at as ServiceReportOptions, as as ServiceSubscriptionsResponse, S as SubAccounts, w as SubAccountsAccount, A as SubAccountsApiKey, B as SubAccountsCreateApiKeyResponse, x as SubAccountsCreateResponse, G as SubAccountsCreateSmtpPasswordResponse, I as SubAccountsLimit, J as SubAccountsLimitResponse, C as SubAccountsListApiKeyResponse, y as SubAccountsListOptions, z as SubAccountsListResponse, H as SubAccountsListSmtpPasswordResponse, F as SubAccountsSmtpPassword, K as SubAccountsUsage, N as SubAccountsUsageResponse, au as SuccessResponse, b as Suppressions, a2 as SuppressionsCreateOptions, a5 as SuppressionsListEntry, a4 as SuppressionsListOptions, a6 as SuppressionsListResponse, a3 as SuppressionsSource, a1 as SuppressionsTypes, U as Users, aq as UsersCreateOptions, ar as UsersCreateResponse, W as Webhooks, t as WebhooksListResponse, u as WebhooksSigningKeyResponse, v as WebhooksValidateResponse } from './shared/mailchannels-sdk.ug4M5nbx.mjs';
|
|
2
2
|
import 'ofetch';
|
package/dist/modules.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { D as Domains,
|
|
1
|
+
export { D as Domains, ai as DomainsBulkCreateLoginLinkResult, aj as DomainsBulkCreateLoginLinks, ak as DomainsBulkCreateLoginLinksResponse, a9 as DomainsBulkProvisionOptions, ab as DomainsBulkProvisionResponse, ae as DomainsCreateLoginLinkResponse, a7 as DomainsData, ag as DomainsDownstreamAddress, af as DomainsListDownstreamAddressesOptions, ah as DomainsListDownstreamAddressesResponse, ac as DomainsListOptions, ad as DomainsListResponse, a8 as DomainsProvisionOptions, aa as DomainsProvisionResponse, E as Emails, j as EmailsCheckDomainDkim, k as EmailsCheckDomainOptions, m as EmailsCheckDomainResponse, l as EmailsCheckDomainVerdict, n as EmailsCreateDkimKeyOptions, p as EmailsCreateDkimKeyResponse, o as EmailsDkimKey, q as EmailsGetDkimKeysOptions, r as EmailsGetDkimKeysResponse, e as EmailsSendAttachment, h as EmailsSendOptions, g as EmailsSendOptionsBase, d as EmailsSendRecipient, i as EmailsSendResponse, f as EmailsSendTracking, s as EmailsUpdateDkimKeyOptions, ap as ListEntriesResponse, an as ListEntry, am as ListEntryOptions, ao as ListEntryResponse, al as ListNames, L as Lists, a as Metrics, P as MetricsBucket, R as MetricsEngagement, T as MetricsEngagementResponse, Q as MetricsOptions, V as MetricsPerformance, X as MetricsPerformanceResponse, Y as MetricsRecipientBehaviour, Z as MetricsRecipientBehaviourResponse, a0 as MetricsUsageResponse, _ as MetricsVolume, $ as MetricsVolumeResponse, O as Optional, c as Service, at as ServiceReportOptions, as as ServiceSubscriptionsResponse, S as SubAccounts, w as SubAccountsAccount, A as SubAccountsApiKey, B as SubAccountsCreateApiKeyResponse, x as SubAccountsCreateResponse, G as SubAccountsCreateSmtpPasswordResponse, I as SubAccountsLimit, J as SubAccountsLimitResponse, C as SubAccountsListApiKeyResponse, y as SubAccountsListOptions, z as SubAccountsListResponse, H as SubAccountsListSmtpPasswordResponse, F as SubAccountsSmtpPassword, K as SubAccountsUsage, N as SubAccountsUsageResponse, au as SuccessResponse, b as Suppressions, a2 as SuppressionsCreateOptions, a5 as SuppressionsListEntry, a4 as SuppressionsListOptions, a6 as SuppressionsListResponse, a3 as SuppressionsSource, a1 as SuppressionsTypes, U as Users, aq as UsersCreateOptions, ar as UsersCreateResponse, W as Webhooks, t as WebhooksListResponse, u as WebhooksSigningKeyResponse, v as WebhooksValidateResponse } from './shared/mailchannels-sdk.ug4M5nbx.js';
|
|
2
2
|
import 'ofetch';
|
package/dist/modules.mjs
CHANGED
|
@@ -184,6 +184,144 @@ class Emails {
|
|
|
184
184
|
};
|
|
185
185
|
return data;
|
|
186
186
|
}
|
|
187
|
+
/**
|
|
188
|
+
* Create a DKIM key pair for a specified domain and selector using the specified algorithm and key length, for the current customer.
|
|
189
|
+
* @param domain - The domain to create the DKIM key for.
|
|
190
|
+
* @param options - DKIM key creation options.
|
|
191
|
+
* @example
|
|
192
|
+
* ```ts
|
|
193
|
+
* const mailchannels = new MailChannels('your-api-key')
|
|
194
|
+
* const { key, error } = await mailchannels.emails.createDkimKey('example.com', {
|
|
195
|
+
* selector: 'mailchannels'
|
|
196
|
+
* })
|
|
197
|
+
* ```
|
|
198
|
+
*/
|
|
199
|
+
async createDkimKey(domain, options) {
|
|
200
|
+
const data = { key: null, error: null };
|
|
201
|
+
if (!options.selector || options.selector.length > 63) {
|
|
202
|
+
data.error = "Selector must be between 1 and 63 characters.";
|
|
203
|
+
}
|
|
204
|
+
if (data.error) return data;
|
|
205
|
+
const payload = {
|
|
206
|
+
algorithm: options.algorithm,
|
|
207
|
+
key_length: options.length,
|
|
208
|
+
selector: options.selector
|
|
209
|
+
};
|
|
210
|
+
const response = await this.mailchannels.post(`/tx/v1/domains/${domain}/dkim-keys`, {
|
|
211
|
+
body: payload,
|
|
212
|
+
onResponseError: async ({ response: response2 }) => {
|
|
213
|
+
data.error = getStatusError(response2, {
|
|
214
|
+
[ErrorCode.BadRequest]: "Bad Request.",
|
|
215
|
+
[ErrorCode.Conflict]: "Key pair already created for customer_handle, domain, and selector."
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
}).catch(() => null);
|
|
219
|
+
if (!response) return data;
|
|
220
|
+
data.key = {
|
|
221
|
+
algorithm: response.algorithm,
|
|
222
|
+
createdAt: response.created_at,
|
|
223
|
+
dnsRecords: response.dkim_dns_records,
|
|
224
|
+
domain: response.domain,
|
|
225
|
+
length: response.key_length,
|
|
226
|
+
publicKey: response.public_key,
|
|
227
|
+
selector: response.selector,
|
|
228
|
+
status: response.status,
|
|
229
|
+
statusModifiedAt: response.status_modified_at
|
|
230
|
+
};
|
|
231
|
+
return data;
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Search for DKIM keys by customer handle and domain, with optional filters. If selector is provided, at most one key will be returned.
|
|
235
|
+
* @param domain - The domain to search DKIM keys for.
|
|
236
|
+
* @param options - The options to filter DKIM keys by.
|
|
237
|
+
* @example
|
|
238
|
+
* ```ts
|
|
239
|
+
* const mailchannels = new MailChannels('your-api-key')
|
|
240
|
+
* const { keys } = await mailchannels.getDkimKeys('example.com', {
|
|
241
|
+
* includeDnsRecord: true
|
|
242
|
+
* })
|
|
243
|
+
* ```
|
|
244
|
+
*/
|
|
245
|
+
async getDkimKeys(domain, options) {
|
|
246
|
+
const data = { keys: [], error: null };
|
|
247
|
+
if (options?.selector && options.selector.length > 63) {
|
|
248
|
+
data.error = "Selector must be a maximum of 63 characters.";
|
|
249
|
+
return data;
|
|
250
|
+
}
|
|
251
|
+
if (typeof options?.limit === "number" && (options.limit < 1 || options.limit > 100)) {
|
|
252
|
+
data.error = "Limit must be between 1 and 100.";
|
|
253
|
+
return data;
|
|
254
|
+
}
|
|
255
|
+
if (typeof options?.offset === "number" && options.offset < 0) {
|
|
256
|
+
data.error = "Offset value is invalid. Only positive values are allowed.";
|
|
257
|
+
return data;
|
|
258
|
+
}
|
|
259
|
+
const payload = {
|
|
260
|
+
selector: options?.selector,
|
|
261
|
+
status: options?.status,
|
|
262
|
+
offset: options?.offset,
|
|
263
|
+
limit: options?.limit,
|
|
264
|
+
include_dns_record: options?.includeDnsRecord
|
|
265
|
+
};
|
|
266
|
+
const response = await this.mailchannels.get(`/tx/v1/domains/${domain}/dkim-keys`, {
|
|
267
|
+
query: payload,
|
|
268
|
+
onResponseError: async ({ response: response2 }) => {
|
|
269
|
+
data.error = getStatusError(response2, {
|
|
270
|
+
[ErrorCode.BadRequest]: "Bad Request."
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
}).catch(() => null);
|
|
274
|
+
if (!response) return data;
|
|
275
|
+
data.keys = response.keys.map((key) => ({
|
|
276
|
+
algorithm: key.algorithm,
|
|
277
|
+
createdAt: key.created_at,
|
|
278
|
+
dnsRecords: key.dkim_dns_records,
|
|
279
|
+
domain: key.domain,
|
|
280
|
+
length: key.key_length,
|
|
281
|
+
publicKey: key.public_key,
|
|
282
|
+
selector: key.selector,
|
|
283
|
+
status: key.status,
|
|
284
|
+
statusModifiedAt: key.status_modified_at
|
|
285
|
+
}));
|
|
286
|
+
return data;
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* Update fields of an existing DKIM key pair for the specified domain and selector, for the current customer. Currently, only the `status` field can be updated.
|
|
290
|
+
* @param domain - The domain the DKIM key belongs to.
|
|
291
|
+
* @param options - The options to update the DKIM key.
|
|
292
|
+
* @example
|
|
293
|
+
* ```ts
|
|
294
|
+
* const mailchannels = new MailChannels('your-api-key')
|
|
295
|
+
* const { success } = await mailchannels.emails.updateDkimKey('example.com', {
|
|
296
|
+
* selector: 'mailchannels',
|
|
297
|
+
* status: 'retired'
|
|
298
|
+
* })
|
|
299
|
+
*/
|
|
300
|
+
async updateDkimKey(domain, options) {
|
|
301
|
+
const data = { success: false, error: null };
|
|
302
|
+
if (!options.selector || options.selector.length > 63) {
|
|
303
|
+
data.error = "Selector must be between 1 and 63 characters.";
|
|
304
|
+
return data;
|
|
305
|
+
}
|
|
306
|
+
const payload = {
|
|
307
|
+
status: options.status
|
|
308
|
+
};
|
|
309
|
+
await this.mailchannels.patch(`/tx/v1/domains/${domain}/dkim-keys/${options.selector}`, {
|
|
310
|
+
body: payload,
|
|
311
|
+
ignoreResponseError: true,
|
|
312
|
+
onResponse: async ({ response }) => {
|
|
313
|
+
if (response.ok) {
|
|
314
|
+
data.success = true;
|
|
315
|
+
return;
|
|
316
|
+
}
|
|
317
|
+
data.error = getStatusError(response, {
|
|
318
|
+
[ErrorCode.BadRequest]: "Bad Request.",
|
|
319
|
+
[ErrorCode.NotFound]: "Specified key pair not found, or the DKIM domain or selector path parameter is missing."
|
|
320
|
+
});
|
|
321
|
+
}
|
|
322
|
+
});
|
|
323
|
+
return data;
|
|
324
|
+
}
|
|
187
325
|
}
|
|
188
326
|
|
|
189
327
|
class Webhooks {
|
|
@@ -1514,7 +1652,7 @@ class Domains {
|
|
|
1514
1652
|
* ```
|
|
1515
1653
|
*/
|
|
1516
1654
|
async bulkCreateLoginLinks(domains) {
|
|
1517
|
-
const data = { results:
|
|
1655
|
+
const data = { results: null, error: null };
|
|
1518
1656
|
if (!domains || !domains.length) {
|
|
1519
1657
|
data.error = "No domains provided.";
|
|
1520
1658
|
return data;
|
|
@@ -9,6 +9,15 @@ declare class MailChannelsClient {
|
|
|
9
9
|
get<T>(path: string, options?: Omit<FetchOptions<"json">, "method">): Promise<T>;
|
|
10
10
|
delete<T>(path: string, options?: Omit<FetchOptions<"json">, "method">): Promise<T>;
|
|
11
11
|
put<T>(path: string, options?: Omit<FetchOptions<"json">, "method">): Promise<T>;
|
|
12
|
+
patch<T>(path: string, options?: Omit<FetchOptions<"json">, "method">): Promise<T>;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
interface SuccessResponse {
|
|
16
|
+
/**
|
|
17
|
+
* Whether the operation was successful.
|
|
18
|
+
*/
|
|
19
|
+
success: boolean;
|
|
20
|
+
error: string | null;
|
|
12
21
|
}
|
|
13
22
|
|
|
14
23
|
interface EmailsSendRecipient {
|
|
@@ -286,6 +295,120 @@ interface EmailsCheckDomainResponse {
|
|
|
286
295
|
error: string | null;
|
|
287
296
|
}
|
|
288
297
|
|
|
298
|
+
interface EmailsCreateDkimKeyOptions {
|
|
299
|
+
/**
|
|
300
|
+
* Algorithm used for the new key pair Currently, only RSA is supported.
|
|
301
|
+
* @default "rsa"
|
|
302
|
+
*/
|
|
303
|
+
algorithm?: "rsa";
|
|
304
|
+
/**
|
|
305
|
+
* Key length in bits. For RSA, must be a multiple of 1024. Common values: 1024 or 2048.
|
|
306
|
+
* @default 2048
|
|
307
|
+
*/
|
|
308
|
+
length?: 1024 | 2048 | 3072 | 4096;
|
|
309
|
+
/**
|
|
310
|
+
* Selector for the new key pair. Must be a maximum of 63 characters.
|
|
311
|
+
*/
|
|
312
|
+
selector: string;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
interface EmailsDkimKey {
|
|
316
|
+
/**
|
|
317
|
+
* Algorithm used for the key pair.
|
|
318
|
+
*/
|
|
319
|
+
algorithm: string;
|
|
320
|
+
/**
|
|
321
|
+
* Timestamp when the key pair was created.
|
|
322
|
+
*/
|
|
323
|
+
createdAt: string;
|
|
324
|
+
/**
|
|
325
|
+
* Suggested DNS records for the DKIM key.
|
|
326
|
+
*/
|
|
327
|
+
dnsRecords: {
|
|
328
|
+
name: string;
|
|
329
|
+
type: string;
|
|
330
|
+
value: string;
|
|
331
|
+
}[];
|
|
332
|
+
/**
|
|
333
|
+
* Domain associated with the key pair.
|
|
334
|
+
*/
|
|
335
|
+
domain: string;
|
|
336
|
+
/**
|
|
337
|
+
* Key length in bits.
|
|
338
|
+
*/
|
|
339
|
+
length: 1024 | 2048 | 3072 | 4096;
|
|
340
|
+
publicKey: string;
|
|
341
|
+
/**
|
|
342
|
+
* Selector assigned to the key pair.
|
|
343
|
+
*/
|
|
344
|
+
selector: string;
|
|
345
|
+
/**
|
|
346
|
+
* Status of the key.
|
|
347
|
+
*/
|
|
348
|
+
status: "active" | "revoked" | "retired";
|
|
349
|
+
/**
|
|
350
|
+
* Timestamp when the key was last modified.
|
|
351
|
+
*/
|
|
352
|
+
statusModifiedAt: string;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
interface EmailsCreateDkimKeyResponse {
|
|
356
|
+
/**
|
|
357
|
+
* The created DKIM key information.
|
|
358
|
+
*/
|
|
359
|
+
key: EmailsDkimKey | null;
|
|
360
|
+
error: string | null;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
interface EmailsGetDkimKeysOptions {
|
|
364
|
+
/**
|
|
365
|
+
* Selector to filter keys by. Must be a maximum of 63 characters.
|
|
366
|
+
*/
|
|
367
|
+
selector?: string;
|
|
368
|
+
/**
|
|
369
|
+
* Status to filter keys by.
|
|
370
|
+
*/
|
|
371
|
+
status?: EmailsDkimKey["status"];
|
|
372
|
+
/**
|
|
373
|
+
* Number of keys to skip before returning results.
|
|
374
|
+
* @default 0
|
|
375
|
+
*/
|
|
376
|
+
offset?: number;
|
|
377
|
+
/**
|
|
378
|
+
* Maximum number of keys to return. Maximum is `100` and minimum is `1`.
|
|
379
|
+
* @default 10
|
|
380
|
+
*/
|
|
381
|
+
limit?: number;
|
|
382
|
+
/**
|
|
383
|
+
* If `true`, includes the suggested DKIM DNS record for each returned key.
|
|
384
|
+
* @default false
|
|
385
|
+
*/
|
|
386
|
+
includeDnsRecord?: boolean;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
type Optional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
390
|
+
|
|
391
|
+
interface EmailsGetDkimKeysResponse {
|
|
392
|
+
/**
|
|
393
|
+
* List of keys matching the filter. Empty if no keys match the filter.
|
|
394
|
+
*/
|
|
395
|
+
keys: Optional<EmailsDkimKey, "dnsRecords">[];
|
|
396
|
+
error: string | null;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
interface EmailsUpdateDkimKeyOptions {
|
|
400
|
+
/**
|
|
401
|
+
* Selector of the DKIM key pair to update. Must be a maximum of 63 characters.
|
|
402
|
+
*/
|
|
403
|
+
selector: string;
|
|
404
|
+
/**
|
|
405
|
+
* New status of the DKIM key pair
|
|
406
|
+
* - `revoked`: Indicates that the key is compromised and should not be used.
|
|
407
|
+
* - `retired`: Indicates that the key has been rotated and is no longer in use.
|
|
408
|
+
*/
|
|
409
|
+
status: Exclude<EmailsDkimKey["status"], "active">;
|
|
410
|
+
}
|
|
411
|
+
|
|
289
412
|
declare class Emails {
|
|
290
413
|
protected mailchannels: MailChannelsClient;
|
|
291
414
|
constructor(mailchannels: MailChannelsClient);
|
|
@@ -323,14 +446,45 @@ declare class Emails {
|
|
|
323
446
|
* ```
|
|
324
447
|
*/
|
|
325
448
|
checkDomain(options: EmailsCheckDomainOptions): Promise<EmailsCheckDomainResponse>;
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
449
|
+
/**
|
|
450
|
+
* Create a DKIM key pair for a specified domain and selector using the specified algorithm and key length, for the current customer.
|
|
451
|
+
* @param domain - The domain to create the DKIM key for.
|
|
452
|
+
* @param options - DKIM key creation options.
|
|
453
|
+
* @example
|
|
454
|
+
* ```ts
|
|
455
|
+
* const mailchannels = new MailChannels('your-api-key')
|
|
456
|
+
* const { key, error } = await mailchannels.emails.createDkimKey('example.com', {
|
|
457
|
+
* selector: 'mailchannels'
|
|
458
|
+
* })
|
|
459
|
+
* ```
|
|
460
|
+
*/
|
|
461
|
+
createDkimKey(domain: string, options: EmailsCreateDkimKeyOptions): Promise<EmailsCreateDkimKeyResponse>;
|
|
462
|
+
/**
|
|
463
|
+
* Search for DKIM keys by customer handle and domain, with optional filters. If selector is provided, at most one key will be returned.
|
|
464
|
+
* @param domain - The domain to search DKIM keys for.
|
|
465
|
+
* @param options - The options to filter DKIM keys by.
|
|
466
|
+
* @example
|
|
467
|
+
* ```ts
|
|
468
|
+
* const mailchannels = new MailChannels('your-api-key')
|
|
469
|
+
* const { keys } = await mailchannels.getDkimKeys('example.com', {
|
|
470
|
+
* includeDnsRecord: true
|
|
471
|
+
* })
|
|
472
|
+
* ```
|
|
473
|
+
*/
|
|
474
|
+
getDkimKeys(domain: string, options?: EmailsGetDkimKeysOptions): Promise<EmailsGetDkimKeysResponse>;
|
|
475
|
+
/**
|
|
476
|
+
* Update fields of an existing DKIM key pair for the specified domain and selector, for the current customer. Currently, only the `status` field can be updated.
|
|
477
|
+
* @param domain - The domain the DKIM key belongs to.
|
|
478
|
+
* @param options - The options to update the DKIM key.
|
|
479
|
+
* @example
|
|
480
|
+
* ```ts
|
|
481
|
+
* const mailchannels = new MailChannels('your-api-key')
|
|
482
|
+
* const { success } = await mailchannels.emails.updateDkimKey('example.com', {
|
|
483
|
+
* selector: 'mailchannels',
|
|
484
|
+
* status: 'retired'
|
|
485
|
+
* })
|
|
486
|
+
*/
|
|
487
|
+
updateDkimKey(domain: string, options: EmailsUpdateDkimKeyOptions): Promise<SuccessResponse>;
|
|
334
488
|
}
|
|
335
489
|
|
|
336
490
|
interface WebhooksListResponse {
|
|
@@ -1256,20 +1410,19 @@ interface DomainsBulkCreateLoginLinkResult {
|
|
|
1256
1410
|
* More information about the result of creating the login link.
|
|
1257
1411
|
*/
|
|
1258
1412
|
comment?: string;
|
|
1413
|
+
/**
|
|
1414
|
+
* If a user browses to this URL, they will be automatically logged in as a domain admin.
|
|
1415
|
+
*/
|
|
1416
|
+
loginLink: string;
|
|
1259
1417
|
}
|
|
1260
1418
|
|
|
1261
|
-
interface
|
|
1262
|
-
successes: DomainsBulkCreateLoginLinkResult
|
|
1263
|
-
|
|
1264
|
-
* If a user browses to this URL, they will be automatically logged in as a domain admin.
|
|
1265
|
-
*/
|
|
1266
|
-
loginLink: string;
|
|
1267
|
-
}[];
|
|
1268
|
-
errors: DomainsBulkCreateLoginLinkResult[];
|
|
1419
|
+
interface DomainsBulkCreateLoginLinks {
|
|
1420
|
+
successes: DomainsBulkCreateLoginLinkResult[];
|
|
1421
|
+
errors: Omit<DomainsBulkCreateLoginLinkResult, "loginLink">[];
|
|
1269
1422
|
}
|
|
1270
1423
|
|
|
1271
1424
|
interface DomainsBulkCreateLoginLinksResponse {
|
|
1272
|
-
results:
|
|
1425
|
+
results: DomainsBulkCreateLoginLinks | null;
|
|
1273
1426
|
error: string | null;
|
|
1274
1427
|
}
|
|
1275
1428
|
|
|
@@ -1644,4 +1797,4 @@ declare class Service {
|
|
|
1644
1797
|
}
|
|
1645
1798
|
|
|
1646
1799
|
export { Domains as D, Emails as E, Lists as L, MailChannelsClient as M, SubAccounts as S, Users as U, Webhooks as W, Metrics as a, Suppressions as b, Service as c };
|
|
1647
|
-
export type {
|
|
1800
|
+
export type { MetricsVolumeResponse as $, SubAccountsApiKey as A, SubAccountsCreateApiKeyResponse as B, SubAccountsListApiKeyResponse as C, SubAccountsSmtpPassword as F, SubAccountsCreateSmtpPasswordResponse as G, SubAccountsListSmtpPasswordResponse as H, SubAccountsLimit as I, SubAccountsLimitResponse as J, SubAccountsUsage as K, SubAccountsUsageResponse as N, Optional as O, MetricsBucket as P, MetricsOptions as Q, MetricsEngagement as R, MetricsEngagementResponse as T, MetricsPerformance as V, MetricsPerformanceResponse as X, MetricsRecipientBehaviour as Y, MetricsRecipientBehaviourResponse as Z, MetricsVolume as _, MetricsUsageResponse as a0, SuppressionsTypes as a1, SuppressionsCreateOptions as a2, SuppressionsSource as a3, SuppressionsListOptions as a4, SuppressionsListEntry as a5, SuppressionsListResponse as a6, DomainsData as a7, DomainsProvisionOptions as a8, DomainsBulkProvisionOptions as a9, DomainsProvisionResponse as aa, DomainsBulkProvisionResponse as ab, DomainsListOptions as ac, DomainsListResponse as ad, DomainsCreateLoginLinkResponse as ae, DomainsListDownstreamAddressesOptions as af, DomainsDownstreamAddress as ag, DomainsListDownstreamAddressesResponse as ah, DomainsBulkCreateLoginLinkResult as ai, DomainsBulkCreateLoginLinks as aj, DomainsBulkCreateLoginLinksResponse as ak, ListNames as al, ListEntryOptions as am, ListEntry as an, ListEntryResponse as ao, ListEntriesResponse as ap, UsersCreateOptions as aq, UsersCreateResponse as ar, ServiceSubscriptionsResponse as as, ServiceReportOptions as at, SuccessResponse as au, EmailsSendRecipient as d, EmailsSendAttachment as e, EmailsSendTracking as f, EmailsSendOptionsBase as g, EmailsSendOptions as h, EmailsSendResponse as i, EmailsCheckDomainDkim as j, EmailsCheckDomainOptions as k, EmailsCheckDomainVerdict as l, EmailsCheckDomainResponse as m, EmailsCreateDkimKeyOptions as n, EmailsDkimKey as o, EmailsCreateDkimKeyResponse as p, EmailsGetDkimKeysOptions as q, EmailsGetDkimKeysResponse as r, EmailsUpdateDkimKeyOptions as s, WebhooksListResponse as t, WebhooksSigningKeyResponse as u, WebhooksValidateResponse as v, SubAccountsAccount as w, SubAccountsCreateResponse as x, SubAccountsListOptions as y, SubAccountsListResponse as z };
|
|
@@ -9,6 +9,15 @@ declare class MailChannelsClient {
|
|
|
9
9
|
get<T>(path: string, options?: Omit<FetchOptions<"json">, "method">): Promise<T>;
|
|
10
10
|
delete<T>(path: string, options?: Omit<FetchOptions<"json">, "method">): Promise<T>;
|
|
11
11
|
put<T>(path: string, options?: Omit<FetchOptions<"json">, "method">): Promise<T>;
|
|
12
|
+
patch<T>(path: string, options?: Omit<FetchOptions<"json">, "method">): Promise<T>;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
interface SuccessResponse {
|
|
16
|
+
/**
|
|
17
|
+
* Whether the operation was successful.
|
|
18
|
+
*/
|
|
19
|
+
success: boolean;
|
|
20
|
+
error: string | null;
|
|
12
21
|
}
|
|
13
22
|
|
|
14
23
|
interface EmailsSendRecipient {
|
|
@@ -286,6 +295,120 @@ interface EmailsCheckDomainResponse {
|
|
|
286
295
|
error: string | null;
|
|
287
296
|
}
|
|
288
297
|
|
|
298
|
+
interface EmailsCreateDkimKeyOptions {
|
|
299
|
+
/**
|
|
300
|
+
* Algorithm used for the new key pair Currently, only RSA is supported.
|
|
301
|
+
* @default "rsa"
|
|
302
|
+
*/
|
|
303
|
+
algorithm?: "rsa";
|
|
304
|
+
/**
|
|
305
|
+
* Key length in bits. For RSA, must be a multiple of 1024. Common values: 1024 or 2048.
|
|
306
|
+
* @default 2048
|
|
307
|
+
*/
|
|
308
|
+
length?: 1024 | 2048 | 3072 | 4096;
|
|
309
|
+
/**
|
|
310
|
+
* Selector for the new key pair. Must be a maximum of 63 characters.
|
|
311
|
+
*/
|
|
312
|
+
selector: string;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
interface EmailsDkimKey {
|
|
316
|
+
/**
|
|
317
|
+
* Algorithm used for the key pair.
|
|
318
|
+
*/
|
|
319
|
+
algorithm: string;
|
|
320
|
+
/**
|
|
321
|
+
* Timestamp when the key pair was created.
|
|
322
|
+
*/
|
|
323
|
+
createdAt: string;
|
|
324
|
+
/**
|
|
325
|
+
* Suggested DNS records for the DKIM key.
|
|
326
|
+
*/
|
|
327
|
+
dnsRecords: {
|
|
328
|
+
name: string;
|
|
329
|
+
type: string;
|
|
330
|
+
value: string;
|
|
331
|
+
}[];
|
|
332
|
+
/**
|
|
333
|
+
* Domain associated with the key pair.
|
|
334
|
+
*/
|
|
335
|
+
domain: string;
|
|
336
|
+
/**
|
|
337
|
+
* Key length in bits.
|
|
338
|
+
*/
|
|
339
|
+
length: 1024 | 2048 | 3072 | 4096;
|
|
340
|
+
publicKey: string;
|
|
341
|
+
/**
|
|
342
|
+
* Selector assigned to the key pair.
|
|
343
|
+
*/
|
|
344
|
+
selector: string;
|
|
345
|
+
/**
|
|
346
|
+
* Status of the key.
|
|
347
|
+
*/
|
|
348
|
+
status: "active" | "revoked" | "retired";
|
|
349
|
+
/**
|
|
350
|
+
* Timestamp when the key was last modified.
|
|
351
|
+
*/
|
|
352
|
+
statusModifiedAt: string;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
interface EmailsCreateDkimKeyResponse {
|
|
356
|
+
/**
|
|
357
|
+
* The created DKIM key information.
|
|
358
|
+
*/
|
|
359
|
+
key: EmailsDkimKey | null;
|
|
360
|
+
error: string | null;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
interface EmailsGetDkimKeysOptions {
|
|
364
|
+
/**
|
|
365
|
+
* Selector to filter keys by. Must be a maximum of 63 characters.
|
|
366
|
+
*/
|
|
367
|
+
selector?: string;
|
|
368
|
+
/**
|
|
369
|
+
* Status to filter keys by.
|
|
370
|
+
*/
|
|
371
|
+
status?: EmailsDkimKey["status"];
|
|
372
|
+
/**
|
|
373
|
+
* Number of keys to skip before returning results.
|
|
374
|
+
* @default 0
|
|
375
|
+
*/
|
|
376
|
+
offset?: number;
|
|
377
|
+
/**
|
|
378
|
+
* Maximum number of keys to return. Maximum is `100` and minimum is `1`.
|
|
379
|
+
* @default 10
|
|
380
|
+
*/
|
|
381
|
+
limit?: number;
|
|
382
|
+
/**
|
|
383
|
+
* If `true`, includes the suggested DKIM DNS record for each returned key.
|
|
384
|
+
* @default false
|
|
385
|
+
*/
|
|
386
|
+
includeDnsRecord?: boolean;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
type Optional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
390
|
+
|
|
391
|
+
interface EmailsGetDkimKeysResponse {
|
|
392
|
+
/**
|
|
393
|
+
* List of keys matching the filter. Empty if no keys match the filter.
|
|
394
|
+
*/
|
|
395
|
+
keys: Optional<EmailsDkimKey, "dnsRecords">[];
|
|
396
|
+
error: string | null;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
interface EmailsUpdateDkimKeyOptions {
|
|
400
|
+
/**
|
|
401
|
+
* Selector of the DKIM key pair to update. Must be a maximum of 63 characters.
|
|
402
|
+
*/
|
|
403
|
+
selector: string;
|
|
404
|
+
/**
|
|
405
|
+
* New status of the DKIM key pair
|
|
406
|
+
* - `revoked`: Indicates that the key is compromised and should not be used.
|
|
407
|
+
* - `retired`: Indicates that the key has been rotated and is no longer in use.
|
|
408
|
+
*/
|
|
409
|
+
status: Exclude<EmailsDkimKey["status"], "active">;
|
|
410
|
+
}
|
|
411
|
+
|
|
289
412
|
declare class Emails {
|
|
290
413
|
protected mailchannels: MailChannelsClient;
|
|
291
414
|
constructor(mailchannels: MailChannelsClient);
|
|
@@ -323,14 +446,45 @@ declare class Emails {
|
|
|
323
446
|
* ```
|
|
324
447
|
*/
|
|
325
448
|
checkDomain(options: EmailsCheckDomainOptions): Promise<EmailsCheckDomainResponse>;
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
449
|
+
/**
|
|
450
|
+
* Create a DKIM key pair for a specified domain and selector using the specified algorithm and key length, for the current customer.
|
|
451
|
+
* @param domain - The domain to create the DKIM key for.
|
|
452
|
+
* @param options - DKIM key creation options.
|
|
453
|
+
* @example
|
|
454
|
+
* ```ts
|
|
455
|
+
* const mailchannels = new MailChannels('your-api-key')
|
|
456
|
+
* const { key, error } = await mailchannels.emails.createDkimKey('example.com', {
|
|
457
|
+
* selector: 'mailchannels'
|
|
458
|
+
* })
|
|
459
|
+
* ```
|
|
460
|
+
*/
|
|
461
|
+
createDkimKey(domain: string, options: EmailsCreateDkimKeyOptions): Promise<EmailsCreateDkimKeyResponse>;
|
|
462
|
+
/**
|
|
463
|
+
* Search for DKIM keys by customer handle and domain, with optional filters. If selector is provided, at most one key will be returned.
|
|
464
|
+
* @param domain - The domain to search DKIM keys for.
|
|
465
|
+
* @param options - The options to filter DKIM keys by.
|
|
466
|
+
* @example
|
|
467
|
+
* ```ts
|
|
468
|
+
* const mailchannels = new MailChannels('your-api-key')
|
|
469
|
+
* const { keys } = await mailchannels.getDkimKeys('example.com', {
|
|
470
|
+
* includeDnsRecord: true
|
|
471
|
+
* })
|
|
472
|
+
* ```
|
|
473
|
+
*/
|
|
474
|
+
getDkimKeys(domain: string, options?: EmailsGetDkimKeysOptions): Promise<EmailsGetDkimKeysResponse>;
|
|
475
|
+
/**
|
|
476
|
+
* Update fields of an existing DKIM key pair for the specified domain and selector, for the current customer. Currently, only the `status` field can be updated.
|
|
477
|
+
* @param domain - The domain the DKIM key belongs to.
|
|
478
|
+
* @param options - The options to update the DKIM key.
|
|
479
|
+
* @example
|
|
480
|
+
* ```ts
|
|
481
|
+
* const mailchannels = new MailChannels('your-api-key')
|
|
482
|
+
* const { success } = await mailchannels.emails.updateDkimKey('example.com', {
|
|
483
|
+
* selector: 'mailchannels',
|
|
484
|
+
* status: 'retired'
|
|
485
|
+
* })
|
|
486
|
+
*/
|
|
487
|
+
updateDkimKey(domain: string, options: EmailsUpdateDkimKeyOptions): Promise<SuccessResponse>;
|
|
334
488
|
}
|
|
335
489
|
|
|
336
490
|
interface WebhooksListResponse {
|
|
@@ -1256,20 +1410,19 @@ interface DomainsBulkCreateLoginLinkResult {
|
|
|
1256
1410
|
* More information about the result of creating the login link.
|
|
1257
1411
|
*/
|
|
1258
1412
|
comment?: string;
|
|
1413
|
+
/**
|
|
1414
|
+
* If a user browses to this URL, they will be automatically logged in as a domain admin.
|
|
1415
|
+
*/
|
|
1416
|
+
loginLink: string;
|
|
1259
1417
|
}
|
|
1260
1418
|
|
|
1261
|
-
interface
|
|
1262
|
-
successes: DomainsBulkCreateLoginLinkResult
|
|
1263
|
-
|
|
1264
|
-
* If a user browses to this URL, they will be automatically logged in as a domain admin.
|
|
1265
|
-
*/
|
|
1266
|
-
loginLink: string;
|
|
1267
|
-
}[];
|
|
1268
|
-
errors: DomainsBulkCreateLoginLinkResult[];
|
|
1419
|
+
interface DomainsBulkCreateLoginLinks {
|
|
1420
|
+
successes: DomainsBulkCreateLoginLinkResult[];
|
|
1421
|
+
errors: Omit<DomainsBulkCreateLoginLinkResult, "loginLink">[];
|
|
1269
1422
|
}
|
|
1270
1423
|
|
|
1271
1424
|
interface DomainsBulkCreateLoginLinksResponse {
|
|
1272
|
-
results:
|
|
1425
|
+
results: DomainsBulkCreateLoginLinks | null;
|
|
1273
1426
|
error: string | null;
|
|
1274
1427
|
}
|
|
1275
1428
|
|
|
@@ -1644,4 +1797,4 @@ declare class Service {
|
|
|
1644
1797
|
}
|
|
1645
1798
|
|
|
1646
1799
|
export { Domains as D, Emails as E, Lists as L, MailChannelsClient as M, SubAccounts as S, Users as U, Webhooks as W, Metrics as a, Suppressions as b, Service as c };
|
|
1647
|
-
export type {
|
|
1800
|
+
export type { MetricsVolumeResponse as $, SubAccountsApiKey as A, SubAccountsCreateApiKeyResponse as B, SubAccountsListApiKeyResponse as C, SubAccountsSmtpPassword as F, SubAccountsCreateSmtpPasswordResponse as G, SubAccountsListSmtpPasswordResponse as H, SubAccountsLimit as I, SubAccountsLimitResponse as J, SubAccountsUsage as K, SubAccountsUsageResponse as N, Optional as O, MetricsBucket as P, MetricsOptions as Q, MetricsEngagement as R, MetricsEngagementResponse as T, MetricsPerformance as V, MetricsPerformanceResponse as X, MetricsRecipientBehaviour as Y, MetricsRecipientBehaviourResponse as Z, MetricsVolume as _, MetricsUsageResponse as a0, SuppressionsTypes as a1, SuppressionsCreateOptions as a2, SuppressionsSource as a3, SuppressionsListOptions as a4, SuppressionsListEntry as a5, SuppressionsListResponse as a6, DomainsData as a7, DomainsProvisionOptions as a8, DomainsBulkProvisionOptions as a9, DomainsProvisionResponse as aa, DomainsBulkProvisionResponse as ab, DomainsListOptions as ac, DomainsListResponse as ad, DomainsCreateLoginLinkResponse as ae, DomainsListDownstreamAddressesOptions as af, DomainsDownstreamAddress as ag, DomainsListDownstreamAddressesResponse as ah, DomainsBulkCreateLoginLinkResult as ai, DomainsBulkCreateLoginLinks as aj, DomainsBulkCreateLoginLinksResponse as ak, ListNames as al, ListEntryOptions as am, ListEntry as an, ListEntryResponse as ao, ListEntriesResponse as ap, UsersCreateOptions as aq, UsersCreateResponse as ar, ServiceSubscriptionsResponse as as, ServiceReportOptions as at, SuccessResponse as au, EmailsSendRecipient as d, EmailsSendAttachment as e, EmailsSendTracking as f, EmailsSendOptionsBase as g, EmailsSendOptions as h, EmailsSendResponse as i, EmailsCheckDomainDkim as j, EmailsCheckDomainOptions as k, EmailsCheckDomainVerdict as l, EmailsCheckDomainResponse as m, EmailsCreateDkimKeyOptions as n, EmailsDkimKey as o, EmailsCreateDkimKeyResponse as p, EmailsGetDkimKeysOptions as q, EmailsGetDkimKeysResponse as r, EmailsUpdateDkimKeyOptions as s, WebhooksListResponse as t, WebhooksSigningKeyResponse as u, WebhooksValidateResponse as v, SubAccountsAccount as w, SubAccountsCreateResponse as x, SubAccountsListOptions as y, SubAccountsListResponse as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mailchannels-sdk",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "Node.js SDK to integrate MailChannels API into your JavaScript or TypeScript server-side applications.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@eslint/compat": "^1.3.2",
|
|
45
45
|
"@stylistic/eslint-plugin": "^5.3.1",
|
|
46
|
-
"@types/node": "^24.
|
|
47
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
48
|
-
"@typescript-eslint/parser": "^8.
|
|
46
|
+
"@types/node": "^24.5.1",
|
|
47
|
+
"@typescript-eslint/eslint-plugin": "^8.44.0",
|
|
48
|
+
"@typescript-eslint/parser": "^8.44.0",
|
|
49
49
|
"@vitest/coverage-v8": "^3.2.4",
|
|
50
50
|
"changelogen": "^0.6.2",
|
|
51
51
|
"eslint": "^9.35.0",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
},
|
|
61
61
|
"scripts": {
|
|
62
62
|
"build": "unbuild",
|
|
63
|
-
"release": "npm run lint && npm run test && changelogen --release && git push --follow-tags",
|
|
63
|
+
"release": "npm run lint && npm run test && pnpm build && changelogen --release && git push --follow-tags",
|
|
64
64
|
"lint": "eslint",
|
|
65
65
|
"lint:fix": "eslint --fix",
|
|
66
66
|
"test": "vitest run --reporter=verbose --coverage",
|