@trycourier/courier 6.0.4 → 6.0.6
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/{users/resources/tenants → commons}/types/UserTenantAssociation.d.ts +4 -1
- package/api/resources/commons/types/index.d.ts +1 -0
- package/api/resources/commons/types/index.js +1 -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.js +7 -7
- package/api/resources/profiles/types/Intercom.d.ts +1 -1
- package/api/resources/profiles/types/{IntercomeRecipient.d.ts → IntercomRecipient.d.ts} +1 -1
- package/api/resources/profiles/types/MsTeams.d.ts +1 -1
- package/api/resources/profiles/types/{SendToMsTeamsUser.d.ts → MsTeamsBaseProperties.d.ts} +1 -2
- package/api/resources/profiles/types/SendToMsTeamsChannelId.d.ts +7 -0
- package/api/resources/profiles/types/SendToMsTeamsChannelName.d.ts +8 -0
- package/api/resources/profiles/types/SendToMsTeamsConversationId.d.ts +7 -0
- package/api/resources/profiles/types/SendToMsTeamsEmail.d.ts +7 -0
- package/api/resources/profiles/types/SendToMsTeamsUserId.d.ts +7 -0
- package/api/resources/profiles/types/SendToSlackChannel.d.ts +7 -0
- package/api/resources/profiles/types/SendToSlackChannel.js +5 -0
- package/api/resources/profiles/types/SendToSlackEmail.d.ts +7 -0
- package/api/resources/profiles/types/SendToSlackEmail.js +5 -0
- package/api/resources/profiles/types/SendToSlackUserId.d.ts +7 -0
- package/api/resources/profiles/types/SendToSlackUserId.js +5 -0
- package/api/resources/profiles/types/Slack.d.ts +5 -0
- package/api/resources/profiles/types/Slack.js +5 -0
- package/api/resources/profiles/types/SlackBaseProperties.d.ts +6 -0
- package/api/resources/profiles/types/SlackBaseProperties.js +5 -0
- package/api/resources/profiles/types/UserProfile.d.ts +1 -0
- package/api/resources/profiles/types/index.d.ts +12 -3
- package/api/resources/profiles/types/index.js +12 -3
- package/api/resources/send/types/Recipient.d.ts +1 -1
- package/api/resources/templates/client/Client.js +1 -1
- package/api/resources/tenants/client/Client.d.ts +4 -0
- package/api/resources/tenants/client/Client.js +52 -4
- package/api/resources/tenants/types/ListUsersForTenantResponse.d.ts +23 -0
- package/api/resources/tenants/types/ListUsersForTenantResponse.js +5 -0
- package/api/resources/tenants/types/TenantListResponse.d.ts +2 -2
- package/api/resources/tenants/types/index.d.ts +1 -0
- package/api/resources/tenants/types/index.js +1 -0
- 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/tenants/client/requests/AddUserToMultipleTenantsParams.d.ts +1 -1
- package/api/resources/users/resources/tenants/types/ListTenantsForUserResponse.d.ts +1 -1
- package/api/resources/users/resources/tenants/types/index.d.ts +0 -1
- package/api/resources/users/resources/tenants/types/index.js +0 -1
- 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/{users/resources/tenants → commons}/types/UserTenantAssociation.d.ts +4 -1
- package/dist/api/resources/commons/types/UserTenantAssociation.js +5 -0
- package/dist/api/resources/commons/types/index.d.ts +1 -0
- package/dist/api/resources/commons/types/index.js +1 -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.js +7 -7
- package/dist/api/resources/profiles/types/Intercom.d.ts +1 -1
- package/dist/api/resources/profiles/types/{IntercomeRecipient.d.ts → IntercomRecipient.d.ts} +1 -1
- package/dist/api/resources/profiles/types/IntercomRecipient.js +5 -0
- package/dist/api/resources/profiles/types/MsTeams.d.ts +1 -1
- package/dist/api/resources/profiles/types/{SendToMsTeamsUser.d.ts → MsTeamsBaseProperties.d.ts} +1 -2
- package/dist/api/resources/profiles/types/MsTeamsBaseProperties.js +5 -0
- package/dist/api/resources/profiles/types/SendToMsTeamsChannelId.d.ts +7 -0
- package/dist/api/resources/profiles/types/SendToMsTeamsChannelId.js +5 -0
- package/dist/api/resources/profiles/types/SendToMsTeamsChannelName.d.ts +8 -0
- package/dist/api/resources/profiles/types/SendToMsTeamsChannelName.js +5 -0
- package/dist/api/resources/profiles/types/SendToMsTeamsConversationId.d.ts +7 -0
- package/dist/api/resources/profiles/types/SendToMsTeamsConversationId.js +5 -0
- package/dist/api/resources/profiles/types/SendToMsTeamsEmail.d.ts +7 -0
- package/dist/api/resources/profiles/types/SendToMsTeamsEmail.js +5 -0
- package/dist/api/resources/profiles/types/SendToMsTeamsUserId.d.ts +7 -0
- package/dist/api/resources/profiles/types/SendToMsTeamsUserId.js +5 -0
- package/dist/api/resources/profiles/types/SendToSlackChannel.d.ts +7 -0
- package/dist/api/resources/profiles/types/SendToSlackChannel.js +5 -0
- package/dist/api/resources/profiles/types/SendToSlackEmail.d.ts +7 -0
- package/dist/api/resources/profiles/types/SendToSlackEmail.js +5 -0
- package/dist/api/resources/profiles/types/SendToSlackUserId.d.ts +7 -0
- package/dist/api/resources/profiles/types/SendToSlackUserId.js +5 -0
- package/dist/api/resources/profiles/types/Slack.d.ts +5 -0
- package/dist/api/resources/profiles/types/Slack.js +5 -0
- package/dist/api/resources/profiles/types/SlackBaseProperties.d.ts +6 -0
- package/dist/api/resources/profiles/types/SlackBaseProperties.js +5 -0
- package/dist/api/resources/profiles/types/UserProfile.d.ts +1 -0
- package/dist/api/resources/profiles/types/index.d.ts +12 -3
- package/dist/api/resources/profiles/types/index.js +12 -3
- package/dist/api/resources/send/types/Recipient.d.ts +1 -1
- package/dist/api/resources/templates/client/Client.js +1 -1
- package/dist/api/resources/tenants/client/Client.d.ts +4 -0
- package/dist/api/resources/tenants/client/Client.js +52 -4
- package/dist/api/resources/tenants/types/ListUsersForTenantResponse.d.ts +23 -0
- package/dist/api/resources/tenants/types/ListUsersForTenantResponse.js +5 -0
- package/dist/api/resources/tenants/types/TenantListResponse.d.ts +2 -2
- package/dist/api/resources/tenants/types/index.d.ts +1 -0
- package/dist/api/resources/tenants/types/index.js +1 -0
- 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/tenants/client/requests/AddUserToMultipleTenantsParams.d.ts +1 -1
- package/dist/api/resources/users/resources/tenants/types/ListTenantsForUserResponse.d.ts +1 -1
- package/dist/api/resources/users/resources/tenants/types/index.d.ts +0 -1
- package/dist/api/resources/users/resources/tenants/types/index.js +0 -1
- 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
- package/api/resources/profiles/types/SendToMsTeamsChannel.d.ts +0 -8
- package/dist/api/resources/profiles/types/SendToMsTeamsChannel.d.ts +0 -8
- /package/api/resources/{users/resources/tenants → commons}/types/UserTenantAssociation.js +0 -0
- /package/api/resources/profiles/types/{IntercomeRecipient.js → IntercomRecipient.js} +0 -0
- /package/api/resources/profiles/types/{SendToMsTeamsChannel.js → MsTeamsBaseProperties.js} +0 -0
- /package/api/resources/profiles/types/{SendToMsTeamsUser.js → SendToMsTeamsChannelId.js} +0 -0
- /package/{dist/api/resources/profiles/types/IntercomeRecipient.js → api/resources/profiles/types/SendToMsTeamsChannelName.js} +0 -0
- /package/{dist/api/resources/profiles/types/SendToMsTeamsChannel.js → api/resources/profiles/types/SendToMsTeamsConversationId.js} +0 -0
- /package/{dist/api/resources/profiles/types/SendToMsTeamsUser.js → api/resources/profiles/types/SendToMsTeamsEmail.js} +0 -0
- /package/{dist/api/resources/users/resources/tenants/types/UserTenantAssociation.js → api/resources/profiles/types/SendToMsTeamsUserId.js} +0 -0
|
@@ -12,10 +12,19 @@ export * from "./Expo";
|
|
|
12
12
|
export * from "./Token";
|
|
13
13
|
export * from "./MultipleTokens";
|
|
14
14
|
export * from "./Intercom";
|
|
15
|
-
export * from "./
|
|
15
|
+
export * from "./IntercomRecipient";
|
|
16
|
+
export * from "./Slack";
|
|
17
|
+
export * from "./SlackBaseProperties";
|
|
18
|
+
export * from "./SendToSlackChannel";
|
|
19
|
+
export * from "./SendToSlackEmail";
|
|
20
|
+
export * from "./SendToSlackUserId";
|
|
16
21
|
export * from "./MsTeams";
|
|
17
|
-
export * from "./
|
|
18
|
-
export * from "./
|
|
22
|
+
export * from "./MsTeamsBaseProperties";
|
|
23
|
+
export * from "./SendToMsTeamsUserId";
|
|
24
|
+
export * from "./SendToMsTeamsEmail";
|
|
25
|
+
export * from "./SendToMsTeamsConversationId";
|
|
26
|
+
export * from "./SendToMsTeamsChannelId";
|
|
27
|
+
export * from "./SendToMsTeamsChannelName";
|
|
19
28
|
export * from "./ProfileGetParameters";
|
|
20
29
|
export * from "./ProfileGetResponse";
|
|
21
30
|
export * from "./MergeProfileResponse";
|
|
@@ -28,10 +28,19 @@ __exportStar(require("./Expo"), exports);
|
|
|
28
28
|
__exportStar(require("./Token"), exports);
|
|
29
29
|
__exportStar(require("./MultipleTokens"), exports);
|
|
30
30
|
__exportStar(require("./Intercom"), exports);
|
|
31
|
-
__exportStar(require("./
|
|
31
|
+
__exportStar(require("./IntercomRecipient"), exports);
|
|
32
|
+
__exportStar(require("./Slack"), exports);
|
|
33
|
+
__exportStar(require("./SlackBaseProperties"), exports);
|
|
34
|
+
__exportStar(require("./SendToSlackChannel"), exports);
|
|
35
|
+
__exportStar(require("./SendToSlackEmail"), exports);
|
|
36
|
+
__exportStar(require("./SendToSlackUserId"), exports);
|
|
32
37
|
__exportStar(require("./MsTeams"), exports);
|
|
33
|
-
__exportStar(require("./
|
|
34
|
-
__exportStar(require("./
|
|
38
|
+
__exportStar(require("./MsTeamsBaseProperties"), exports);
|
|
39
|
+
__exportStar(require("./SendToMsTeamsUserId"), exports);
|
|
40
|
+
__exportStar(require("./SendToMsTeamsEmail"), exports);
|
|
41
|
+
__exportStar(require("./SendToMsTeamsConversationId"), exports);
|
|
42
|
+
__exportStar(require("./SendToMsTeamsChannelId"), exports);
|
|
43
|
+
__exportStar(require("./SendToMsTeamsChannelName"), exports);
|
|
35
44
|
__exportStar(require("./ProfileGetParameters"), exports);
|
|
36
45
|
__exportStar(require("./ProfileGetResponse"), exports);
|
|
37
46
|
__exportStar(require("./MergeProfileResponse"), exports);
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
import * as Courier from "../../..";
|
|
5
|
-
export declare type Recipient = Courier.AudienceRecipient | Courier.ListRecipient | Courier.ListPatternRecipient | Courier.UserRecipient;
|
|
5
|
+
export declare type Recipient = Courier.AudienceRecipient | Courier.ListRecipient | Courier.ListPatternRecipient | Courier.UserRecipient | Courier.Slack | Courier.MsTeams;
|
|
@@ -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.6",
|
|
69
69
|
},
|
|
70
70
|
contentType: "application/json",
|
|
71
71
|
queryParameters: _queryParams,
|
|
@@ -27,5 +27,9 @@ export declare class Tenants {
|
|
|
27
27
|
get(tenantId: string, requestOptions?: Tenants.RequestOptions): Promise<Courier.Tenant>;
|
|
28
28
|
list(requestOptions?: Tenants.RequestOptions): Promise<Courier.TenantListResponse>;
|
|
29
29
|
delete(tenantId: string, requestOptions?: Tenants.RequestOptions): Promise<void>;
|
|
30
|
+
/**
|
|
31
|
+
* @throws {@link Courier.BadRequestError}
|
|
32
|
+
*/
|
|
33
|
+
getUsersByTenant(tenantId: string, requestOptions?: Tenants.RequestOptions): Promise<Courier.ListUsersForTenantResponse>;
|
|
30
34
|
protected _getAuthorizationHeader(): Promise<string>;
|
|
31
35
|
}
|
|
@@ -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.6",
|
|
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.6",
|
|
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.6",
|
|
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.6",
|
|
199
199
|
},
|
|
200
200
|
contentType: "application/json",
|
|
201
201
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -225,6 +225,54 @@ class Tenants {
|
|
|
225
225
|
}
|
|
226
226
|
});
|
|
227
227
|
}
|
|
228
|
+
/**
|
|
229
|
+
* @throws {@link Courier.BadRequestError}
|
|
230
|
+
*/
|
|
231
|
+
getUsersByTenant(tenantId, requestOptions) {
|
|
232
|
+
var _a;
|
|
233
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
234
|
+
const _response = yield core.fetcher({
|
|
235
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.CourierEnvironment.Production, `/tenants/${tenantId}/users`),
|
|
236
|
+
method: "GET",
|
|
237
|
+
headers: {
|
|
238
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
239
|
+
"X-Fern-Language": "JavaScript",
|
|
240
|
+
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
241
|
+
"X-Fern-SDK-Version": "v6.0.6",
|
|
242
|
+
},
|
|
243
|
+
contentType: "application/json",
|
|
244
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
245
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
246
|
+
});
|
|
247
|
+
if (_response.ok) {
|
|
248
|
+
return _response.body;
|
|
249
|
+
}
|
|
250
|
+
if (_response.error.reason === "status-code") {
|
|
251
|
+
switch (_response.error.statusCode) {
|
|
252
|
+
case 400:
|
|
253
|
+
throw new Courier.BadRequestError(_response.error.body);
|
|
254
|
+
default:
|
|
255
|
+
throw new errors.CourierError({
|
|
256
|
+
statusCode: _response.error.statusCode,
|
|
257
|
+
body: _response.error.body,
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
switch (_response.error.reason) {
|
|
262
|
+
case "non-json":
|
|
263
|
+
throw new errors.CourierError({
|
|
264
|
+
statusCode: _response.error.statusCode,
|
|
265
|
+
body: _response.error.rawBody,
|
|
266
|
+
});
|
|
267
|
+
case "timeout":
|
|
268
|
+
throw new errors.CourierTimeoutError();
|
|
269
|
+
case "unknown":
|
|
270
|
+
throw new errors.CourierError({
|
|
271
|
+
message: _response.error.errorMessage,
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
});
|
|
275
|
+
}
|
|
228
276
|
_getAuthorizationHeader() {
|
|
229
277
|
var _a;
|
|
230
278
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Courier from "../../..";
|
|
5
|
+
export interface ListUsersForTenantResponse {
|
|
6
|
+
items?: Courier.UserTenantAssociation;
|
|
7
|
+
/** Set to true when there are more pages that can be retrieved. */
|
|
8
|
+
has_more: boolean;
|
|
9
|
+
/** A url that may be used to generate these results. */
|
|
10
|
+
url: string;
|
|
11
|
+
/**
|
|
12
|
+
* A url that may be used to generate fetch the next set of results.
|
|
13
|
+
* Defined only when `has_more` is set to true
|
|
14
|
+
*/
|
|
15
|
+
next_url?: string;
|
|
16
|
+
/**
|
|
17
|
+
* A pointer to the next page of results. Defined
|
|
18
|
+
* only when `has_more` is set to true
|
|
19
|
+
*/
|
|
20
|
+
cursor?: string;
|
|
21
|
+
/** Always set to `list`. Represents the type of this object. */
|
|
22
|
+
type: "list";
|
|
23
|
+
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as Courier from "../../..";
|
|
5
5
|
export interface TenantListResponse {
|
|
6
|
-
/** A pointer to the next page of results. Defined only
|
|
6
|
+
/** A pointer to the next page of results. Defined only when has_more is set to true. */
|
|
7
7
|
cursor?: string;
|
|
8
8
|
/** Set to true when there are more pages that can be retrieved. */
|
|
9
9
|
has_more: boolean;
|
|
@@ -11,7 +11,7 @@ export interface TenantListResponse {
|
|
|
11
11
|
items: Courier.Tenant[];
|
|
12
12
|
/**
|
|
13
13
|
* A url that may be used to generate fetch the next set of results.
|
|
14
|
-
* Defined only
|
|
14
|
+
* Defined only when has_more is set to true
|
|
15
15
|
*/
|
|
16
16
|
next_url?: string;
|
|
17
17
|
/** A url that may be used to generate these results. */
|
|
@@ -19,4 +19,5 @@ __exportStar(require("./SubscriptionTopic"), exports);
|
|
|
19
19
|
__exportStar(require("./SubscriptionTopicStatus"), exports);
|
|
20
20
|
__exportStar(require("./Tenant"), exports);
|
|
21
21
|
__exportStar(require("./TenantListResponse"), exports);
|
|
22
|
+
__exportStar(require("./ListUsersForTenantResponse"), exports);
|
|
22
23
|
__exportStar(require("./TemplateProperty"), exports);
|
|
@@ -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.6",
|
|
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.6",
|
|
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.6",
|
|
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.6",
|
|
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.6",
|
|
164
164
|
},
|
|
165
165
|
contentType: "application/json",
|
|
166
166
|
body: request,
|
package/api/resources/users/resources/preferences/client/requests/UserPreferencesUpdateParams.d.ts
CHANGED
|
@@ -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.6",
|
|
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.6",
|
|
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.6",
|
|
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.6",
|
|
211
211
|
},
|
|
212
212
|
contentType: "application/json",
|
|
213
213
|
queryParameters: _queryParams,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as Courier from "../../../../..";
|
|
5
5
|
export interface ListTenantsForUserResponse {
|
|
6
|
-
items?: Courier.
|
|
6
|
+
items?: Courier.UserTenantAssociation;
|
|
7
7
|
/** Set to true when there are more pages that can be retrieved. */
|
|
8
8
|
has_more: boolean;
|
|
9
9
|
/** A url that may be used to generate these results. */
|
|
@@ -15,5 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./AddUserToSingleTenantsParamsProfile"), exports);
|
|
18
|
-
__exportStar(require("./UserTenantAssociation"), exports);
|
|
19
18
|
__exportStar(require("./ListTenantsForUserResponse"), exports);
|
|
@@ -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.6",
|
|
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.6",
|
|
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.6",
|
|
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.6",
|
|
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.6",
|
|
264
264
|
},
|
|
265
265
|
contentType: "application/json",
|
|
266
266
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
package/core/fetcher/Fetcher.js
CHANGED
|
@@ -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) {
|
package/dist/Client.js
CHANGED
|
@@ -74,7 +74,7 @@ class CourierClient {
|
|
|
74
74
|
Authorization: yield this._getAuthorizationHeader(),
|
|
75
75
|
"X-Fern-Language": "JavaScript",
|
|
76
76
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
77
|
-
"X-Fern-SDK-Version": "v6.0.
|
|
77
|
+
"X-Fern-SDK-Version": "v6.0.6",
|
|
78
78
|
"Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined,
|
|
79
79
|
"X-Idempotency-Expiration": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry) != null
|
|
80
80
|
? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry.toString()
|
|
@@ -26,7 +26,7 @@ export declare class Audiences {
|
|
|
26
26
|
*/
|
|
27
27
|
update(audienceId: string, request?: Courier.AudienceUpdateParams, requestOptions?: Audiences.RequestOptions): Promise<Courier.AudienceUpdateResponse>;
|
|
28
28
|
/**
|
|
29
|
-
* Deletes the specified
|
|
29
|
+
* Deletes the specified audience.
|
|
30
30
|
*/
|
|
31
31
|
delete(audienceId: string, requestOptions?: Audiences.RequestOptions): Promise<void>;
|
|
32
32
|
/**
|