@trycourier/courier 6.2.2 → 6.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Client.d.ts +71 -11
- package/Client.js +72 -12
- package/api/client/requests/SendMessageRequest.d.ts +71 -11
- 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.d.ts +38 -4
- package/api/resources/brands/client/Client.js +43 -9
- package/api/resources/brands/client/requests/BrandUpdateParameters.d.ts +13 -2
- package/api/resources/bulk/client/Client.d.ts +91 -3
- package/api/resources/bulk/client/Client.js +96 -8
- package/api/resources/bulk/client/requests/BulkCreateJobParams.d.ts +70 -1
- package/api/resources/inbound/client/Client.js +1 -1
- package/api/resources/lists/client/Client.d.ts +8 -96
- package/api/resources/lists/client/Client.js +18 -106
- package/api/resources/lists/client/requests/AddSubscribersToList.d.ts +2 -24
- package/api/resources/lists/client/requests/SubscribeUserToListRequest.d.ts +2 -24
- package/api/resources/lists/client/requests/SubscribeUsersToListRequest.d.ts +2 -24
- package/api/resources/messages/client/Client.js +6 -6
- package/api/resources/notifications/client/Client.js +6 -6
- package/api/resources/profiles/client/Client.d.ts +7 -1
- package/api/resources/profiles/client/Client.js +14 -8
- package/api/resources/templates/client/Client.js +1 -1
- package/api/resources/tenants/client/Client.d.ts +6 -1
- package/api/resources/tenants/client/Client.js +13 -8
- package/api/resources/tenants/client/requests/TenantCreateOrReplaceParams.d.ts +6 -1
- package/api/resources/translations/client/Client.js +2 -2
- package/api/resources/users/resources/preferences/client/Client.d.ts +10 -4
- package/api/resources/users/resources/preferences/client/Client.js +43 -8
- package/api/resources/users/resources/preferences/client/requests/UserPreferencesParams.d.ts +15 -0
- package/api/resources/users/resources/preferences/client/requests/UserPreferencesParams.js +5 -0
- package/api/resources/users/resources/preferences/client/requests/UserPreferencesTopicParams.d.ts +15 -0
- package/api/resources/users/resources/preferences/client/requests/UserPreferencesTopicParams.js +5 -0
- package/api/resources/users/resources/preferences/client/requests/UserPreferencesUpdateParams.d.ts +4 -0
- package/api/resources/users/resources/preferences/client/requests/index.d.ts +2 -0
- package/api/resources/users/resources/tenants/client/Client.js +5 -5
- package/api/resources/users/resources/tokens/client/Client.d.ts +5 -1
- package/api/resources/users/resources/tokens/client/Client.js +11 -7
- package/dist/Client.d.ts +71 -11
- package/dist/Client.js +72 -12
- package/dist/api/client/requests/SendMessageRequest.d.ts +71 -11
- 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.d.ts +38 -4
- package/dist/api/resources/brands/client/Client.js +43 -9
- package/dist/api/resources/brands/client/requests/BrandUpdateParameters.d.ts +13 -2
- package/dist/api/resources/bulk/client/Client.d.ts +91 -3
- package/dist/api/resources/bulk/client/Client.js +96 -8
- package/dist/api/resources/bulk/client/requests/BulkCreateJobParams.d.ts +70 -1
- package/dist/api/resources/inbound/client/Client.js +1 -1
- package/dist/api/resources/lists/client/Client.d.ts +8 -96
- package/dist/api/resources/lists/client/Client.js +18 -106
- package/dist/api/resources/lists/client/requests/AddSubscribersToList.d.ts +2 -24
- package/dist/api/resources/lists/client/requests/SubscribeUserToListRequest.d.ts +2 -24
- package/dist/api/resources/lists/client/requests/SubscribeUsersToListRequest.d.ts +2 -24
- package/dist/api/resources/messages/client/Client.js +6 -6
- package/dist/api/resources/notifications/client/Client.js +6 -6
- package/dist/api/resources/profiles/client/Client.d.ts +7 -1
- package/dist/api/resources/profiles/client/Client.js +14 -8
- package/dist/api/resources/templates/client/Client.js +1 -1
- package/dist/api/resources/tenants/client/Client.d.ts +6 -1
- package/dist/api/resources/tenants/client/Client.js +13 -8
- package/dist/api/resources/tenants/client/requests/TenantCreateOrReplaceParams.d.ts +6 -1
- package/dist/api/resources/translations/client/Client.js +2 -2
- package/dist/api/resources/users/resources/preferences/client/Client.d.ts +10 -4
- package/dist/api/resources/users/resources/preferences/client/Client.js +43 -8
- package/dist/api/resources/users/resources/preferences/client/requests/UserPreferencesParams.d.ts +15 -0
- package/dist/api/resources/users/resources/preferences/client/requests/UserPreferencesParams.js +5 -0
- package/dist/api/resources/users/resources/preferences/client/requests/UserPreferencesTopicParams.d.ts +15 -0
- package/dist/api/resources/users/resources/preferences/client/requests/UserPreferencesTopicParams.js +5 -0
- package/dist/api/resources/users/resources/preferences/client/requests/UserPreferencesUpdateParams.d.ts +4 -0
- package/dist/api/resources/users/resources/preferences/client/requests/index.d.ts +2 -0
- package/dist/api/resources/users/resources/tenants/client/Client.js +5 -5
- package/dist/api/resources/users/resources/tokens/client/Client.d.ts +5 -1
- package/dist/api/resources/users/resources/tokens/client/Client.js +11 -7
- package/package.json +1 -1
|
@@ -30,7 +30,12 @@ export declare class Tenants {
|
|
|
30
30
|
* name: "string",
|
|
31
31
|
* parent_tenant_id: "string",
|
|
32
32
|
* default_preferences: {
|
|
33
|
-
* items: [{
|
|
33
|
+
* items: [{
|
|
34
|
+
* id: "string",
|
|
35
|
+
* status: Courier.SubscriptionTopicStatus.OptedOut,
|
|
36
|
+
* has_custom_routing: undefined,
|
|
37
|
+
* custom_routing: undefined
|
|
38
|
+
* }]
|
|
34
39
|
* },
|
|
35
40
|
* properties: {
|
|
36
41
|
* "string": {
|
|
@@ -60,7 +60,12 @@ class Tenants {
|
|
|
60
60
|
* name: "string",
|
|
61
61
|
* parent_tenant_id: "string",
|
|
62
62
|
* default_preferences: {
|
|
63
|
-
* items: [{
|
|
63
|
+
* items: [{
|
|
64
|
+
* id: "string",
|
|
65
|
+
* status: Courier.SubscriptionTopicStatus.OptedOut,
|
|
66
|
+
* has_custom_routing: undefined,
|
|
67
|
+
* custom_routing: undefined
|
|
68
|
+
* }]
|
|
64
69
|
* },
|
|
65
70
|
* properties: {
|
|
66
71
|
* "string": {
|
|
@@ -85,7 +90,7 @@ class Tenants {
|
|
|
85
90
|
Authorization: yield this._getAuthorizationHeader(),
|
|
86
91
|
"X-Fern-Language": "JavaScript",
|
|
87
92
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
88
|
-
"X-Fern-SDK-Version": "v6.2.
|
|
93
|
+
"X-Fern-SDK-Version": "v6.2.3",
|
|
89
94
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
90
95
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
91
96
|
},
|
|
@@ -142,7 +147,7 @@ class Tenants {
|
|
|
142
147
|
Authorization: yield this._getAuthorizationHeader(),
|
|
143
148
|
"X-Fern-Language": "JavaScript",
|
|
144
149
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
145
|
-
"X-Fern-SDK-Version": "v6.2.
|
|
150
|
+
"X-Fern-SDK-Version": "v6.2.3",
|
|
146
151
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
147
152
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
148
153
|
},
|
|
@@ -211,7 +216,7 @@ class Tenants {
|
|
|
211
216
|
Authorization: yield this._getAuthorizationHeader(),
|
|
212
217
|
"X-Fern-Language": "JavaScript",
|
|
213
218
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
214
|
-
"X-Fern-SDK-Version": "v6.2.
|
|
219
|
+
"X-Fern-SDK-Version": "v6.2.3",
|
|
215
220
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
216
221
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
217
222
|
},
|
|
@@ -261,7 +266,7 @@ class Tenants {
|
|
|
261
266
|
Authorization: yield this._getAuthorizationHeader(),
|
|
262
267
|
"X-Fern-Language": "JavaScript",
|
|
263
268
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
264
|
-
"X-Fern-SDK-Version": "v6.2.
|
|
269
|
+
"X-Fern-SDK-Version": "v6.2.3",
|
|
265
270
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
266
271
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
267
272
|
},
|
|
@@ -324,7 +329,7 @@ class Tenants {
|
|
|
324
329
|
Authorization: yield this._getAuthorizationHeader(),
|
|
325
330
|
"X-Fern-Language": "JavaScript",
|
|
326
331
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
327
|
-
"X-Fern-SDK-Version": "v6.2.
|
|
332
|
+
"X-Fern-SDK-Version": "v6.2.3",
|
|
328
333
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
329
334
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
330
335
|
},
|
|
@@ -385,7 +390,7 @@ class Tenants {
|
|
|
385
390
|
Authorization: yield this._getAuthorizationHeader(),
|
|
386
391
|
"X-Fern-Language": "JavaScript",
|
|
387
392
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
388
|
-
"X-Fern-SDK-Version": "v6.2.
|
|
393
|
+
"X-Fern-SDK-Version": "v6.2.3",
|
|
389
394
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
390
395
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
391
396
|
},
|
|
@@ -436,7 +441,7 @@ class Tenants {
|
|
|
436
441
|
Authorization: yield this._getAuthorizationHeader(),
|
|
437
442
|
"X-Fern-Language": "JavaScript",
|
|
438
443
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
439
|
-
"X-Fern-SDK-Version": "v6.2.
|
|
444
|
+
"X-Fern-SDK-Version": "v6.2.3",
|
|
440
445
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
441
446
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
442
447
|
},
|
|
@@ -8,7 +8,12 @@ import * as Courier from "../../../../index";
|
|
|
8
8
|
* name: "string",
|
|
9
9
|
* parent_tenant_id: "string",
|
|
10
10
|
* default_preferences: {
|
|
11
|
-
* items: [{
|
|
11
|
+
* items: [{
|
|
12
|
+
* id: "string",
|
|
13
|
+
* status: Courier.SubscriptionTopicStatus.OptedOut,
|
|
14
|
+
* has_custom_routing: undefined,
|
|
15
|
+
* custom_routing: undefined
|
|
16
|
+
* }]
|
|
12
17
|
* },
|
|
13
18
|
* properties: {
|
|
14
19
|
* "string": {
|
|
@@ -70,7 +70,7 @@ class Translations {
|
|
|
70
70
|
Authorization: yield this._getAuthorizationHeader(),
|
|
71
71
|
"X-Fern-Language": "JavaScript",
|
|
72
72
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
73
|
-
"X-Fern-SDK-Version": "v6.2.
|
|
73
|
+
"X-Fern-SDK-Version": "v6.2.3",
|
|
74
74
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
75
75
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
76
76
|
},
|
|
@@ -130,7 +130,7 @@ class Translations {
|
|
|
130
130
|
Authorization: yield this._getAuthorizationHeader(),
|
|
131
131
|
"X-Fern-Language": "JavaScript",
|
|
132
132
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
133
|
-
"X-Fern-SDK-Version": "v6.2.
|
|
133
|
+
"X-Fern-SDK-Version": "v6.2.3",
|
|
134
134
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
135
135
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
136
136
|
},
|
|
@@ -22,27 +22,33 @@ export declare class Preferences {
|
|
|
22
22
|
* Fetch all user preferences.
|
|
23
23
|
*
|
|
24
24
|
* @param {string} userId - A unique identifier associated with the user whose preferences you wish to retrieve.
|
|
25
|
+
* @param {Courier.users.UserPreferencesParams} request
|
|
25
26
|
* @param {Preferences.RequestOptions} requestOptions - Request-specific configuration.
|
|
26
27
|
*
|
|
27
28
|
* @throws {@link Courier.BadRequestError}
|
|
28
29
|
*
|
|
29
30
|
* @example
|
|
30
|
-
* await courier.users.preferences.list("string"
|
|
31
|
+
* await courier.users.preferences.list("string", {
|
|
32
|
+
* tenant_id: "string"
|
|
33
|
+
* })
|
|
31
34
|
*/
|
|
32
|
-
list(userId: string, requestOptions?: Preferences.RequestOptions): Promise<Courier.users.UserPreferencesListResponse>;
|
|
35
|
+
list(userId: string, request?: Courier.users.UserPreferencesParams, requestOptions?: Preferences.RequestOptions): Promise<Courier.users.UserPreferencesListResponse>;
|
|
33
36
|
/**
|
|
34
37
|
* Fetch user preferences for a specific subscription topic.
|
|
35
38
|
*
|
|
36
39
|
* @param {string} userId - A unique identifier associated with the user whose preferences you wish to retrieve.
|
|
37
40
|
* @param {string} topicId - A unique identifier associated with a subscription topic.
|
|
41
|
+
* @param {Courier.users.UserPreferencesTopicParams} request
|
|
38
42
|
* @param {Preferences.RequestOptions} requestOptions - Request-specific configuration.
|
|
39
43
|
*
|
|
40
44
|
* @throws {@link Courier.NotFoundError}
|
|
41
45
|
*
|
|
42
46
|
* @example
|
|
43
|
-
* await courier.users.preferences.get("string", "string"
|
|
47
|
+
* await courier.users.preferences.get("string", "string", {
|
|
48
|
+
* tenant_id: "string"
|
|
49
|
+
* })
|
|
44
50
|
*/
|
|
45
|
-
get(userId: string, topicId: string, requestOptions?: Preferences.RequestOptions): Promise<Courier.users.UserPreferencesGetResponse>;
|
|
51
|
+
get(userId: string, topicId: string, request?: Courier.users.UserPreferencesTopicParams, requestOptions?: Preferences.RequestOptions): Promise<Courier.users.UserPreferencesGetResponse>;
|
|
46
52
|
/**
|
|
47
53
|
* Update or Create user preferences for a specific subscription topic.
|
|
48
54
|
*
|
|
@@ -34,6 +34,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
34
34
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
35
35
|
});
|
|
36
36
|
};
|
|
37
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
38
|
+
var t = {};
|
|
39
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
40
|
+
t[p] = s[p];
|
|
41
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
42
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
43
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
44
|
+
t[p[i]] = s[p[i]];
|
|
45
|
+
}
|
|
46
|
+
return t;
|
|
47
|
+
};
|
|
37
48
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
38
49
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
39
50
|
};
|
|
@@ -52,16 +63,24 @@ class Preferences {
|
|
|
52
63
|
* Fetch all user preferences.
|
|
53
64
|
*
|
|
54
65
|
* @param {string} userId - A unique identifier associated with the user whose preferences you wish to retrieve.
|
|
66
|
+
* @param {Courier.users.UserPreferencesParams} request
|
|
55
67
|
* @param {Preferences.RequestOptions} requestOptions - Request-specific configuration.
|
|
56
68
|
*
|
|
57
69
|
* @throws {@link Courier.BadRequestError}
|
|
58
70
|
*
|
|
59
71
|
* @example
|
|
60
|
-
* await courier.users.preferences.list("string"
|
|
72
|
+
* await courier.users.preferences.list("string", {
|
|
73
|
+
* tenant_id: "string"
|
|
74
|
+
* })
|
|
61
75
|
*/
|
|
62
|
-
list(userId, requestOptions) {
|
|
76
|
+
list(userId, request = {}, requestOptions) {
|
|
63
77
|
var _a, _b;
|
|
64
78
|
return __awaiter(this, void 0, void 0, function* () {
|
|
79
|
+
const { tenant_id: tenantId } = request;
|
|
80
|
+
const _queryParams = {};
|
|
81
|
+
if (tenantId != null) {
|
|
82
|
+
_queryParams["tenant_id"] = tenantId;
|
|
83
|
+
}
|
|
65
84
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
66
85
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/users/${encodeURIComponent(userId)}/preferences`),
|
|
67
86
|
method: "GET",
|
|
@@ -69,11 +88,12 @@ class Preferences {
|
|
|
69
88
|
Authorization: yield this._getAuthorizationHeader(),
|
|
70
89
|
"X-Fern-Language": "JavaScript",
|
|
71
90
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
72
|
-
"X-Fern-SDK-Version": "v6.2.
|
|
91
|
+
"X-Fern-SDK-Version": "v6.2.3",
|
|
73
92
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
74
93
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
75
94
|
},
|
|
76
95
|
contentType: "application/json",
|
|
96
|
+
queryParameters: _queryParams,
|
|
77
97
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
78
98
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
79
99
|
});
|
|
@@ -111,16 +131,24 @@ class Preferences {
|
|
|
111
131
|
*
|
|
112
132
|
* @param {string} userId - A unique identifier associated with the user whose preferences you wish to retrieve.
|
|
113
133
|
* @param {string} topicId - A unique identifier associated with a subscription topic.
|
|
134
|
+
* @param {Courier.users.UserPreferencesTopicParams} request
|
|
114
135
|
* @param {Preferences.RequestOptions} requestOptions - Request-specific configuration.
|
|
115
136
|
*
|
|
116
137
|
* @throws {@link Courier.NotFoundError}
|
|
117
138
|
*
|
|
118
139
|
* @example
|
|
119
|
-
* await courier.users.preferences.get("string", "string"
|
|
140
|
+
* await courier.users.preferences.get("string", "string", {
|
|
141
|
+
* tenant_id: "string"
|
|
142
|
+
* })
|
|
120
143
|
*/
|
|
121
|
-
get(userId, topicId, requestOptions) {
|
|
144
|
+
get(userId, topicId, request = {}, requestOptions) {
|
|
122
145
|
var _a, _b;
|
|
123
146
|
return __awaiter(this, void 0, void 0, function* () {
|
|
147
|
+
const { tenant_id: tenantId } = request;
|
|
148
|
+
const _queryParams = {};
|
|
149
|
+
if (tenantId != null) {
|
|
150
|
+
_queryParams["tenant_id"] = tenantId;
|
|
151
|
+
}
|
|
124
152
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
125
153
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/users/${encodeURIComponent(userId)}/preferences/${encodeURIComponent(topicId)}`),
|
|
126
154
|
method: "GET",
|
|
@@ -128,11 +156,12 @@ class Preferences {
|
|
|
128
156
|
Authorization: yield this._getAuthorizationHeader(),
|
|
129
157
|
"X-Fern-Language": "JavaScript",
|
|
130
158
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
131
|
-
"X-Fern-SDK-Version": "v6.2.
|
|
159
|
+
"X-Fern-SDK-Version": "v6.2.3",
|
|
132
160
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
133
161
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
134
162
|
},
|
|
135
163
|
contentType: "application/json",
|
|
164
|
+
queryParameters: _queryParams,
|
|
136
165
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
137
166
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
138
167
|
});
|
|
@@ -187,6 +216,11 @@ class Preferences {
|
|
|
187
216
|
update(userId, topicId, request, requestOptions) {
|
|
188
217
|
var _a, _b;
|
|
189
218
|
return __awaiter(this, void 0, void 0, function* () {
|
|
219
|
+
const { tenant_id: tenantId } = request, _body = __rest(request, ["tenant_id"]);
|
|
220
|
+
const _queryParams = {};
|
|
221
|
+
if (tenantId != null) {
|
|
222
|
+
_queryParams["tenant_id"] = tenantId;
|
|
223
|
+
}
|
|
190
224
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
191
225
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/users/${encodeURIComponent(userId)}/preferences/${encodeURIComponent(topicId)}`),
|
|
192
226
|
method: "PUT",
|
|
@@ -194,12 +228,13 @@ class Preferences {
|
|
|
194
228
|
Authorization: yield this._getAuthorizationHeader(),
|
|
195
229
|
"X-Fern-Language": "JavaScript",
|
|
196
230
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
197
|
-
"X-Fern-SDK-Version": "v6.2.
|
|
231
|
+
"X-Fern-SDK-Version": "v6.2.3",
|
|
198
232
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
199
233
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
200
234
|
},
|
|
201
235
|
contentType: "application/json",
|
|
202
|
-
|
|
236
|
+
queryParameters: _queryParams,
|
|
237
|
+
body: _body,
|
|
203
238
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
204
239
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
205
240
|
});
|
package/dist/api/resources/users/resources/preferences/client/requests/UserPreferencesParams.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* tenant_id: "string"
|
|
8
|
+
* }
|
|
9
|
+
*/
|
|
10
|
+
export interface UserPreferencesParams {
|
|
11
|
+
/**
|
|
12
|
+
* Query the preferences of a user for this specific tenant context.
|
|
13
|
+
*/
|
|
14
|
+
tenant_id?: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* tenant_id: "string"
|
|
8
|
+
* }
|
|
9
|
+
*/
|
|
10
|
+
export interface UserPreferencesTopicParams {
|
|
11
|
+
/**
|
|
12
|
+
* Query the preferences of a user for this specific tenant context.
|
|
13
|
+
*/
|
|
14
|
+
tenant_id?: string;
|
|
15
|
+
}
|
|
@@ -13,5 +13,9 @@ import * as Courier from "../../../../../../index";
|
|
|
13
13
|
* }
|
|
14
14
|
*/
|
|
15
15
|
export interface UserPreferencesUpdateParams {
|
|
16
|
+
/**
|
|
17
|
+
* Update the preferences of a user for this specific tenant context.
|
|
18
|
+
*/
|
|
19
|
+
tenant_id?: string;
|
|
16
20
|
topic: Courier.users.TopicPreferenceUpdate;
|
|
17
21
|
}
|
|
@@ -82,7 +82,7 @@ class Tenants {
|
|
|
82
82
|
Authorization: yield this._getAuthorizationHeader(),
|
|
83
83
|
"X-Fern-Language": "JavaScript",
|
|
84
84
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
85
|
-
"X-Fern-SDK-Version": "v6.2.
|
|
85
|
+
"X-Fern-SDK-Version": "v6.2.3",
|
|
86
86
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
87
87
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
88
88
|
},
|
|
@@ -146,7 +146,7 @@ class Tenants {
|
|
|
146
146
|
Authorization: yield this._getAuthorizationHeader(),
|
|
147
147
|
"X-Fern-Language": "JavaScript",
|
|
148
148
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
149
|
-
"X-Fern-SDK-Version": "v6.2.
|
|
149
|
+
"X-Fern-SDK-Version": "v6.2.3",
|
|
150
150
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
151
151
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
152
152
|
},
|
|
@@ -198,7 +198,7 @@ class Tenants {
|
|
|
198
198
|
Authorization: yield this._getAuthorizationHeader(),
|
|
199
199
|
"X-Fern-Language": "JavaScript",
|
|
200
200
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
201
|
-
"X-Fern-SDK-Version": "v6.2.
|
|
201
|
+
"X-Fern-SDK-Version": "v6.2.3",
|
|
202
202
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
203
203
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
204
204
|
},
|
|
@@ -250,7 +250,7 @@ class Tenants {
|
|
|
250
250
|
Authorization: yield this._getAuthorizationHeader(),
|
|
251
251
|
"X-Fern-Language": "JavaScript",
|
|
252
252
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
253
|
-
"X-Fern-SDK-Version": "v6.2.
|
|
253
|
+
"X-Fern-SDK-Version": "v6.2.3",
|
|
254
254
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
255
255
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
256
256
|
},
|
|
@@ -313,7 +313,7 @@ class Tenants {
|
|
|
313
313
|
Authorization: yield this._getAuthorizationHeader(),
|
|
314
314
|
"X-Fern-Language": "JavaScript",
|
|
315
315
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
316
|
-
"X-Fern-SDK-Version": "v6.2.
|
|
316
|
+
"X-Fern-SDK-Version": "v6.2.3",
|
|
317
317
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
318
318
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
319
319
|
},
|
|
@@ -77,7 +77,11 @@ export declare class Tokens {
|
|
|
77
77
|
*
|
|
78
78
|
* @example
|
|
79
79
|
* await courier.users.tokens.update("string", "string", {
|
|
80
|
-
* patch: [{
|
|
80
|
+
* patch: [{
|
|
81
|
+
* op: "string",
|
|
82
|
+
* path: "string",
|
|
83
|
+
* value: "string"
|
|
84
|
+
* }]
|
|
81
85
|
* })
|
|
82
86
|
*/
|
|
83
87
|
update(userId: string, token: string, request: Courier.users.PatchUserTokenOpts, requestOptions?: Tokens.RequestOptions): Promise<void>;
|
|
@@ -69,7 +69,7 @@ class Tokens {
|
|
|
69
69
|
Authorization: yield this._getAuthorizationHeader(),
|
|
70
70
|
"X-Fern-Language": "JavaScript",
|
|
71
71
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
72
|
-
"X-Fern-SDK-Version": "v6.2.
|
|
72
|
+
"X-Fern-SDK-Version": "v6.2.3",
|
|
73
73
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
74
74
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
75
75
|
},
|
|
@@ -150,7 +150,7 @@ class Tokens {
|
|
|
150
150
|
Authorization: yield this._getAuthorizationHeader(),
|
|
151
151
|
"X-Fern-Language": "JavaScript",
|
|
152
152
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
153
|
-
"X-Fern-SDK-Version": "v6.2.
|
|
153
|
+
"X-Fern-SDK-Version": "v6.2.3",
|
|
154
154
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
155
155
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
156
156
|
},
|
|
@@ -200,7 +200,11 @@ class Tokens {
|
|
|
200
200
|
*
|
|
201
201
|
* @example
|
|
202
202
|
* await courier.users.tokens.update("string", "string", {
|
|
203
|
-
* patch: [{
|
|
203
|
+
* patch: [{
|
|
204
|
+
* op: "string",
|
|
205
|
+
* path: "string",
|
|
206
|
+
* value: "string"
|
|
207
|
+
* }]
|
|
204
208
|
* })
|
|
205
209
|
*/
|
|
206
210
|
update(userId, token, request, requestOptions) {
|
|
@@ -213,7 +217,7 @@ class Tokens {
|
|
|
213
217
|
Authorization: yield this._getAuthorizationHeader(),
|
|
214
218
|
"X-Fern-Language": "JavaScript",
|
|
215
219
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
216
|
-
"X-Fern-SDK-Version": "v6.2.
|
|
220
|
+
"X-Fern-SDK-Version": "v6.2.3",
|
|
217
221
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
218
222
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
219
223
|
},
|
|
@@ -273,7 +277,7 @@ class Tokens {
|
|
|
273
277
|
Authorization: yield this._getAuthorizationHeader(),
|
|
274
278
|
"X-Fern-Language": "JavaScript",
|
|
275
279
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
276
|
-
"X-Fern-SDK-Version": "v6.2.
|
|
280
|
+
"X-Fern-SDK-Version": "v6.2.3",
|
|
277
281
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
278
282
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
279
283
|
},
|
|
@@ -331,7 +335,7 @@ class Tokens {
|
|
|
331
335
|
Authorization: yield this._getAuthorizationHeader(),
|
|
332
336
|
"X-Fern-Language": "JavaScript",
|
|
333
337
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
334
|
-
"X-Fern-SDK-Version": "v6.2.
|
|
338
|
+
"X-Fern-SDK-Version": "v6.2.3",
|
|
335
339
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
336
340
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
337
341
|
},
|
|
@@ -386,7 +390,7 @@ class Tokens {
|
|
|
386
390
|
Authorization: yield this._getAuthorizationHeader(),
|
|
387
391
|
"X-Fern-Language": "JavaScript",
|
|
388
392
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
389
|
-
"X-Fern-SDK-Version": "v6.2.
|
|
393
|
+
"X-Fern-SDK-Version": "v6.2.3",
|
|
390
394
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
391
395
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
392
396
|
},
|