@trycourier/courier 6.4.2 → 6.5.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/Client.js +1 -1
- package/README.md +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/commons/types/BaseTemplateTenantAssociation.d.ts +15 -0
- package/api/resources/commons/types/BaseTemplateTenantAssociation.js +5 -0
- package/api/resources/commons/types/ListTemplateTenantAssociation.d.ts +7 -0
- package/api/resources/commons/types/ListTemplateTenantAssociation.js +5 -0
- package/api/resources/commons/types/SingleTemplateTenantAssociation.d.ts +7 -0
- package/api/resources/commons/types/SingleTemplateTenantAssociation.js +5 -0
- package/api/resources/commons/types/TenantTemplateData.d.ts +11 -0
- package/api/resources/commons/types/TenantTemplateData.js +5 -0
- package/api/resources/commons/types/TenantTemplateDataNoContent.d.ts +10 -0
- package/api/resources/commons/types/TenantTemplateDataNoContent.js +5 -0
- package/api/resources/commons/types/index.d.ts +5 -0
- package/api/resources/commons/types/index.js +5 -0
- package/api/resources/inbound/client/Client.js +1 -1
- package/api/resources/lists/client/Client.d.ts +3 -2
- package/api/resources/lists/client/Client.js +17 -15
- package/api/resources/lists/client/requests/RestoreListRequest.d.ts +9 -0
- package/api/resources/lists/client/requests/RestoreListRequest.js +5 -0
- package/api/resources/lists/client/requests/index.d.ts +1 -0
- package/api/resources/lists/types/List.d.ts +2 -2
- package/api/resources/messages/client/Client.js +6 -6
- package/api/resources/messages/types/Reason.d.ts +13 -1
- package/api/resources/messages/types/Reason.js +3 -0
- package/api/resources/notifications/client/Client.js +6 -6
- package/api/resources/profiles/client/Client.js +8 -8
- package/api/resources/templates/client/Client.js +1 -1
- package/api/resources/tenants/client/Client.d.ts +24 -0
- package/api/resources/tenants/client/Client.js +135 -7
- package/api/resources/tenants/client/requests/GetTemplateListByTenantParams.d.ts +17 -0
- package/api/resources/tenants/client/requests/GetTemplateListByTenantParams.js +5 -0
- package/api/resources/tenants/client/requests/index.d.ts +1 -0
- package/api/resources/tenants/types/GetTemplateByTenantResponse.d.ts +6 -0
- package/api/resources/tenants/types/GetTemplateByTenantResponse.js +5 -0
- package/api/resources/tenants/types/ListTemplatesByTenantResponse.d.ts +23 -0
- package/api/resources/tenants/types/ListTemplatesByTenantResponse.js +5 -0
- package/api/resources/tenants/types/index.d.ts +2 -0
- package/api/resources/tenants/types/index.js +2 -0
- 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.js +6 -6
- 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/commons/types/BaseTemplateTenantAssociation.d.ts +15 -0
- package/dist/api/resources/commons/types/BaseTemplateTenantAssociation.js +5 -0
- package/dist/api/resources/commons/types/ListTemplateTenantAssociation.d.ts +7 -0
- package/dist/api/resources/commons/types/ListTemplateTenantAssociation.js +5 -0
- package/dist/api/resources/commons/types/SingleTemplateTenantAssociation.d.ts +7 -0
- package/dist/api/resources/commons/types/SingleTemplateTenantAssociation.js +5 -0
- package/dist/api/resources/commons/types/TenantTemplateData.d.ts +11 -0
- package/dist/api/resources/commons/types/TenantTemplateData.js +5 -0
- package/dist/api/resources/commons/types/TenantTemplateDataNoContent.d.ts +10 -0
- package/dist/api/resources/commons/types/TenantTemplateDataNoContent.js +5 -0
- package/dist/api/resources/commons/types/index.d.ts +5 -0
- package/dist/api/resources/commons/types/index.js +5 -0
- package/dist/api/resources/inbound/client/Client.js +1 -1
- package/dist/api/resources/lists/client/Client.d.ts +3 -2
- package/dist/api/resources/lists/client/Client.js +17 -15
- package/dist/api/resources/lists/client/requests/RestoreListRequest.d.ts +9 -0
- package/dist/api/resources/lists/client/requests/RestoreListRequest.js +5 -0
- package/dist/api/resources/lists/client/requests/index.d.ts +1 -0
- package/dist/api/resources/lists/types/List.d.ts +2 -2
- package/dist/api/resources/messages/client/Client.js +6 -6
- package/dist/api/resources/messages/types/Reason.d.ts +13 -1
- package/dist/api/resources/messages/types/Reason.js +3 -0
- package/dist/api/resources/notifications/client/Client.js +6 -6
- package/dist/api/resources/profiles/client/Client.js +8 -8
- package/dist/api/resources/templates/client/Client.js +1 -1
- package/dist/api/resources/tenants/client/Client.d.ts +24 -0
- package/dist/api/resources/tenants/client/Client.js +135 -7
- package/dist/api/resources/tenants/client/requests/GetTemplateListByTenantParams.d.ts +17 -0
- package/dist/api/resources/tenants/client/requests/GetTemplateListByTenantParams.js +5 -0
- package/dist/api/resources/tenants/client/requests/index.d.ts +1 -0
- package/dist/api/resources/tenants/types/GetTemplateByTenantResponse.d.ts +6 -0
- package/dist/api/resources/tenants/types/GetTemplateByTenantResponse.js +5 -0
- package/dist/api/resources/tenants/types/ListTemplatesByTenantResponse.d.ts +23 -0
- package/dist/api/resources/tenants/types/ListTemplatesByTenantResponse.js +5 -0
- package/dist/api/resources/tenants/types/index.d.ts +2 -0
- package/dist/api/resources/tenants/types/index.js +2 -0
- 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.js +6 -6
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +122 -2
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -69,7 +69,7 @@ export declare class Lists {
|
|
|
69
69
|
* preferences: undefined
|
|
70
70
|
* })
|
|
71
71
|
*/
|
|
72
|
-
update(listId: string, request: Courier.ListPutParams, requestOptions?: Lists.RequestOptions): core.HttpResponsePromise<
|
|
72
|
+
update(listId: string, request: Courier.ListPutParams, requestOptions?: Lists.RequestOptions): core.HttpResponsePromise<void>;
|
|
73
73
|
private __update;
|
|
74
74
|
/**
|
|
75
75
|
* Delete a list by list ID.
|
|
@@ -86,12 +86,13 @@ export declare class Lists {
|
|
|
86
86
|
* Restore a previously deleted list.
|
|
87
87
|
*
|
|
88
88
|
* @param {string} listId - A unique identifier representing the list you wish to retrieve.
|
|
89
|
+
* @param {Courier.RestoreListRequest} request
|
|
89
90
|
* @param {Lists.RequestOptions} requestOptions - Request-specific configuration.
|
|
90
91
|
*
|
|
91
92
|
* @example
|
|
92
93
|
* await client.lists.restore("list_id")
|
|
93
94
|
*/
|
|
94
|
-
restore(listId: string, requestOptions?: Lists.RequestOptions): core.HttpResponsePromise<void>;
|
|
95
|
+
restore(listId: string, request?: Courier.RestoreListRequest, requestOptions?: Lists.RequestOptions): core.HttpResponsePromise<void>;
|
|
95
96
|
private __restore;
|
|
96
97
|
/**
|
|
97
98
|
* Get the list's subscriptions.
|
|
@@ -86,7 +86,7 @@ class Lists {
|
|
|
86
86
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
87
87
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, "/lists"),
|
|
88
88
|
method: "GET",
|
|
89
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.
|
|
89
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
90
90
|
contentType: "application/json",
|
|
91
91
|
queryParameters: _queryParams,
|
|
92
92
|
requestType: "json",
|
|
@@ -146,7 +146,7 @@ class Lists {
|
|
|
146
146
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
147
147
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, `/lists/${encodeURIComponent(listId)}`),
|
|
148
148
|
method: "GET",
|
|
149
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.
|
|
149
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
150
150
|
contentType: "application/json",
|
|
151
151
|
requestType: "json",
|
|
152
152
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -207,7 +207,7 @@ class Lists {
|
|
|
207
207
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
208
208
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, `/lists/${encodeURIComponent(listId)}`),
|
|
209
209
|
method: "PUT",
|
|
210
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.
|
|
210
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
211
211
|
contentType: "application/json",
|
|
212
212
|
requestType: "json",
|
|
213
213
|
body: request,
|
|
@@ -216,7 +216,7 @@ class Lists {
|
|
|
216
216
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
217
217
|
});
|
|
218
218
|
if (_response.ok) {
|
|
219
|
-
return { data:
|
|
219
|
+
return { data: undefined, rawResponse: _response.rawResponse };
|
|
220
220
|
}
|
|
221
221
|
if (_response.error.reason === "status-code") {
|
|
222
222
|
throw new errors.CourierError({
|
|
@@ -260,7 +260,7 @@ class Lists {
|
|
|
260
260
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
261
261
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, `/lists/${encodeURIComponent(listId)}`),
|
|
262
262
|
method: "DELETE",
|
|
263
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.
|
|
263
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
264
264
|
contentType: "application/json",
|
|
265
265
|
requestType: "json",
|
|
266
266
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -298,23 +298,25 @@ class Lists {
|
|
|
298
298
|
* Restore a previously deleted list.
|
|
299
299
|
*
|
|
300
300
|
* @param {string} listId - A unique identifier representing the list you wish to retrieve.
|
|
301
|
+
* @param {Courier.RestoreListRequest} request
|
|
301
302
|
* @param {Lists.RequestOptions} requestOptions - Request-specific configuration.
|
|
302
303
|
*
|
|
303
304
|
* @example
|
|
304
305
|
* await client.lists.restore("list_id")
|
|
305
306
|
*/
|
|
306
|
-
restore(listId, requestOptions) {
|
|
307
|
-
return core.HttpResponsePromise.fromPromise(this.__restore(listId, requestOptions));
|
|
307
|
+
restore(listId, request = {}, requestOptions) {
|
|
308
|
+
return core.HttpResponsePromise.fromPromise(this.__restore(listId, request, requestOptions));
|
|
308
309
|
}
|
|
309
|
-
__restore(
|
|
310
|
-
return __awaiter(this,
|
|
310
|
+
__restore(listId_1) {
|
|
311
|
+
return __awaiter(this, arguments, void 0, function* (listId, request = {}, requestOptions) {
|
|
311
312
|
var _a, _b, _c;
|
|
312
313
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
313
314
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, `/lists/${encodeURIComponent(listId)}/restore`),
|
|
314
315
|
method: "PUT",
|
|
315
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.
|
|
316
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
316
317
|
contentType: "application/json",
|
|
317
318
|
requestType: "json",
|
|
319
|
+
body: request,
|
|
318
320
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
319
321
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
320
322
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -372,7 +374,7 @@ class Lists {
|
|
|
372
374
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
373
375
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, `/lists/${encodeURIComponent(listId)}/subscriptions`),
|
|
374
376
|
method: "GET",
|
|
375
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.
|
|
377
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
376
378
|
contentType: "application/json",
|
|
377
379
|
queryParameters: _queryParams,
|
|
378
380
|
requestType: "json",
|
|
@@ -441,7 +443,7 @@ class Lists {
|
|
|
441
443
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
442
444
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, `/lists/${encodeURIComponent(listId)}/subscriptions`),
|
|
443
445
|
method: "PUT",
|
|
444
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.
|
|
446
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
445
447
|
contentType: "application/json",
|
|
446
448
|
requestType: "json",
|
|
447
449
|
body: request,
|
|
@@ -510,7 +512,7 @@ class Lists {
|
|
|
510
512
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
511
513
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, `/lists/${encodeURIComponent(listId)}/subscriptions`),
|
|
512
514
|
method: "POST",
|
|
513
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.
|
|
515
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined, "X-Idempotency-Expiration": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry : undefined }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
514
516
|
contentType: "application/json",
|
|
515
517
|
requestType: "json",
|
|
516
518
|
body: request,
|
|
@@ -572,7 +574,7 @@ class Lists {
|
|
|
572
574
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
573
575
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, `/lists/${encodeURIComponent(listId)}/subscriptions/${encodeURIComponent(userId)}`),
|
|
574
576
|
method: "PUT",
|
|
575
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.
|
|
577
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
576
578
|
contentType: "application/json",
|
|
577
579
|
requestType: "json",
|
|
578
580
|
body: request,
|
|
@@ -628,7 +630,7 @@ class Lists {
|
|
|
628
630
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
629
631
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, `/lists/${encodeURIComponent(listId)}/subscriptions/${encodeURIComponent(userId)}`),
|
|
630
632
|
method: "DELETE",
|
|
631
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.
|
|
633
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
632
634
|
contentType: "application/json",
|
|
633
635
|
requestType: "json",
|
|
634
636
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { type GetAllListsRequest } from "./GetAllListsRequest";
|
|
2
|
+
export { type RestoreListRequest } from "./RestoreListRequest";
|
|
2
3
|
export { type GetSubscriptionForListRequest } from "./GetSubscriptionForListRequest";
|
|
3
4
|
export { type SubscribeUsersToListRequest } from "./SubscribeUsersToListRequest";
|
|
4
5
|
export { type AddSubscribersToList } from "./AddSubscribersToList";
|
|
@@ -135,7 +135,7 @@ class Messages {
|
|
|
135
135
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
136
136
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, "messages"),
|
|
137
137
|
method: "GET",
|
|
138
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.
|
|
138
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
139
139
|
contentType: "application/json",
|
|
140
140
|
queryParameters: _queryParams,
|
|
141
141
|
requestType: "json",
|
|
@@ -191,7 +191,7 @@ class Messages {
|
|
|
191
191
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
192
192
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, `messages/${encodeURIComponent(messageId)}`),
|
|
193
193
|
method: "GET",
|
|
194
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.
|
|
194
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
195
195
|
contentType: "application/json",
|
|
196
196
|
requestType: "json",
|
|
197
197
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -250,7 +250,7 @@ class Messages {
|
|
|
250
250
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
251
251
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, `messages/${encodeURIComponent(messageId)}/cancel`),
|
|
252
252
|
method: "POST",
|
|
253
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.
|
|
253
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined, "X-Idempotency-Expiration": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry : undefined }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
254
254
|
contentType: "application/json",
|
|
255
255
|
requestType: "json",
|
|
256
256
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -311,7 +311,7 @@ class Messages {
|
|
|
311
311
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
312
312
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, `messages/${encodeURIComponent(messageId)}/history`),
|
|
313
313
|
method: "GET",
|
|
314
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.
|
|
314
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
315
315
|
contentType: "application/json",
|
|
316
316
|
queryParameters: _queryParams,
|
|
317
317
|
requestType: "json",
|
|
@@ -372,7 +372,7 @@ class Messages {
|
|
|
372
372
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
373
373
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, `messages/${encodeURIComponent(messageId)}/output`),
|
|
374
374
|
method: "GET",
|
|
375
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.
|
|
375
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
376
376
|
contentType: "application/json",
|
|
377
377
|
requestType: "json",
|
|
378
378
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -429,7 +429,7 @@ class Messages {
|
|
|
429
429
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
430
430
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, `requests/${encodeURIComponent(requestId)}/archive`),
|
|
431
431
|
method: "PUT",
|
|
432
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.
|
|
432
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
433
433
|
contentType: "application/json",
|
|
434
434
|
requestType: "json",
|
|
435
435
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -2,15 +2,24 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
export type Reason =
|
|
5
|
+
/**
|
|
6
|
+
* The message bounced and was not delivered. */
|
|
7
|
+
"BOUNCED"
|
|
8
|
+
/**
|
|
9
|
+
* The message failed to be delivered. */
|
|
10
|
+
| "FAILED"
|
|
5
11
|
/**
|
|
6
12
|
* The recipient did not receive the notification because of a condition that passed. */
|
|
7
|
-
"FILTERED"
|
|
13
|
+
| "FILTERED"
|
|
8
14
|
/**
|
|
9
15
|
* The notification did not contain any valid channels. */
|
|
10
16
|
| "NO_CHANNELS"
|
|
11
17
|
/**
|
|
12
18
|
* The notification did not contain a configured provider for a channel. */
|
|
13
19
|
| "NO_PROVIDERS"
|
|
20
|
+
/**
|
|
21
|
+
* The recipient has not opted in to receive this type of notification. */
|
|
22
|
+
| "OPT_IN_REQUIRED"
|
|
14
23
|
/**
|
|
15
24
|
* The Integration provider had an error when sending a notification. */
|
|
16
25
|
| "PROVIDER_ERROR"
|
|
@@ -21,9 +30,12 @@ export type Reason =
|
|
|
21
30
|
* The recipient did not receive the notification because they chose to unsubscribe from it. */
|
|
22
31
|
| "UNSUBSCRIBED";
|
|
23
32
|
export declare const Reason: {
|
|
33
|
+
readonly Bounced: "BOUNCED";
|
|
34
|
+
readonly Failed: "FAILED";
|
|
24
35
|
readonly Filtered: "FILTERED";
|
|
25
36
|
readonly NoChannels: "NO_CHANNELS";
|
|
26
37
|
readonly NoProviders: "NO_PROVIDERS";
|
|
38
|
+
readonly OptInRequired: "OPT_IN_REQUIRED";
|
|
27
39
|
readonly ProviderError: "PROVIDER_ERROR";
|
|
28
40
|
readonly Unpublished: "UNPUBLISHED";
|
|
29
41
|
readonly Unsubscribed: "UNSUBSCRIBED";
|
|
@@ -5,9 +5,12 @@
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.Reason = void 0;
|
|
7
7
|
exports.Reason = {
|
|
8
|
+
Bounced: "BOUNCED",
|
|
9
|
+
Failed: "FAILED",
|
|
8
10
|
Filtered: "FILTERED",
|
|
9
11
|
NoChannels: "NO_CHANNELS",
|
|
10
12
|
NoProviders: "NO_PROVIDERS",
|
|
13
|
+
OptInRequired: "OPT_IN_REQUIRED",
|
|
11
14
|
ProviderError: "PROVIDER_ERROR",
|
|
12
15
|
Unpublished: "UNPUBLISHED",
|
|
13
16
|
Unsubscribed: "UNSUBSCRIBED",
|
|
@@ -81,7 +81,7 @@ class Notifications {
|
|
|
81
81
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
82
82
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, "/notifications"),
|
|
83
83
|
method: "GET",
|
|
84
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.
|
|
84
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
85
85
|
contentType: "application/json",
|
|
86
86
|
queryParameters: _queryParams,
|
|
87
87
|
requestType: "json",
|
|
@@ -132,7 +132,7 @@ class Notifications {
|
|
|
132
132
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
133
133
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, `/notifications/${encodeURIComponent(id)}/content`),
|
|
134
134
|
method: "GET",
|
|
135
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.
|
|
135
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
136
136
|
contentType: "application/json",
|
|
137
137
|
requestType: "json",
|
|
138
138
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -185,7 +185,7 @@ class Notifications {
|
|
|
185
185
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
186
186
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, `/notifications/${encodeURIComponent(id)}/draft/content`),
|
|
187
187
|
method: "GET",
|
|
188
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.
|
|
188
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
189
189
|
contentType: "application/json",
|
|
190
190
|
requestType: "json",
|
|
191
191
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -239,7 +239,7 @@ class Notifications {
|
|
|
239
239
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
240
240
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, `/notifications/${encodeURIComponent(id)}/${encodeURIComponent(submissionId)}/checks`),
|
|
241
241
|
method: "GET",
|
|
242
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.
|
|
242
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
243
243
|
contentType: "application/json",
|
|
244
244
|
requestType: "json",
|
|
245
245
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -301,7 +301,7 @@ class Notifications {
|
|
|
301
301
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
302
302
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, `/notifications/${encodeURIComponent(id)}/${encodeURIComponent(submissionId)}/checks`),
|
|
303
303
|
method: "PUT",
|
|
304
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.
|
|
304
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
305
305
|
contentType: "application/json",
|
|
306
306
|
requestType: "json",
|
|
307
307
|
body: request,
|
|
@@ -356,7 +356,7 @@ class Notifications {
|
|
|
356
356
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
357
357
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, `/notifications/${encodeURIComponent(id)}/${encodeURIComponent(submissionId)}/checks`),
|
|
358
358
|
method: "DELETE",
|
|
359
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.
|
|
359
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
360
360
|
contentType: "application/json",
|
|
361
361
|
requestType: "json",
|
|
362
362
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -78,7 +78,7 @@ class Profiles {
|
|
|
78
78
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
79
79
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, `/profiles/${encodeURIComponent(userId)}`),
|
|
80
80
|
method: "GET",
|
|
81
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.
|
|
81
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
82
82
|
contentType: "application/json",
|
|
83
83
|
requestType: "json",
|
|
84
84
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -144,7 +144,7 @@ class Profiles {
|
|
|
144
144
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
145
145
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, `/profiles/${encodeURIComponent(userId)}`),
|
|
146
146
|
method: "POST",
|
|
147
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.
|
|
147
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined, "X-Idempotency-Expiration": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry : undefined }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
148
148
|
contentType: "application/json",
|
|
149
149
|
requestType: "json",
|
|
150
150
|
body: request,
|
|
@@ -214,7 +214,7 @@ class Profiles {
|
|
|
214
214
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
215
215
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, `/profiles/${encodeURIComponent(userId)}`),
|
|
216
216
|
method: "PUT",
|
|
217
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.
|
|
217
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
218
218
|
contentType: "application/json",
|
|
219
219
|
requestType: "json",
|
|
220
220
|
body: request,
|
|
@@ -281,7 +281,7 @@ class Profiles {
|
|
|
281
281
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
282
282
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, `/profiles/${encodeURIComponent(userId)}`),
|
|
283
283
|
method: "PATCH",
|
|
284
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.
|
|
284
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
285
285
|
contentType: "application/json",
|
|
286
286
|
requestType: "json",
|
|
287
287
|
body: request,
|
|
@@ -336,7 +336,7 @@ class Profiles {
|
|
|
336
336
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
337
337
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, `/profiles/${encodeURIComponent(userId)}`),
|
|
338
338
|
method: "DELETE",
|
|
339
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.
|
|
339
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
340
340
|
contentType: "application/json",
|
|
341
341
|
requestType: "json",
|
|
342
342
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -401,7 +401,7 @@ class Profiles {
|
|
|
401
401
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
402
402
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, `/profiles/${encodeURIComponent(userId)}/lists`),
|
|
403
403
|
method: "GET",
|
|
404
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.
|
|
404
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
405
405
|
contentType: "application/json",
|
|
406
406
|
queryParameters: _queryParams,
|
|
407
407
|
requestType: "json",
|
|
@@ -470,7 +470,7 @@ class Profiles {
|
|
|
470
470
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
471
471
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, `/profiles/${encodeURIComponent(userId)}/lists`),
|
|
472
472
|
method: "POST",
|
|
473
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.
|
|
473
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined, "X-Idempotency-Expiration": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry : undefined }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
474
474
|
contentType: "application/json",
|
|
475
475
|
requestType: "json",
|
|
476
476
|
body: request,
|
|
@@ -530,7 +530,7 @@ class Profiles {
|
|
|
530
530
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
531
531
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, `/profiles/${encodeURIComponent(userId)}/lists`),
|
|
532
532
|
method: "DELETE",
|
|
533
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.
|
|
533
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
534
534
|
contentType: "application/json",
|
|
535
535
|
requestType: "json",
|
|
536
536
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -80,7 +80,7 @@ class Templates {
|
|
|
80
80
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
81
81
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, "/notifications"),
|
|
82
82
|
method: "GET",
|
|
83
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.
|
|
83
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
84
84
|
contentType: "application/json",
|
|
85
85
|
queryParameters: _queryParams,
|
|
86
86
|
requestType: "json",
|
|
@@ -111,5 +111,29 @@ export declare class Tenants {
|
|
|
111
111
|
*/
|
|
112
112
|
removeDefaultPreferencesForTopic(tenantId: string, topicId: string, requestOptions?: Tenants.RequestOptions): core.HttpResponsePromise<void>;
|
|
113
113
|
private __removeDefaultPreferencesForTopic;
|
|
114
|
+
/**
|
|
115
|
+
* @param {string} tenantId - Id of the tenant for which to retrieve the template.
|
|
116
|
+
* @param {string} templateId - Id of the template to be retrieved.
|
|
117
|
+
* @param {Tenants.RequestOptions} requestOptions - Request-specific configuration.
|
|
118
|
+
*
|
|
119
|
+
* @throws {@link Courier.BadRequestError}
|
|
120
|
+
*
|
|
121
|
+
* @example
|
|
122
|
+
* await client.tenants.getTemplateByTenant("tenant_id", "template_id")
|
|
123
|
+
*/
|
|
124
|
+
getTemplateByTenant(tenantId: string, templateId: string, requestOptions?: Tenants.RequestOptions): core.HttpResponsePromise<Courier.GetTemplateByTenantResponse>;
|
|
125
|
+
private __getTemplateByTenant;
|
|
126
|
+
/**
|
|
127
|
+
* @param {string} tenantId - Id of the tenant for which to retrieve the templates.
|
|
128
|
+
* @param {Courier.GetTemplateListByTenantParams} request
|
|
129
|
+
* @param {Tenants.RequestOptions} requestOptions - Request-specific configuration.
|
|
130
|
+
*
|
|
131
|
+
* @throws {@link Courier.BadRequestError}
|
|
132
|
+
*
|
|
133
|
+
* @example
|
|
134
|
+
* await client.tenants.getTemplateListByTenant("tenant_id")
|
|
135
|
+
*/
|
|
136
|
+
getTemplateListByTenant(tenantId: string, request?: Courier.GetTemplateListByTenantParams, requestOptions?: Tenants.RequestOptions): core.HttpResponsePromise<Courier.ListTemplatesByTenantResponse>;
|
|
137
|
+
private __getTemplateListByTenant;
|
|
114
138
|
protected _getAuthorizationHeader(): Promise<string>;
|
|
115
139
|
}
|