@trycourier/courier 6.4.2 → 6.6.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 +2 -2
- 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/ListTemplateTenantAssociation.d.ts +7 -0
- package/api/resources/commons/types/SingleTemplateTenantAssociation.d.ts +7 -0
- package/api/resources/commons/types/TenantTemplateData.d.ts +11 -0
- package/api/resources/commons/types/TenantTemplateDataNoContent.d.ts +10 -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/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/send/types/Channel.d.ts +1 -0
- package/api/resources/send/types/MessageProvidersType.d.ts +4 -3
- package/api/resources/send/types/Routing.d.ts +1 -1
- package/api/resources/send/types/index.d.ts +0 -3
- package/api/resources/send/types/index.js +0 -3
- 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/{send/types/RoutingChannel.d.ts → tenants/types/GetTemplateByTenantResponse.d.ts} +2 -1
- 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/send/types/Channel.d.ts +1 -0
- package/dist/api/resources/send/types/MessageProvidersType.d.ts +4 -3
- package/dist/api/resources/send/types/Routing.d.ts +1 -1
- package/dist/api/resources/send/types/index.d.ts +0 -3
- package/dist/api/resources/send/types/index.js +0 -3
- 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/{send/types/RoutingChannel.d.ts → tenants/types/GetTemplateByTenantResponse.d.ts} +2 -1
- 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
- package/api/resources/send/types/RoutingStrategyChannel.d.ts +0 -11
- package/api/resources/send/types/RoutingStrategyProvider.d.ts +0 -10
- package/dist/api/resources/send/types/RoutingStrategyChannel.d.ts +0 -11
- package/dist/api/resources/send/types/RoutingStrategyProvider.d.ts +0 -10
- /package/api/resources/{send/types/RoutingChannel.js → commons/types/BaseTemplateTenantAssociation.js} +0 -0
- /package/api/resources/{send/types/RoutingStrategyChannel.js → commons/types/ListTemplateTenantAssociation.js} +0 -0
- /package/api/resources/{send/types/RoutingStrategyProvider.js → commons/types/SingleTemplateTenantAssociation.js} +0 -0
- /package/{dist/api/resources/send/types/RoutingChannel.js → api/resources/commons/types/TenantTemplateData.js} +0 -0
- /package/{dist/api/resources/send/types/RoutingStrategyChannel.js → api/resources/commons/types/TenantTemplateDataNoContent.js} +0 -0
- /package/{dist/api/resources/send/types/RoutingStrategyProvider.js → api/resources/lists/client/requests/RestoreListRequest.js} +0 -0
package/Client.js
CHANGED
|
@@ -167,7 +167,7 @@ class CourierClient {
|
|
|
167
167
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
168
168
|
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, "/send"),
|
|
169
169
|
method: "POST",
|
|
170
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.
|
|
170
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.6.0", "User-Agent": "@trycourier/courier/6.6.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),
|
|
171
171
|
contentType: "application/json",
|
|
172
172
|
requestType: "json",
|
|
173
173
|
body: request,
|
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
[](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2Ftrycourier%2Fcourier-node)
|
|
4
4
|
[](https://www.npmjs.com/package/@trycourier/courier)
|
|
5
5
|
|
|
6
|
-
The Courier TypeScript library provides convenient access to the Courier
|
|
6
|
+
The Courier TypeScript library provides convenient access to the Courier APIs from TypeScript.
|
|
7
7
|
|
|
8
8
|
## Documentation
|
|
9
9
|
|
|
@@ -17,7 +17,7 @@ npm i -s @trycourier/courier
|
|
|
17
17
|
|
|
18
18
|
## Reference
|
|
19
19
|
|
|
20
|
-
A full reference for this library is available [here](
|
|
20
|
+
A full reference for this library is available [here](https://github.com/trycourier/courier-node/blob/HEAD/./reference.md).
|
|
21
21
|
|
|
22
22
|
## Usage
|
|
23
23
|
|
|
@@ -76,7 +76,7 @@ class Audiences {
|
|
|
76
76
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
77
77
|
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, `/audiences/${encodeURIComponent(audienceId)}`),
|
|
78
78
|
method: "GET",
|
|
79
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.
|
|
79
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.6.0", "User-Agent": "@trycourier/courier/6.6.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
80
80
|
contentType: "application/json",
|
|
81
81
|
requestType: "json",
|
|
82
82
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -133,7 +133,7 @@ class Audiences {
|
|
|
133
133
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
134
134
|
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, `/audiences/${encodeURIComponent(audienceId)}`),
|
|
135
135
|
method: "PUT",
|
|
136
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.
|
|
136
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.6.0", "User-Agent": "@trycourier/courier/6.6.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
137
137
|
contentType: "application/json",
|
|
138
138
|
requestType: "json",
|
|
139
139
|
body: request,
|
|
@@ -186,7 +186,7 @@ class Audiences {
|
|
|
186
186
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
187
187
|
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, `/audiences/${encodeURIComponent(audienceId)}`),
|
|
188
188
|
method: "DELETE",
|
|
189
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.
|
|
189
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.6.0", "User-Agent": "@trycourier/courier/6.6.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
190
190
|
contentType: "application/json",
|
|
191
191
|
requestType: "json",
|
|
192
192
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -246,7 +246,7 @@ class Audiences {
|
|
|
246
246
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
247
247
|
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, `/audiences/${encodeURIComponent(audienceId)}/members`),
|
|
248
248
|
method: "GET",
|
|
249
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.
|
|
249
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.6.0", "User-Agent": "@trycourier/courier/6.6.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
250
250
|
contentType: "application/json",
|
|
251
251
|
queryParameters: _queryParams,
|
|
252
252
|
requestType: "json",
|
|
@@ -311,7 +311,7 @@ class Audiences {
|
|
|
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, "/audiences"),
|
|
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.6.0", "User-Agent": "@trycourier/courier/6.6.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",
|
|
@@ -80,7 +80,7 @@ class AuditEvents {
|
|
|
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, "/audit-events"),
|
|
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.6.0", "User-Agent": "@trycourier/courier/6.6.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",
|
|
@@ -133,7 +133,7 @@ class AuditEvents {
|
|
|
133
133
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
134
134
|
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, `/audit-events/${encodeURIComponent(auditEventId)}`),
|
|
135
135
|
method: "GET",
|
|
136
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.
|
|
136
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.6.0", "User-Agent": "@trycourier/courier/6.6.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
137
137
|
contentType: "application/json",
|
|
138
138
|
requestType: "json",
|
|
139
139
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -78,7 +78,7 @@ class AuthTokens {
|
|
|
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, "/auth/issue-token"),
|
|
80
80
|
method: "POST",
|
|
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.6.0", "User-Agent": "@trycourier/courier/6.6.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),
|
|
82
82
|
contentType: "application/json",
|
|
83
83
|
requestType: "json",
|
|
84
84
|
body: request,
|
|
@@ -82,7 +82,7 @@ class Automations {
|
|
|
82
82
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
83
83
|
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, `/automations/${encodeURIComponent(templateId)}/invoke`),
|
|
84
84
|
method: "POST",
|
|
85
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.
|
|
85
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.6.0", "User-Agent": "@trycourier/courier/6.6.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),
|
|
86
86
|
contentType: "application/json",
|
|
87
87
|
requestType: "json",
|
|
88
88
|
body: request,
|
|
@@ -153,7 +153,7 @@ class Automations {
|
|
|
153
153
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
154
154
|
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, "/automations/invoke"),
|
|
155
155
|
method: "POST",
|
|
156
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.
|
|
156
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.6.0", "User-Agent": "@trycourier/courier/6.6.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),
|
|
157
157
|
contentType: "application/json",
|
|
158
158
|
requestType: "json",
|
|
159
159
|
body: request,
|
|
@@ -87,7 +87,7 @@ class Brands {
|
|
|
87
87
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
88
88
|
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, "/brands"),
|
|
89
89
|
method: "POST",
|
|
90
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.
|
|
90
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.6.0", "User-Agent": "@trycourier/courier/6.6.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),
|
|
91
91
|
contentType: "application/json",
|
|
92
92
|
requestType: "json",
|
|
93
93
|
body: request,
|
|
@@ -149,7 +149,7 @@ class Brands {
|
|
|
149
149
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
150
150
|
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, `/brands/${encodeURIComponent(brandId)}`),
|
|
151
151
|
method: "GET",
|
|
152
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.
|
|
152
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.6.0", "User-Agent": "@trycourier/courier/6.6.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
153
153
|
contentType: "application/json",
|
|
154
154
|
requestType: "json",
|
|
155
155
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -206,7 +206,7 @@ class Brands {
|
|
|
206
206
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
207
207
|
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, "/brands"),
|
|
208
208
|
method: "GET",
|
|
209
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.
|
|
209
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.6.0", "User-Agent": "@trycourier/courier/6.6.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
210
210
|
contentType: "application/json",
|
|
211
211
|
queryParameters: _queryParams,
|
|
212
212
|
requestType: "json",
|
|
@@ -261,7 +261,7 @@ class Brands {
|
|
|
261
261
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
262
262
|
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, `/brands/${encodeURIComponent(brandId)}`),
|
|
263
263
|
method: "DELETE",
|
|
264
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.
|
|
264
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.6.0", "User-Agent": "@trycourier/courier/6.6.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
265
265
|
contentType: "application/json",
|
|
266
266
|
requestType: "json",
|
|
267
267
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -323,7 +323,7 @@ class Brands {
|
|
|
323
323
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
324
324
|
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, `/brands/${encodeURIComponent(brandId)}`),
|
|
325
325
|
method: "PUT",
|
|
326
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.
|
|
326
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.6.0", "User-Agent": "@trycourier/courier/6.6.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
327
327
|
contentType: "application/json",
|
|
328
328
|
requestType: "json",
|
|
329
329
|
body: request,
|
|
@@ -85,7 +85,7 @@ class Bulk {
|
|
|
85
85
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
86
86
|
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, "/bulk"),
|
|
87
87
|
method: "POST",
|
|
88
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.
|
|
88
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.6.0", "User-Agent": "@trycourier/courier/6.6.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),
|
|
89
89
|
contentType: "application/json",
|
|
90
90
|
requestType: "json",
|
|
91
91
|
body: request,
|
|
@@ -158,7 +158,7 @@ class Bulk {
|
|
|
158
158
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
159
159
|
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, `/bulk/${encodeURIComponent(jobId)}`),
|
|
160
160
|
method: "POST",
|
|
161
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.
|
|
161
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.6.0", "User-Agent": "@trycourier/courier/6.6.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),
|
|
162
162
|
contentType: "application/json",
|
|
163
163
|
requestType: "json",
|
|
164
164
|
body: request,
|
|
@@ -213,7 +213,7 @@ class Bulk {
|
|
|
213
213
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
214
214
|
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, `/bulk/${encodeURIComponent(jobId)}/run`),
|
|
215
215
|
method: "POST",
|
|
216
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.
|
|
216
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.6.0", "User-Agent": "@trycourier/courier/6.6.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),
|
|
217
217
|
contentType: "application/json",
|
|
218
218
|
requestType: "json",
|
|
219
219
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -272,7 +272,7 @@ class Bulk {
|
|
|
272
272
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
273
273
|
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, `/bulk/${encodeURIComponent(jobId)}`),
|
|
274
274
|
method: "GET",
|
|
275
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.
|
|
275
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.6.0", "User-Agent": "@trycourier/courier/6.6.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
276
276
|
contentType: "application/json",
|
|
277
277
|
requestType: "json",
|
|
278
278
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -337,7 +337,7 @@ class Bulk {
|
|
|
337
337
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
338
338
|
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, `/bulk/${encodeURIComponent(jobId)}/users`),
|
|
339
339
|
method: "GET",
|
|
340
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.
|
|
340
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.6.0", "User-Agent": "@trycourier/courier/6.6.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
341
341
|
contentType: "application/json",
|
|
342
342
|
queryParameters: _queryParams,
|
|
343
343
|
requestType: "json",
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export interface BaseTemplateTenantAssociation {
|
|
5
|
+
/** The template's id */
|
|
6
|
+
id: string;
|
|
7
|
+
/** The timestamp at which the template was created */
|
|
8
|
+
created_at: string;
|
|
9
|
+
/** The timestamp at which the template was last updated */
|
|
10
|
+
updated_at: string;
|
|
11
|
+
/** The timestamp at which the template was published */
|
|
12
|
+
published_at: string;
|
|
13
|
+
/** The version of the template */
|
|
14
|
+
version: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Courier from "../../../index";
|
|
5
|
+
/**
|
|
6
|
+
* The template's data containing it's routing configs and Elemental content
|
|
7
|
+
*/
|
|
8
|
+
export interface TenantTemplateData {
|
|
9
|
+
routing: Courier.MessageRouting;
|
|
10
|
+
content: Courier.ElementalContent;
|
|
11
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Courier from "../../../index";
|
|
5
|
+
/**
|
|
6
|
+
* The template's data containing it's routing configs
|
|
7
|
+
*/
|
|
8
|
+
export interface TenantTemplateDataNoContent {
|
|
9
|
+
routing: Courier.MessageRouting;
|
|
10
|
+
}
|
|
@@ -15,3 +15,8 @@ export * from "./NotificationPreferenceDetails";
|
|
|
15
15
|
export * from "./RecipientPreferences";
|
|
16
16
|
export * from "./Email";
|
|
17
17
|
export * from "./UserTenantAssociation";
|
|
18
|
+
export * from "./BaseTemplateTenantAssociation";
|
|
19
|
+
export * from "./SingleTemplateTenantAssociation";
|
|
20
|
+
export * from "./ListTemplateTenantAssociation";
|
|
21
|
+
export * from "./TenantTemplateData";
|
|
22
|
+
export * from "./TenantTemplateDataNoContent";
|
|
@@ -31,3 +31,8 @@ __exportStar(require("./NotificationPreferenceDetails"), exports);
|
|
|
31
31
|
__exportStar(require("./RecipientPreferences"), exports);
|
|
32
32
|
__exportStar(require("./Email"), exports);
|
|
33
33
|
__exportStar(require("./UserTenantAssociation"), exports);
|
|
34
|
+
__exportStar(require("./BaseTemplateTenantAssociation"), exports);
|
|
35
|
+
__exportStar(require("./SingleTemplateTenantAssociation"), exports);
|
|
36
|
+
__exportStar(require("./ListTemplateTenantAssociation"), exports);
|
|
37
|
+
__exportStar(require("./TenantTemplateData"), exports);
|
|
38
|
+
__exportStar(require("./TenantTemplateDataNoContent"), exports);
|
|
@@ -87,7 +87,7 @@ class Inbound {
|
|
|
87
87
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
88
88
|
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, "/inbound/courier"),
|
|
89
89
|
method: "POST",
|
|
90
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.
|
|
90
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.6.0", "User-Agent": "@trycourier/courier/6.6.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
91
91
|
contentType: "application/json",
|
|
92
92
|
requestType: "json",
|
|
93
93
|
body: request,
|
|
@@ -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.6.0", "User-Agent": "@trycourier/courier/6.6.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.6.0", "User-Agent": "@trycourier/courier/6.6.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.6.0", "User-Agent": "@trycourier/courier/6.6.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.6.0", "User-Agent": "@trycourier/courier/6.6.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.6.0", "User-Agent": "@trycourier/courier/6.6.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.6.0", "User-Agent": "@trycourier/courier/6.6.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.6.0", "User-Agent": "@trycourier/courier/6.6.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.6.0", "User-Agent": "@trycourier/courier/6.6.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.6.0", "User-Agent": "@trycourier/courier/6.6.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.6.0", "User-Agent": "@trycourier/courier/6.6.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";
|