@trycourier/courier 6.2.3 → 6.3.1

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 (65) hide show
  1. package/Client.d.ts +2 -1
  2. package/Client.js +3 -2
  3. package/api/client/requests/SendMessageRequest.d.ts +2 -1
  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.js +5 -5
  9. package/api/resources/bulk/client/Client.d.ts +7 -3
  10. package/api/resources/bulk/client/Client.js +18 -8
  11. package/api/resources/bulk/client/requests/BulkCreateJobParams.d.ts +2 -1
  12. package/api/resources/bulk/client/requests/BulkGetUsersParams.d.ts +15 -0
  13. package/api/resources/bulk/client/requests/BulkGetUsersParams.js +5 -0
  14. package/api/resources/bulk/client/requests/index.d.ts +1 -0
  15. package/api/resources/inbound/client/Client.js +1 -1
  16. package/api/resources/lists/client/Client.js +10 -10
  17. package/api/resources/messages/client/Client.js +6 -6
  18. package/api/resources/notifications/client/Client.js +6 -6
  19. package/api/resources/profiles/client/Client.d.ts +13 -0
  20. package/api/resources/profiles/client/Client.js +62 -7
  21. package/api/resources/profiles/types/UserProfilePatch.d.ts +11 -0
  22. package/api/resources/profiles/types/UserProfilePatch.js +5 -0
  23. package/api/resources/profiles/types/index.d.ts +1 -0
  24. package/api/resources/profiles/types/index.js +1 -0
  25. package/api/resources/send/types/BaseMessage.d.ts +1 -1
  26. package/api/resources/send/types/Delay.d.ts +3 -1
  27. package/api/resources/templates/client/Client.js +1 -1
  28. package/api/resources/tenants/client/Client.js +7 -7
  29. package/api/resources/translations/client/Client.js +2 -2
  30. package/api/resources/users/resources/preferences/client/Client.js +3 -3
  31. package/api/resources/users/resources/tenants/client/Client.js +5 -5
  32. package/api/resources/users/resources/tokens/client/Client.js +6 -6
  33. package/dist/Client.d.ts +2 -1
  34. package/dist/Client.js +3 -2
  35. package/dist/api/client/requests/SendMessageRequest.d.ts +2 -1
  36. package/dist/api/resources/audiences/client/Client.js +5 -5
  37. package/dist/api/resources/auditEvents/client/Client.js +2 -2
  38. package/dist/api/resources/authTokens/client/Client.js +1 -1
  39. package/dist/api/resources/automations/client/Client.js +2 -2
  40. package/dist/api/resources/brands/client/Client.js +5 -5
  41. package/dist/api/resources/bulk/client/Client.d.ts +7 -3
  42. package/dist/api/resources/bulk/client/Client.js +18 -8
  43. package/dist/api/resources/bulk/client/requests/BulkCreateJobParams.d.ts +2 -1
  44. package/dist/api/resources/bulk/client/requests/BulkGetUsersParams.d.ts +15 -0
  45. package/dist/api/resources/bulk/client/requests/BulkGetUsersParams.js +5 -0
  46. package/dist/api/resources/bulk/client/requests/index.d.ts +1 -0
  47. package/dist/api/resources/inbound/client/Client.js +1 -1
  48. package/dist/api/resources/lists/client/Client.js +10 -10
  49. package/dist/api/resources/messages/client/Client.js +6 -6
  50. package/dist/api/resources/notifications/client/Client.js +6 -6
  51. package/dist/api/resources/profiles/client/Client.d.ts +13 -0
  52. package/dist/api/resources/profiles/client/Client.js +62 -7
  53. package/dist/api/resources/profiles/types/UserProfilePatch.d.ts +11 -0
  54. package/dist/api/resources/profiles/types/UserProfilePatch.js +5 -0
  55. package/dist/api/resources/profiles/types/index.d.ts +1 -0
  56. package/dist/api/resources/profiles/types/index.js +1 -0
  57. package/dist/api/resources/send/types/BaseMessage.d.ts +1 -1
  58. package/dist/api/resources/send/types/Delay.d.ts +3 -1
  59. package/dist/api/resources/templates/client/Client.js +1 -1
  60. package/dist/api/resources/tenants/client/Client.js +7 -7
  61. package/dist/api/resources/translations/client/Client.js +2 -2
  62. package/dist/api/resources/users/resources/preferences/client/Client.js +3 -3
  63. package/dist/api/resources/users/resources/tenants/client/Client.js +5 -5
  64. package/dist/api/resources/users/resources/tokens/client/Client.js +6 -6
  65. package/package.json +1 -1
@@ -69,7 +69,7 @@ class Profiles {
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.3",
72
+ "X-Fern-SDK-Version": "v6.3.1",
73
73
  "X-Fern-Runtime": core.RUNTIME.type,
74
74
  "X-Fern-Runtime-Version": core.RUNTIME.version,
75
75
  },
@@ -134,7 +134,7 @@ class Profiles {
134
134
  Authorization: yield this._getAuthorizationHeader(),
135
135
  "X-Fern-Language": "JavaScript",
136
136
  "X-Fern-SDK-Name": "@trycourier/courier",
137
- "X-Fern-SDK-Version": "v6.2.3",
137
+ "X-Fern-SDK-Version": "v6.3.1",
138
138
  "X-Fern-Runtime": core.RUNTIME.type,
139
139
  "X-Fern-Runtime-Version": core.RUNTIME.version,
140
140
  "Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined,
@@ -205,7 +205,7 @@ class Profiles {
205
205
  Authorization: yield this._getAuthorizationHeader(),
206
206
  "X-Fern-Language": "JavaScript",
207
207
  "X-Fern-SDK-Name": "@trycourier/courier",
208
- "X-Fern-SDK-Version": "v6.2.3",
208
+ "X-Fern-SDK-Version": "v6.3.1",
209
209
  "X-Fern-Runtime": core.RUNTIME.type,
210
210
  "X-Fern-Runtime-Version": core.RUNTIME.version,
211
211
  },
@@ -243,6 +243,61 @@ class Profiles {
243
243
  }
244
244
  });
245
245
  }
246
+ /**
247
+ * @param {string} userId - A unique identifier representing the user associated with the requested profile.
248
+ * @param {Courier.UserProfilePatch[]} request
249
+ * @param {Profiles.RequestOptions} requestOptions - Request-specific configuration.
250
+ *
251
+ * @example
252
+ * await courier.profiles.mergeProfile("string", [{
253
+ * op: "string",
254
+ * path: "string",
255
+ * value: "string"
256
+ * }])
257
+ */
258
+ mergeProfile(userId, request, requestOptions) {
259
+ var _a, _b;
260
+ return __awaiter(this, void 0, void 0, function* () {
261
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
262
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/profiles/${encodeURIComponent(userId)}`),
263
+ method: "PATCH",
264
+ headers: {
265
+ Authorization: yield this._getAuthorizationHeader(),
266
+ "X-Fern-Language": "JavaScript",
267
+ "X-Fern-SDK-Name": "@trycourier/courier",
268
+ "X-Fern-SDK-Version": "v6.3.1",
269
+ "X-Fern-Runtime": core.RUNTIME.type,
270
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
271
+ },
272
+ contentType: "application/json",
273
+ body: request,
274
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
275
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
276
+ });
277
+ if (_response.ok) {
278
+ return;
279
+ }
280
+ if (_response.error.reason === "status-code") {
281
+ throw new errors.CourierError({
282
+ statusCode: _response.error.statusCode,
283
+ body: _response.error.body,
284
+ });
285
+ }
286
+ switch (_response.error.reason) {
287
+ case "non-json":
288
+ throw new errors.CourierError({
289
+ statusCode: _response.error.statusCode,
290
+ body: _response.error.rawBody,
291
+ });
292
+ case "timeout":
293
+ throw new errors.CourierTimeoutError();
294
+ case "unknown":
295
+ throw new errors.CourierError({
296
+ message: _response.error.errorMessage,
297
+ });
298
+ }
299
+ });
300
+ }
246
301
  /**
247
302
  * Deletes the specified user profile.
248
303
  *
@@ -264,7 +319,7 @@ class Profiles {
264
319
  Authorization: yield this._getAuthorizationHeader(),
265
320
  "X-Fern-Language": "JavaScript",
266
321
  "X-Fern-SDK-Name": "@trycourier/courier",
267
- "X-Fern-SDK-Version": "v6.2.3",
322
+ "X-Fern-SDK-Version": "v6.3.1",
268
323
  "X-Fern-Runtime": core.RUNTIME.type,
269
324
  "X-Fern-Runtime-Version": core.RUNTIME.version,
270
325
  },
@@ -330,7 +385,7 @@ class Profiles {
330
385
  Authorization: yield this._getAuthorizationHeader(),
331
386
  "X-Fern-Language": "JavaScript",
332
387
  "X-Fern-SDK-Name": "@trycourier/courier",
333
- "X-Fern-SDK-Version": "v6.2.3",
388
+ "X-Fern-SDK-Version": "v6.3.1",
334
389
  "X-Fern-Runtime": core.RUNTIME.type,
335
390
  "X-Fern-Runtime-Version": core.RUNTIME.version,
336
391
  },
@@ -398,7 +453,7 @@ class Profiles {
398
453
  Authorization: yield this._getAuthorizationHeader(),
399
454
  "X-Fern-Language": "JavaScript",
400
455
  "X-Fern-SDK-Name": "@trycourier/courier",
401
- "X-Fern-SDK-Version": "v6.2.3",
456
+ "X-Fern-SDK-Version": "v6.3.1",
402
457
  "X-Fern-Runtime": core.RUNTIME.type,
403
458
  "X-Fern-Runtime-Version": core.RUNTIME.version,
404
459
  "Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined,
@@ -459,7 +514,7 @@ class Profiles {
459
514
  Authorization: yield this._getAuthorizationHeader(),
460
515
  "X-Fern-Language": "JavaScript",
461
516
  "X-Fern-SDK-Name": "@trycourier/courier",
462
- "X-Fern-SDK-Version": "v6.2.3",
517
+ "X-Fern-SDK-Version": "v6.3.1",
463
518
  "X-Fern-Runtime": core.RUNTIME.type,
464
519
  "X-Fern-Runtime-Version": core.RUNTIME.version,
465
520
  },
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface UserProfilePatch {
5
+ /** The operation to perform. */
6
+ op: string;
7
+ /** The JSON path specifying the part of the profile to operate on. */
8
+ path: string;
9
+ /** The value for the operation. */
10
+ value: string;
11
+ }
@@ -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 });
@@ -42,3 +42,4 @@ export * from "./WebhookMethod";
42
42
  export * from "./WebhookAuthentication";
43
43
  export * from "./WebhookAuthMode";
44
44
  export * from "./WebhookProfileType";
45
+ export * from "./UserProfilePatch";
@@ -58,3 +58,4 @@ __exportStar(require("./WebhookMethod"), exports);
58
58
  __exportStar(require("./WebhookAuthentication"), exports);
59
59
  __exportStar(require("./WebhookAuthMode"), exports);
60
60
  __exportStar(require("./WebhookProfileType"), exports);
61
+ __exportStar(require("./UserProfilePatch"), exports);
@@ -21,7 +21,7 @@ export interface BaseMessage {
21
21
  routing?: Courier.Routing;
22
22
  /** Time in ms to attempt the channel before failing over to the next available channel. */
23
23
  timeout?: Courier.Timeout;
24
- /** Defines the time to wait before delivering the message. */
24
+ /** Defines the time to wait before delivering the message. You can specify one of the following options. Duration with the number of milliseconds to delay. Until with an ISO 8601 timestamp that specifies when it should be delivered. Until with an OpenStreetMap opening_hours-like format that specifies the [Delivery Window](https://www.courier.com/docs/platform/sending/failover/#delivery-window) (e.g., 'Mo-Fr 08:00-18:00pm') */
25
25
  delay?: Courier.Delay;
26
26
  /**
27
27
  * "Expiry allows you to set an absolute or relative time in which a message expires.
@@ -3,5 +3,7 @@
3
3
  */
4
4
  export interface Delay {
5
5
  /** The duration of the delay in milliseconds. */
6
- duration: number;
6
+ duration?: number;
7
+ /** An ISO 8601 timestamp that specifies when it should be delivered or an OpenStreetMap opening_hours-like format that specifies the [Delivery Window](https://www.courier.com/docs/platform/sending/failover/#delivery-window) (e.g., 'Mo-Fr 08:00-18:00pm') */
8
+ until?: string;
7
9
  }
@@ -73,7 +73,7 @@ class Templates {
73
73
  Authorization: yield this._getAuthorizationHeader(),
74
74
  "X-Fern-Language": "JavaScript",
75
75
  "X-Fern-SDK-Name": "@trycourier/courier",
76
- "X-Fern-SDK-Version": "v6.2.3",
76
+ "X-Fern-SDK-Version": "v6.3.1",
77
77
  "X-Fern-Runtime": core.RUNTIME.type,
78
78
  "X-Fern-Runtime-Version": core.RUNTIME.version,
79
79
  },
@@ -90,7 +90,7 @@ class Tenants {
90
90
  Authorization: yield this._getAuthorizationHeader(),
91
91
  "X-Fern-Language": "JavaScript",
92
92
  "X-Fern-SDK-Name": "@trycourier/courier",
93
- "X-Fern-SDK-Version": "v6.2.3",
93
+ "X-Fern-SDK-Version": "v6.3.1",
94
94
  "X-Fern-Runtime": core.RUNTIME.type,
95
95
  "X-Fern-Runtime-Version": core.RUNTIME.version,
96
96
  },
@@ -147,7 +147,7 @@ class Tenants {
147
147
  Authorization: yield this._getAuthorizationHeader(),
148
148
  "X-Fern-Language": "JavaScript",
149
149
  "X-Fern-SDK-Name": "@trycourier/courier",
150
- "X-Fern-SDK-Version": "v6.2.3",
150
+ "X-Fern-SDK-Version": "v6.3.1",
151
151
  "X-Fern-Runtime": core.RUNTIME.type,
152
152
  "X-Fern-Runtime-Version": core.RUNTIME.version,
153
153
  },
@@ -216,7 +216,7 @@ class Tenants {
216
216
  Authorization: yield this._getAuthorizationHeader(),
217
217
  "X-Fern-Language": "JavaScript",
218
218
  "X-Fern-SDK-Name": "@trycourier/courier",
219
- "X-Fern-SDK-Version": "v6.2.3",
219
+ "X-Fern-SDK-Version": "v6.3.1",
220
220
  "X-Fern-Runtime": core.RUNTIME.type,
221
221
  "X-Fern-Runtime-Version": core.RUNTIME.version,
222
222
  },
@@ -266,7 +266,7 @@ class Tenants {
266
266
  Authorization: yield this._getAuthorizationHeader(),
267
267
  "X-Fern-Language": "JavaScript",
268
268
  "X-Fern-SDK-Name": "@trycourier/courier",
269
- "X-Fern-SDK-Version": "v6.2.3",
269
+ "X-Fern-SDK-Version": "v6.3.1",
270
270
  "X-Fern-Runtime": core.RUNTIME.type,
271
271
  "X-Fern-Runtime-Version": core.RUNTIME.version,
272
272
  },
@@ -329,7 +329,7 @@ class Tenants {
329
329
  Authorization: yield this._getAuthorizationHeader(),
330
330
  "X-Fern-Language": "JavaScript",
331
331
  "X-Fern-SDK-Name": "@trycourier/courier",
332
- "X-Fern-SDK-Version": "v6.2.3",
332
+ "X-Fern-SDK-Version": "v6.3.1",
333
333
  "X-Fern-Runtime": core.RUNTIME.type,
334
334
  "X-Fern-Runtime-Version": core.RUNTIME.version,
335
335
  },
@@ -390,7 +390,7 @@ class Tenants {
390
390
  Authorization: yield this._getAuthorizationHeader(),
391
391
  "X-Fern-Language": "JavaScript",
392
392
  "X-Fern-SDK-Name": "@trycourier/courier",
393
- "X-Fern-SDK-Version": "v6.2.3",
393
+ "X-Fern-SDK-Version": "v6.3.1",
394
394
  "X-Fern-Runtime": core.RUNTIME.type,
395
395
  "X-Fern-Runtime-Version": core.RUNTIME.version,
396
396
  },
@@ -441,7 +441,7 @@ class Tenants {
441
441
  Authorization: yield this._getAuthorizationHeader(),
442
442
  "X-Fern-Language": "JavaScript",
443
443
  "X-Fern-SDK-Name": "@trycourier/courier",
444
- "X-Fern-SDK-Version": "v6.2.3",
444
+ "X-Fern-SDK-Version": "v6.3.1",
445
445
  "X-Fern-Runtime": core.RUNTIME.type,
446
446
  "X-Fern-Runtime-Version": core.RUNTIME.version,
447
447
  },
@@ -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.3",
73
+ "X-Fern-SDK-Version": "v6.3.1",
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.3",
133
+ "X-Fern-SDK-Version": "v6.3.1",
134
134
  "X-Fern-Runtime": core.RUNTIME.type,
135
135
  "X-Fern-Runtime-Version": core.RUNTIME.version,
136
136
  },
@@ -88,7 +88,7 @@ class Preferences {
88
88
  Authorization: yield this._getAuthorizationHeader(),
89
89
  "X-Fern-Language": "JavaScript",
90
90
  "X-Fern-SDK-Name": "@trycourier/courier",
91
- "X-Fern-SDK-Version": "v6.2.3",
91
+ "X-Fern-SDK-Version": "v6.3.1",
92
92
  "X-Fern-Runtime": core.RUNTIME.type,
93
93
  "X-Fern-Runtime-Version": core.RUNTIME.version,
94
94
  },
@@ -156,7 +156,7 @@ class Preferences {
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.2.3",
159
+ "X-Fern-SDK-Version": "v6.3.1",
160
160
  "X-Fern-Runtime": core.RUNTIME.type,
161
161
  "X-Fern-Runtime-Version": core.RUNTIME.version,
162
162
  },
@@ -228,7 +228,7 @@ class Preferences {
228
228
  Authorization: yield this._getAuthorizationHeader(),
229
229
  "X-Fern-Language": "JavaScript",
230
230
  "X-Fern-SDK-Name": "@trycourier/courier",
231
- "X-Fern-SDK-Version": "v6.2.3",
231
+ "X-Fern-SDK-Version": "v6.3.1",
232
232
  "X-Fern-Runtime": core.RUNTIME.type,
233
233
  "X-Fern-Runtime-Version": core.RUNTIME.version,
234
234
  },
@@ -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.3",
85
+ "X-Fern-SDK-Version": "v6.3.1",
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.3",
149
+ "X-Fern-SDK-Version": "v6.3.1",
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.3",
201
+ "X-Fern-SDK-Version": "v6.3.1",
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.3",
253
+ "X-Fern-SDK-Version": "v6.3.1",
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.3",
316
+ "X-Fern-SDK-Version": "v6.3.1",
317
317
  "X-Fern-Runtime": core.RUNTIME.type,
318
318
  "X-Fern-Runtime-Version": core.RUNTIME.version,
319
319
  },
@@ -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.3",
72
+ "X-Fern-SDK-Version": "v6.3.1",
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.3",
153
+ "X-Fern-SDK-Version": "v6.3.1",
154
154
  "X-Fern-Runtime": core.RUNTIME.type,
155
155
  "X-Fern-Runtime-Version": core.RUNTIME.version,
156
156
  },
@@ -217,7 +217,7 @@ class Tokens {
217
217
  Authorization: yield this._getAuthorizationHeader(),
218
218
  "X-Fern-Language": "JavaScript",
219
219
  "X-Fern-SDK-Name": "@trycourier/courier",
220
- "X-Fern-SDK-Version": "v6.2.3",
220
+ "X-Fern-SDK-Version": "v6.3.1",
221
221
  "X-Fern-Runtime": core.RUNTIME.type,
222
222
  "X-Fern-Runtime-Version": core.RUNTIME.version,
223
223
  },
@@ -277,7 +277,7 @@ class Tokens {
277
277
  Authorization: yield this._getAuthorizationHeader(),
278
278
  "X-Fern-Language": "JavaScript",
279
279
  "X-Fern-SDK-Name": "@trycourier/courier",
280
- "X-Fern-SDK-Version": "v6.2.3",
280
+ "X-Fern-SDK-Version": "v6.3.1",
281
281
  "X-Fern-Runtime": core.RUNTIME.type,
282
282
  "X-Fern-Runtime-Version": core.RUNTIME.version,
283
283
  },
@@ -335,7 +335,7 @@ class Tokens {
335
335
  Authorization: yield this._getAuthorizationHeader(),
336
336
  "X-Fern-Language": "JavaScript",
337
337
  "X-Fern-SDK-Name": "@trycourier/courier",
338
- "X-Fern-SDK-Version": "v6.2.3",
338
+ "X-Fern-SDK-Version": "v6.3.1",
339
339
  "X-Fern-Runtime": core.RUNTIME.type,
340
340
  "X-Fern-Runtime-Version": core.RUNTIME.version,
341
341
  },
@@ -390,7 +390,7 @@ class Tokens {
390
390
  Authorization: yield this._getAuthorizationHeader(),
391
391
  "X-Fern-Language": "JavaScript",
392
392
  "X-Fern-SDK-Name": "@trycourier/courier",
393
- "X-Fern-SDK-Version": "v6.2.3",
393
+ "X-Fern-SDK-Version": "v6.3.1",
394
394
  "X-Fern-Runtime": core.RUNTIME.type,
395
395
  "X-Fern-Runtime-Version": core.RUNTIME.version,
396
396
  },
package/dist/Client.d.ts CHANGED
@@ -116,7 +116,8 @@ export declare class CourierClient {
116
116
  * criteria: Courier.Criteria.NoEscalation
117
117
  * },
118
118
  * delay: {
119
- * duration: 1
119
+ * duration: 1,
120
+ * until: "string"
120
121
  * },
121
122
  * expiry: {
122
123
  * expires_at: "string",
package/dist/Client.js CHANGED
@@ -141,7 +141,8 @@ class CourierClient {
141
141
  * criteria: Courier.Criteria.NoEscalation
142
142
  * },
143
143
  * delay: {
144
- * duration: 1
144
+ * duration: 1,
145
+ * until: "string"
145
146
  * },
146
147
  * expiry: {
147
148
  * expires_at: "string",
@@ -165,7 +166,7 @@ class CourierClient {
165
166
  Authorization: yield this._getAuthorizationHeader(),
166
167
  "X-Fern-Language": "JavaScript",
167
168
  "X-Fern-SDK-Name": "@trycourier/courier",
168
- "X-Fern-SDK-Version": "v6.2.3",
169
+ "X-Fern-SDK-Version": "v6.3.1",
169
170
  "X-Fern-Runtime": core.RUNTIME.type,
170
171
  "X-Fern-Runtime-Version": core.RUNTIME.version,
171
172
  "Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined,
@@ -76,7 +76,8 @@ import * as Courier from "../../index";
76
76
  * criteria: Courier.Criteria.NoEscalation
77
77
  * },
78
78
  * delay: {
79
- * duration: 1
79
+ * duration: 1,
80
+ * until: "string"
80
81
  * },
81
82
  * expiry: {
82
83
  * expires_at: "string",
@@ -67,7 +67,7 @@ class Audiences {
67
67
  Authorization: yield this._getAuthorizationHeader(),
68
68
  "X-Fern-Language": "JavaScript",
69
69
  "X-Fern-SDK-Name": "@trycourier/courier",
70
- "X-Fern-SDK-Version": "v6.2.3",
70
+ "X-Fern-SDK-Version": "v6.3.1",
71
71
  "X-Fern-Runtime": core.RUNTIME.type,
72
72
  "X-Fern-Runtime-Version": core.RUNTIME.version,
73
73
  },
@@ -127,7 +127,7 @@ class Audiences {
127
127
  Authorization: yield this._getAuthorizationHeader(),
128
128
  "X-Fern-Language": "JavaScript",
129
129
  "X-Fern-SDK-Name": "@trycourier/courier",
130
- "X-Fern-SDK-Version": "v6.2.3",
130
+ "X-Fern-SDK-Version": "v6.3.1",
131
131
  "X-Fern-Runtime": core.RUNTIME.type,
132
132
  "X-Fern-Runtime-Version": core.RUNTIME.version,
133
133
  },
@@ -179,7 +179,7 @@ class Audiences {
179
179
  Authorization: yield this._getAuthorizationHeader(),
180
180
  "X-Fern-Language": "JavaScript",
181
181
  "X-Fern-SDK-Name": "@trycourier/courier",
182
- "X-Fern-SDK-Version": "v6.2.3",
182
+ "X-Fern-SDK-Version": "v6.3.1",
183
183
  "X-Fern-Runtime": core.RUNTIME.type,
184
184
  "X-Fern-Runtime-Version": core.RUNTIME.version,
185
185
  },
@@ -240,7 +240,7 @@ class Audiences {
240
240
  Authorization: yield this._getAuthorizationHeader(),
241
241
  "X-Fern-Language": "JavaScript",
242
242
  "X-Fern-SDK-Name": "@trycourier/courier",
243
- "X-Fern-SDK-Version": "v6.2.3",
243
+ "X-Fern-SDK-Version": "v6.3.1",
244
244
  "X-Fern-Runtime": core.RUNTIME.type,
245
245
  "X-Fern-Runtime-Version": core.RUNTIME.version,
246
246
  },
@@ -306,7 +306,7 @@ class Audiences {
306
306
  Authorization: yield this._getAuthorizationHeader(),
307
307
  "X-Fern-Language": "JavaScript",
308
308
  "X-Fern-SDK-Name": "@trycourier/courier",
309
- "X-Fern-SDK-Version": "v6.2.3",
309
+ "X-Fern-SDK-Version": "v6.3.1",
310
310
  "X-Fern-Runtime": core.RUNTIME.type,
311
311
  "X-Fern-Runtime-Version": core.RUNTIME.version,
312
312
  },
@@ -73,7 +73,7 @@ class AuditEvents {
73
73
  Authorization: yield this._getAuthorizationHeader(),
74
74
  "X-Fern-Language": "JavaScript",
75
75
  "X-Fern-SDK-Name": "@trycourier/courier",
76
- "X-Fern-SDK-Version": "v6.2.3",
76
+ "X-Fern-SDK-Version": "v6.3.1",
77
77
  "X-Fern-Runtime": core.RUNTIME.type,
78
78
  "X-Fern-Runtime-Version": core.RUNTIME.version,
79
79
  },
@@ -125,7 +125,7 @@ class AuditEvents {
125
125
  Authorization: yield this._getAuthorizationHeader(),
126
126
  "X-Fern-Language": "JavaScript",
127
127
  "X-Fern-SDK-Name": "@trycourier/courier",
128
- "X-Fern-SDK-Version": "v6.2.3",
128
+ "X-Fern-SDK-Version": "v6.3.1",
129
129
  "X-Fern-Runtime": core.RUNTIME.type,
130
130
  "X-Fern-Runtime-Version": core.RUNTIME.version,
131
131
  },
@@ -69,7 +69,7 @@ class AuthTokens {
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.3",
72
+ "X-Fern-SDK-Version": "v6.3.1",
73
73
  "X-Fern-Runtime": core.RUNTIME.type,
74
74
  "X-Fern-Runtime-Version": core.RUNTIME.version,
75
75
  "Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined,
@@ -79,7 +79,7 @@ class Automations {
79
79
  Authorization: yield this._getAuthorizationHeader(),
80
80
  "X-Fern-Language": "JavaScript",
81
81
  "X-Fern-SDK-Name": "@trycourier/courier",
82
- "X-Fern-SDK-Version": "v6.2.3",
82
+ "X-Fern-SDK-Version": "v6.3.1",
83
83
  "X-Fern-Runtime": core.RUNTIME.type,
84
84
  "X-Fern-Runtime-Version": core.RUNTIME.version,
85
85
  "Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined,
@@ -151,7 +151,7 @@ class Automations {
151
151
  Authorization: yield this._getAuthorizationHeader(),
152
152
  "X-Fern-Language": "JavaScript",
153
153
  "X-Fern-SDK-Name": "@trycourier/courier",
154
- "X-Fern-SDK-Version": "v6.2.3",
154
+ "X-Fern-SDK-Version": "v6.3.1",
155
155
  "X-Fern-Runtime": core.RUNTIME.type,
156
156
  "X-Fern-Runtime-Version": core.RUNTIME.version,
157
157
  "Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined,
@@ -97,7 +97,7 @@ class Brands {
97
97
  Authorization: yield this._getAuthorizationHeader(),
98
98
  "X-Fern-Language": "JavaScript",
99
99
  "X-Fern-SDK-Name": "@trycourier/courier",
100
- "X-Fern-SDK-Version": "v6.2.3",
100
+ "X-Fern-SDK-Version": "v6.3.1",
101
101
  "X-Fern-Runtime": core.RUNTIME.type,
102
102
  "X-Fern-Runtime-Version": core.RUNTIME.version,
103
103
  "Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined,
@@ -160,7 +160,7 @@ class Brands {
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.2.3",
163
+ "X-Fern-SDK-Version": "v6.3.1",
164
164
  "X-Fern-Runtime": core.RUNTIME.type,
165
165
  "X-Fern-Runtime-Version": core.RUNTIME.version,
166
166
  },
@@ -218,7 +218,7 @@ class Brands {
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.2.3",
221
+ "X-Fern-SDK-Version": "v6.3.1",
222
222
  "X-Fern-Runtime": core.RUNTIME.type,
223
223
  "X-Fern-Runtime-Version": core.RUNTIME.version,
224
224
  },
@@ -272,7 +272,7 @@ class Brands {
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.2.3",
275
+ "X-Fern-SDK-Version": "v6.3.1",
276
276
  "X-Fern-Runtime": core.RUNTIME.type,
277
277
  "X-Fern-Runtime-Version": core.RUNTIME.version,
278
278
  },
@@ -356,7 +356,7 @@ class Brands {
356
356
  Authorization: yield this._getAuthorizationHeader(),
357
357
  "X-Fern-Language": "JavaScript",
358
358
  "X-Fern-SDK-Name": "@trycourier/courier",
359
- "X-Fern-SDK-Version": "v6.2.3",
359
+ "X-Fern-SDK-Version": "v6.3.1",
360
360
  "X-Fern-Runtime": core.RUNTIME.type,
361
361
  "X-Fern-Runtime-Version": core.RUNTIME.version,
362
362
  },
@@ -94,7 +94,8 @@ export declare class Bulk {
94
94
  * criteria: Courier.Criteria.NoEscalation
95
95
  * },
96
96
  * delay: {
97
- * duration: 1
97
+ * duration: 1,
98
+ * until: "string"
98
99
  * },
99
100
  * expiry: {
100
101
  * expires_at: "string",
@@ -190,13 +191,16 @@ export declare class Bulk {
190
191
  * Get Bulk Job Users
191
192
  *
192
193
  * @param {string} jobId - A unique identifier representing the bulk job
194
+ * @param {Courier.BulkGetUsersParams} request
193
195
  * @param {Bulk.RequestOptions} requestOptions - Request-specific configuration.
194
196
  *
195
197
  * @throws {@link Courier.BadRequestError}
196
198
  *
197
199
  * @example
198
- * await courier.bulk.getUsers("string")
200
+ * await courier.bulk.getUsers("string", {
201
+ * cursor: "string"
202
+ * })
199
203
  */
200
- getUsers(jobId: string, requestOptions?: Bulk.RequestOptions): Promise<Courier.BulkGetJobUsersResponse>;
204
+ getUsers(jobId: string, request?: Courier.BulkGetUsersParams, requestOptions?: Bulk.RequestOptions): Promise<Courier.BulkGetJobUsersResponse>;
201
205
  protected _getAuthorizationHeader(): Promise<string>;
202
206
  }