@trycourier/courier 6.0.3 → 6.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Client.js +1 -1
- package/api/resources/audiences/client/Client.d.ts +1 -1
- package/api/resources/audiences/client/Client.js +6 -6
- 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/brands/types/BrandSettings.d.ts +1 -0
- package/api/resources/bulk/client/Client.js +6 -6
- package/api/resources/commons/types/ChannelClassification.d.ts +3 -1
- package/api/resources/commons/types/ChannelClassification.js +2 -0
- package/api/resources/lists/client/Client.js +10 -10
- package/api/resources/messages/client/Client.js +7 -7
- package/api/resources/notifications/client/Client.js +8 -8
- package/api/resources/profiles/client/Client.d.ts +1 -1
- package/api/resources/profiles/client/Client.js +8 -8
- package/api/resources/profiles/types/GetListSubscriptionsList.d.ts +14 -0
- package/api/resources/profiles/types/GetListSubscriptionsList.js +5 -0
- package/api/resources/profiles/types/GetListSubscriptionsResponse.d.ts +9 -0
- package/api/resources/profiles/types/GetListSubscriptionsResponse.js +5 -0
- package/api/resources/profiles/types/SubscribeToListsRequest.d.ts +1 -2
- package/api/resources/profiles/types/SubscribeToListsRequestListObject.d.ts +8 -0
- package/api/resources/profiles/types/SubscribeToListsRequestListObject.js +5 -0
- package/api/resources/profiles/types/index.d.ts +3 -0
- package/api/resources/profiles/types/index.js +3 -0
- package/api/resources/templates/client/Client.js +1 -1
- package/api/resources/tenants/client/Client.js +4 -4
- package/api/resources/translations/client/Client.js +2 -2
- package/api/resources/users/resources/preferences/client/Client.d.ts +1 -1
- package/api/resources/users/resources/preferences/client/Client.js +4 -4
- package/api/resources/users/resources/preferences/client/requests/UserPreferencesUpdateParams.d.ts +1 -1
- package/api/resources/users/resources/preferences/types/TopicPreference.d.ts +1 -1
- package/api/resources/users/resources/tenants/client/Client.js +4 -4
- package/api/resources/users/resources/tokens/client/Client.js +5 -5
- package/core/fetcher/Fetcher.js +16 -13
- package/dist/Client.js +1 -1
- package/dist/api/resources/audiences/client/Client.d.ts +1 -1
- package/dist/api/resources/audiences/client/Client.js +6 -6
- 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/brands/types/BrandSettings.d.ts +1 -0
- package/dist/api/resources/bulk/client/Client.js +6 -6
- package/dist/api/resources/commons/types/ChannelClassification.d.ts +3 -1
- package/dist/api/resources/commons/types/ChannelClassification.js +2 -0
- package/dist/api/resources/lists/client/Client.js +10 -10
- package/dist/api/resources/messages/client/Client.js +7 -7
- package/dist/api/resources/notifications/client/Client.js +8 -8
- package/dist/api/resources/profiles/client/Client.d.ts +1 -1
- package/dist/api/resources/profiles/client/Client.js +8 -8
- package/dist/api/resources/profiles/types/GetListSubscriptionsList.d.ts +14 -0
- package/dist/api/resources/profiles/types/GetListSubscriptionsList.js +5 -0
- package/dist/api/resources/profiles/types/GetListSubscriptionsResponse.d.ts +9 -0
- package/dist/api/resources/profiles/types/GetListSubscriptionsResponse.js +5 -0
- package/dist/api/resources/profiles/types/SubscribeToListsRequest.d.ts +1 -2
- package/dist/api/resources/profiles/types/SubscribeToListsRequestListObject.d.ts +8 -0
- package/dist/api/resources/profiles/types/SubscribeToListsRequestListObject.js +5 -0
- package/dist/api/resources/profiles/types/index.d.ts +3 -0
- package/dist/api/resources/profiles/types/index.js +3 -0
- package/dist/api/resources/templates/client/Client.js +1 -1
- package/dist/api/resources/tenants/client/Client.js +4 -4
- package/dist/api/resources/translations/client/Client.js +2 -2
- package/dist/api/resources/users/resources/preferences/client/Client.d.ts +1 -1
- package/dist/api/resources/users/resources/preferences/client/Client.js +4 -4
- package/dist/api/resources/users/resources/preferences/client/requests/UserPreferencesUpdateParams.d.ts +1 -1
- package/dist/api/resources/users/resources/preferences/types/TopicPreference.d.ts +1 -1
- package/dist/api/resources/users/resources/tenants/client/Client.js +4 -4
- package/dist/api/resources/users/resources/tokens/client/Client.js +5 -5
- package/dist/core/fetcher/Fetcher.js +16 -13
- package/package.json +1 -1
|
@@ -96,7 +96,7 @@ class Messages {
|
|
|
96
96
|
Authorization: yield this._getAuthorizationHeader(),
|
|
97
97
|
"X-Fern-Language": "JavaScript",
|
|
98
98
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
99
|
-
"X-Fern-SDK-Version": "v6.0.
|
|
99
|
+
"X-Fern-SDK-Version": "v6.0.5",
|
|
100
100
|
},
|
|
101
101
|
contentType: "application/json",
|
|
102
102
|
queryParameters: _queryParams,
|
|
@@ -142,7 +142,7 @@ class Messages {
|
|
|
142
142
|
Authorization: yield this._getAuthorizationHeader(),
|
|
143
143
|
"X-Fern-Language": "JavaScript",
|
|
144
144
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
145
|
-
"X-Fern-SDK-Version": "v6.0.
|
|
145
|
+
"X-Fern-SDK-Version": "v6.0.5",
|
|
146
146
|
},
|
|
147
147
|
contentType: "application/json",
|
|
148
148
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -192,7 +192,7 @@ class Messages {
|
|
|
192
192
|
Authorization: yield this._getAuthorizationHeader(),
|
|
193
193
|
"X-Fern-Language": "JavaScript",
|
|
194
194
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
195
|
-
"X-Fern-SDK-Version": "v6.0.
|
|
195
|
+
"X-Fern-SDK-Version": "v6.0.5",
|
|
196
196
|
"Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined,
|
|
197
197
|
"X-Idempotency-Expiration": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry) != null
|
|
198
198
|
? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry.toString()
|
|
@@ -246,7 +246,7 @@ class Messages {
|
|
|
246
246
|
Authorization: yield this._getAuthorizationHeader(),
|
|
247
247
|
"X-Fern-Language": "JavaScript",
|
|
248
248
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
249
|
-
"X-Fern-SDK-Version": "v6.0.
|
|
249
|
+
"X-Fern-SDK-Version": "v6.0.5",
|
|
250
250
|
},
|
|
251
251
|
contentType: "application/json",
|
|
252
252
|
queryParameters: _queryParams,
|
|
@@ -298,7 +298,7 @@ class Messages {
|
|
|
298
298
|
Authorization: yield this._getAuthorizationHeader(),
|
|
299
299
|
"X-Fern-Language": "JavaScript",
|
|
300
300
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
301
|
-
"X-Fern-SDK-Version": "v6.0.
|
|
301
|
+
"X-Fern-SDK-Version": "v6.0.5",
|
|
302
302
|
},
|
|
303
303
|
contentType: "application/json",
|
|
304
304
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -339,13 +339,13 @@ class Messages {
|
|
|
339
339
|
var _a;
|
|
340
340
|
return __awaiter(this, void 0, void 0, function* () {
|
|
341
341
|
const _response = yield core.fetcher({
|
|
342
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.CourierEnvironment.Production, `
|
|
342
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.CourierEnvironment.Production, `requests/${requestId}/archive`),
|
|
343
343
|
method: "PUT",
|
|
344
344
|
headers: {
|
|
345
345
|
Authorization: yield this._getAuthorizationHeader(),
|
|
346
346
|
"X-Fern-Language": "JavaScript",
|
|
347
347
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
348
|
-
"X-Fern-SDK-Version": "v6.0.
|
|
348
|
+
"X-Fern-SDK-Version": "v6.0.5",
|
|
349
349
|
},
|
|
350
350
|
contentType: "application/json",
|
|
351
351
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -62,7 +62,7 @@ class Notifications {
|
|
|
62
62
|
Authorization: yield this._getAuthorizationHeader(),
|
|
63
63
|
"X-Fern-Language": "JavaScript",
|
|
64
64
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
65
|
-
"X-Fern-SDK-Version": "v6.0.
|
|
65
|
+
"X-Fern-SDK-Version": "v6.0.5",
|
|
66
66
|
},
|
|
67
67
|
contentType: "application/json",
|
|
68
68
|
queryParameters: _queryParams,
|
|
@@ -103,7 +103,7 @@ class Notifications {
|
|
|
103
103
|
Authorization: yield this._getAuthorizationHeader(),
|
|
104
104
|
"X-Fern-Language": "JavaScript",
|
|
105
105
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
106
|
-
"X-Fern-SDK-Version": "v6.0.
|
|
106
|
+
"X-Fern-SDK-Version": "v6.0.5",
|
|
107
107
|
},
|
|
108
108
|
contentType: "application/json",
|
|
109
109
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -143,7 +143,7 @@ class Notifications {
|
|
|
143
143
|
Authorization: yield this._getAuthorizationHeader(),
|
|
144
144
|
"X-Fern-Language": "JavaScript",
|
|
145
145
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
146
|
-
"X-Fern-SDK-Version": "v6.0.
|
|
146
|
+
"X-Fern-SDK-Version": "v6.0.5",
|
|
147
147
|
},
|
|
148
148
|
contentType: "application/json",
|
|
149
149
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -183,7 +183,7 @@ class Notifications {
|
|
|
183
183
|
Authorization: yield this._getAuthorizationHeader(),
|
|
184
184
|
"X-Fern-Language": "JavaScript",
|
|
185
185
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
186
|
-
"X-Fern-SDK-Version": "v6.0.
|
|
186
|
+
"X-Fern-SDK-Version": "v6.0.5",
|
|
187
187
|
},
|
|
188
188
|
contentType: "application/json",
|
|
189
189
|
body: request,
|
|
@@ -224,7 +224,7 @@ class Notifications {
|
|
|
224
224
|
Authorization: yield this._getAuthorizationHeader(),
|
|
225
225
|
"X-Fern-Language": "JavaScript",
|
|
226
226
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
227
|
-
"X-Fern-SDK-Version": "v6.0.
|
|
227
|
+
"X-Fern-SDK-Version": "v6.0.5",
|
|
228
228
|
},
|
|
229
229
|
contentType: "application/json",
|
|
230
230
|
body: request,
|
|
@@ -265,7 +265,7 @@ class Notifications {
|
|
|
265
265
|
Authorization: yield this._getAuthorizationHeader(),
|
|
266
266
|
"X-Fern-Language": "JavaScript",
|
|
267
267
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
268
|
-
"X-Fern-SDK-Version": "v6.0.
|
|
268
|
+
"X-Fern-SDK-Version": "v6.0.5",
|
|
269
269
|
},
|
|
270
270
|
contentType: "application/json",
|
|
271
271
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -305,7 +305,7 @@ class Notifications {
|
|
|
305
305
|
Authorization: yield this._getAuthorizationHeader(),
|
|
306
306
|
"X-Fern-Language": "JavaScript",
|
|
307
307
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
308
|
-
"X-Fern-SDK-Version": "v6.0.
|
|
308
|
+
"X-Fern-SDK-Version": "v6.0.5",
|
|
309
309
|
},
|
|
310
310
|
contentType: "application/json",
|
|
311
311
|
body: request,
|
|
@@ -346,7 +346,7 @@ class Notifications {
|
|
|
346
346
|
Authorization: yield this._getAuthorizationHeader(),
|
|
347
347
|
"X-Fern-Language": "JavaScript",
|
|
348
348
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
349
|
-
"X-Fern-SDK-Version": "v6.0.
|
|
349
|
+
"X-Fern-SDK-Version": "v6.0.5",
|
|
350
350
|
},
|
|
351
351
|
contentType: "application/json",
|
|
352
352
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -48,7 +48,7 @@ export declare class Profiles {
|
|
|
48
48
|
* Returns the subscribed lists for a specified user.
|
|
49
49
|
* @throws {@link Courier.BadRequestError}
|
|
50
50
|
*/
|
|
51
|
-
getListSubscriptions(userId: string, request?: Courier.GetListSubscriptionsRequest, requestOptions?: Profiles.RequestOptions): Promise<
|
|
51
|
+
getListSubscriptions(userId: string, request?: Courier.GetListSubscriptionsRequest, requestOptions?: Profiles.RequestOptions): Promise<Courier.GetListSubscriptionsResponse>;
|
|
52
52
|
/**
|
|
53
53
|
* Subscribes the given user to one or more lists. If the list does not exist, it will be created.
|
|
54
54
|
* @throws {@link Courier.BadRequestError}
|
|
@@ -62,7 +62,7 @@ class Profiles {
|
|
|
62
62
|
Authorization: yield this._getAuthorizationHeader(),
|
|
63
63
|
"X-Fern-Language": "JavaScript",
|
|
64
64
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
65
|
-
"X-Fern-SDK-Version": "v6.0.
|
|
65
|
+
"X-Fern-SDK-Version": "v6.0.5",
|
|
66
66
|
},
|
|
67
67
|
contentType: "application/json",
|
|
68
68
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -111,7 +111,7 @@ class Profiles {
|
|
|
111
111
|
Authorization: yield this._getAuthorizationHeader(),
|
|
112
112
|
"X-Fern-Language": "JavaScript",
|
|
113
113
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
114
|
-
"X-Fern-SDK-Version": "v6.0.
|
|
114
|
+
"X-Fern-SDK-Version": "v6.0.5",
|
|
115
115
|
"Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined,
|
|
116
116
|
"X-Idempotency-Expiration": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry) != null
|
|
117
117
|
? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry.toString()
|
|
@@ -168,7 +168,7 @@ class Profiles {
|
|
|
168
168
|
Authorization: yield this._getAuthorizationHeader(),
|
|
169
169
|
"X-Fern-Language": "JavaScript",
|
|
170
170
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
171
|
-
"X-Fern-SDK-Version": "v6.0.
|
|
171
|
+
"X-Fern-SDK-Version": "v6.0.5",
|
|
172
172
|
},
|
|
173
173
|
contentType: "application/json",
|
|
174
174
|
body: request,
|
|
@@ -218,7 +218,7 @@ class Profiles {
|
|
|
218
218
|
Authorization: yield this._getAuthorizationHeader(),
|
|
219
219
|
"X-Fern-Language": "JavaScript",
|
|
220
220
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
221
|
-
"X-Fern-SDK-Version": "v6.0.
|
|
221
|
+
"X-Fern-SDK-Version": "v6.0.5",
|
|
222
222
|
},
|
|
223
223
|
contentType: "application/json",
|
|
224
224
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -272,7 +272,7 @@ class Profiles {
|
|
|
272
272
|
Authorization: yield this._getAuthorizationHeader(),
|
|
273
273
|
"X-Fern-Language": "JavaScript",
|
|
274
274
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
275
|
-
"X-Fern-SDK-Version": "v6.0.
|
|
275
|
+
"X-Fern-SDK-Version": "v6.0.5",
|
|
276
276
|
},
|
|
277
277
|
contentType: "application/json",
|
|
278
278
|
queryParameters: _queryParams,
|
|
@@ -280,7 +280,7 @@ class Profiles {
|
|
|
280
280
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
281
281
|
});
|
|
282
282
|
if (_response.ok) {
|
|
283
|
-
return;
|
|
283
|
+
return _response.body;
|
|
284
284
|
}
|
|
285
285
|
if (_response.error.reason === "status-code") {
|
|
286
286
|
switch (_response.error.statusCode) {
|
|
@@ -322,7 +322,7 @@ class Profiles {
|
|
|
322
322
|
Authorization: yield this._getAuthorizationHeader(),
|
|
323
323
|
"X-Fern-Language": "JavaScript",
|
|
324
324
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
325
|
-
"X-Fern-SDK-Version": "v6.0.
|
|
325
|
+
"X-Fern-SDK-Version": "v6.0.5",
|
|
326
326
|
"Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined,
|
|
327
327
|
"X-Idempotency-Expiration": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry) != null
|
|
328
328
|
? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry.toString()
|
|
@@ -376,7 +376,7 @@ class Profiles {
|
|
|
376
376
|
Authorization: yield this._getAuthorizationHeader(),
|
|
377
377
|
"X-Fern-Language": "JavaScript",
|
|
378
378
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
379
|
-
"X-Fern-SDK-Version": "v6.0.
|
|
379
|
+
"X-Fern-SDK-Version": "v6.0.5",
|
|
380
380
|
},
|
|
381
381
|
contentType: "application/json",
|
|
382
382
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Courier from "../../..";
|
|
5
|
+
export interface GetListSubscriptionsList {
|
|
6
|
+
id: string;
|
|
7
|
+
/** List name */
|
|
8
|
+
name: string;
|
|
9
|
+
/** The date/time of when the list was created. Represented as a string in ISO format. */
|
|
10
|
+
created: string;
|
|
11
|
+
/** The date/time of when the list was updated. Represented as a string in ISO format. */
|
|
12
|
+
updated: string;
|
|
13
|
+
preferences?: Courier.RecipientPreferences;
|
|
14
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Courier from "../../..";
|
|
5
|
+
export interface GetListSubscriptionsResponse {
|
|
6
|
+
paging: Courier.Paging;
|
|
7
|
+
/** An array of lists */
|
|
8
|
+
results: Courier.GetListSubscriptionsList[];
|
|
9
|
+
}
|
|
@@ -21,5 +21,8 @@ export * from "./ProfileGetResponse";
|
|
|
21
21
|
export * from "./MergeProfileResponse";
|
|
22
22
|
export * from "./ReplaceProfileResponse";
|
|
23
23
|
export * from "./SubscribeToListsRequest";
|
|
24
|
+
export * from "./SubscribeToListsRequestListObject";
|
|
24
25
|
export * from "./SubscribeToListsResponse";
|
|
25
26
|
export * from "./DeleteListSubscriptionResponse";
|
|
27
|
+
export * from "./GetListSubscriptionsList";
|
|
28
|
+
export * from "./GetListSubscriptionsResponse";
|
|
@@ -37,5 +37,8 @@ __exportStar(require("./ProfileGetResponse"), exports);
|
|
|
37
37
|
__exportStar(require("./MergeProfileResponse"), exports);
|
|
38
38
|
__exportStar(require("./ReplaceProfileResponse"), exports);
|
|
39
39
|
__exportStar(require("./SubscribeToListsRequest"), exports);
|
|
40
|
+
__exportStar(require("./SubscribeToListsRequestListObject"), exports);
|
|
40
41
|
__exportStar(require("./SubscribeToListsResponse"), exports);
|
|
41
42
|
__exportStar(require("./DeleteListSubscriptionResponse"), exports);
|
|
43
|
+
__exportStar(require("./GetListSubscriptionsList"), exports);
|
|
44
|
+
__exportStar(require("./GetListSubscriptionsResponse"), exports);
|
|
@@ -65,7 +65,7 @@ class Templates {
|
|
|
65
65
|
Authorization: yield this._getAuthorizationHeader(),
|
|
66
66
|
"X-Fern-Language": "JavaScript",
|
|
67
67
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
68
|
-
"X-Fern-SDK-Version": "v6.0.
|
|
68
|
+
"X-Fern-SDK-Version": "v6.0.5",
|
|
69
69
|
},
|
|
70
70
|
contentType: "application/json",
|
|
71
71
|
queryParameters: _queryParams,
|
|
@@ -61,7 +61,7 @@ class Tenants {
|
|
|
61
61
|
Authorization: yield this._getAuthorizationHeader(),
|
|
62
62
|
"X-Fern-Language": "JavaScript",
|
|
63
63
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
64
|
-
"X-Fern-SDK-Version": "v6.0.
|
|
64
|
+
"X-Fern-SDK-Version": "v6.0.5",
|
|
65
65
|
},
|
|
66
66
|
contentType: "application/json",
|
|
67
67
|
body: request,
|
|
@@ -110,7 +110,7 @@ class Tenants {
|
|
|
110
110
|
Authorization: yield this._getAuthorizationHeader(),
|
|
111
111
|
"X-Fern-Language": "JavaScript",
|
|
112
112
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
113
|
-
"X-Fern-SDK-Version": "v6.0.
|
|
113
|
+
"X-Fern-SDK-Version": "v6.0.5",
|
|
114
114
|
},
|
|
115
115
|
contentType: "application/json",
|
|
116
116
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -155,7 +155,7 @@ class Tenants {
|
|
|
155
155
|
Authorization: yield this._getAuthorizationHeader(),
|
|
156
156
|
"X-Fern-Language": "JavaScript",
|
|
157
157
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
158
|
-
"X-Fern-SDK-Version": "v6.0.
|
|
158
|
+
"X-Fern-SDK-Version": "v6.0.5",
|
|
159
159
|
},
|
|
160
160
|
contentType: "application/json",
|
|
161
161
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -195,7 +195,7 @@ class Tenants {
|
|
|
195
195
|
Authorization: yield this._getAuthorizationHeader(),
|
|
196
196
|
"X-Fern-Language": "JavaScript",
|
|
197
197
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
198
|
-
"X-Fern-SDK-Version": "v6.0.
|
|
198
|
+
"X-Fern-SDK-Version": "v6.0.5",
|
|
199
199
|
},
|
|
200
200
|
contentType: "application/json",
|
|
201
201
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -62,7 +62,7 @@ class Translations {
|
|
|
62
62
|
Authorization: yield this._getAuthorizationHeader(),
|
|
63
63
|
"X-Fern-Language": "JavaScript",
|
|
64
64
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
65
|
-
"X-Fern-SDK-Version": "v6.0.
|
|
65
|
+
"X-Fern-SDK-Version": "v6.0.5",
|
|
66
66
|
},
|
|
67
67
|
contentType: "application/json",
|
|
68
68
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -111,7 +111,7 @@ class Translations {
|
|
|
111
111
|
Authorization: yield this._getAuthorizationHeader(),
|
|
112
112
|
"X-Fern-Language": "JavaScript",
|
|
113
113
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
114
|
-
"X-Fern-SDK-Version": "v6.0.
|
|
114
|
+
"X-Fern-SDK-Version": "v6.0.5",
|
|
115
115
|
},
|
|
116
116
|
contentType: "application/json",
|
|
117
117
|
body: request,
|
|
@@ -28,7 +28,7 @@ export declare class Preferences {
|
|
|
28
28
|
*/
|
|
29
29
|
get(userId: string, topicId: string, requestOptions?: Preferences.RequestOptions): Promise<Courier.users.UserPreferencesGetResponse>;
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
31
|
+
* Update or Create user preferences for a specific subscription topic.
|
|
32
32
|
* @throws {@link Courier.BadRequestError}
|
|
33
33
|
*/
|
|
34
34
|
update(userId: string, topicId: string, request: Courier.users.UserPreferencesUpdateParams, requestOptions?: Preferences.RequestOptions): Promise<Courier.users.UserPreferencesUpdateResponse>;
|
|
@@ -62,7 +62,7 @@ class Preferences {
|
|
|
62
62
|
Authorization: yield this._getAuthorizationHeader(),
|
|
63
63
|
"X-Fern-Language": "JavaScript",
|
|
64
64
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
65
|
-
"X-Fern-SDK-Version": "v6.0.
|
|
65
|
+
"X-Fern-SDK-Version": "v6.0.5",
|
|
66
66
|
},
|
|
67
67
|
contentType: "application/json",
|
|
68
68
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -111,7 +111,7 @@ class Preferences {
|
|
|
111
111
|
Authorization: yield this._getAuthorizationHeader(),
|
|
112
112
|
"X-Fern-Language": "JavaScript",
|
|
113
113
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
114
|
-
"X-Fern-SDK-Version": "v6.0.
|
|
114
|
+
"X-Fern-SDK-Version": "v6.0.5",
|
|
115
115
|
},
|
|
116
116
|
contentType: "application/json",
|
|
117
117
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -147,7 +147,7 @@ class Preferences {
|
|
|
147
147
|
});
|
|
148
148
|
}
|
|
149
149
|
/**
|
|
150
|
-
*
|
|
150
|
+
* Update or Create user preferences for a specific subscription topic.
|
|
151
151
|
* @throws {@link Courier.BadRequestError}
|
|
152
152
|
*/
|
|
153
153
|
update(userId, topicId, request, requestOptions) {
|
|
@@ -160,7 +160,7 @@ class Preferences {
|
|
|
160
160
|
Authorization: yield this._getAuthorizationHeader(),
|
|
161
161
|
"X-Fern-Language": "JavaScript",
|
|
162
162
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
163
|
-
"X-Fern-SDK-Version": "v6.0.
|
|
163
|
+
"X-Fern-SDK-Version": "v6.0.5",
|
|
164
164
|
},
|
|
165
165
|
contentType: "application/json",
|
|
166
166
|
body: request,
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import * as Courier from "../../../../../..";
|
|
5
5
|
export interface UserPreferencesUpdateParams {
|
|
6
6
|
status: Courier.PreferenceStatus;
|
|
7
|
-
/**
|
|
7
|
+
/** The Channels a user has chosen to receive notifications through for this topic */
|
|
8
8
|
custom_routing?: Courier.ChannelClassification[];
|
|
9
9
|
default_status: Courier.PreferenceStatus;
|
|
10
10
|
has_custom_routing?: boolean;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as Courier from "../../../../..";
|
|
5
5
|
export interface TopicPreference {
|
|
6
|
-
/**
|
|
6
|
+
/** The Channels a user has chosen to receive notifications through for this topic */
|
|
7
7
|
custom_routing?: Courier.ChannelClassification[];
|
|
8
8
|
default_status: Courier.PreferenceStatus;
|
|
9
9
|
has_custom_routing?: boolean;
|
|
@@ -64,7 +64,7 @@ class Tenants {
|
|
|
64
64
|
Authorization: yield this._getAuthorizationHeader(),
|
|
65
65
|
"X-Fern-Language": "JavaScript",
|
|
66
66
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
67
|
-
"X-Fern-SDK-Version": "v6.0.
|
|
67
|
+
"X-Fern-SDK-Version": "v6.0.5",
|
|
68
68
|
},
|
|
69
69
|
contentType: "application/json",
|
|
70
70
|
body: request,
|
|
@@ -112,7 +112,7 @@ class Tenants {
|
|
|
112
112
|
Authorization: yield this._getAuthorizationHeader(),
|
|
113
113
|
"X-Fern-Language": "JavaScript",
|
|
114
114
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
115
|
-
"X-Fern-SDK-Version": "v6.0.
|
|
115
|
+
"X-Fern-SDK-Version": "v6.0.5",
|
|
116
116
|
},
|
|
117
117
|
contentType: "application/json",
|
|
118
118
|
body: request,
|
|
@@ -156,7 +156,7 @@ class Tenants {
|
|
|
156
156
|
Authorization: yield this._getAuthorizationHeader(),
|
|
157
157
|
"X-Fern-Language": "JavaScript",
|
|
158
158
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
159
|
-
"X-Fern-SDK-Version": "v6.0.
|
|
159
|
+
"X-Fern-SDK-Version": "v6.0.5",
|
|
160
160
|
},
|
|
161
161
|
contentType: "application/json",
|
|
162
162
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -207,7 +207,7 @@ class Tenants {
|
|
|
207
207
|
Authorization: yield this._getAuthorizationHeader(),
|
|
208
208
|
"X-Fern-Language": "JavaScript",
|
|
209
209
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
210
|
-
"X-Fern-SDK-Version": "v6.0.
|
|
210
|
+
"X-Fern-SDK-Version": "v6.0.5",
|
|
211
211
|
},
|
|
212
212
|
contentType: "application/json",
|
|
213
213
|
queryParameters: _queryParams,
|
|
@@ -62,7 +62,7 @@ class Tokens {
|
|
|
62
62
|
Authorization: yield this._getAuthorizationHeader(),
|
|
63
63
|
"X-Fern-Language": "JavaScript",
|
|
64
64
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
65
|
-
"X-Fern-SDK-Version": "v6.0.
|
|
65
|
+
"X-Fern-SDK-Version": "v6.0.5",
|
|
66
66
|
},
|
|
67
67
|
contentType: "application/json",
|
|
68
68
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -111,7 +111,7 @@ class Tokens {
|
|
|
111
111
|
Authorization: yield this._getAuthorizationHeader(),
|
|
112
112
|
"X-Fern-Language": "JavaScript",
|
|
113
113
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
114
|
-
"X-Fern-SDK-Version": "v6.0.
|
|
114
|
+
"X-Fern-SDK-Version": "v6.0.5",
|
|
115
115
|
},
|
|
116
116
|
contentType: "application/json",
|
|
117
117
|
body: request,
|
|
@@ -161,7 +161,7 @@ class Tokens {
|
|
|
161
161
|
Authorization: yield this._getAuthorizationHeader(),
|
|
162
162
|
"X-Fern-Language": "JavaScript",
|
|
163
163
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
164
|
-
"X-Fern-SDK-Version": "v6.0.
|
|
164
|
+
"X-Fern-SDK-Version": "v6.0.5",
|
|
165
165
|
},
|
|
166
166
|
contentType: "application/json",
|
|
167
167
|
body: request,
|
|
@@ -211,7 +211,7 @@ class Tokens {
|
|
|
211
211
|
Authorization: yield this._getAuthorizationHeader(),
|
|
212
212
|
"X-Fern-Language": "JavaScript",
|
|
213
213
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
214
|
-
"X-Fern-SDK-Version": "v6.0.
|
|
214
|
+
"X-Fern-SDK-Version": "v6.0.5",
|
|
215
215
|
},
|
|
216
216
|
contentType: "application/json",
|
|
217
217
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -260,7 +260,7 @@ class Tokens {
|
|
|
260
260
|
Authorization: yield this._getAuthorizationHeader(),
|
|
261
261
|
"X-Fern-Language": "JavaScript",
|
|
262
262
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
263
|
-
"X-Fern-SDK-Version": "v6.0.
|
|
263
|
+
"X-Fern-SDK-Version": "v6.0.5",
|
|
264
264
|
},
|
|
265
265
|
contentType: "application/json",
|
|
266
266
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -86,19 +86,22 @@ function fetcherImpl(args) {
|
|
|
86
86
|
else if (response.body != null && args.responseType === "streaming") {
|
|
87
87
|
body = response.body;
|
|
88
88
|
}
|
|
89
|
-
else
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
89
|
+
else {
|
|
90
|
+
const text = yield response.text();
|
|
91
|
+
if (text.length > 0) {
|
|
92
|
+
try {
|
|
93
|
+
body = JSON.parse(text);
|
|
94
|
+
}
|
|
95
|
+
catch (err) {
|
|
96
|
+
return {
|
|
97
|
+
ok: false,
|
|
98
|
+
error: {
|
|
99
|
+
reason: "non-json",
|
|
100
|
+
statusCode: response.status,
|
|
101
|
+
rawBody: text,
|
|
102
|
+
},
|
|
103
|
+
};
|
|
104
|
+
}
|
|
102
105
|
}
|
|
103
106
|
}
|
|
104
107
|
if (response.status >= 200 && response.status < 400) {
|