@trycourier/courier 3.15.0 → 3.16.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 +4 -0
- package/lib/brands.js +4 -0
- package/lib/profile.js +4 -0
- package/lib/types.d.ts +2 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/lib/brands.js
CHANGED
|
@@ -86,6 +86,10 @@ exports.createBrand = function (options) {
|
|
|
86
86
|
if (config && config.idempotencyKey) {
|
|
87
87
|
axiosConfig.headers["Idempotency-Key"] = config.idempotencyKey;
|
|
88
88
|
}
|
|
89
|
+
if (config && config.idempotencyExpiry) {
|
|
90
|
+
axiosConfig.headers["x-idempotency-expiration"] =
|
|
91
|
+
config.idempotencyExpiry;
|
|
92
|
+
}
|
|
89
93
|
return [4 /*yield*/, options.httpClient.post("/brands", params, axiosConfig)];
|
|
90
94
|
case 1:
|
|
91
95
|
res = _a.sent();
|
package/lib/profile.js
CHANGED
|
@@ -64,6 +64,10 @@ exports.mergeProfile = function (options) {
|
|
|
64
64
|
if (config && config.idempotencyKey) {
|
|
65
65
|
axiosConfig.headers["Idempotency-Key"] = config.idempotencyKey;
|
|
66
66
|
}
|
|
67
|
+
if (config && config.idempotencyExpiry) {
|
|
68
|
+
axiosConfig.headers["x-idempotency-expiration"] =
|
|
69
|
+
config.idempotencyExpiry;
|
|
70
|
+
}
|
|
67
71
|
return [4 /*yield*/, options.httpClient.post("/profiles/" + params.recipientId, {
|
|
68
72
|
profile: params.profile
|
|
69
73
|
}, axiosConfig)];
|
package/lib/types.d.ts
CHANGED
|
@@ -81,6 +81,7 @@ export interface ICourierProfileListsPostParameters {
|
|
|
81
81
|
}
|
|
82
82
|
export interface ICourierProfilePostConfig {
|
|
83
83
|
idempotencyKey?: string;
|
|
84
|
+
idempotencyExpiry?: number;
|
|
84
85
|
}
|
|
85
86
|
export interface ICourierProfilePostResponse {
|
|
86
87
|
status: "SUCCESS";
|
|
@@ -278,6 +279,7 @@ export interface ICourierBrandParameters {
|
|
|
278
279
|
}
|
|
279
280
|
export interface ICourierBrandPostConfig {
|
|
280
281
|
idempotencyKey?: string;
|
|
282
|
+
idempotencyExpiry?: number;
|
|
281
283
|
}
|
|
282
284
|
export interface ICourierBrandPutParameters extends ICourierBrandParameters {
|
|
283
285
|
id: string;
|