mailchannels-sdk 0.4.0 → 0.4.1

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/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 Yizack Rangel
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Yizack Rangel
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,175 +1,177 @@
1
- ![MailChannels](/docs/public/images/presentation.png)
2
-
3
- # MailChannels
4
-
5
- [![npm version][npm-version-src]][npm-version-href]
6
- [![npm downloads][npm-downloads-src]][npm-downloads-href]
7
- [![codecov][codecov-coverage-src]][codecov-coverage-href]
8
-
9
- Node.js SDK to integrate [MailChannels API](https://docs.mailchannels.net/) into your JavaScript or TypeScript server-side applications.
10
-
11
- <!-- #region overview -->
12
- This library provides a simple way to interact with the [MailChannels API](https://docs.mailchannels.net/). It is written in TypeScript and can be used in both JavaScript and TypeScript projects and in different runtimes.
13
- <!-- #endregion overview -->
14
-
15
- <!-- #region note -->
16
- > [!NOTE]
17
- > This library is NOT officially maintained by [MailChannels Corporation](https://mailchannels.com/).
18
- <!-- #endregion note -->
19
-
20
- - [✨ Release Notes](CHANGELOG.md)
21
- - [📖 Documentation](https://mailchannels.yizack.com)
22
-
23
- ## Contents
24
-
25
- - 🚀 [Features](#features)
26
- - 📏 [Requirements](#requirements)
27
- - 🏃 [Quick setup](#quick-setup)
28
- - 🚧 [Roadmap](#roadmap)
29
- - ⚖️ [License](#license)
30
- - 💻 [Development](#development)
31
-
32
- ## <a name="features">🚀 Features</a>
33
-
34
- - Send transactional emails
35
- - Check DKIM, SPF & Domain Lockdown
36
- - Webhook notifications
37
- - Manage sub-accounts
38
- - Manage inbound domains
39
- - Manage account lists
40
- - Manage recipient lists
41
-
42
- ## <a name="requirements">📏 Requirements</a>
43
-
44
- - MailChannels account
45
- - Email API key
46
-
47
- ## <a name="quick-setup">🏃 Quick setup</a>
48
-
49
- 1. Add `mailchannels-sdk` dependency to your project
50
-
51
- ```sh
52
- # npm
53
- npm i mailchannels-sdk
54
-
55
- # yarn
56
- yarn add mailchannels-sdk
57
-
58
- # pnpm
59
- pnpm add mailchannels-sdk
60
- ```
61
-
62
- ## <a name="license">⚖️ License</a>
63
-
64
- [MIT License](LICENSE)
65
-
66
- <!-- #region roadmap -->
67
- ## <a name="roadmap">🚧 Roadmap</a>
68
-
69
- Already implemented features are marked with a checkmark. Please open an issue if you find any bugs or missing features.
70
-
71
- ### [Email API](https://docs.mailchannels.net/email-api/api-reference/email-api)
72
-
73
- - 📧 Emails
74
- - ✅ [Send an Email](https://docs.mailchannels.net/email-api/api-reference/send-an-email)
75
- - [DKIM, SPF & Domain Lockdown Check](https://docs.mailchannels.net/email-api/api-reference/dkim-spf-domain-lockdown-check)
76
- - 📢 Webhooks
77
- - ✅ [Enroll for Webhook Notifications](https://docs.mailchannels.net/email-api/api-reference/enroll-for-webhook-notifications)
78
- - [Retrieve Customer Webhooks](https://docs.mailchannels.net/email-api/api-reference/retrieve-customer-webhooks)
79
- - ✅ [Delete Customer Webhooks](https://docs.mailchannels.net/email-api/api-reference/delete-customer-webhooks)
80
- - ✅ [Retrieve Webhook Signing Key](https://docs.mailchannels.net/email-api/api-reference/retrieve-webhook-signing-key)
81
- - ✅ [Validate Enrolled Webhook](https://docs.mailchannels.net/email-api/api-reference/validate-enrolled-webhook)
82
- - 🪪 Sub-accounts
83
- - ✅ [Create Sub-account](https://docs.mailchannels.net/email-api/api-reference/create-sub-account)
84
- - [Retrieve Sub-accounts](https://docs.mailchannels.net/email-api/api-reference/retrieve-sub-accounts)
85
- - ✅ [Delete Sub-account](https://docs.mailchannels.net/email-api/api-reference/delete-sub-account)
86
- - ✅ [Suspend Sub-account](https://docs.mailchannels.net/email-api/api-reference/suspend-sub-account)
87
- - ✅ [Activate Sub-account](https://docs.mailchannels.net/email-api/api-reference/activate-sub-account)
88
- - ✅ [Create Sub-account API Key](https://docs.mailchannels.net/email-api/api-reference/create-sub-account-api-key)
89
- - ✅ [Delete Sub-account API Key](https://docs.mailchannels.net/email-api/api-reference/delete-sub-account-api-key)
90
- - ✅ [Retrieve Sub-account API Keys](https://docs.mailchannels.net/email-api/api-reference/retrieve-sub-account-api-keys)
91
- - ✅ [Create Sub-account SMTP Password](https://docs.mailchannels.net/email-api/api-reference/create-sub-account-smtp-password)
92
- - ✅ [Delete Sub-account SMTP Password](https://docs.mailchannels.net/email-api/api-reference/delete-sub-account-smtp-password)
93
- - ✅ [Retrieve Sub-account SMTP Passwords](https://docs.mailchannels.net/email-api/api-reference/retrieve-sub-account-smtp-passwords)
94
- - ✅ [Retrieve Sub-account Limit](https://docs.mailchannels.net/email-api/api-reference/retrieve-sub-account-limit)
95
- - ✅ [Set Sub-account Limit](https://docs.mailchannels.net/email-api/api-reference/set-sub-account-limit)
96
- - ✅ [Delete Sub-account Limit](https://docs.mailchannels.net/email-api/api-reference/delete-sub-account-limit)
97
- - ✅ [Retrieve Sub-account Usage Stats](https://docs.mailchannels.net/email-api/api-reference/retrieve-sub-account-usage-stats)
98
- - 📊 Metrics
99
- - ✅ [Retrieve Engagement Metrics](https://docs.mailchannels.net/email-api/api-reference/retrieve-engagement-metrics)
100
- - [Retrieve Performance Metrics](https://docs.mailchannels.net/email-api/api-reference/retrieve-performance-metrics)
101
- - ✅ [Retrieve Recipient Behaviour Metrics](https://docs.mailchannels.net/email-api/api-reference/retrieve-recipient-behaviour-metrics)
102
- - ✅ [Retrieve Usage Stats](https://docs.mailchannels.net/email-api/api-reference/retrieve-usage-stats)
103
- - ✅ [Retrieve Volume Metrics](https://docs.mailchannels.net/email-api/api-reference/retrieve-volume-metrics)
104
- - 🚫 Suppressions
105
- - ✅ [Create Suppression Entries](https://docs.mailchannels.net/email-api/api-reference/create-suppression-entries)
106
- - [Delete Suppression Entry](https://docs.mailchannels.net/email-api/api-reference/delete-suppression-entry)
107
- - ✅ [Retrieve Suppression List](https://docs.mailchannels.net/email-api/api-reference/retrieve-suppression-list)
108
-
109
- ### [Inbound API](https://docs.mailchannels.net/inbound-api/API-reference/inbound-api)
110
-
111
- - 🌐 Domains
112
- - ✅ [Provision domain](https://docs.mailchannels.net/inbound-api/API-reference/provision-domain)
113
- - [Remove domain](https://docs.mailchannels.net/inbound-api/API-reference/remove-domain)
114
- - ✅ [List domains](https://docs.mailchannels.net/inbound-api/API-reference/list-domains)
115
- - ✅ [Bulk provision domains](https://docs.mailchannels.net/inbound-api/API-reference/bulk-provision-domains)
116
- - ✅ [Add domain list entry](https://docs.mailchannels.net/inbound-api/API-reference/add-domain-list-entry)
117
- - ✅ [Get domain list entries](https://docs.mailchannels.net/inbound-api/API-reference/get-domain-list-entries)
118
- - ✅ [Delete domain list entry](https://docs.mailchannels.net/inbound-api/API-reference/delete-domain-list-entry)
119
- - ✅ [Create login link](https://docs.mailchannels.net/inbound-api/API-reference/create-login-link)
120
- - 🚧 [Bulk create login links](https://docs.mailchannels.net/inbound-api/API-reference/bulk-create-login-links)
121
- - ✅ [Set downstream address](https://docs.mailchannels.net/inbound-api/API-reference/set-downstream-address)
122
- - ✅ [Fetch downstream addresses](https://docs.mailchannels.net/inbound-api/API-reference/fetch-downstream-addresses)
123
- - ✅ [Update API key](https://docs.mailchannels.net/inbound-api/API-reference/update-api-key)
124
- - 📋 Lists
125
- - ✅ [Add item to customer list](https://docs.mailchannels.net/inbound-api/API-reference/add-item-to-customer-list)
126
- - [Delete item from customer list](https://docs.mailchannels.net/inbound-api/API-reference/delete-item-from-customer-list)
127
- - ✅ [Get customer list entries](https://docs.mailchannels.net/inbound-api/API-reference/get-customer-list-entries)
128
- - 📥 Users
129
- - ✅ [Create a recipient](https://docs.mailchannels.net/inbound-api/API-reference/create-a-recipient)
130
- - [Add item to recipient list](https://docs.mailchannels.net/inbound-api/API-reference/add-item-to-recipient-list)
131
- - ✅ [Get recipient list entries](https://docs.mailchannels.net/inbound-api/API-reference/get-recipient-list-entries)
132
- - ✅ [Delete item from recipient list](https://docs.mailchannels.net/inbound-api/API-reference/delete-item-from-recipient-list)
133
- - ⚙️ Service
134
- - ✅ [Retrieve the condition of the service](https://docs.mailchannels.net/inbound-api/API-reference/retrieve-the-condition-of-the-service)
135
- - [Submit a false negative or false positive report](https://docs.mailchannels.net/inbound-api/API-reference/submit-a-false-negative-or-false-positive-report)
136
- - ✅ [Get a list of your subscriptions to MailChannels Inbound](https://docs.mailchannels.net/inbound-api/API-reference/get-a-list-of-your-subscriptions-to-mail-channels-inbound)
137
- <!-- #endregion roadmap -->
138
-
139
- ## <a name="development">💻 Development</a>
140
-
141
- <details>
142
- <summary>Local development</summary>
143
-
144
- ```sh
145
- # Install dependencies
146
- pnpm install
147
-
148
- # Build the package
149
- npm run build
150
-
151
- # Run ESLint
152
- npm run lint
153
-
154
- # Run Vitest
155
- npm run test
156
- npm run test:watch
157
-
158
- # Run typecheck
159
- npm run test:types
160
-
161
- # Release new version
162
- npm run release
163
- ```
164
-
165
- </details>
166
-
167
- <!-- Badges -->
168
- [npm-version-src]: https://img.shields.io/npm/v/mailchannels-sdk.svg?style=flat&colorA=070a30&colorB=35a047
169
- [npm-version-href]: https://npmjs.com/package/mailchannels-sdk
170
-
171
- [npm-downloads-src]: https://img.shields.io/npm/dm/mailchannels-sdk.svg?style=flat&colorA=070a30&colorB=35a047
172
- [npm-downloads-href]: https://npmjs.com/package/mailchannels-sdk
173
-
174
- [codecov-coverage-src]: https://img.shields.io/codecov/c/github/yizack/mailchannels?style=flat&colorA=070a30&token=HTSBRHSJ5M
175
- [codecov-coverage-href]: https://codecov.io/gh/Yizack/mailchannels
1
+ ![MailChannels](/docs/public/images/presentation.png)
2
+
3
+ # MailChannels
4
+
5
+ [![npm version][npm-version-src]][npm-version-href]
6
+ [![npm downloads][npm-downloads-src]][npm-downloads-href]
7
+ [![codecov][codecov-coverage-src]][codecov-coverage-href]
8
+
9
+ Node.js SDK to integrate [MailChannels API](https://docs.mailchannels.net/) into your JavaScript or TypeScript server-side applications.
10
+
11
+ <!-- #region overview -->
12
+ This library provides a simple way to interact with the [MailChannels API](https://docs.mailchannels.net/). It is written in TypeScript and can be used in both JavaScript and TypeScript projects and in different runtimes.
13
+ <!-- #endregion overview -->
14
+
15
+ <!-- #region note -->
16
+ > [!NOTE]
17
+ > This library is NOT officially maintained by [MailChannels Corporation](https://mailchannels.com/).
18
+ <!-- #endregion note -->
19
+
20
+ - [✨ Release Notes](CHANGELOG.md)
21
+ - [📖 Documentation](https://mailchannels.yizack.com)
22
+
23
+ ## Contents
24
+
25
+ - 🚀 [Features](#features)
26
+ - 📏 [Requirements](#requirements)
27
+ - 🏃 [Quick setup](#quick-setup)
28
+ - 🚧 [Roadmap](#roadmap)
29
+ - ⚖️ [License](#license)
30
+ - 💻 [Development](#development)
31
+
32
+ ## <a name="features">🚀 Features</a>
33
+
34
+ - Send transactional emails
35
+ - Check DKIM, SPF & Domain Lockdown
36
+ - Webhook notifications
37
+ - Manage sub-accounts
38
+ - Retrieve metrics
39
+ - Manage suppressions
40
+ - Manage inbound domains
41
+ - Manage account lists
42
+ - Manage recipient lists
43
+
44
+ ## <a name="requirements">📏 Requirements</a>
45
+
46
+ - MailChannels account
47
+ - Email API key
48
+
49
+ ## <a name="quick-setup">🏃 Quick setup</a>
50
+
51
+ 1. Add `mailchannels-sdk` dependency to your project
52
+
53
+ ```sh
54
+ # npm
55
+ npm i mailchannels-sdk
56
+
57
+ # yarn
58
+ yarn add mailchannels-sdk
59
+
60
+ # pnpm
61
+ pnpm add mailchannels-sdk
62
+ ```
63
+
64
+ ## <a name="license">⚖️ License</a>
65
+
66
+ [MIT License](LICENSE)
67
+
68
+ <!-- #region roadmap -->
69
+ ## <a name="roadmap">🚧 Roadmap</a>
70
+
71
+ Already implemented features are marked with a checkmark. Please open an issue if you find any bugs or missing features.
72
+
73
+ ### [Email API](https://docs.mailchannels.net/email-api/api-reference/email-api)
74
+
75
+ - 📧 Emails
76
+ - [Send an Email](https://docs.mailchannels.net/email-api/api-reference/send-an-email)
77
+ - ✅ [DKIM, SPF & Domain Lockdown Check](https://docs.mailchannels.net/email-api/api-reference/dkim-spf-domain-lockdown-check)
78
+ - 📢 Webhooks
79
+ - ✅ [Enroll for Webhook Notifications](https://docs.mailchannels.net/email-api/api-reference/enroll-for-webhook-notifications)
80
+ - ✅ [Retrieve Customer Webhooks](https://docs.mailchannels.net/email-api/api-reference/retrieve-customer-webhooks)
81
+ - ✅ [Delete Customer Webhooks](https://docs.mailchannels.net/email-api/api-reference/delete-customer-webhooks)
82
+ - [Retrieve Webhook Signing Key](https://docs.mailchannels.net/email-api/api-reference/retrieve-webhook-signing-key)
83
+ - ✅ [Validate Enrolled Webhook](https://docs.mailchannels.net/email-api/api-reference/validate-enrolled-webhook)
84
+ - 🪪 Sub-accounts
85
+ - ✅ [Create Sub-account](https://docs.mailchannels.net/email-api/api-reference/create-sub-account)
86
+ - ✅ [Retrieve Sub-accounts](https://docs.mailchannels.net/email-api/api-reference/retrieve-sub-accounts)
87
+ - ✅ [Delete Sub-account](https://docs.mailchannels.net/email-api/api-reference/delete-sub-account)
88
+ - ✅ [Suspend Sub-account](https://docs.mailchannels.net/email-api/api-reference/suspend-sub-account)
89
+ - ✅ [Activate Sub-account](https://docs.mailchannels.net/email-api/api-reference/activate-sub-account)
90
+ - ✅ [Create Sub-account API Key](https://docs.mailchannels.net/email-api/api-reference/create-sub-account-api-key)
91
+ - ✅ [Delete Sub-account API Key](https://docs.mailchannels.net/email-api/api-reference/delete-sub-account-api-key)
92
+ - ✅ [Retrieve Sub-account API Keys](https://docs.mailchannels.net/email-api/api-reference/retrieve-sub-account-api-keys)
93
+ - ✅ [Create Sub-account SMTP Password](https://docs.mailchannels.net/email-api/api-reference/create-sub-account-smtp-password)
94
+ - ✅ [Delete Sub-account SMTP Password](https://docs.mailchannels.net/email-api/api-reference/delete-sub-account-smtp-password)
95
+ - ✅ [Retrieve Sub-account SMTP Passwords](https://docs.mailchannels.net/email-api/api-reference/retrieve-sub-account-smtp-passwords)
96
+ - ✅ [Retrieve Sub-account Limit](https://docs.mailchannels.net/email-api/api-reference/retrieve-sub-account-limit)
97
+ - ✅ [Set Sub-account Limit](https://docs.mailchannels.net/email-api/api-reference/set-sub-account-limit)
98
+ - [Delete Sub-account Limit](https://docs.mailchannels.net/email-api/api-reference/delete-sub-account-limit)
99
+ - ✅ [Retrieve Sub-account Usage Stats](https://docs.mailchannels.net/email-api/api-reference/retrieve-sub-account-usage-stats)
100
+ - 📊 Metrics
101
+ - ✅ [Retrieve Engagement Metrics](https://docs.mailchannels.net/email-api/api-reference/retrieve-engagement-metrics)
102
+ - ✅ [Retrieve Performance Metrics](https://docs.mailchannels.net/email-api/api-reference/retrieve-performance-metrics)
103
+ - ✅ [Retrieve Recipient Behaviour Metrics](https://docs.mailchannels.net/email-api/api-reference/retrieve-recipient-behaviour-metrics)
104
+ - [Retrieve Usage Stats](https://docs.mailchannels.net/email-api/api-reference/retrieve-usage-stats)
105
+ - ✅ [Retrieve Volume Metrics](https://docs.mailchannels.net/email-api/api-reference/retrieve-volume-metrics)
106
+ - 🚫 Suppressions
107
+ - ✅ [Create Suppression Entries](https://docs.mailchannels.net/email-api/api-reference/create-suppression-entries)
108
+ - ✅ [Delete Suppression Entry](https://docs.mailchannels.net/email-api/api-reference/delete-suppression-entry)
109
+ - [Retrieve Suppression List](https://docs.mailchannels.net/email-api/api-reference/retrieve-suppression-list)
110
+
111
+ ### [Inbound API](https://docs.mailchannels.net/inbound-api/API-reference/inbound-api)
112
+
113
+ - 🌐 Domains
114
+ - ✅ [Provision domain](https://docs.mailchannels.net/inbound-api/API-reference/provision-domain)
115
+ - ✅ [Remove domain](https://docs.mailchannels.net/inbound-api/API-reference/remove-domain)
116
+ - ✅ [List domains](https://docs.mailchannels.net/inbound-api/API-reference/list-domains)
117
+ - ✅ [Bulk provision domains](https://docs.mailchannels.net/inbound-api/API-reference/bulk-provision-domains)
118
+ - ✅ [Add domain list entry](https://docs.mailchannels.net/inbound-api/API-reference/add-domain-list-entry)
119
+ - ✅ [Get domain list entries](https://docs.mailchannels.net/inbound-api/API-reference/get-domain-list-entries)
120
+ - [Delete domain list entry](https://docs.mailchannels.net/inbound-api/API-reference/delete-domain-list-entry)
121
+ - ✅ [Create login link](https://docs.mailchannels.net/inbound-api/API-reference/create-login-link)
122
+ - ✅ [Bulk create login links](https://docs.mailchannels.net/inbound-api/API-reference/bulk-create-login-links)
123
+ - ✅ [Set downstream address](https://docs.mailchannels.net/inbound-api/API-reference/set-downstream-address)
124
+ - [Fetch downstream addresses](https://docs.mailchannels.net/inbound-api/API-reference/fetch-downstream-addresses)
125
+ - ✅ [Update API key](https://docs.mailchannels.net/inbound-api/API-reference/update-api-key)
126
+ - 📋 Lists
127
+ - ✅ [Add item to customer list](https://docs.mailchannels.net/inbound-api/API-reference/add-item-to-customer-list)
128
+ - [Delete item from customer list](https://docs.mailchannels.net/inbound-api/API-reference/delete-item-from-customer-list)
129
+ - ✅ [Get customer list entries](https://docs.mailchannels.net/inbound-api/API-reference/get-customer-list-entries)
130
+ - 📥 Users
131
+ - ✅ [Create a recipient](https://docs.mailchannels.net/inbound-api/API-reference/create-a-recipient)
132
+ - ✅ [Add item to recipient list](https://docs.mailchannels.net/inbound-api/API-reference/add-item-to-recipient-list)
133
+ - [Get recipient list entries](https://docs.mailchannels.net/inbound-api/API-reference/get-recipient-list-entries)
134
+ - ✅ [Delete item from recipient list](https://docs.mailchannels.net/inbound-api/API-reference/delete-item-from-recipient-list)
135
+ - ⚙️ Service
136
+ - ✅ [Retrieve the condition of the service](https://docs.mailchannels.net/inbound-api/API-reference/retrieve-the-condition-of-the-service)
137
+ - [Submit a false negative or false positive report](https://docs.mailchannels.net/inbound-api/API-reference/submit-a-false-negative-or-false-positive-report)
138
+ - ✅ [Get a list of your subscriptions to MailChannels Inbound](https://docs.mailchannels.net/inbound-api/API-reference/get-a-list-of-your-subscriptions-to-mail-channels-inbound)
139
+ <!-- #endregion roadmap -->
140
+
141
+ ## <a name="development">💻 Development</a>
142
+
143
+ <details>
144
+ <summary>Local development</summary>
145
+
146
+ ```sh
147
+ # Install dependencies
148
+ pnpm install
149
+
150
+ # Build the package
151
+ npm run build
152
+
153
+ # Run ESLint
154
+ npm run lint
155
+
156
+ # Run Vitest
157
+ npm run test
158
+ npm run test:watch
159
+
160
+ # Run typecheck
161
+ npm run test:types
162
+
163
+ # Release new version
164
+ npm run release
165
+ ```
166
+
167
+ </details>
168
+
169
+ <!-- Badges -->
170
+ [npm-version-src]: https://img.shields.io/npm/v/mailchannels-sdk.svg?style=flat&colorA=070a30&colorB=35a047
171
+ [npm-version-href]: https://npmjs.com/package/mailchannels-sdk
172
+
173
+ [npm-downloads-src]: https://img.shields.io/npm/dm/mailchannels-sdk.svg?style=flat&colorA=070a30&colorB=35a047
174
+ [npm-downloads-href]: https://npmjs.com/package/mailchannels-sdk
175
+
176
+ [codecov-coverage-src]: https://img.shields.io/codecov/c/github/yizack/mailchannels?style=flat&colorA=070a30&token=HTSBRHSJ5M
177
+ [codecov-coverage-href]: https://codecov.io/gh/Yizack/mailchannels
@@ -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.DUD1k4jz.mjs';
2
- export { a2 as DomainsBulkProvisionOptions, a4 as DomainsBulkProvisionResponse, a7 as DomainsCreateLoginLinkResponse, a0 as DomainsData, a9 as DomainsDownstreamAddress, a8 as DomainsListDownstreamAddressesOptions, aa as DomainsListDownstreamAddressesResponse, a5 as DomainsListOptions, a6 as DomainsListResponse, a1 as DomainsProvisionOptions, a3 as DomainsProvisionResponse, j as EmailsCheckDomainDkim, k as EmailsCheckDomainOptions, m as EmailsCheckDomainResponse, l as EmailsCheckDomainVerdict, e as EmailsSendAttachment, h as EmailsSendOptions, g as EmailsSendOptionsBase, d as EmailsSendRecipient, i as EmailsSendResponse, f as EmailsSendTracking, af as ListEntriesResponse, ad as ListEntry, ac as ListEntryOptions, ae as ListEntryResponse, ab as ListNames, G as MetricsBucket, I as MetricsEngagement, J as MetricsEngagementResponse, H as MetricsOptions, K as MetricsPerformance, N as MetricsPerformanceResponse, O as MetricsRecipientBehaviour, P as MetricsRecipientBehaviourResponse, T as MetricsUsageResponse, Q as MetricsVolume, R as MetricsVolumeResponse, aj as ServiceReportOptions, ai as ServiceSubscriptionsResponse, q as SubAccountsAccount, u as SubAccountsApiKey, v as SubAccountsCreateApiKeyResponse, r as SubAccountsCreateResponse, y as SubAccountsCreateSmtpPasswordResponse, A as SubAccountsLimit, B as SubAccountsLimitResponse, w as SubAccountsListApiKeyResponse, s as SubAccountsListOptions, t as SubAccountsListResponse, z as SubAccountsListSmtpPasswordResponse, x as SubAccountsSmtpPassword, C as SubAccountsUsage, F as SubAccountsUsageResponse, ak as SuccessResponse, X as SuppressionsCreateOptions, _ as SuppressionsListEntry, Z as SuppressionsListOptions, $ as SuppressionsListResponse, Y as SuppressionsSource, V as SuppressionsTypes, ag as UsersCreateOptions, ah as UsersCreateResponse, n as WebhooksListResponse, o as WebhooksSigningKeyResponse, p as WebhooksValidateResponse } from './shared/mailchannels-sdk.DUD1k4jz.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.Bakg_aFG.mjs';
2
+ export { ac as DomainsBulkCreateLoginLink, ab as DomainsBulkCreateLoginLinkResult, ad as DomainsBulkCreateLoginLinksResponse, a2 as DomainsBulkProvisionOptions, a4 as DomainsBulkProvisionResponse, a7 as DomainsCreateLoginLinkResponse, a0 as DomainsData, a9 as DomainsDownstreamAddress, a8 as DomainsListDownstreamAddressesOptions, aa as DomainsListDownstreamAddressesResponse, a5 as DomainsListOptions, a6 as DomainsListResponse, a1 as DomainsProvisionOptions, a3 as DomainsProvisionResponse, j as EmailsCheckDomainDkim, k as EmailsCheckDomainOptions, m as EmailsCheckDomainResponse, l as EmailsCheckDomainVerdict, e as EmailsSendAttachment, h as EmailsSendOptions, g as EmailsSendOptionsBase, d as EmailsSendRecipient, i as EmailsSendResponse, f as EmailsSendTracking, ai as ListEntriesResponse, ag as ListEntry, af as ListEntryOptions, ah as ListEntryResponse, ae as ListNames, G as MetricsBucket, I as MetricsEngagement, J as MetricsEngagementResponse, H as MetricsOptions, K as MetricsPerformance, N as MetricsPerformanceResponse, O as MetricsRecipientBehaviour, P as MetricsRecipientBehaviourResponse, T as MetricsUsageResponse, Q as MetricsVolume, R as MetricsVolumeResponse, am as ServiceReportOptions, al as ServiceSubscriptionsResponse, q as SubAccountsAccount, u as SubAccountsApiKey, v as SubAccountsCreateApiKeyResponse, r as SubAccountsCreateResponse, y as SubAccountsCreateSmtpPasswordResponse, A as SubAccountsLimit, B as SubAccountsLimitResponse, w as SubAccountsListApiKeyResponse, s as SubAccountsListOptions, t as SubAccountsListResponse, z as SubAccountsListSmtpPasswordResponse, x as SubAccountsSmtpPassword, C as SubAccountsUsage, F as SubAccountsUsageResponse, an as SuccessResponse, X as SuppressionsCreateOptions, _ as SuppressionsListEntry, Z as SuppressionsListOptions, $ as SuppressionsListResponse, Y as SuppressionsSource, V as SuppressionsTypes, aj as UsersCreateOptions, ak as UsersCreateResponse, n as WebhooksListResponse, o as WebhooksSigningKeyResponse, p as WebhooksValidateResponse } from './shared/mailchannels-sdk.Bakg_aFG.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.DUD1k4jz.js';
2
- export { a2 as DomainsBulkProvisionOptions, a4 as DomainsBulkProvisionResponse, a7 as DomainsCreateLoginLinkResponse, a0 as DomainsData, a9 as DomainsDownstreamAddress, a8 as DomainsListDownstreamAddressesOptions, aa as DomainsListDownstreamAddressesResponse, a5 as DomainsListOptions, a6 as DomainsListResponse, a1 as DomainsProvisionOptions, a3 as DomainsProvisionResponse, j as EmailsCheckDomainDkim, k as EmailsCheckDomainOptions, m as EmailsCheckDomainResponse, l as EmailsCheckDomainVerdict, e as EmailsSendAttachment, h as EmailsSendOptions, g as EmailsSendOptionsBase, d as EmailsSendRecipient, i as EmailsSendResponse, f as EmailsSendTracking, af as ListEntriesResponse, ad as ListEntry, ac as ListEntryOptions, ae as ListEntryResponse, ab as ListNames, G as MetricsBucket, I as MetricsEngagement, J as MetricsEngagementResponse, H as MetricsOptions, K as MetricsPerformance, N as MetricsPerformanceResponse, O as MetricsRecipientBehaviour, P as MetricsRecipientBehaviourResponse, T as MetricsUsageResponse, Q as MetricsVolume, R as MetricsVolumeResponse, aj as ServiceReportOptions, ai as ServiceSubscriptionsResponse, q as SubAccountsAccount, u as SubAccountsApiKey, v as SubAccountsCreateApiKeyResponse, r as SubAccountsCreateResponse, y as SubAccountsCreateSmtpPasswordResponse, A as SubAccountsLimit, B as SubAccountsLimitResponse, w as SubAccountsListApiKeyResponse, s as SubAccountsListOptions, t as SubAccountsListResponse, z as SubAccountsListSmtpPasswordResponse, x as SubAccountsSmtpPassword, C as SubAccountsUsage, F as SubAccountsUsageResponse, ak as SuccessResponse, X as SuppressionsCreateOptions, _ as SuppressionsListEntry, Z as SuppressionsListOptions, $ as SuppressionsListResponse, Y as SuppressionsSource, V as SuppressionsTypes, ag as UsersCreateOptions, ah as UsersCreateResponse, n as WebhooksListResponse, o as WebhooksSigningKeyResponse, p as WebhooksValidateResponse } from './shared/mailchannels-sdk.DUD1k4jz.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.Bakg_aFG.js';
2
+ export { ac as DomainsBulkCreateLoginLink, ab as DomainsBulkCreateLoginLinkResult, ad as DomainsBulkCreateLoginLinksResponse, a2 as DomainsBulkProvisionOptions, a4 as DomainsBulkProvisionResponse, a7 as DomainsCreateLoginLinkResponse, a0 as DomainsData, a9 as DomainsDownstreamAddress, a8 as DomainsListDownstreamAddressesOptions, aa as DomainsListDownstreamAddressesResponse, a5 as DomainsListOptions, a6 as DomainsListResponse, a1 as DomainsProvisionOptions, a3 as DomainsProvisionResponse, j as EmailsCheckDomainDkim, k as EmailsCheckDomainOptions, m as EmailsCheckDomainResponse, l as EmailsCheckDomainVerdict, e as EmailsSendAttachment, h as EmailsSendOptions, g as EmailsSendOptionsBase, d as EmailsSendRecipient, i as EmailsSendResponse, f as EmailsSendTracking, ai as ListEntriesResponse, ag as ListEntry, af as ListEntryOptions, ah as ListEntryResponse, ae as ListNames, G as MetricsBucket, I as MetricsEngagement, J as MetricsEngagementResponse, H as MetricsOptions, K as MetricsPerformance, N as MetricsPerformanceResponse, O as MetricsRecipientBehaviour, P as MetricsRecipientBehaviourResponse, T as MetricsUsageResponse, Q as MetricsVolume, R as MetricsVolumeResponse, am as ServiceReportOptions, al as ServiceSubscriptionsResponse, q as SubAccountsAccount, u as SubAccountsApiKey, v as SubAccountsCreateApiKeyResponse, r as SubAccountsCreateResponse, y as SubAccountsCreateSmtpPasswordResponse, A as SubAccountsLimit, B as SubAccountsLimitResponse, w as SubAccountsListApiKeyResponse, s as SubAccountsListOptions, t as SubAccountsListResponse, z as SubAccountsListSmtpPasswordResponse, x as SubAccountsSmtpPassword, C as SubAccountsUsage, F as SubAccountsUsageResponse, an as SuccessResponse, X as SuppressionsCreateOptions, _ as SuppressionsListEntry, Z as SuppressionsListOptions, $ as SuppressionsListResponse, Y as SuppressionsSource, V as SuppressionsTypes, aj as UsersCreateOptions, ak as UsersCreateResponse, n as WebhooksListResponse, o as WebhooksSigningKeyResponse, p as WebhooksValidateResponse } from './shared/mailchannels-sdk.Bakg_aFG.js';
3
3
  import 'ofetch';
4
4
 
5
5
  declare class MailChannels extends MailChannelsClient {
@@ -1,2 +1,2 @@
1
- export { D as Domains, a2 as DomainsBulkProvisionOptions, a4 as DomainsBulkProvisionResponse, a7 as DomainsCreateLoginLinkResponse, a0 as DomainsData, a9 as DomainsDownstreamAddress, a8 as DomainsListDownstreamAddressesOptions, aa as DomainsListDownstreamAddressesResponse, a5 as DomainsListOptions, a6 as DomainsListResponse, a1 as DomainsProvisionOptions, a3 as DomainsProvisionResponse, E as Emails, j as EmailsCheckDomainDkim, k as EmailsCheckDomainOptions, m as EmailsCheckDomainResponse, l as EmailsCheckDomainVerdict, e as EmailsSendAttachment, h as EmailsSendOptions, g as EmailsSendOptionsBase, d as EmailsSendRecipient, i as EmailsSendResponse, f as EmailsSendTracking, af as ListEntriesResponse, ad as ListEntry, ac as ListEntryOptions, ae as ListEntryResponse, ab as ListNames, L as Lists, a as Metrics, G as MetricsBucket, I as MetricsEngagement, J as MetricsEngagementResponse, H as MetricsOptions, K as MetricsPerformance, N as MetricsPerformanceResponse, O as MetricsRecipientBehaviour, P as MetricsRecipientBehaviourResponse, T as MetricsUsageResponse, Q as MetricsVolume, R as MetricsVolumeResponse, c as Service, aj as ServiceReportOptions, ai as ServiceSubscriptionsResponse, S as SubAccounts, q as SubAccountsAccount, u as SubAccountsApiKey, v as SubAccountsCreateApiKeyResponse, r as SubAccountsCreateResponse, y as SubAccountsCreateSmtpPasswordResponse, A as SubAccountsLimit, B as SubAccountsLimitResponse, w as SubAccountsListApiKeyResponse, s as SubAccountsListOptions, t as SubAccountsListResponse, z as SubAccountsListSmtpPasswordResponse, x as SubAccountsSmtpPassword, C as SubAccountsUsage, F as SubAccountsUsageResponse, ak as SuccessResponse, b as Suppressions, X as SuppressionsCreateOptions, _ as SuppressionsListEntry, Z as SuppressionsListOptions, $ as SuppressionsListResponse, Y as SuppressionsSource, V as SuppressionsTypes, U as Users, ag as UsersCreateOptions, ah as UsersCreateResponse, W as Webhooks, n as WebhooksListResponse, o as WebhooksSigningKeyResponse, p as WebhooksValidateResponse } from './shared/mailchannels-sdk.DUD1k4jz.mjs';
1
+ export { D as Domains, ac as DomainsBulkCreateLoginLink, ab as DomainsBulkCreateLoginLinkResult, ad as DomainsBulkCreateLoginLinksResponse, a2 as DomainsBulkProvisionOptions, a4 as DomainsBulkProvisionResponse, a7 as DomainsCreateLoginLinkResponse, a0 as DomainsData, a9 as DomainsDownstreamAddress, a8 as DomainsListDownstreamAddressesOptions, aa as DomainsListDownstreamAddressesResponse, a5 as DomainsListOptions, a6 as DomainsListResponse, a1 as DomainsProvisionOptions, a3 as DomainsProvisionResponse, E as Emails, j as EmailsCheckDomainDkim, k as EmailsCheckDomainOptions, m as EmailsCheckDomainResponse, l as EmailsCheckDomainVerdict, e as EmailsSendAttachment, h as EmailsSendOptions, g as EmailsSendOptionsBase, d as EmailsSendRecipient, i as EmailsSendResponse, f as EmailsSendTracking, ai as ListEntriesResponse, ag as ListEntry, af as ListEntryOptions, ah as ListEntryResponse, ae as ListNames, L as Lists, a as Metrics, G as MetricsBucket, I as MetricsEngagement, J as MetricsEngagementResponse, H as MetricsOptions, K as MetricsPerformance, N as MetricsPerformanceResponse, O as MetricsRecipientBehaviour, P as MetricsRecipientBehaviourResponse, T as MetricsUsageResponse, Q as MetricsVolume, R as MetricsVolumeResponse, c as Service, am as ServiceReportOptions, al as ServiceSubscriptionsResponse, S as SubAccounts, q as SubAccountsAccount, u as SubAccountsApiKey, v as SubAccountsCreateApiKeyResponse, r as SubAccountsCreateResponse, y as SubAccountsCreateSmtpPasswordResponse, A as SubAccountsLimit, B as SubAccountsLimitResponse, w as SubAccountsListApiKeyResponse, s as SubAccountsListOptions, t as SubAccountsListResponse, z as SubAccountsListSmtpPasswordResponse, x as SubAccountsSmtpPassword, C as SubAccountsUsage, F as SubAccountsUsageResponse, an as SuccessResponse, b as Suppressions, X as SuppressionsCreateOptions, _ as SuppressionsListEntry, Z as SuppressionsListOptions, $ as SuppressionsListResponse, Y as SuppressionsSource, V as SuppressionsTypes, U as Users, aj as UsersCreateOptions, ak as UsersCreateResponse, W as Webhooks, n as WebhooksListResponse, o as WebhooksSigningKeyResponse, p as WebhooksValidateResponse } from './shared/mailchannels-sdk.Bakg_aFG.mjs';
2
2
  import 'ofetch';
package/dist/modules.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { D as Domains, a2 as DomainsBulkProvisionOptions, a4 as DomainsBulkProvisionResponse, a7 as DomainsCreateLoginLinkResponse, a0 as DomainsData, a9 as DomainsDownstreamAddress, a8 as DomainsListDownstreamAddressesOptions, aa as DomainsListDownstreamAddressesResponse, a5 as DomainsListOptions, a6 as DomainsListResponse, a1 as DomainsProvisionOptions, a3 as DomainsProvisionResponse, E as Emails, j as EmailsCheckDomainDkim, k as EmailsCheckDomainOptions, m as EmailsCheckDomainResponse, l as EmailsCheckDomainVerdict, e as EmailsSendAttachment, h as EmailsSendOptions, g as EmailsSendOptionsBase, d as EmailsSendRecipient, i as EmailsSendResponse, f as EmailsSendTracking, af as ListEntriesResponse, ad as ListEntry, ac as ListEntryOptions, ae as ListEntryResponse, ab as ListNames, L as Lists, a as Metrics, G as MetricsBucket, I as MetricsEngagement, J as MetricsEngagementResponse, H as MetricsOptions, K as MetricsPerformance, N as MetricsPerformanceResponse, O as MetricsRecipientBehaviour, P as MetricsRecipientBehaviourResponse, T as MetricsUsageResponse, Q as MetricsVolume, R as MetricsVolumeResponse, c as Service, aj as ServiceReportOptions, ai as ServiceSubscriptionsResponse, S as SubAccounts, q as SubAccountsAccount, u as SubAccountsApiKey, v as SubAccountsCreateApiKeyResponse, r as SubAccountsCreateResponse, y as SubAccountsCreateSmtpPasswordResponse, A as SubAccountsLimit, B as SubAccountsLimitResponse, w as SubAccountsListApiKeyResponse, s as SubAccountsListOptions, t as SubAccountsListResponse, z as SubAccountsListSmtpPasswordResponse, x as SubAccountsSmtpPassword, C as SubAccountsUsage, F as SubAccountsUsageResponse, ak as SuccessResponse, b as Suppressions, X as SuppressionsCreateOptions, _ as SuppressionsListEntry, Z as SuppressionsListOptions, $ as SuppressionsListResponse, Y as SuppressionsSource, V as SuppressionsTypes, U as Users, ag as UsersCreateOptions, ah as UsersCreateResponse, W as Webhooks, n as WebhooksListResponse, o as WebhooksSigningKeyResponse, p as WebhooksValidateResponse } from './shared/mailchannels-sdk.DUD1k4jz.js';
1
+ export { D as Domains, ac as DomainsBulkCreateLoginLink, ab as DomainsBulkCreateLoginLinkResult, ad as DomainsBulkCreateLoginLinksResponse, a2 as DomainsBulkProvisionOptions, a4 as DomainsBulkProvisionResponse, a7 as DomainsCreateLoginLinkResponse, a0 as DomainsData, a9 as DomainsDownstreamAddress, a8 as DomainsListDownstreamAddressesOptions, aa as DomainsListDownstreamAddressesResponse, a5 as DomainsListOptions, a6 as DomainsListResponse, a1 as DomainsProvisionOptions, a3 as DomainsProvisionResponse, E as Emails, j as EmailsCheckDomainDkim, k as EmailsCheckDomainOptions, m as EmailsCheckDomainResponse, l as EmailsCheckDomainVerdict, e as EmailsSendAttachment, h as EmailsSendOptions, g as EmailsSendOptionsBase, d as EmailsSendRecipient, i as EmailsSendResponse, f as EmailsSendTracking, ai as ListEntriesResponse, ag as ListEntry, af as ListEntryOptions, ah as ListEntryResponse, ae as ListNames, L as Lists, a as Metrics, G as MetricsBucket, I as MetricsEngagement, J as MetricsEngagementResponse, H as MetricsOptions, K as MetricsPerformance, N as MetricsPerformanceResponse, O as MetricsRecipientBehaviour, P as MetricsRecipientBehaviourResponse, T as MetricsUsageResponse, Q as MetricsVolume, R as MetricsVolumeResponse, c as Service, am as ServiceReportOptions, al as ServiceSubscriptionsResponse, S as SubAccounts, q as SubAccountsAccount, u as SubAccountsApiKey, v as SubAccountsCreateApiKeyResponse, r as SubAccountsCreateResponse, y as SubAccountsCreateSmtpPasswordResponse, A as SubAccountsLimit, B as SubAccountsLimitResponse, w as SubAccountsListApiKeyResponse, s as SubAccountsListOptions, t as SubAccountsListResponse, z as SubAccountsListSmtpPasswordResponse, x as SubAccountsSmtpPassword, C as SubAccountsUsage, F as SubAccountsUsageResponse, an as SuccessResponse, b as Suppressions, X as SuppressionsCreateOptions, _ as SuppressionsListEntry, Z as SuppressionsListOptions, $ as SuppressionsListResponse, Y as SuppressionsSource, V as SuppressionsTypes, U as Users, aj as UsersCreateOptions, ak as UsersCreateResponse, W as Webhooks, n as WebhooksListResponse, o as WebhooksSigningKeyResponse, p as WebhooksValidateResponse } from './shared/mailchannels-sdk.Bakg_aFG.js';
2
2
  import 'ofetch';
package/dist/modules.mjs CHANGED
@@ -989,7 +989,7 @@ class Suppressions {
989
989
  * @example
990
990
  * ```ts
991
991
  * const mailchannels = new MailChannels('your-api-key')
992
- * const response = await mailchannels.suppressions.create({
992
+ * const { success } = await mailchannels.suppressions.create({
993
993
  * // ...
994
994
  * });
995
995
  */
@@ -1028,7 +1028,7 @@ class Suppressions {
1028
1028
  * @example
1029
1029
  * ```ts
1030
1030
  * const mailchannels = new MailChannels('your-api-key')
1031
- * const response = await mailchannels.suppressions.delete('name@example.com', 'api');
1031
+ * const { success } = await mailchannels.suppressions.delete('name@example.com', 'api');
1032
1032
  * ```
1033
1033
  */
1034
1034
  async delete(recipient, source) {
@@ -1055,7 +1055,7 @@ class Suppressions {
1055
1055
  * @example
1056
1056
  * ```ts
1057
1057
  * const mailchannels = new MailChannels('your-api-key')
1058
- * const response = await mailchannels.suppressions.list();
1058
+ * const { list }= await mailchannels.suppressions.list();
1059
1059
  * ```
1060
1060
  * @param options - Options to filter and customize the suppression entries retrieval.
1061
1061
  */
@@ -1389,7 +1389,7 @@ class Domains {
1389
1389
  return data;
1390
1390
  }
1391
1391
  /**
1392
- * Sets the list of downstream addreses for the domain. This action deletes any existing downstream address for the domain before creating new ones. If the `records` parameter is an empty array, all downstream address records will be deleted.
1392
+ * Sets the list of downstream addresses for the domain. This action deletes any existing downstream address for the domain before creating new ones. If the `records` parameter is an empty array, all downstream address records will be deleted.
1393
1393
  * @param domain - The domain name.
1394
1394
  * @param records - The list of records to set for the domain. A maximum of 10 records can be set.
1395
1395
  * @example
@@ -1504,6 +1504,39 @@ class Domains {
1504
1504
  });
1505
1505
  return data;
1506
1506
  }
1507
+ /**
1508
+ * Generate a batch of links that allow a user to log in as a domain administrator to their different domains.
1509
+ * @param domains - The list of domain names. Maximum of `1000` links per request.
1510
+ * @example
1511
+ * ```ts
1512
+ * const mailchannels = new MailChannels('your-api-key')
1513
+ * const { results } = await mailchannels.domains.bulkCreateLoginLinks(['example.com', 'example2.com'])
1514
+ * ```
1515
+ */
1516
+ async bulkCreateLoginLinks(domains) {
1517
+ const data = { results: [], error: null };
1518
+ if (!domains || !domains.length) {
1519
+ data.error = "No domains provided.";
1520
+ return data;
1521
+ }
1522
+ if (domains.length > 1e3) {
1523
+ data.error = "The maximum number of domains to create login links for is 1000.";
1524
+ return data;
1525
+ }
1526
+ const response = await this.mailchannels.post("/inbound/v1/domains/batch/login-link", {
1527
+ body: {
1528
+ domains: domains.map((domain) => ({ domain }))
1529
+ },
1530
+ onResponseError: async ({ response: response2 }) => {
1531
+ data.error = getStatusError(response2, {
1532
+ [ErrorCode.BadRequest]: "Bad Request."
1533
+ });
1534
+ }
1535
+ }).catch(() => null);
1536
+ if (!response) return data;
1537
+ data.results = response;
1538
+ return data;
1539
+ }
1507
1540
  }
1508
1541
 
1509
1542
  class Lists {