mailchannels-sdk 0.4.4 → 0.4.6

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 CHANGED
@@ -33,13 +33,13 @@ This library provides a simple way to interact with the [MailChannels API](https
33
33
 
34
34
  - Send transactional emails
35
35
  - Check DKIM, SPF & Domain Lockdown
36
+ - Configure DKIM keys
36
37
  - Webhook notifications
37
38
  - Manage sub-accounts
38
39
  - Retrieve metrics
39
- - Manage suppressions
40
- - Manage inbound domains
41
- - Manage account lists
42
- - Manage recipient lists
40
+ - Handle suppressions
41
+ - Configure inbound domains
42
+ - Manage account and recipient lists
43
43
 
44
44
  ## <a name="requirements">📏 Requirements</a>
45
45
 
@@ -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.CiU7QtsS.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.CiU7QtsS.mjs';
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.DgBM4Ujq.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.DgBM4Ujq.mjs';
3
3
  import 'ofetch';
4
4
 
5
5
  declare class MailChannels extends MailChannelsClient {
@@ -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.CiU7QtsS.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.CiU7QtsS.js';
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.DgBM4Ujq.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.DgBM4Ujq.js';
3
3
  import 'ofetch';
4
4
 
5
5
  declare class MailChannels extends MailChannelsClient {
@@ -1,2 +1,2 @@
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.CiU7QtsS.mjs';
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.DgBM4Ujq.mjs';
2
2
  import 'ofetch';
package/dist/modules.d.ts CHANGED
@@ -1,2 +1,2 @@
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.CiU7QtsS.js';
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.DgBM4Ujq.js';
2
2
  import 'ofetch';
package/dist/modules.mjs CHANGED
@@ -103,6 +103,7 @@ class Emails {
103
103
  dkim_selector: dkim?.selector || void 0,
104
104
  dynamic_template_data: options.mustaches
105
105
  }],
106
+ headers: options.headers,
106
107
  reply_to: parseRecipient(options.replyTo),
107
108
  from: parsedFrom,
108
109
  subject: options.subject,
@@ -160,12 +161,12 @@ class Emails {
160
161
  */
161
162
  async checkDomain(options) {
162
163
  const { dkim, domain, senderId } = options;
163
- const dkimOptions = Array.isArray(dkim) ? dkim : [dkim];
164
+ const dkimOptions = dkim ? Array.isArray(dkim) ? dkim : [dkim] : void 0;
164
165
  const data = { results: null, error: null };
165
166
  const payload = {
166
- dkim_settings: dkimOptions.map(({ domain: domain2, privateKey, selector }) => ({
167
+ dkim_settings: dkimOptions?.map(({ domain: domain2, privateKey, selector }) => ({
167
168
  dkim_domain: domain2,
168
- dkim_private_key: stripPemHeaders(privateKey),
169
+ dkim_private_key: privateKey ? stripPemHeaders(privateKey) : void 0,
169
170
  dkim_selector: selector
170
171
  })),
171
172
  domain,
@@ -182,13 +183,15 @@ class Emails {
182
183
  }).catch(() => null);
183
184
  if (!response) return data;
184
185
  data.results = {
185
- dkim: response.check_results.dkim.map(({ dkim_domain, dkim_selector, reason, verdict }) => ({
186
- domain: dkim_domain,
187
- selector: dkim_selector,
188
- reason,
189
- verdict
186
+ dkim: response.check_results.dkim.map((dkimResults) => ({
187
+ domain: dkimResults.dkim_domain,
188
+ keyStatus: dkimResults.dkim_key_status,
189
+ selector: dkimResults.dkim_selector,
190
+ reason: dkimResults.reason,
191
+ verdict: dkimResults.verdict
190
192
  })),
191
193
  domainLockdown: response.check_results.domain_lockdown,
194
+ senderDomain: response.check_results.sender_domain,
192
195
  spf: response.check_results.spf,
193
196
  references: response.references
194
197
  };
@@ -1252,7 +1255,7 @@ class Domains {
1252
1255
  }
1253
1256
  /**
1254
1257
  * Provision a single domain to use MailChannels Inbound.
1255
- * @param options - The domain data to provision.
1258
+ * @param options - The provision options and domain data.
1256
1259
  * @example
1257
1260
  * ```ts
1258
1261
  * const mailchannels = new MailChannels('your-api-key')
@@ -1285,7 +1288,7 @@ class Domains {
1285
1288
  /**
1286
1289
  * Provision up to 1000 domains to use MailChannels Inbound.
1287
1290
  * @param options - The options to provision the domains.
1288
- * @param domains - The list of domains to provision.
1291
+ * @param domains - A list of domain data to provision.
1289
1292
  * @example
1290
1293
  * ```ts
1291
1294
  * const mailchannels = new MailChannels('your-api-key')
@@ -129,6 +129,15 @@ interface EmailsSendOptionsBase {
129
129
  * 'Name <email@example.com>'
130
130
  */
131
131
  from: EmailsSendRecipient | string;
132
+ /**
133
+ * An object containing key-value pairs, where both keys (header names) and values must be strings. These pairs represent custom headers to be substituted.
134
+ *
135
+ * Please note the following restrictions and behavior:
136
+ * - **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`.
137
+ * - **Header precedence**: If a header is defined in both the personalizations object and the root headers, the value from personalizations will be used.
138
+ * - **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.
139
+ */
140
+ headers?: Record<string, string>;
132
141
  /**
133
142
  * 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.
134
143
  * @example
@@ -187,13 +196,13 @@ interface EmailsSendOptionsBase {
187
196
  type EmailsSendOptions = EmailsSendOptionsBase & (
188
197
  | {
189
198
  /**
190
- * The HTML content of the email
199
+ * The HTML content of the email.
191
200
  * @example
192
201
  * '<p>Hello World</p>'
193
202
  */
194
203
  html: string;
195
204
  /**
196
- * The plain text content of the email (optional when html is provided)
205
+ * The plain text content of the email (optional when html is provided).
197
206
  * @example
198
207
  * 'Hello World'
199
208
  */
@@ -201,13 +210,13 @@ type EmailsSendOptions = EmailsSendOptionsBase & (
201
210
  }
202
211
  | {
203
212
  /**
204
- * The HTML content of the email (optional when text is provided)
213
+ * The HTML content of the email (optional when text is provided).
205
214
  * @example
206
215
  * '<p>Hello World</p>'
207
216
  */
208
217
  html?: string;
209
218
  /**
210
- * The plain text content of the email
219
+ * The plain text content of the email.
211
220
  * @example
212
221
  * 'Hello World'
213
222
  */
@@ -217,7 +226,7 @@ type EmailsSendOptions = EmailsSendOptionsBase & (
217
226
 
218
227
  interface EmailsSendResponse {
219
228
  /**
220
- * Indicates if the email was successfully sent
229
+ * Indicates if the email was successfully sent.
221
230
  */
222
231
  success: boolean;
223
232
  data: {
@@ -251,74 +260,6 @@ interface EmailsSendResponse {
251
260
  error: string | null;
252
261
  }
253
262
 
254
- interface EmailsCheckDomainDkim {
255
- /**
256
- * Domain used for DKIM signing.
257
- */
258
- domain: string;
259
- /**
260
- * DKIM private key encoded in Base64.
261
- */
262
- privateKey: string;
263
- /**
264
- * DKIM selector in the domain DNS records.
265
- */
266
- selector: string;
267
- }
268
-
269
- interface EmailsCheckDomainOptions {
270
- /**
271
- * Up to 10 DKIM checks are allowed.
272
- */
273
- dkim: EmailsCheckDomainDkim[] | EmailsCheckDomainDkim;
274
- /**
275
- * Domain used for sending emails.
276
- */
277
- domain: string;
278
- /**
279
- * `X-MailChannels-Sender-Id` header value in emails via MailChannels.
280
- */
281
- senderId: string;
282
- }
283
-
284
- type EmailsCheckDomainVerdict = "passed" | "failed" | "soft failed" | "temporary error" | "permanent error" | "neutral" | "none" | "unknown";
285
-
286
- interface EmailsCheckDomainResponse {
287
- /**
288
- * The results of the domain checks.
289
- */
290
- results: {
291
- dkim: {
292
- domain: string;
293
- selector: string;
294
- /**
295
- * A human-readable explanation of DKIM check.
296
- */
297
- reason?: string;
298
- verdict: Extract<EmailsCheckDomainVerdict, "passed" | "failed">;
299
- }[];
300
- domainLockdown: {
301
- /**
302
- * A human-readable explanation of Domain Lockdown check.
303
- */
304
- reason?: string;
305
- verdict: Extract<EmailsCheckDomainVerdict, "passed" | "failed">;
306
- };
307
- spf: {
308
- /**
309
- * A human-readable explanation of SPF check.
310
- */
311
- reason?: string;
312
- verdict: EmailsCheckDomainVerdict;
313
- };
314
- references?: string[];
315
- } | null;
316
- /**
317
- * Link to SPF, Domain Lockdown or DKIM references, displayed if any verdict is not passed.
318
- */
319
- error: string | null;
320
- }
321
-
322
263
  interface EmailsCreateDkimKeyOptions {
323
264
  /**
324
265
  * Algorithm used for the new key pair Currently, only RSA is supported.
@@ -384,6 +325,107 @@ interface EmailsCreateDkimKeyResponse {
384
325
  error: string | null;
385
326
  }
386
327
 
328
+ interface EmailsCheckDomainDkim {
329
+ /**
330
+ * Domain used for DKIM signing.
331
+ */
332
+ domain?: string;
333
+ /**
334
+ * DKIM private key encoded in Base64.
335
+ */
336
+ privateKey?: string;
337
+ /**
338
+ * DKIM selector in the domain DNS records.
339
+ */
340
+ selector?: string;
341
+ }
342
+
343
+ interface EmailsCheckDomainOptions {
344
+ /**
345
+ * 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:
346
+ * - If `domain`, `selector`, and `privateKey` are all present, verify using the provided domain, selector, and key.
347
+ * - If `domain` and `selector` are present, use the stored private key for the given domain and selector.
348
+ * - If only `domain` is present, use all stored keys for the given domain.
349
+ * - If none are present, use all stored keys for the `domain` provided in the domain field of the request.
350
+ * - If `privateKey` is present, `selector` must be present.
351
+ * - If `selector` is present and `domain` is not, the domain will be taken from the domain field of the request.
352
+ */
353
+ dkim?: EmailsCheckDomainDkim[] | EmailsCheckDomainDkim;
354
+ /**
355
+ * 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.
356
+ */
357
+ domain: string;
358
+ /**
359
+ * 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.
360
+ */
361
+ senderId?: string;
362
+ }
363
+
364
+ type EmailsCheckDomainVerdict = "passed" | "failed" | "soft failed" | "temporary error" | "permanent error" | "neutral" | "none" | "unknown";
365
+
366
+ interface EmailsCheckDomainResponse {
367
+ /**
368
+ * The results of the domain checks.
369
+ */
370
+ results: {
371
+ dkim: {
372
+ domain: string;
373
+ /**
374
+ * The human readable status of the DKIM key used for verification.
375
+ */
376
+ keyStatus?: EmailsDkimKey["status"] | "provided";
377
+ selector: string;
378
+ /**
379
+ * A human-readable explanation of DKIM check.
380
+ */
381
+ reason?: string;
382
+ verdict: Extract<EmailsCheckDomainVerdict, "passed" | "failed">;
383
+ }[];
384
+ domainLockdown: {
385
+ /**
386
+ * A human-readable explanation of Domain Lockdown check.
387
+ */
388
+ reason?: string;
389
+ verdict: Extract<EmailsCheckDomainVerdict, "passed" | "failed">;
390
+ };
391
+ /**
392
+ * 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.
393
+ */
394
+ senderDomain: {
395
+ a: {
396
+ /**
397
+ * A human-readable explanation of A record check.
398
+ */
399
+ reason?: string;
400
+ verdict: Extract<EmailsCheckDomainVerdict, "passed" | "failed">;
401
+ };
402
+ mx: {
403
+ /**
404
+ * A human-readable explanation of MX record check.
405
+ */
406
+ reason?: string;
407
+ verdict: Extract<EmailsCheckDomainVerdict, "passed" | "failed">;
408
+ };
409
+ /**
410
+ * Overall verdict. Passed if either A or MX record check passed.
411
+ */
412
+ verdict: Extract<EmailsCheckDomainVerdict, "passed" | "failed">;
413
+ };
414
+ spf: {
415
+ /**
416
+ * A human-readable explanation of SPF check.
417
+ */
418
+ reason?: string;
419
+ verdict: EmailsCheckDomainVerdict;
420
+ };
421
+ references?: string[];
422
+ } | null;
423
+ /**
424
+ * Link to SPF, Domain Lockdown or DKIM references, displayed if any verdict is not passed.
425
+ */
426
+ error: string | null;
427
+ }
428
+
387
429
  interface EmailsGetDkimKeysOptions {
388
430
  /**
389
431
  * Selector to filter keys by. Must be a maximum of 63 characters.
@@ -426,7 +468,7 @@ interface EmailsUpdateDkimKeyOptions {
426
468
  */
427
469
  selector: string;
428
470
  /**
429
- * New status of the DKIM key pair
471
+ * New status of the DKIM key pair.
430
472
  * - `revoked`: Indicates that the key is compromised and should not be used.
431
473
  * - `retired`: Indicates that the key has been rotated and is no longer in use.
432
474
  */
@@ -523,7 +565,7 @@ interface WebhooksSigningKeyResponse {
523
565
 
524
566
  interface WebhooksValidateResponse {
525
567
  /**
526
- * Indicates whether all webhook validations passed
568
+ * Indicates whether all webhook validations passed.
527
569
  */
528
570
  allPassed: boolean;
529
571
  /**
@@ -531,11 +573,11 @@ interface WebhooksValidateResponse {
531
573
  */
532
574
  results: {
533
575
  /**
534
- * Indicates whether the webhook responded with a 2xx HTTP status code
576
+ * Indicates whether the webhook responded with a 2xx HTTP status code.
535
577
  */
536
578
  result: "passed" | "failed";
537
579
  /**
538
- * The webhook that was validated
580
+ * The webhook that was validated.
539
581
  */
540
582
  webhook: string;
541
583
  /**
@@ -547,7 +589,7 @@ interface WebhooksValidateResponse {
547
589
  */
548
590
  body?: string;
549
591
  /**
550
- * HTTP status code returned by the webhook
592
+ * HTTP status code returned by the webhook.
551
593
  */
552
594
  status: number;
553
595
  } | null;
@@ -1144,11 +1186,11 @@ interface SuppressionsListOptions {
1144
1186
  */
1145
1187
  source?: Exclude<SuppressionsSource, "all">;
1146
1188
  /**
1147
- * The date and/or time before which the suppression entries were created. Format: `YYYY-MM-DD` or `YYYY-MM-DDTHH:MM:SSZ`
1189
+ * The date and/or time before which the suppression entries were created. Format: `YYYY-MM-DD` or `YYYY-MM-DDTHH:MM:SSZ`.
1148
1190
  */
1149
1191
  createdBefore?: string;
1150
1192
  /**
1151
- * The date and/or time after which the suppression entries were created. Format: `YYYY-MM-DD` or `YYYY-MM-DDTHH:MM:SSZ`
1193
+ * The date and/or time after which the suppression entries were created. Format: `YYYY-MM-DD` or `YYYY-MM-DDTHH:MM:SSZ`.
1152
1194
  */
1153
1195
  createdAfter?: string;
1154
1196
  /**
@@ -1298,7 +1340,7 @@ interface DomainsData {
1298
1340
  target: string;
1299
1341
  }[] | null;
1300
1342
  /**
1301
- * 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
1343
+ * 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.
1302
1344
  */
1303
1345
  aliases?: string[] | null;
1304
1346
  /**
@@ -1321,6 +1363,9 @@ interface DomainsProvisionOptions {
1321
1363
  type DomainsBulkProvisionOptions = DomainsProvisionOptions & Pick<DomainsData, "subscriptionHandle">;
1322
1364
 
1323
1365
  interface DomainsProvisionResponse {
1366
+ /**
1367
+ * The provisioned domain data.
1368
+ */
1324
1369
  data: DomainsData | null;
1325
1370
  error: string | null;
1326
1371
  }
@@ -1334,6 +1379,9 @@ interface DomainsBulkProvisionResponse {
1334
1379
  * Domains that were successfully provisioned or updated.
1335
1380
  */
1336
1381
  successes: {
1382
+ /**
1383
+ * The provisioned domain data.
1384
+ */
1337
1385
  domain: DomainsData;
1338
1386
  code: number;
1339
1387
  comment?: string;
@@ -1342,6 +1390,9 @@ interface DomainsBulkProvisionResponse {
1342
1390
  * Domains that were not successfully provisioned.
1343
1391
  */
1344
1392
  errors: {
1393
+ /**
1394
+ * The failed to provision domain data.
1395
+ */
1345
1396
  domain: DomainsData;
1346
1397
  code: number;
1347
1398
  comment?: string;
@@ -1356,7 +1407,7 @@ interface DomainsListOptions {
1356
1407
  */
1357
1408
  domains?: string[];
1358
1409
  /**
1359
- * The maximum number of domains included in the response. Possible values are 1 to 5000
1410
+ * The maximum number of domains included in the response. Possible values are 1 to 5000.
1360
1411
  * @default 10
1361
1412
  */
1362
1413
  limit?: number;
@@ -1369,7 +1420,7 @@ interface DomainsListOptions {
1369
1420
 
1370
1421
  interface DomainsListResponse {
1371
1422
  /**
1372
- * A list of domains
1423
+ * A list of domains.
1373
1424
  */
1374
1425
  domains: DomainsData[];
1375
1426
  /**
@@ -1455,7 +1506,7 @@ declare class Domains {
1455
1506
  constructor(mailchannels: MailChannelsClient);
1456
1507
  /**
1457
1508
  * Provision a single domain to use MailChannels Inbound.
1458
- * @param options - The domain data to provision.
1509
+ * @param options - The provision options and domain data.
1459
1510
  * @example
1460
1511
  * ```ts
1461
1512
  * const mailchannels = new MailChannels('your-api-key')
@@ -1469,7 +1520,7 @@ declare class Domains {
1469
1520
  /**
1470
1521
  * Provision up to 1000 domains to use MailChannels Inbound.
1471
1522
  * @param options - The options to provision the domains.
1472
- * @param domains - The list of domains to provision.
1523
+ * @param domains - A list of domain data to provision.
1473
1524
  * @example
1474
1525
  * ```ts
1475
1526
  * const mailchannels = new MailChannels('your-api-key')
@@ -1651,7 +1702,7 @@ declare class Lists {
1651
1702
 
1652
1703
  interface UsersCreateOptions {
1653
1704
  /**
1654
- * Flag to indicate if the user is a domain admin or a regular user
1705
+ * Flag to indicate if the user is a domain admin or a regular user.
1655
1706
  * @default false
1656
1707
  */
1657
1708
  admin?: boolean;
@@ -1664,7 +1715,7 @@ interface UsersCreateOptions {
1664
1715
  */
1665
1716
  filter?: boolean | "compute";
1666
1717
  /**
1667
- * safelist and blocklist entries to be added
1718
+ * safelist and blocklist entries to be added.
1668
1719
  */
1669
1720
  listEntries?: {
1670
1721
  blocklist?: string[];
@@ -1770,7 +1821,7 @@ interface ServiceReportOptions {
1770
1821
  */
1771
1822
  messageContent: string;
1772
1823
  /**
1773
- * The SMTP envelope information
1824
+ * The SMTP envelope information.
1774
1825
  */
1775
1826
  smtpEnvelopeInformation?: {
1776
1827
  ehlo: string;
@@ -129,6 +129,15 @@ interface EmailsSendOptionsBase {
129
129
  * 'Name <email@example.com>'
130
130
  */
131
131
  from: EmailsSendRecipient | string;
132
+ /**
133
+ * An object containing key-value pairs, where both keys (header names) and values must be strings. These pairs represent custom headers to be substituted.
134
+ *
135
+ * Please note the following restrictions and behavior:
136
+ * - **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`.
137
+ * - **Header precedence**: If a header is defined in both the personalizations object and the root headers, the value from personalizations will be used.
138
+ * - **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.
139
+ */
140
+ headers?: Record<string, string>;
132
141
  /**
133
142
  * 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.
134
143
  * @example
@@ -187,13 +196,13 @@ interface EmailsSendOptionsBase {
187
196
  type EmailsSendOptions = EmailsSendOptionsBase & (
188
197
  | {
189
198
  /**
190
- * The HTML content of the email
199
+ * The HTML content of the email.
191
200
  * @example
192
201
  * '<p>Hello World</p>'
193
202
  */
194
203
  html: string;
195
204
  /**
196
- * The plain text content of the email (optional when html is provided)
205
+ * The plain text content of the email (optional when html is provided).
197
206
  * @example
198
207
  * 'Hello World'
199
208
  */
@@ -201,13 +210,13 @@ type EmailsSendOptions = EmailsSendOptionsBase & (
201
210
  }
202
211
  | {
203
212
  /**
204
- * The HTML content of the email (optional when text is provided)
213
+ * The HTML content of the email (optional when text is provided).
205
214
  * @example
206
215
  * '<p>Hello World</p>'
207
216
  */
208
217
  html?: string;
209
218
  /**
210
- * The plain text content of the email
219
+ * The plain text content of the email.
211
220
  * @example
212
221
  * 'Hello World'
213
222
  */
@@ -217,7 +226,7 @@ type EmailsSendOptions = EmailsSendOptionsBase & (
217
226
 
218
227
  interface EmailsSendResponse {
219
228
  /**
220
- * Indicates if the email was successfully sent
229
+ * Indicates if the email was successfully sent.
221
230
  */
222
231
  success: boolean;
223
232
  data: {
@@ -251,74 +260,6 @@ interface EmailsSendResponse {
251
260
  error: string | null;
252
261
  }
253
262
 
254
- interface EmailsCheckDomainDkim {
255
- /**
256
- * Domain used for DKIM signing.
257
- */
258
- domain: string;
259
- /**
260
- * DKIM private key encoded in Base64.
261
- */
262
- privateKey: string;
263
- /**
264
- * DKIM selector in the domain DNS records.
265
- */
266
- selector: string;
267
- }
268
-
269
- interface EmailsCheckDomainOptions {
270
- /**
271
- * Up to 10 DKIM checks are allowed.
272
- */
273
- dkim: EmailsCheckDomainDkim[] | EmailsCheckDomainDkim;
274
- /**
275
- * Domain used for sending emails.
276
- */
277
- domain: string;
278
- /**
279
- * `X-MailChannels-Sender-Id` header value in emails via MailChannels.
280
- */
281
- senderId: string;
282
- }
283
-
284
- type EmailsCheckDomainVerdict = "passed" | "failed" | "soft failed" | "temporary error" | "permanent error" | "neutral" | "none" | "unknown";
285
-
286
- interface EmailsCheckDomainResponse {
287
- /**
288
- * The results of the domain checks.
289
- */
290
- results: {
291
- dkim: {
292
- domain: string;
293
- selector: string;
294
- /**
295
- * A human-readable explanation of DKIM check.
296
- */
297
- reason?: string;
298
- verdict: Extract<EmailsCheckDomainVerdict, "passed" | "failed">;
299
- }[];
300
- domainLockdown: {
301
- /**
302
- * A human-readable explanation of Domain Lockdown check.
303
- */
304
- reason?: string;
305
- verdict: Extract<EmailsCheckDomainVerdict, "passed" | "failed">;
306
- };
307
- spf: {
308
- /**
309
- * A human-readable explanation of SPF check.
310
- */
311
- reason?: string;
312
- verdict: EmailsCheckDomainVerdict;
313
- };
314
- references?: string[];
315
- } | null;
316
- /**
317
- * Link to SPF, Domain Lockdown or DKIM references, displayed if any verdict is not passed.
318
- */
319
- error: string | null;
320
- }
321
-
322
263
  interface EmailsCreateDkimKeyOptions {
323
264
  /**
324
265
  * Algorithm used for the new key pair Currently, only RSA is supported.
@@ -384,6 +325,107 @@ interface EmailsCreateDkimKeyResponse {
384
325
  error: string | null;
385
326
  }
386
327
 
328
+ interface EmailsCheckDomainDkim {
329
+ /**
330
+ * Domain used for DKIM signing.
331
+ */
332
+ domain?: string;
333
+ /**
334
+ * DKIM private key encoded in Base64.
335
+ */
336
+ privateKey?: string;
337
+ /**
338
+ * DKIM selector in the domain DNS records.
339
+ */
340
+ selector?: string;
341
+ }
342
+
343
+ interface EmailsCheckDomainOptions {
344
+ /**
345
+ * 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:
346
+ * - If `domain`, `selector`, and `privateKey` are all present, verify using the provided domain, selector, and key.
347
+ * - If `domain` and `selector` are present, use the stored private key for the given domain and selector.
348
+ * - If only `domain` is present, use all stored keys for the given domain.
349
+ * - If none are present, use all stored keys for the `domain` provided in the domain field of the request.
350
+ * - If `privateKey` is present, `selector` must be present.
351
+ * - If `selector` is present and `domain` is not, the domain will be taken from the domain field of the request.
352
+ */
353
+ dkim?: EmailsCheckDomainDkim[] | EmailsCheckDomainDkim;
354
+ /**
355
+ * 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.
356
+ */
357
+ domain: string;
358
+ /**
359
+ * 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.
360
+ */
361
+ senderId?: string;
362
+ }
363
+
364
+ type EmailsCheckDomainVerdict = "passed" | "failed" | "soft failed" | "temporary error" | "permanent error" | "neutral" | "none" | "unknown";
365
+
366
+ interface EmailsCheckDomainResponse {
367
+ /**
368
+ * The results of the domain checks.
369
+ */
370
+ results: {
371
+ dkim: {
372
+ domain: string;
373
+ /**
374
+ * The human readable status of the DKIM key used for verification.
375
+ */
376
+ keyStatus?: EmailsDkimKey["status"] | "provided";
377
+ selector: string;
378
+ /**
379
+ * A human-readable explanation of DKIM check.
380
+ */
381
+ reason?: string;
382
+ verdict: Extract<EmailsCheckDomainVerdict, "passed" | "failed">;
383
+ }[];
384
+ domainLockdown: {
385
+ /**
386
+ * A human-readable explanation of Domain Lockdown check.
387
+ */
388
+ reason?: string;
389
+ verdict: Extract<EmailsCheckDomainVerdict, "passed" | "failed">;
390
+ };
391
+ /**
392
+ * 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.
393
+ */
394
+ senderDomain: {
395
+ a: {
396
+ /**
397
+ * A human-readable explanation of A record check.
398
+ */
399
+ reason?: string;
400
+ verdict: Extract<EmailsCheckDomainVerdict, "passed" | "failed">;
401
+ };
402
+ mx: {
403
+ /**
404
+ * A human-readable explanation of MX record check.
405
+ */
406
+ reason?: string;
407
+ verdict: Extract<EmailsCheckDomainVerdict, "passed" | "failed">;
408
+ };
409
+ /**
410
+ * Overall verdict. Passed if either A or MX record check passed.
411
+ */
412
+ verdict: Extract<EmailsCheckDomainVerdict, "passed" | "failed">;
413
+ };
414
+ spf: {
415
+ /**
416
+ * A human-readable explanation of SPF check.
417
+ */
418
+ reason?: string;
419
+ verdict: EmailsCheckDomainVerdict;
420
+ };
421
+ references?: string[];
422
+ } | null;
423
+ /**
424
+ * Link to SPF, Domain Lockdown or DKIM references, displayed if any verdict is not passed.
425
+ */
426
+ error: string | null;
427
+ }
428
+
387
429
  interface EmailsGetDkimKeysOptions {
388
430
  /**
389
431
  * Selector to filter keys by. Must be a maximum of 63 characters.
@@ -426,7 +468,7 @@ interface EmailsUpdateDkimKeyOptions {
426
468
  */
427
469
  selector: string;
428
470
  /**
429
- * New status of the DKIM key pair
471
+ * New status of the DKIM key pair.
430
472
  * - `revoked`: Indicates that the key is compromised and should not be used.
431
473
  * - `retired`: Indicates that the key has been rotated and is no longer in use.
432
474
  */
@@ -523,7 +565,7 @@ interface WebhooksSigningKeyResponse {
523
565
 
524
566
  interface WebhooksValidateResponse {
525
567
  /**
526
- * Indicates whether all webhook validations passed
568
+ * Indicates whether all webhook validations passed.
527
569
  */
528
570
  allPassed: boolean;
529
571
  /**
@@ -531,11 +573,11 @@ interface WebhooksValidateResponse {
531
573
  */
532
574
  results: {
533
575
  /**
534
- * Indicates whether the webhook responded with a 2xx HTTP status code
576
+ * Indicates whether the webhook responded with a 2xx HTTP status code.
535
577
  */
536
578
  result: "passed" | "failed";
537
579
  /**
538
- * The webhook that was validated
580
+ * The webhook that was validated.
539
581
  */
540
582
  webhook: string;
541
583
  /**
@@ -547,7 +589,7 @@ interface WebhooksValidateResponse {
547
589
  */
548
590
  body?: string;
549
591
  /**
550
- * HTTP status code returned by the webhook
592
+ * HTTP status code returned by the webhook.
551
593
  */
552
594
  status: number;
553
595
  } | null;
@@ -1144,11 +1186,11 @@ interface SuppressionsListOptions {
1144
1186
  */
1145
1187
  source?: Exclude<SuppressionsSource, "all">;
1146
1188
  /**
1147
- * The date and/or time before which the suppression entries were created. Format: `YYYY-MM-DD` or `YYYY-MM-DDTHH:MM:SSZ`
1189
+ * The date and/or time before which the suppression entries were created. Format: `YYYY-MM-DD` or `YYYY-MM-DDTHH:MM:SSZ`.
1148
1190
  */
1149
1191
  createdBefore?: string;
1150
1192
  /**
1151
- * The date and/or time after which the suppression entries were created. Format: `YYYY-MM-DD` or `YYYY-MM-DDTHH:MM:SSZ`
1193
+ * The date and/or time after which the suppression entries were created. Format: `YYYY-MM-DD` or `YYYY-MM-DDTHH:MM:SSZ`.
1152
1194
  */
1153
1195
  createdAfter?: string;
1154
1196
  /**
@@ -1298,7 +1340,7 @@ interface DomainsData {
1298
1340
  target: string;
1299
1341
  }[] | null;
1300
1342
  /**
1301
- * 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
1343
+ * 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.
1302
1344
  */
1303
1345
  aliases?: string[] | null;
1304
1346
  /**
@@ -1321,6 +1363,9 @@ interface DomainsProvisionOptions {
1321
1363
  type DomainsBulkProvisionOptions = DomainsProvisionOptions & Pick<DomainsData, "subscriptionHandle">;
1322
1364
 
1323
1365
  interface DomainsProvisionResponse {
1366
+ /**
1367
+ * The provisioned domain data.
1368
+ */
1324
1369
  data: DomainsData | null;
1325
1370
  error: string | null;
1326
1371
  }
@@ -1334,6 +1379,9 @@ interface DomainsBulkProvisionResponse {
1334
1379
  * Domains that were successfully provisioned or updated.
1335
1380
  */
1336
1381
  successes: {
1382
+ /**
1383
+ * The provisioned domain data.
1384
+ */
1337
1385
  domain: DomainsData;
1338
1386
  code: number;
1339
1387
  comment?: string;
@@ -1342,6 +1390,9 @@ interface DomainsBulkProvisionResponse {
1342
1390
  * Domains that were not successfully provisioned.
1343
1391
  */
1344
1392
  errors: {
1393
+ /**
1394
+ * The failed to provision domain data.
1395
+ */
1345
1396
  domain: DomainsData;
1346
1397
  code: number;
1347
1398
  comment?: string;
@@ -1356,7 +1407,7 @@ interface DomainsListOptions {
1356
1407
  */
1357
1408
  domains?: string[];
1358
1409
  /**
1359
- * The maximum number of domains included in the response. Possible values are 1 to 5000
1410
+ * The maximum number of domains included in the response. Possible values are 1 to 5000.
1360
1411
  * @default 10
1361
1412
  */
1362
1413
  limit?: number;
@@ -1369,7 +1420,7 @@ interface DomainsListOptions {
1369
1420
 
1370
1421
  interface DomainsListResponse {
1371
1422
  /**
1372
- * A list of domains
1423
+ * A list of domains.
1373
1424
  */
1374
1425
  domains: DomainsData[];
1375
1426
  /**
@@ -1455,7 +1506,7 @@ declare class Domains {
1455
1506
  constructor(mailchannels: MailChannelsClient);
1456
1507
  /**
1457
1508
  * Provision a single domain to use MailChannels Inbound.
1458
- * @param options - The domain data to provision.
1509
+ * @param options - The provision options and domain data.
1459
1510
  * @example
1460
1511
  * ```ts
1461
1512
  * const mailchannels = new MailChannels('your-api-key')
@@ -1469,7 +1520,7 @@ declare class Domains {
1469
1520
  /**
1470
1521
  * Provision up to 1000 domains to use MailChannels Inbound.
1471
1522
  * @param options - The options to provision the domains.
1472
- * @param domains - The list of domains to provision.
1523
+ * @param domains - A list of domain data to provision.
1473
1524
  * @example
1474
1525
  * ```ts
1475
1526
  * const mailchannels = new MailChannels('your-api-key')
@@ -1651,7 +1702,7 @@ declare class Lists {
1651
1702
 
1652
1703
  interface UsersCreateOptions {
1653
1704
  /**
1654
- * Flag to indicate if the user is a domain admin or a regular user
1705
+ * Flag to indicate if the user is a domain admin or a regular user.
1655
1706
  * @default false
1656
1707
  */
1657
1708
  admin?: boolean;
@@ -1664,7 +1715,7 @@ interface UsersCreateOptions {
1664
1715
  */
1665
1716
  filter?: boolean | "compute";
1666
1717
  /**
1667
- * safelist and blocklist entries to be added
1718
+ * safelist and blocklist entries to be added.
1668
1719
  */
1669
1720
  listEntries?: {
1670
1721
  blocklist?: string[];
@@ -1770,7 +1821,7 @@ interface ServiceReportOptions {
1770
1821
  */
1771
1822
  messageContent: string;
1772
1823
  /**
1773
- * The SMTP envelope information
1824
+ * The SMTP envelope information.
1774
1825
  */
1775
1826
  smtpEnvelopeInformation?: {
1776
1827
  ehlo: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mailchannels-sdk",
3
- "version": "0.4.4",
3
+ "version": "0.4.6",
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,24 +43,24 @@
43
43
  "devDependencies": {
44
44
  "@eslint/compat": "^1.4.0",
45
45
  "@stylistic/eslint-plugin": "^5.4.0",
46
- "@types/node": "^24.5.2",
47
- "@typescript-eslint/eslint-plugin": "^8.44.1",
48
- "@typescript-eslint/parser": "^8.44.1",
46
+ "@types/node": "^24.8.1",
47
+ "@typescript-eslint/eslint-plugin": "^8.46.1",
48
+ "@typescript-eslint/parser": "^8.46.1",
49
49
  "@vitest/coverage-v8": "^3.2.4",
50
50
  "changelogen": "^0.6.2",
51
- "eslint": "^9.36.0",
51
+ "eslint": "^9.37.0",
52
52
  "eslint-plugin-import-x": "^4.16.1",
53
- "jiti": "^2.6.0",
53
+ "jiti": "^2.6.1",
54
54
  "scule": "^1.3.0",
55
- "typescript": "^5.9.2",
55
+ "typescript": "^5.9.3",
56
56
  "unbuild": "^3.6.1",
57
57
  "vitepress": "^1.6.4",
58
- "vitepress-plugin-group-icons": "^1.6.3",
58
+ "vitepress-plugin-group-icons": "^1.6.4",
59
59
  "vitest": "^3.2.4"
60
60
  },
61
61
  "scripts": {
62
62
  "build": "unbuild",
63
- "release": "npm run lint && npm run test && pnpm build && changelogen --release && git push --follow-tags",
63
+ "release": "pnpm lint && pnpm 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",