@trycourier/courier 3.1.0 → 3.2.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/CHANGELOG.md +6 -1
- package/lib/client.js +4 -0
- package/lib/lists/index.js +4 -0
- package/lib/types.d.ts +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
|
5
5
|
|
|
6
6
|
## [Unreleased][unreleased]
|
|
7
7
|
|
|
8
|
+
## [v3.2.0] - 2021-11-18
|
|
9
|
+
|
|
10
|
+
- adds idempotency expiration support for send and send list endpoints
|
|
11
|
+
|
|
8
12
|
## [v3.1.0] - 2021-11-16
|
|
9
13
|
|
|
10
14
|
- Expose additional type definitions for `getMessage`
|
|
@@ -181,7 +185,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
|
181
185
|
|
|
182
186
|
## v1.0.1 - 2019-07-12
|
|
183
187
|
|
|
184
|
-
[unreleased]: https://github.com/trycourier/courier-node/compare/v3.
|
|
188
|
+
[unreleased]: https://github.com/trycourier/courier-node/compare/v3.2.0...HEAD
|
|
189
|
+
[v3.2.0]: https://github.com/trycourier/courier-node/compare/v3.1.0...v3.2.0
|
|
185
190
|
[v3.1.0]: https://github.com/trycourier/courier-node/compare/v3.0.0...v3.1.0
|
|
186
191
|
[v3.0.0]: https://github.com/trycourier/courier-node/compare/v2.8.0...v3.0.0
|
|
187
192
|
[v2.8.0]: https://github.com/trycourier/courier-node/compare/v2.7.0...v2.8.0
|
package/lib/client.js
CHANGED
|
@@ -55,6 +55,10 @@ var send = function (options) {
|
|
|
55
55
|
if (config && config.idempotencyKey) {
|
|
56
56
|
axiosConfig.headers["Idempotency-Key"] = config.idempotencyKey;
|
|
57
57
|
}
|
|
58
|
+
if (config && config.idempotencyExpiry) {
|
|
59
|
+
axiosConfig.headers["x-idempotency-expiration"] =
|
|
60
|
+
config.idempotencyExpiry;
|
|
61
|
+
}
|
|
58
62
|
return [4 /*yield*/, options.httpClient.post("/send", {
|
|
59
63
|
brand: params.brand,
|
|
60
64
|
data: params.data,
|
package/lib/lists/index.js
CHANGED
|
@@ -192,6 +192,10 @@ var send = function (options) {
|
|
|
192
192
|
if (config && config.idempotencyKey) {
|
|
193
193
|
axiosConfig.headers["Idempotency-Key"] = config.idempotencyKey;
|
|
194
194
|
}
|
|
195
|
+
if (config && config.idempotencyExpiry) {
|
|
196
|
+
axiosConfig.headers["x-idempotency-expiration"] =
|
|
197
|
+
config.idempotencyExpiry;
|
|
198
|
+
}
|
|
195
199
|
return [4 /*yield*/, options.httpClient.post("/send/list", params, axiosConfig)];
|
|
196
200
|
case 1:
|
|
197
201
|
res = _a.sent();
|
package/lib/types.d.ts
CHANGED