@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.
Files changed (79) hide show
  1. package/Client.d.ts +71 -11
  2. package/Client.js +72 -12
  3. package/api/client/requests/SendMessageRequest.d.ts +71 -11
  4. package/api/resources/audiences/client/Client.js +5 -5
  5. package/api/resources/auditEvents/client/Client.js +2 -2
  6. package/api/resources/authTokens/client/Client.js +1 -1
  7. package/api/resources/automations/client/Client.js +2 -2
  8. package/api/resources/brands/client/Client.d.ts +38 -4
  9. package/api/resources/brands/client/Client.js +43 -9
  10. package/api/resources/brands/client/requests/BrandUpdateParameters.d.ts +13 -2
  11. package/api/resources/bulk/client/Client.d.ts +91 -3
  12. package/api/resources/bulk/client/Client.js +96 -8
  13. package/api/resources/bulk/client/requests/BulkCreateJobParams.d.ts +70 -1
  14. package/api/resources/inbound/client/Client.js +1 -1
  15. package/api/resources/lists/client/Client.d.ts +8 -96
  16. package/api/resources/lists/client/Client.js +18 -106
  17. package/api/resources/lists/client/requests/AddSubscribersToList.d.ts +2 -24
  18. package/api/resources/lists/client/requests/SubscribeUserToListRequest.d.ts +2 -24
  19. package/api/resources/lists/client/requests/SubscribeUsersToListRequest.d.ts +2 -24
  20. package/api/resources/messages/client/Client.js +6 -6
  21. package/api/resources/notifications/client/Client.js +6 -6
  22. package/api/resources/profiles/client/Client.d.ts +7 -1
  23. package/api/resources/profiles/client/Client.js +14 -8
  24. package/api/resources/templates/client/Client.js +1 -1
  25. package/api/resources/tenants/client/Client.d.ts +6 -1
  26. package/api/resources/tenants/client/Client.js +13 -8
  27. package/api/resources/tenants/client/requests/TenantCreateOrReplaceParams.d.ts +6 -1
  28. package/api/resources/translations/client/Client.js +2 -2
  29. package/api/resources/users/resources/preferences/client/Client.d.ts +10 -4
  30. package/api/resources/users/resources/preferences/client/Client.js +43 -8
  31. package/api/resources/users/resources/preferences/client/requests/UserPreferencesParams.d.ts +15 -0
  32. package/api/resources/users/resources/preferences/client/requests/UserPreferencesParams.js +5 -0
  33. package/api/resources/users/resources/preferences/client/requests/UserPreferencesTopicParams.d.ts +15 -0
  34. package/api/resources/users/resources/preferences/client/requests/UserPreferencesTopicParams.js +5 -0
  35. package/api/resources/users/resources/preferences/client/requests/UserPreferencesUpdateParams.d.ts +4 -0
  36. package/api/resources/users/resources/preferences/client/requests/index.d.ts +2 -0
  37. package/api/resources/users/resources/tenants/client/Client.js +5 -5
  38. package/api/resources/users/resources/tokens/client/Client.d.ts +5 -1
  39. package/api/resources/users/resources/tokens/client/Client.js +11 -7
  40. package/dist/Client.d.ts +71 -11
  41. package/dist/Client.js +72 -12
  42. package/dist/api/client/requests/SendMessageRequest.d.ts +71 -11
  43. package/dist/api/resources/audiences/client/Client.js +5 -5
  44. package/dist/api/resources/auditEvents/client/Client.js +2 -2
  45. package/dist/api/resources/authTokens/client/Client.js +1 -1
  46. package/dist/api/resources/automations/client/Client.js +2 -2
  47. package/dist/api/resources/brands/client/Client.d.ts +38 -4
  48. package/dist/api/resources/brands/client/Client.js +43 -9
  49. package/dist/api/resources/brands/client/requests/BrandUpdateParameters.d.ts +13 -2
  50. package/dist/api/resources/bulk/client/Client.d.ts +91 -3
  51. package/dist/api/resources/bulk/client/Client.js +96 -8
  52. package/dist/api/resources/bulk/client/requests/BulkCreateJobParams.d.ts +70 -1
  53. package/dist/api/resources/inbound/client/Client.js +1 -1
  54. package/dist/api/resources/lists/client/Client.d.ts +8 -96
  55. package/dist/api/resources/lists/client/Client.js +18 -106
  56. package/dist/api/resources/lists/client/requests/AddSubscribersToList.d.ts +2 -24
  57. package/dist/api/resources/lists/client/requests/SubscribeUserToListRequest.d.ts +2 -24
  58. package/dist/api/resources/lists/client/requests/SubscribeUsersToListRequest.d.ts +2 -24
  59. package/dist/api/resources/messages/client/Client.js +6 -6
  60. package/dist/api/resources/notifications/client/Client.js +6 -6
  61. package/dist/api/resources/profiles/client/Client.d.ts +7 -1
  62. package/dist/api/resources/profiles/client/Client.js +14 -8
  63. package/dist/api/resources/templates/client/Client.js +1 -1
  64. package/dist/api/resources/tenants/client/Client.d.ts +6 -1
  65. package/dist/api/resources/tenants/client/Client.js +13 -8
  66. package/dist/api/resources/tenants/client/requests/TenantCreateOrReplaceParams.d.ts +6 -1
  67. package/dist/api/resources/translations/client/Client.js +2 -2
  68. package/dist/api/resources/users/resources/preferences/client/Client.d.ts +10 -4
  69. package/dist/api/resources/users/resources/preferences/client/Client.js +43 -8
  70. package/dist/api/resources/users/resources/preferences/client/requests/UserPreferencesParams.d.ts +15 -0
  71. package/dist/api/resources/users/resources/preferences/client/requests/UserPreferencesParams.js +5 -0
  72. package/dist/api/resources/users/resources/preferences/client/requests/UserPreferencesTopicParams.d.ts +15 -0
  73. package/dist/api/resources/users/resources/preferences/client/requests/UserPreferencesTopicParams.js +5 -0
  74. package/dist/api/resources/users/resources/preferences/client/requests/UserPreferencesUpdateParams.d.ts +4 -0
  75. package/dist/api/resources/users/resources/preferences/client/requests/index.d.ts +2 -0
  76. package/dist/api/resources/users/resources/tenants/client/Client.js +5 -5
  77. package/dist/api/resources/users/resources/tokens/client/Client.d.ts +5 -1
  78. package/dist/api/resources/users/resources/tokens/client/Client.js +11 -7
  79. package/package.json +1 -1
@@ -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.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.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.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
- body: request,
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
  });
@@ -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,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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
  }
@@ -1 +1,3 @@
1
+ export { type UserPreferencesParams } from "./UserPreferencesParams";
2
+ export { type UserPreferencesTopicParams } from "./UserPreferencesTopicParams";
1
3
  export { type UserPreferencesUpdateParams } from "./UserPreferencesUpdateParams";
@@ -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.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.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.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.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.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.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.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.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.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.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.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
  },
package/dist/Client.d.ts CHANGED
@@ -46,7 +46,15 @@ export declare class CourierClient {
46
46
  * @example
47
47
  * await courier.send({
48
48
  * message: {
49
- * content: {},
49
+ * content: {
50
+ * version: "string",
51
+ * brand: {
52
+ * "key": "value"
53
+ * },
54
+ * elements: [{
55
+ * type: "text"
56
+ * }]
57
+ * },
50
58
  * data: {
51
59
  * "string": {
52
60
  * "key": "value"
@@ -54,19 +62,71 @@ export declare class CourierClient {
54
62
  * },
55
63
  * brand_id: "string",
56
64
  * channels: {
57
- * "string": {}
65
+ * "string": {
66
+ * brand_id: undefined,
67
+ * providers: undefined,
68
+ * routing_method: undefined,
69
+ * if: undefined,
70
+ * timeouts: undefined,
71
+ * override: undefined,
72
+ * metadata: undefined
73
+ * }
74
+ * },
75
+ * context: {
76
+ * tenant_id: "string"
77
+ * },
78
+ * metadata: {
79
+ * event: "string",
80
+ * tags: [],
81
+ * utm: {
82
+ * source: undefined,
83
+ * medium: undefined,
84
+ * campaign: undefined,
85
+ * term: undefined,
86
+ * content: undefined
87
+ * },
88
+ * trace_id: "string"
89
+ * },
90
+ * preferences: {
91
+ * subscription_topic_id: "string"
58
92
  * },
59
- * context: {},
60
- * metadata: {},
61
- * preferences: {},
62
93
  * providers: {
63
- * "string": {}
94
+ * "string": {
95
+ * override: undefined,
96
+ * if: undefined,
97
+ * timeouts: undefined,
98
+ * metadata: undefined
99
+ * }
100
+ * },
101
+ * routing: {
102
+ * method: Courier.RoutingMethod.All,
103
+ * channels: [{
104
+ * channel: "string",
105
+ * config: undefined,
106
+ * method: undefined,
107
+ * providers: undefined,
108
+ * if: undefined
109
+ * }]
110
+ * },
111
+ * timeout: {
112
+ * provider: {},
113
+ * channel: {},
114
+ * message: 1,
115
+ * escalation: 1,
116
+ * criteria: Courier.Criteria.NoEscalation
117
+ * },
118
+ * delay: {
119
+ * duration: 1
120
+ * },
121
+ * expiry: {
122
+ * expires_at: "string",
123
+ * expires_in: "string"
64
124
  * },
65
- * routing: {},
66
- * timeout: {},
67
- * delay: {},
68
- * expiry: {},
69
- * to: {}
125
+ * to: {
126
+ * audience_id: "string",
127
+ * data: {},
128
+ * filters: []
129
+ * }
70
130
  * }
71
131
  * })
72
132
  */
package/dist/Client.js CHANGED
@@ -71,7 +71,15 @@ class CourierClient {
71
71
  * @example
72
72
  * await courier.send({
73
73
  * message: {
74
- * content: {},
74
+ * content: {
75
+ * version: "string",
76
+ * brand: {
77
+ * "key": "value"
78
+ * },
79
+ * elements: [{
80
+ * type: "text"
81
+ * }]
82
+ * },
75
83
  * data: {
76
84
  * "string": {
77
85
  * "key": "value"
@@ -79,19 +87,71 @@ class CourierClient {
79
87
  * },
80
88
  * brand_id: "string",
81
89
  * channels: {
82
- * "string": {}
90
+ * "string": {
91
+ * brand_id: undefined,
92
+ * providers: undefined,
93
+ * routing_method: undefined,
94
+ * if: undefined,
95
+ * timeouts: undefined,
96
+ * override: undefined,
97
+ * metadata: undefined
98
+ * }
99
+ * },
100
+ * context: {
101
+ * tenant_id: "string"
102
+ * },
103
+ * metadata: {
104
+ * event: "string",
105
+ * tags: [],
106
+ * utm: {
107
+ * source: undefined,
108
+ * medium: undefined,
109
+ * campaign: undefined,
110
+ * term: undefined,
111
+ * content: undefined
112
+ * },
113
+ * trace_id: "string"
114
+ * },
115
+ * preferences: {
116
+ * subscription_topic_id: "string"
83
117
  * },
84
- * context: {},
85
- * metadata: {},
86
- * preferences: {},
87
118
  * providers: {
88
- * "string": {}
119
+ * "string": {
120
+ * override: undefined,
121
+ * if: undefined,
122
+ * timeouts: undefined,
123
+ * metadata: undefined
124
+ * }
125
+ * },
126
+ * routing: {
127
+ * method: Courier.RoutingMethod.All,
128
+ * channels: [{
129
+ * channel: "string",
130
+ * config: undefined,
131
+ * method: undefined,
132
+ * providers: undefined,
133
+ * if: undefined
134
+ * }]
135
+ * },
136
+ * timeout: {
137
+ * provider: {},
138
+ * channel: {},
139
+ * message: 1,
140
+ * escalation: 1,
141
+ * criteria: Courier.Criteria.NoEscalation
142
+ * },
143
+ * delay: {
144
+ * duration: 1
145
+ * },
146
+ * expiry: {
147
+ * expires_at: "string",
148
+ * expires_in: "string"
89
149
  * },
90
- * routing: {},
91
- * timeout: {},
92
- * delay: {},
93
- * expiry: {},
94
- * to: {}
150
+ * to: {
151
+ * audience_id: "string",
152
+ * data: {},
153
+ * filters: []
154
+ * }
95
155
  * }
96
156
  * })
97
157
  */
@@ -105,7 +165,7 @@ class CourierClient {
105
165
  Authorization: yield this._getAuthorizationHeader(),
106
166
  "X-Fern-Language": "JavaScript",
107
167
  "X-Fern-SDK-Name": "@trycourier/courier",
108
- "X-Fern-SDK-Version": "v6.2.2",
168
+ "X-Fern-SDK-Version": "v6.2.3",
109
169
  "X-Fern-Runtime": core.RUNTIME.type,
110
170
  "X-Fern-Runtime-Version": core.RUNTIME.version,
111
171
  "Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined,
@@ -6,7 +6,15 @@ import * as Courier from "../../index";
6
6
  * @example
7
7
  * {
8
8
  * message: {
9
- * content: {},
9
+ * content: {
10
+ * version: "string",
11
+ * brand: {
12
+ * "key": "value"
13
+ * },
14
+ * elements: [{
15
+ * type: "text"
16
+ * }]
17
+ * },
10
18
  * data: {
11
19
  * "string": {
12
20
  * "key": "value"
@@ -14,19 +22,71 @@ import * as Courier from "../../index";
14
22
  * },
15
23
  * brand_id: "string",
16
24
  * channels: {
17
- * "string": {}
25
+ * "string": {
26
+ * brand_id: undefined,
27
+ * providers: undefined,
28
+ * routing_method: undefined,
29
+ * if: undefined,
30
+ * timeouts: undefined,
31
+ * override: undefined,
32
+ * metadata: undefined
33
+ * }
34
+ * },
35
+ * context: {
36
+ * tenant_id: "string"
37
+ * },
38
+ * metadata: {
39
+ * event: "string",
40
+ * tags: [],
41
+ * utm: {
42
+ * source: undefined,
43
+ * medium: undefined,
44
+ * campaign: undefined,
45
+ * term: undefined,
46
+ * content: undefined
47
+ * },
48
+ * trace_id: "string"
49
+ * },
50
+ * preferences: {
51
+ * subscription_topic_id: "string"
18
52
  * },
19
- * context: {},
20
- * metadata: {},
21
- * preferences: {},
22
53
  * providers: {
23
- * "string": {}
54
+ * "string": {
55
+ * override: undefined,
56
+ * if: undefined,
57
+ * timeouts: undefined,
58
+ * metadata: undefined
59
+ * }
60
+ * },
61
+ * routing: {
62
+ * method: Courier.RoutingMethod.All,
63
+ * channels: [{
64
+ * channel: "string",
65
+ * config: undefined,
66
+ * method: undefined,
67
+ * providers: undefined,
68
+ * if: undefined
69
+ * }]
70
+ * },
71
+ * timeout: {
72
+ * provider: {},
73
+ * channel: {},
74
+ * message: 1,
75
+ * escalation: 1,
76
+ * criteria: Courier.Criteria.NoEscalation
77
+ * },
78
+ * delay: {
79
+ * duration: 1
80
+ * },
81
+ * expiry: {
82
+ * expires_at: "string",
83
+ * expires_in: "string"
24
84
  * },
25
- * routing: {},
26
- * timeout: {},
27
- * delay: {},
28
- * expiry: {},
29
- * to: {}
85
+ * to: {
86
+ * audience_id: "string",
87
+ * data: {},
88
+ * filters: []
89
+ * }
30
90
  * }
31
91
  * }
32
92
  */