@trycourier/courier 6.1.2 → 6.1.3
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/Client.js +1 -1
- package/api/resources/audiences/client/Client.js +5 -5
- package/api/resources/auditEvents/client/Client.js +2 -2
- package/api/resources/authTokens/client/Client.js +1 -1
- package/api/resources/automations/client/Client.js +2 -2
- package/api/resources/brands/client/Client.js +5 -5
- package/api/resources/bulk/client/Client.js +5 -5
- package/api/resources/lists/client/Client.js +10 -10
- package/api/resources/messages/client/Client.js +6 -6
- package/api/resources/notifications/client/Client.js +8 -8
- package/api/resources/profiles/client/Client.js +7 -7
- package/api/resources/templates/client/Client.js +1 -1
- package/api/resources/tenants/client/Client.js +7 -7
- package/api/resources/translations/client/Client.js +2 -2
- package/api/resources/users/resources/preferences/client/Client.js +3 -3
- package/api/resources/users/resources/tenants/client/Client.js +5 -5
- package/api/resources/users/resources/tokens/client/Client.d.ts +9 -0
- package/api/resources/users/resources/tokens/client/Client.js +55 -5
- package/dist/Client.js +1 -1
- package/dist/api/resources/audiences/client/Client.js +5 -5
- package/dist/api/resources/auditEvents/client/Client.js +2 -2
- package/dist/api/resources/authTokens/client/Client.js +1 -1
- package/dist/api/resources/automations/client/Client.js +2 -2
- package/dist/api/resources/brands/client/Client.js +5 -5
- package/dist/api/resources/bulk/client/Client.js +5 -5
- package/dist/api/resources/lists/client/Client.js +10 -10
- package/dist/api/resources/messages/client/Client.js +6 -6
- package/dist/api/resources/notifications/client/Client.js +8 -8
- package/dist/api/resources/profiles/client/Client.js +7 -7
- package/dist/api/resources/templates/client/Client.js +1 -1
- package/dist/api/resources/tenants/client/Client.js +7 -7
- package/dist/api/resources/translations/client/Client.js +2 -2
- package/dist/api/resources/users/resources/preferences/client/Client.js +3 -3
- package/dist/api/resources/users/resources/tenants/client/Client.js +5 -5
- package/dist/api/resources/users/resources/tokens/client/Client.d.ts +9 -0
- package/dist/api/resources/users/resources/tokens/client/Client.js +55 -5
- package/package.json +1 -1
|
@@ -85,7 +85,7 @@ class Tenants {
|
|
|
85
85
|
Authorization: yield this._getAuthorizationHeader(),
|
|
86
86
|
"X-Fern-Language": "JavaScript",
|
|
87
87
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
88
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
88
|
+
"X-Fern-SDK-Version": "v6.1.3",
|
|
89
89
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
90
90
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
91
91
|
},
|
|
@@ -142,7 +142,7 @@ class Tenants {
|
|
|
142
142
|
Authorization: yield this._getAuthorizationHeader(),
|
|
143
143
|
"X-Fern-Language": "JavaScript",
|
|
144
144
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
145
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
145
|
+
"X-Fern-SDK-Version": "v6.1.3",
|
|
146
146
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
147
147
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
148
148
|
},
|
|
@@ -211,7 +211,7 @@ class Tenants {
|
|
|
211
211
|
Authorization: yield this._getAuthorizationHeader(),
|
|
212
212
|
"X-Fern-Language": "JavaScript",
|
|
213
213
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
214
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
214
|
+
"X-Fern-SDK-Version": "v6.1.3",
|
|
215
215
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
216
216
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
217
217
|
},
|
|
@@ -261,7 +261,7 @@ class Tenants {
|
|
|
261
261
|
Authorization: yield this._getAuthorizationHeader(),
|
|
262
262
|
"X-Fern-Language": "JavaScript",
|
|
263
263
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
264
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
264
|
+
"X-Fern-SDK-Version": "v6.1.3",
|
|
265
265
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
266
266
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
267
267
|
},
|
|
@@ -324,7 +324,7 @@ class Tenants {
|
|
|
324
324
|
Authorization: yield this._getAuthorizationHeader(),
|
|
325
325
|
"X-Fern-Language": "JavaScript",
|
|
326
326
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
327
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
327
|
+
"X-Fern-SDK-Version": "v6.1.3",
|
|
328
328
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
329
329
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
330
330
|
},
|
|
@@ -385,7 +385,7 @@ class Tenants {
|
|
|
385
385
|
Authorization: yield this._getAuthorizationHeader(),
|
|
386
386
|
"X-Fern-Language": "JavaScript",
|
|
387
387
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
388
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
388
|
+
"X-Fern-SDK-Version": "v6.1.3",
|
|
389
389
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
390
390
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
391
391
|
},
|
|
@@ -436,7 +436,7 @@ class Tenants {
|
|
|
436
436
|
Authorization: yield this._getAuthorizationHeader(),
|
|
437
437
|
"X-Fern-Language": "JavaScript",
|
|
438
438
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
439
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
439
|
+
"X-Fern-SDK-Version": "v6.1.3",
|
|
440
440
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
441
441
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
442
442
|
},
|
|
@@ -70,7 +70,7 @@ class Translations {
|
|
|
70
70
|
Authorization: yield this._getAuthorizationHeader(),
|
|
71
71
|
"X-Fern-Language": "JavaScript",
|
|
72
72
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
73
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
73
|
+
"X-Fern-SDK-Version": "v6.1.3",
|
|
74
74
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
75
75
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
76
76
|
},
|
|
@@ -130,7 +130,7 @@ class Translations {
|
|
|
130
130
|
Authorization: yield this._getAuthorizationHeader(),
|
|
131
131
|
"X-Fern-Language": "JavaScript",
|
|
132
132
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
133
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
133
|
+
"X-Fern-SDK-Version": "v6.1.3",
|
|
134
134
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
135
135
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
136
136
|
},
|
|
@@ -69,7 +69,7 @@ class Preferences {
|
|
|
69
69
|
Authorization: yield this._getAuthorizationHeader(),
|
|
70
70
|
"X-Fern-Language": "JavaScript",
|
|
71
71
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
72
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
72
|
+
"X-Fern-SDK-Version": "v6.1.3",
|
|
73
73
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
74
74
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
75
75
|
},
|
|
@@ -128,7 +128,7 @@ class Preferences {
|
|
|
128
128
|
Authorization: yield this._getAuthorizationHeader(),
|
|
129
129
|
"X-Fern-Language": "JavaScript",
|
|
130
130
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
131
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
131
|
+
"X-Fern-SDK-Version": "v6.1.3",
|
|
132
132
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
133
133
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
134
134
|
},
|
|
@@ -194,7 +194,7 @@ class Preferences {
|
|
|
194
194
|
Authorization: yield this._getAuthorizationHeader(),
|
|
195
195
|
"X-Fern-Language": "JavaScript",
|
|
196
196
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
197
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
197
|
+
"X-Fern-SDK-Version": "v6.1.3",
|
|
198
198
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
199
199
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
200
200
|
},
|
|
@@ -82,7 +82,7 @@ class Tenants {
|
|
|
82
82
|
Authorization: yield this._getAuthorizationHeader(),
|
|
83
83
|
"X-Fern-Language": "JavaScript",
|
|
84
84
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
85
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
85
|
+
"X-Fern-SDK-Version": "v6.1.3",
|
|
86
86
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
87
87
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
88
88
|
},
|
|
@@ -146,7 +146,7 @@ class Tenants {
|
|
|
146
146
|
Authorization: yield this._getAuthorizationHeader(),
|
|
147
147
|
"X-Fern-Language": "JavaScript",
|
|
148
148
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
149
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
149
|
+
"X-Fern-SDK-Version": "v6.1.3",
|
|
150
150
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
151
151
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
152
152
|
},
|
|
@@ -198,7 +198,7 @@ class Tenants {
|
|
|
198
198
|
Authorization: yield this._getAuthorizationHeader(),
|
|
199
199
|
"X-Fern-Language": "JavaScript",
|
|
200
200
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
201
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
201
|
+
"X-Fern-SDK-Version": "v6.1.3",
|
|
202
202
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
203
203
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
204
204
|
},
|
|
@@ -250,7 +250,7 @@ class Tenants {
|
|
|
250
250
|
Authorization: yield this._getAuthorizationHeader(),
|
|
251
251
|
"X-Fern-Language": "JavaScript",
|
|
252
252
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
253
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
253
|
+
"X-Fern-SDK-Version": "v6.1.3",
|
|
254
254
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
255
255
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
256
256
|
},
|
|
@@ -313,7 +313,7 @@ class Tenants {
|
|
|
313
313
|
Authorization: yield this._getAuthorizationHeader(),
|
|
314
314
|
"X-Fern-Language": "JavaScript",
|
|
315
315
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
316
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
316
|
+
"X-Fern-SDK-Version": "v6.1.3",
|
|
317
317
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
318
318
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
319
319
|
},
|
|
@@ -106,5 +106,14 @@ export declare class Tokens {
|
|
|
106
106
|
* await courier.users.tokens.list("string")
|
|
107
107
|
*/
|
|
108
108
|
list(userId: string, requestOptions?: Tokens.RequestOptions): Promise<Courier.users.GetAllTokensResponse>;
|
|
109
|
+
/**
|
|
110
|
+
* @param {string} userId - The user's ID. This can be any uniquely identifiable string.
|
|
111
|
+
* @param {string} token - The full token string.
|
|
112
|
+
* @param {Tokens.RequestOptions} requestOptions - Request-specific configuration.
|
|
113
|
+
*
|
|
114
|
+
* @example
|
|
115
|
+
* await courier.users.tokens.delete("string", "string")
|
|
116
|
+
*/
|
|
117
|
+
delete(userId: string, token: string, requestOptions?: Tokens.RequestOptions): Promise<void>;
|
|
109
118
|
protected _getAuthorizationHeader(): Promise<string>;
|
|
110
119
|
}
|
|
@@ -69,7 +69,7 @@ class Tokens {
|
|
|
69
69
|
Authorization: yield this._getAuthorizationHeader(),
|
|
70
70
|
"X-Fern-Language": "JavaScript",
|
|
71
71
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
72
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
72
|
+
"X-Fern-SDK-Version": "v6.1.3",
|
|
73
73
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
74
74
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
75
75
|
},
|
|
@@ -150,7 +150,7 @@ class Tokens {
|
|
|
150
150
|
Authorization: yield this._getAuthorizationHeader(),
|
|
151
151
|
"X-Fern-Language": "JavaScript",
|
|
152
152
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
153
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
153
|
+
"X-Fern-SDK-Version": "v6.1.3",
|
|
154
154
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
155
155
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
156
156
|
},
|
|
@@ -213,7 +213,7 @@ class Tokens {
|
|
|
213
213
|
Authorization: yield this._getAuthorizationHeader(),
|
|
214
214
|
"X-Fern-Language": "JavaScript",
|
|
215
215
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
216
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
216
|
+
"X-Fern-SDK-Version": "v6.1.3",
|
|
217
217
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
218
218
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
219
219
|
},
|
|
@@ -273,7 +273,7 @@ class Tokens {
|
|
|
273
273
|
Authorization: yield this._getAuthorizationHeader(),
|
|
274
274
|
"X-Fern-Language": "JavaScript",
|
|
275
275
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
276
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
276
|
+
"X-Fern-SDK-Version": "v6.1.3",
|
|
277
277
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
278
278
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
279
279
|
},
|
|
@@ -331,7 +331,7 @@ class Tokens {
|
|
|
331
331
|
Authorization: yield this._getAuthorizationHeader(),
|
|
332
332
|
"X-Fern-Language": "JavaScript",
|
|
333
333
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
334
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
334
|
+
"X-Fern-SDK-Version": "v6.1.3",
|
|
335
335
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
336
336
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
337
337
|
},
|
|
@@ -368,6 +368,56 @@ class Tokens {
|
|
|
368
368
|
}
|
|
369
369
|
});
|
|
370
370
|
}
|
|
371
|
+
/**
|
|
372
|
+
* @param {string} userId - The user's ID. This can be any uniquely identifiable string.
|
|
373
|
+
* @param {string} token - The full token string.
|
|
374
|
+
* @param {Tokens.RequestOptions} requestOptions - Request-specific configuration.
|
|
375
|
+
*
|
|
376
|
+
* @example
|
|
377
|
+
* await courier.users.tokens.delete("string", "string")
|
|
378
|
+
*/
|
|
379
|
+
delete(userId, token, requestOptions) {
|
|
380
|
+
var _a, _b;
|
|
381
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
382
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
383
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/users/${encodeURIComponent(userId)}/tokens/${encodeURIComponent(token)}`),
|
|
384
|
+
method: "DELETE",
|
|
385
|
+
headers: {
|
|
386
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
387
|
+
"X-Fern-Language": "JavaScript",
|
|
388
|
+
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
389
|
+
"X-Fern-SDK-Version": "v6.1.3",
|
|
390
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
391
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
392
|
+
},
|
|
393
|
+
contentType: "application/json",
|
|
394
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
395
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
396
|
+
});
|
|
397
|
+
if (_response.ok) {
|
|
398
|
+
return;
|
|
399
|
+
}
|
|
400
|
+
if (_response.error.reason === "status-code") {
|
|
401
|
+
throw new errors.CourierError({
|
|
402
|
+
statusCode: _response.error.statusCode,
|
|
403
|
+
body: _response.error.body,
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
switch (_response.error.reason) {
|
|
407
|
+
case "non-json":
|
|
408
|
+
throw new errors.CourierError({
|
|
409
|
+
statusCode: _response.error.statusCode,
|
|
410
|
+
body: _response.error.rawBody,
|
|
411
|
+
});
|
|
412
|
+
case "timeout":
|
|
413
|
+
throw new errors.CourierTimeoutError();
|
|
414
|
+
case "unknown":
|
|
415
|
+
throw new errors.CourierError({
|
|
416
|
+
message: _response.error.errorMessage,
|
|
417
|
+
});
|
|
418
|
+
}
|
|
419
|
+
});
|
|
420
|
+
}
|
|
371
421
|
_getAuthorizationHeader() {
|
|
372
422
|
var _a;
|
|
373
423
|
return __awaiter(this, void 0, void 0, function* () {
|