mailchannels-sdk 1.1.0 → 1.3.0
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/.agents/skills/mailchannels-js/resources/custom-tracking-domains.md +83 -0
- package/.agents/skills/mailchannels-js/resources/error-handling.md +1 -0
- package/.agents/skills/mailchannels-js/resources/metrics-and-usage.md +3 -2
- package/.agents/skills/mailchannels-js/resources/sending.md +26 -0
- package/.agents/skills/mailchannels-js/resources/sub-accounts.md +1 -1
- package/.agents/skills/mailchannels-js/resources/suppressions.md +7 -7
- package/README.md +6 -4
- package/dist/_chunks/simulator.mjs +127 -24
- package/dist/mailchannels.d.mts +289 -23
- package/dist/mailchannels.mjs +294 -18
- package/package.json +8 -8
package/dist/mailchannels.d.mts
CHANGED
|
@@ -62,6 +62,11 @@ interface ErrorResponse {
|
|
|
62
62
|
* This field is intended for diagnostic use only and should not be relied upon.
|
|
63
63
|
*/
|
|
64
64
|
type: ErrorType;
|
|
65
|
+
/**
|
|
66
|
+
* An object containing the response, if available.
|
|
67
|
+
* This field may be `null` if no response is available or if the error is not related to an HTTP request or if the response is not a JSON object.
|
|
68
|
+
*/
|
|
69
|
+
response: Record<string, unknown> | null;
|
|
65
70
|
}
|
|
66
71
|
interface SuccessResponse {
|
|
67
72
|
/**
|
|
@@ -129,6 +134,12 @@ interface EmailsSendTracking {
|
|
|
129
134
|
* Track when a recipient clicks a link in your email.
|
|
130
135
|
*/
|
|
131
136
|
click?: {
|
|
137
|
+
/**
|
|
138
|
+
* The name of a configured active click tracking domain.
|
|
139
|
+
* When specified, click tracking links will use this domain instead of the default MailChannels domain.
|
|
140
|
+
* The domain must be registered in your account and have an active status.
|
|
141
|
+
*/
|
|
142
|
+
customDomainName?: string;
|
|
132
143
|
/**
|
|
133
144
|
* @default false
|
|
134
145
|
*/
|
|
@@ -138,6 +149,12 @@ interface EmailsSendTracking {
|
|
|
138
149
|
* Track when a recipient opens your email. Please note that some email clients may not support open tracking.
|
|
139
150
|
*/
|
|
140
151
|
open?: {
|
|
152
|
+
/**
|
|
153
|
+
* The name of a configured active open tracking domain.
|
|
154
|
+
* When specified, the open tracking pixel will use this domain instead of the default MailChannels domain.
|
|
155
|
+
* The domain must be registered in your account and have an active status.
|
|
156
|
+
*/
|
|
157
|
+
customDomainName?: string;
|
|
141
158
|
/**
|
|
142
159
|
* @default false
|
|
143
160
|
*/
|
|
@@ -360,10 +377,21 @@ interface EmailsSendOptionsBase {
|
|
|
360
377
|
/**
|
|
361
378
|
* Mark these messages as transactional or non-transactional. In order for a message to be marked as non-transactional, it must have exactly one recipient per personalization, and it must be DKIM signed. 400 Bad Request will be returned if there are more than one recipient in any personalization for non-transactional messages. If a message is marked as non-transactional, it changes the sending process as follows:
|
|
362
379
|
*
|
|
363
|
-
* List-Unsubscribe headers will be added.
|
|
380
|
+
* List-Unsubscribe and List-Unsubscribe-Post headers will be added, unless you supply your own List-Unsubscribe header, in which case yours is used and neither is added.
|
|
364
381
|
* @default true
|
|
365
382
|
*/
|
|
366
383
|
transactional?: boolean;
|
|
384
|
+
/**
|
|
385
|
+
* Settings to customize the unsubscribe experience for the message.
|
|
386
|
+
*/
|
|
387
|
+
unsubscribe?: {
|
|
388
|
+
/**
|
|
389
|
+
* The name of a configured active unsubscribe tracking domain.
|
|
390
|
+
* When specified, unsubscribe links will use this domain instead of the default MailChannels domain.
|
|
391
|
+
* The domain must be registered in your account and have an active status.
|
|
392
|
+
*/
|
|
393
|
+
customDomainName?: string;
|
|
394
|
+
};
|
|
367
395
|
}
|
|
368
396
|
type EmailsSendTargetOptions = {
|
|
369
397
|
personalizations: (Omit<EmailsSendPersonalization, "template"> & {
|
|
@@ -697,6 +725,171 @@ declare class DomainsDkim {
|
|
|
697
725
|
*/
|
|
698
726
|
rotate(domain: string, selector: string, options: DomainsDkimRotateOptions): Promise<DomainsDkimRotateResponse>;
|
|
699
727
|
}
|
|
728
|
+
type DomainsCustomTrackingScope = "click" | "open" | "unsubscribe";
|
|
729
|
+
interface DomainsCustomTrackingDomain {
|
|
730
|
+
/**
|
|
731
|
+
* The label for this custom tracking domain.
|
|
732
|
+
*/
|
|
733
|
+
name: string;
|
|
734
|
+
/**
|
|
735
|
+
* The registered domain hostname.
|
|
736
|
+
*/
|
|
737
|
+
hostname: string;
|
|
738
|
+
/**
|
|
739
|
+
* The event type this domain handles.
|
|
740
|
+
*/
|
|
741
|
+
scope: DomainsCustomTrackingScope;
|
|
742
|
+
/**
|
|
743
|
+
* Current status of the custom tracking domain.
|
|
744
|
+
*/
|
|
745
|
+
status: "active" | "disabled";
|
|
746
|
+
/**
|
|
747
|
+
* ISO 8601 timestamp when the domain was registered.
|
|
748
|
+
*/
|
|
749
|
+
createdAt: string;
|
|
750
|
+
}
|
|
751
|
+
interface DomainsCustomTrackingDnsSetupRequired {
|
|
752
|
+
/**
|
|
753
|
+
* UUID v4 nonce; also the TXT record value to set. Present only when TXT ownership verification is pending.
|
|
754
|
+
* @example "550e8400-e29b-41d4-a716-446655440000"
|
|
755
|
+
*/
|
|
756
|
+
token?: string;
|
|
757
|
+
/**
|
|
758
|
+
* Fully-qualified DNS TXT record name to add. Present only when TXT ownership verification is pending.
|
|
759
|
+
* @example "_mailchannels-verify.click.example.com"
|
|
760
|
+
*/
|
|
761
|
+
txtRecordName?: string;
|
|
762
|
+
/**
|
|
763
|
+
* Value for the DNS TXT record (same as token). Present only when TXT ownership verification is pending.
|
|
764
|
+
* @example "550e8400-e29b-41d4-a716-446655440000"
|
|
765
|
+
*/
|
|
766
|
+
txtRecordValue?: string;
|
|
767
|
+
/**
|
|
768
|
+
* Human-readable guidance for the DNS records that must be in place before retrying.
|
|
769
|
+
*/
|
|
770
|
+
instructions?: string;
|
|
771
|
+
}
|
|
772
|
+
type DomainsCustomTrackingWithDnsSetupRequired<T extends 202 | 201 | 200 | undefined = undefined> = T extends undefined ? DomainsCustomTrackingDomain & {
|
|
773
|
+
dnsSetupRequired: false;
|
|
774
|
+
} | DomainsCustomTrackingDnsSetupRequired & {
|
|
775
|
+
dnsSetupRequired: true;
|
|
776
|
+
} : T extends 202 ? DomainsCustomTrackingDnsSetupRequired & {
|
|
777
|
+
dnsSetupRequired: true;
|
|
778
|
+
} : DomainsCustomTrackingDomain & {
|
|
779
|
+
dnsSetupRequired: false;
|
|
780
|
+
};
|
|
781
|
+
type DomainsCustomTrackingCreateResponse = DataResponse<DomainsCustomTrackingWithDnsSetupRequired>;
|
|
782
|
+
interface DomainsCustomTrackingListOptions {
|
|
783
|
+
/**
|
|
784
|
+
* Filter by custom tracking domain label.
|
|
785
|
+
*/
|
|
786
|
+
name?: string;
|
|
787
|
+
/**
|
|
788
|
+
* Filter by status.
|
|
789
|
+
*/
|
|
790
|
+
status?: "active" | "disabled";
|
|
791
|
+
/**
|
|
792
|
+
* Filter by scope.
|
|
793
|
+
*/
|
|
794
|
+
scope?: DomainsCustomTrackingScope;
|
|
795
|
+
/**
|
|
796
|
+
* The maximum number of domains to return. Possible values are `1` to `1000`.
|
|
797
|
+
* @default 100
|
|
798
|
+
*/
|
|
799
|
+
limit?: number;
|
|
800
|
+
/**
|
|
801
|
+
* The number of domains to skip before returning results. The default is `0`.
|
|
802
|
+
* @default 0
|
|
803
|
+
*/
|
|
804
|
+
offset?: number;
|
|
805
|
+
}
|
|
806
|
+
type DomainsCustomTrackingListResponse = DataResponse<{
|
|
807
|
+
/**
|
|
808
|
+
* List of custom tracking domains matching the filter criteria.
|
|
809
|
+
*/
|
|
810
|
+
customTrackingDomains: DomainsCustomTrackingDomain[];
|
|
811
|
+
/**
|
|
812
|
+
* Total number of custom tracking domains.
|
|
813
|
+
*/
|
|
814
|
+
total: number;
|
|
815
|
+
}>;
|
|
816
|
+
interface DomainsCustomTrackingUpdateOptions {
|
|
817
|
+
/**
|
|
818
|
+
* New label for this custom tracking domain. Maximum length is `64` characters. Must match the pattern `^[a-z0-9-]+$`.
|
|
819
|
+
*/
|
|
820
|
+
name?: string;
|
|
821
|
+
/**
|
|
822
|
+
* New status. Re-activation requires DNS verification — add the TXT record and CNAME record described in the response body, then retry.
|
|
823
|
+
*/
|
|
824
|
+
status?: "active" | "disabled";
|
|
825
|
+
}
|
|
826
|
+
type DomainsCustomTrackingUpdateResponse = DataResponse<DomainsCustomTrackingWithDnsSetupRequired>;
|
|
827
|
+
declare class DomainsCustomTracking {
|
|
828
|
+
private mailchannels;
|
|
829
|
+
private static readonly SCOPE_VALUES;
|
|
830
|
+
constructor(mailchannels: MailChannelsClient);
|
|
831
|
+
/**
|
|
832
|
+
* Retrieve all custom tracking domains registered under your account.
|
|
833
|
+
* Optional filters include domain name, status, scope, limit and offset.
|
|
834
|
+
* @param options - Optional filter options.
|
|
835
|
+
* @example
|
|
836
|
+
* ```ts
|
|
837
|
+
* const mailchannels = new MailChannels('your-api-key')
|
|
838
|
+
* const { data, error } = await mailchannels.domains.customTracking.list({
|
|
839
|
+
* status: 'active'
|
|
840
|
+
* })
|
|
841
|
+
* ```
|
|
842
|
+
*/
|
|
843
|
+
list(options?: DomainsCustomTrackingListOptions): Promise<DomainsCustomTrackingListResponse>;
|
|
844
|
+
/**
|
|
845
|
+
* Register a custom branded domain for click tracking, open tracking, or unsubscribe handling. By default, MailChannels uses shared domains for these links. Using a custom domain improves brand consistency by replacing shared domains with your own (e.g., `click.example.com`). Once registered, select the domain at send time using its `name`.
|
|
846
|
+
*
|
|
847
|
+
* Before registration completes, two DNS records must be in place:
|
|
848
|
+
* 1. A TXT record at `_mailchannels-verify.<hostname>` containing the verification token (returned when DNS setup is required).
|
|
849
|
+
* 2. A CNAME record at `<hostname>` pointing to `links.mailchannels.net`.
|
|
850
|
+
* @param name - A unique label used to select this domain at message send time. Maximum length is `64` characters. Must match the pattern `^[a-z0-9-]+$`.
|
|
851
|
+
* @param hostname - The hostname to register as a custom tracking domain (e.g., `click.example.com`).
|
|
852
|
+
* @param scope - The event type this domain handles.
|
|
853
|
+
* @example
|
|
854
|
+
* ```ts
|
|
855
|
+
* const mailchannels = new MailChannels('your-api-key')
|
|
856
|
+
* const { data, error } = await mailchannels.domains.customTracking.create(
|
|
857
|
+
* 'clickdemo',
|
|
858
|
+
* 'click.example.com',
|
|
859
|
+
* 'click'
|
|
860
|
+
* )
|
|
861
|
+
* ```
|
|
862
|
+
*/
|
|
863
|
+
create(name: string, hostname: string, scope: DomainsCustomTrackingScope): Promise<DomainsCustomTrackingCreateResponse>;
|
|
864
|
+
/**
|
|
865
|
+
* Update an existing custom tracking domain by its hostname and scope. Supports updating the custom tracking domain's name or toggling its active status.
|
|
866
|
+
* @param hostname - The hostname of the custom tracking domain to update.
|
|
867
|
+
* @param scope - The scope of the custom tracking domain to update.
|
|
868
|
+
* @param options - The options for updating the custom tracking domain.
|
|
869
|
+
* @example
|
|
870
|
+
* ```ts
|
|
871
|
+
* const mailchannels = new MailChannels('your-api-key')
|
|
872
|
+
* const { data, error } = await mailchannels.domains.customTracking.update('click.example.com', 'click', {
|
|
873
|
+
* name: 'newclickname',
|
|
874
|
+
* status: 'active'
|
|
875
|
+
* })
|
|
876
|
+
* ```
|
|
877
|
+
*/
|
|
878
|
+
update(hostname: string, scope: DomainsCustomTrackingScope, options: DomainsCustomTrackingUpdateOptions): Promise<DomainsCustomTrackingUpdateResponse>;
|
|
879
|
+
/**
|
|
880
|
+
* Permanently delete an existing custom tracking domain for the given hostname and scope. The domain can be re-registered if needed.
|
|
881
|
+
*
|
|
882
|
+
* WARNING: Any tracking links or unsubscribe URLs in previously sent emails using this domain will stop working immediately.
|
|
883
|
+
* @param hostname - The hostname of the custom tracking domain to delete.
|
|
884
|
+
* @param scope - The scope of the custom tracking domain to delete.
|
|
885
|
+
* @example
|
|
886
|
+
* ```ts
|
|
887
|
+
* const mailchannels = new MailChannels('your-api-key')
|
|
888
|
+
* const { success, error } = await mailchannels.domains.customTracking.delete('click.example.com', 'click')
|
|
889
|
+
* ```
|
|
890
|
+
*/
|
|
891
|
+
delete(hostname: string, scope: DomainsCustomTrackingScope): Promise<SuccessResponse>;
|
|
892
|
+
}
|
|
700
893
|
interface DomainsCheck {
|
|
701
894
|
/**
|
|
702
895
|
* Domain used for DKIM signing.
|
|
@@ -792,6 +985,7 @@ type DomainsCheckResponse = DataResponse<{
|
|
|
792
985
|
declare class Domains {
|
|
793
986
|
protected mailchannels: MailChannelsClient;
|
|
794
987
|
readonly dkim: DomainsDkim;
|
|
988
|
+
readonly customTracking: DomainsCustomTracking;
|
|
795
989
|
constructor(mailchannels: MailChannelsClient);
|
|
796
990
|
/**
|
|
797
991
|
* Validates a domain's email authentication setup by retrieving its DKIM, SPF, and Domain Lockdown status. This endpoint checks whether the domain is properly configured for secure email delivery.
|
|
@@ -1246,8 +1440,15 @@ interface SubAccountsUsage {
|
|
|
1246
1440
|
startDate?: string;
|
|
1247
1441
|
/**
|
|
1248
1442
|
* The total usage for the current billing period.
|
|
1443
|
+
* @example 5000
|
|
1249
1444
|
*/
|
|
1250
1445
|
total: number;
|
|
1446
|
+
/**
|
|
1447
|
+
* The effective monthly limit for the current billing period. A limit of zero means the account cannot send any messages.
|
|
1448
|
+
* For sub-accounts with no explicit limit set (i.e., -1), the monthly limit for the parent account is returned.
|
|
1449
|
+
* @example 10000
|
|
1450
|
+
*/
|
|
1451
|
+
monthlyLimit: number;
|
|
1251
1452
|
}
|
|
1252
1453
|
type SubAccountsUsageResponse = DataResponse<SubAccountsUsage>;
|
|
1253
1454
|
interface MetricsEngagement {
|
|
@@ -1259,25 +1460,74 @@ interface MetricsEngagement {
|
|
|
1259
1460
|
clickTrackingDelivered: MetricsBucket[];
|
|
1260
1461
|
open: MetricsBucket[];
|
|
1261
1462
|
openTrackingDelivered: MetricsBucket[];
|
|
1463
|
+
uniqueClick?: MetricsBucket[];
|
|
1464
|
+
uniqueClickTrackingDelivered?: MetricsBucket[];
|
|
1465
|
+
uniqueOpen?: MetricsBucket[];
|
|
1466
|
+
uniqueOpenTrackingDelivered?: MetricsBucket[];
|
|
1262
1467
|
};
|
|
1468
|
+
/**
|
|
1469
|
+
* Count of click events by recipients.
|
|
1470
|
+
*/
|
|
1263
1471
|
click: number;
|
|
1472
|
+
/**
|
|
1473
|
+
* Count of recipients of delivered messages with HTML content that contains tracked click URLs, where click tracking is enabled in the send request.
|
|
1474
|
+
*/
|
|
1264
1475
|
clickTrackingDelivered: number;
|
|
1476
|
+
/**
|
|
1477
|
+
* The end of the time range for retrieving message engagement metrics (exclusive).
|
|
1478
|
+
*/
|
|
1265
1479
|
endTime: string;
|
|
1480
|
+
/**
|
|
1481
|
+
* Count of open events by recipients.
|
|
1482
|
+
*/
|
|
1266
1483
|
open: number;
|
|
1484
|
+
/**
|
|
1485
|
+
* Count of recipients of delivered messages with HTML content where open tracking was enabled in the send request.
|
|
1486
|
+
*/
|
|
1267
1487
|
openTrackingDelivered: number;
|
|
1488
|
+
/**
|
|
1489
|
+
* The beginning of the time range for retrieving message engagement metrics (inclusive).
|
|
1490
|
+
*/
|
|
1268
1491
|
startTime: string;
|
|
1492
|
+
/**
|
|
1493
|
+
* Count of distinct messages that had at least one click event.
|
|
1494
|
+
* Unlike `click`, each message is counted at most once regardless of how many links were clicked or how many times.
|
|
1495
|
+
* Use this to compute click rates without exceeding 100%.
|
|
1496
|
+
*/
|
|
1497
|
+
uniqueClick?: number;
|
|
1498
|
+
/**
|
|
1499
|
+
* Count of distinct messages delivered with click tracking enabled (message-level, not recipient-level).
|
|
1500
|
+
* Use as the denominator when computing unique click rates.
|
|
1501
|
+
*/
|
|
1502
|
+
uniqueClickTrackingDelivered?: number;
|
|
1503
|
+
/**
|
|
1504
|
+
* Count of distinct messages that had at least one open event.
|
|
1505
|
+
* Unlike `open`, each message is counted at most once regardless of how many times its tracking pixel was fired.
|
|
1506
|
+
* Use this to compute open rates without exceeding 100%.
|
|
1507
|
+
*/
|
|
1508
|
+
uniqueOpen?: number;
|
|
1509
|
+
/**
|
|
1510
|
+
* Count of distinct messages delivered with open tracking enabled (message-level, not recipient-level).
|
|
1511
|
+
* Use as the denominator when computing unique open rates.
|
|
1512
|
+
*/
|
|
1513
|
+
uniqueOpenTrackingDelivered?: number;
|
|
1269
1514
|
}
|
|
1270
1515
|
type MetricsEngagementResponse = DataResponse<MetricsEngagement>;
|
|
1271
1516
|
interface MetricsPerformance {
|
|
1272
1517
|
/**
|
|
1273
|
-
* Count of messages bounced during the specified time range.
|
|
1518
|
+
* Count of messages hard-bounced during the specified time range.
|
|
1274
1519
|
*/
|
|
1275
1520
|
bounced: number;
|
|
1521
|
+
/**
|
|
1522
|
+
* Count of messages complained during the specified time range.
|
|
1523
|
+
*/
|
|
1524
|
+
complained: number;
|
|
1276
1525
|
/**
|
|
1277
1526
|
* A series of metrics aggregations bucketed by time interval (e.g. hour, day).
|
|
1278
1527
|
*/
|
|
1279
1528
|
buckets: {
|
|
1280
1529
|
bounced: MetricsBucket[];
|
|
1530
|
+
complained: MetricsBucket[];
|
|
1281
1531
|
delivered: MetricsBucket[];
|
|
1282
1532
|
processed: MetricsBucket[];
|
|
1283
1533
|
};
|
|
@@ -1369,8 +1619,15 @@ type MetricsUsageResponse = DataResponse<{
|
|
|
1369
1619
|
startDate?: string;
|
|
1370
1620
|
/**
|
|
1371
1621
|
* The total usage for the current billing period.
|
|
1622
|
+
* @example 5000
|
|
1372
1623
|
*/
|
|
1373
1624
|
total: number;
|
|
1625
|
+
/**
|
|
1626
|
+
* The effective monthly limit for the current billing period. A limit of zero means the account cannot send any messages.
|
|
1627
|
+
* For sub-accounts with no explicit limit set (i.e., -1), the monthly limit for the parent account is returned.
|
|
1628
|
+
* @example 10000
|
|
1629
|
+
*/
|
|
1630
|
+
monthlyLimit: number;
|
|
1374
1631
|
}>;
|
|
1375
1632
|
type MetricsSendersType = "sub-accounts" | "campaigns";
|
|
1376
1633
|
interface MetricsSendersOptions {
|
|
@@ -1453,6 +1710,21 @@ interface MetricsOptions {
|
|
|
1453
1710
|
interval?: "hour" | "day" | "week" | "month";
|
|
1454
1711
|
}
|
|
1455
1712
|
type SuppressionsTypes = "transactional" | "non-transactional";
|
|
1713
|
+
interface SuppressionsCreateEntry {
|
|
1714
|
+
/**
|
|
1715
|
+
* Must be less than `1024` characters.
|
|
1716
|
+
*/
|
|
1717
|
+
notes?: string;
|
|
1718
|
+
/**
|
|
1719
|
+
* The email address to suppress. Must be a valid email address format and less than `255` characters.
|
|
1720
|
+
*/
|
|
1721
|
+
recipient: string;
|
|
1722
|
+
/**
|
|
1723
|
+
* An array of types of suppression to apply to the recipient.
|
|
1724
|
+
* @default ["non-transactional"]
|
|
1725
|
+
*/
|
|
1726
|
+
types?: SuppressionsTypes[];
|
|
1727
|
+
}
|
|
1456
1728
|
interface SuppressionsCreateOptions {
|
|
1457
1729
|
/**
|
|
1458
1730
|
* If true, the parent account creates suppression entries for all associated sub-accounts. This field is only applicable to parent accounts. Sub-accounts cannot create entries for other sub-accounts.
|
|
@@ -1461,22 +1733,9 @@ interface SuppressionsCreateOptions {
|
|
|
1461
1733
|
addToSubAccounts?: boolean;
|
|
1462
1734
|
/**
|
|
1463
1735
|
* The total number of suppression entries to create, for the parent and/or its sub-accounts, must not exceed `1000`.
|
|
1736
|
+
* @deprecated Use `create(entries, options?)` instead.
|
|
1464
1737
|
*/
|
|
1465
|
-
entries:
|
|
1466
|
-
/**
|
|
1467
|
-
* Must be less than `1024` characters.
|
|
1468
|
-
*/
|
|
1469
|
-
notes?: string;
|
|
1470
|
-
/**
|
|
1471
|
-
* The email address to suppress. Must be a valid email address format and less than `255` characters.
|
|
1472
|
-
*/
|
|
1473
|
-
recipient: string;
|
|
1474
|
-
/**
|
|
1475
|
-
* An array of types of suppression to apply to the recipient.
|
|
1476
|
-
* @default ["non-transactional"]
|
|
1477
|
-
*/
|
|
1478
|
-
types?: SuppressionsTypes[];
|
|
1479
|
-
}[];
|
|
1738
|
+
entries: SuppressionsCreateEntry[];
|
|
1480
1739
|
}
|
|
1481
1740
|
type SuppressionsSource = "api" | "unsubscribe_link" | "list_unsubscribe" | "hard_bounce" | "spam_complaint" | "all";
|
|
1482
1741
|
interface SuppressionsListOptions {
|
|
@@ -1727,7 +1986,7 @@ declare class Metrics {
|
|
|
1727
1986
|
*/
|
|
1728
1987
|
engagement(options?: MetricsOptions): Promise<MetricsEngagementResponse>;
|
|
1729
1988
|
/**
|
|
1730
|
-
* Retrieve performance metrics for messages sent from your account, including counts of processed, delivered, hard-bounced events. Supports optional filters for time range, and campaign ID.
|
|
1989
|
+
* Retrieve performance metrics for messages sent from your account, including counts of processed, delivered, hard-bounced, and complained events. Supports optional filters for time range, and campaign ID.
|
|
1731
1990
|
* @param options - Options to filter and customize the performance metrics retrieval.
|
|
1732
1991
|
* @example
|
|
1733
1992
|
* ```ts
|
|
@@ -1782,14 +2041,21 @@ declare class Suppressions {
|
|
|
1782
2041
|
constructor(mailchannels: MailChannelsClient);
|
|
1783
2042
|
/**
|
|
1784
2043
|
* Creates suppression entries for the specified account. Parent accounts can create suppression entries for all associated sub-accounts. If `types` is not provided, it defaults to `non-transactional`. The operation is atomic, meaning all entries are successfully added or none are added if an error occurs.
|
|
1785
|
-
* @param
|
|
2044
|
+
* @param entries - The total number of suppression entries to create, for the parent and/or its sub-accounts, must not exceed `1000`.
|
|
2045
|
+
* @param options - The options of the suppression entries to create.
|
|
1786
2046
|
* @example
|
|
1787
2047
|
* ```ts
|
|
1788
2048
|
* const mailchannels = new MailChannels('your-api-key')
|
|
1789
|
-
* const { success, error } = await mailchannels.suppressions.create(
|
|
1790
|
-
*
|
|
1791
|
-
*
|
|
2049
|
+
* const { success, error } = await mailchannels.suppressions.create([
|
|
2050
|
+
* {
|
|
2051
|
+
* notes: "test",
|
|
2052
|
+
* recipient: "name@example.com",
|
|
2053
|
+
* types: ["transactional"]
|
|
2054
|
+
* }
|
|
2055
|
+
* ], { addToSubAccounts: false });
|
|
1792
2056
|
*/
|
|
2057
|
+
create(entries: SuppressionsCreateEntry[], options?: Omit<SuppressionsCreateOptions, "entries">): Promise<SuccessResponse>;
|
|
2058
|
+
/** @deprecated Use positional params `create(entries, options?)` instead. */
|
|
1793
2059
|
create(options: SuppressionsCreateOptions): Promise<SuccessResponse>;
|
|
1794
2060
|
/**
|
|
1795
2061
|
* Deletes suppression entry associated with the account based on the specified recipient and source.
|
|
@@ -1827,4 +2093,4 @@ declare class MailChannels extends MailChannelsClient {
|
|
|
1827
2093
|
readonly suppressions: Suppressions;
|
|
1828
2094
|
constructor(key: string, options?: MailChannelsClientOptions);
|
|
1829
2095
|
}
|
|
1830
|
-
export { Attachment, type DataResponse, Domains, type DomainsCheckOptions, type DomainsCheckResponse, type DomainsCheckVerdict, type DomainsDkimCreateOptions, type DomainsDkimCreateResponse, type DomainsDkimKey, type DomainsDkimKeyStatus, type DomainsDkimListOptions, type DomainsDkimListResponse, type DomainsDkimRotateOptions, type DomainsDkimRotateResponse, type DomainsDkimUpdateStatusOptions, Emails, type EmailsQueueResponse, type EmailsSendAsyncResponse, type EmailsSendAttachment, type EmailsSendContent, type EmailsSendDkim, type EmailsSendOptions, type EmailsSendPersonalization, type EmailsSendRecipient, type EmailsSendRecipientInput, type EmailsSendResponse, type EmailsSendTemplate, type EmailsSendTemplateType, type EmailsSendTemplateValue, type EmailsSendTracking, type ErrorResponse, type ErrorType, MailChannels, MailChannelsClient, type MailChannelsClientOptions, Metrics, type MetricsBucket, type MetricsEngagement, type MetricsEngagementResponse, type MetricsOptions, type MetricsPerformance, type MetricsPerformanceResponse, type MetricsRecipientBehaviour, type MetricsRecipientBehaviourResponse, type MetricsSenders, type MetricsSendersOptions, type MetricsSendersResponse, type MetricsSendersType, type MetricsUsageResponse, type MetricsVolume, type MetricsVolumeResponse, type SubAccount, SubAccounts, type SubAccountsAccount, type SubAccountsApiKey, type SubAccountsApiKeysCreateResponse, type SubAccountsApiKeysListOptions, type SubAccountsApiKeysListResponse, type SubAccountsCreateApiKeyResponse, type SubAccountsCreateResponse, type SubAccountsCreateSmtpPasswordResponse, type SubAccountsLimit, type SubAccountsLimitResponse, type SubAccountsLimitsGetResponse, type SubAccountsLimitsSetOptions, type SubAccountsListApiKeyOptions, type SubAccountsListApiKeyResponse, type SubAccountsListOptions, type SubAccountsListResponse, type SubAccountsListSmtpPasswordResponse, type SubAccountsSmtpPassword, type SubAccountsSmtpPasswordsCreateResponse, type SubAccountsSmtpPasswordsListResponse, type SubAccountsUsage, type SubAccountsUsageResponse, type SuccessResponse, Suppressions, type SuppressionsCreateOptions, type SuppressionsListEntry, type SuppressionsListOptions, type SuppressionsListResponse, type SuppressionsSource, type SuppressionsTypes, type WebhookEvent, type WebhookEventClick, type WebhookEventComplained, type WebhookEventDelivered, type WebhookEventDropped, type WebhookEventHardBounced, type WebhookEventOpen, type WebhookEventProcessed, type WebhookEventSoftBounced, type WebhookEventTest, type WebhookEventType, type WebhookEventUnsubscribed, Webhooks, type WebhooksBatch, type WebhooksBatchResponseStatus, type WebhooksBatchStatus, type WebhooksBatchesOptions, type WebhooksBatchesResponse, type WebhooksListResponse, type WebhooksResendBatch, type WebhooksResendBatchResponse, type WebhooksSigningKeyResponse, type WebhooksValidateResponse, type WebhooksVerifyOptions, type WebhooksVerifyResponse };
|
|
2096
|
+
export { Attachment, type DataResponse, Domains, type DomainsCheckOptions, type DomainsCheckResponse, type DomainsCheckVerdict, type DomainsCustomTrackingCreateResponse, type DomainsCustomTrackingDnsSetupRequired, type DomainsCustomTrackingDomain, type DomainsCustomTrackingListOptions, type DomainsCustomTrackingListResponse, type DomainsCustomTrackingScope, type DomainsCustomTrackingUpdateOptions, type DomainsCustomTrackingUpdateResponse, type DomainsCustomTrackingWithDnsSetupRequired, type DomainsDkimCreateOptions, type DomainsDkimCreateResponse, type DomainsDkimKey, type DomainsDkimKeyStatus, type DomainsDkimListOptions, type DomainsDkimListResponse, type DomainsDkimRotateOptions, type DomainsDkimRotateResponse, type DomainsDkimUpdateStatusOptions, Emails, type EmailsQueueResponse, type EmailsSendAsyncResponse, type EmailsSendAttachment, type EmailsSendContent, type EmailsSendDkim, type EmailsSendOptions, type EmailsSendPersonalization, type EmailsSendRecipient, type EmailsSendRecipientInput, type EmailsSendResponse, type EmailsSendTemplate, type EmailsSendTemplateType, type EmailsSendTemplateValue, type EmailsSendTracking, type ErrorResponse, type ErrorType, MailChannels, MailChannelsClient, type MailChannelsClientOptions, Metrics, type MetricsBucket, type MetricsEngagement, type MetricsEngagementResponse, type MetricsOptions, type MetricsPerformance, type MetricsPerformanceResponse, type MetricsRecipientBehaviour, type MetricsRecipientBehaviourResponse, type MetricsSenders, type MetricsSendersOptions, type MetricsSendersResponse, type MetricsSendersType, type MetricsUsageResponse, type MetricsVolume, type MetricsVolumeResponse, type SubAccount, SubAccounts, type SubAccountsAccount, type SubAccountsApiKey, type SubAccountsApiKeysCreateResponse, type SubAccountsApiKeysListOptions, type SubAccountsApiKeysListResponse, type SubAccountsCreateApiKeyResponse, type SubAccountsCreateResponse, type SubAccountsCreateSmtpPasswordResponse, type SubAccountsLimit, type SubAccountsLimitResponse, type SubAccountsLimitsGetResponse, type SubAccountsLimitsSetOptions, type SubAccountsListApiKeyOptions, type SubAccountsListApiKeyResponse, type SubAccountsListOptions, type SubAccountsListResponse, type SubAccountsListSmtpPasswordResponse, type SubAccountsSmtpPassword, type SubAccountsSmtpPasswordsCreateResponse, type SubAccountsSmtpPasswordsListResponse, type SubAccountsUsage, type SubAccountsUsageResponse, type SuccessResponse, Suppressions, type SuppressionsCreateEntry, type SuppressionsCreateOptions, type SuppressionsListEntry, type SuppressionsListOptions, type SuppressionsListResponse, type SuppressionsSource, type SuppressionsTypes, type WebhookEvent, type WebhookEventClick, type WebhookEventComplained, type WebhookEventDelivered, type WebhookEventDropped, type WebhookEventHardBounced, type WebhookEventOpen, type WebhookEventProcessed, type WebhookEventSoftBounced, type WebhookEventTest, type WebhookEventType, type WebhookEventUnsubscribed, Webhooks, type WebhooksBatch, type WebhooksBatchResponseStatus, type WebhooksBatchStatus, type WebhooksBatchesOptions, type WebhooksBatchesResponse, type WebhooksListResponse, type WebhooksResendBatch, type WebhooksResendBatchResponse, type WebhooksSigningKeyResponse, type WebhooksValidateResponse, type WebhooksVerifyOptions, type WebhooksVerifyResponse };
|