mailchannels-sdk 0.4.5 → 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.
@@ -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.LKYcN74O.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.LKYcN74O.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.LKYcN74O.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.LKYcN74O.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.LKYcN74O.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.LKYcN74O.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
  };
@@ -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
@@ -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.
@@ -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
@@ -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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mailchannels-sdk",
3
- "version": "0.4.5",
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,9 +43,9 @@
43
43
  "devDependencies": {
44
44
  "@eslint/compat": "^1.4.0",
45
45
  "@stylistic/eslint-plugin": "^5.4.0",
46
- "@types/node": "^24.7.2",
47
- "@typescript-eslint/eslint-plugin": "^8.46.0",
48
- "@typescript-eslint/parser": "^8.46.0",
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
51
  "eslint": "^9.37.0",
@@ -55,7 +55,7 @@
55
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": {