@trycourier/courier 6.0.8 → 6.1.0

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 (85) hide show
  1. package/Client.js +1 -1
  2. package/api/resources/audiences/client/Client.js +5 -5
  3. package/api/resources/auditEvents/client/Client.js +2 -2
  4. package/api/resources/authTokens/client/Client.js +1 -1
  5. package/api/resources/automations/client/Client.js +2 -2
  6. package/api/resources/brands/client/Client.js +5 -5
  7. package/api/resources/bulk/client/Client.js +5 -5
  8. package/api/resources/lists/client/Client.d.ts +1 -1
  9. package/api/resources/lists/client/Client.js +11 -20
  10. package/api/resources/lists/client/requests/index.d.ts +0 -1
  11. package/api/resources/lists/types/index.d.ts +0 -5
  12. package/api/resources/lists/types/index.js +0 -5
  13. package/api/resources/messages/client/Client.js +6 -6
  14. package/api/resources/notifications/client/Client.js +8 -8
  15. package/api/resources/profiles/client/Client.js +7 -7
  16. package/api/resources/templates/client/Client.js +1 -1
  17. package/api/resources/tenants/client/Client.d.ts +2 -2
  18. package/api/resources/tenants/client/Client.js +25 -7
  19. package/api/resources/tenants/client/requests/ListTenantParams.d.ts +14 -0
  20. package/api/resources/tenants/client/requests/ListUsersForTenantParams.d.ts +14 -0
  21. package/api/resources/tenants/client/requests/index.d.ts +2 -0
  22. package/api/resources/tenants/types/ListUsersForTenantResponse.d.ts +1 -1
  23. package/api/resources/translations/client/Client.js +2 -2
  24. package/api/resources/users/resources/preferences/client/Client.js +3 -3
  25. package/api/resources/users/resources/tenants/client/Client.js +8 -8
  26. package/api/resources/users/resources/tenants/client/requests/ListTenantsForUserParams.d.ts +2 -2
  27. package/api/resources/users/resources/tenants/types/ListTenantsForUserResponse.d.ts +1 -1
  28. package/api/resources/users/resources/tokens/client/Client.js +5 -5
  29. package/core/fetcher/Fetcher.js +3 -5
  30. package/dist/Client.js +1 -1
  31. package/dist/api/resources/audiences/client/Client.js +5 -5
  32. package/dist/api/resources/auditEvents/client/Client.js +2 -2
  33. package/dist/api/resources/authTokens/client/Client.js +1 -1
  34. package/dist/api/resources/automations/client/Client.js +2 -2
  35. package/dist/api/resources/brands/client/Client.js +5 -5
  36. package/dist/api/resources/bulk/client/Client.js +5 -5
  37. package/dist/api/resources/lists/client/Client.d.ts +1 -1
  38. package/dist/api/resources/lists/client/Client.js +11 -20
  39. package/dist/api/resources/lists/client/requests/index.d.ts +0 -1
  40. package/dist/api/resources/lists/types/index.d.ts +0 -5
  41. package/dist/api/resources/lists/types/index.js +0 -5
  42. package/dist/api/resources/messages/client/Client.js +6 -6
  43. package/dist/api/resources/notifications/client/Client.js +8 -8
  44. package/dist/api/resources/profiles/client/Client.js +7 -7
  45. package/dist/api/resources/templates/client/Client.js +1 -1
  46. package/dist/api/resources/tenants/client/Client.d.ts +2 -2
  47. package/dist/api/resources/tenants/client/Client.js +25 -7
  48. package/dist/api/resources/tenants/client/requests/ListTenantParams.d.ts +14 -0
  49. package/dist/api/resources/tenants/client/requests/ListUsersForTenantParams.d.ts +14 -0
  50. package/dist/api/resources/tenants/client/requests/index.d.ts +2 -0
  51. package/dist/api/resources/tenants/types/ListUsersForTenantResponse.d.ts +1 -1
  52. package/dist/api/resources/translations/client/Client.js +2 -2
  53. package/dist/api/resources/users/resources/preferences/client/Client.js +3 -3
  54. package/dist/api/resources/users/resources/tenants/client/Client.js +8 -8
  55. package/dist/api/resources/users/resources/tenants/client/requests/ListTenantsForUserParams.d.ts +2 -2
  56. package/dist/api/resources/users/resources/tenants/types/ListTenantsForUserResponse.d.ts +1 -1
  57. package/dist/api/resources/users/resources/tokens/client/Client.js +5 -5
  58. package/dist/core/fetcher/Fetcher.js +3 -5
  59. package/jest.config.js +5 -0
  60. package/package.json +6 -2
  61. package/tests/client.test.ts +11 -0
  62. package/api/resources/lists/client/requests/GetListRequest.d.ts +0 -13
  63. package/api/resources/lists/types/ListFindByRecipientIdParams.d.ts +0 -6
  64. package/api/resources/lists/types/ListFindByRecipientIdResponse.d.ts +0 -8
  65. package/api/resources/lists/types/ListGetAllParams.d.ts +0 -7
  66. package/api/resources/lists/types/ListGetSubscriptionsParams.d.ts +0 -6
  67. package/api/resources/lists/types/ListGetSubscriptionsParams.js +0 -5
  68. package/api/resources/lists/types/RecipientSubscriptionsResponse.d.ts +0 -8
  69. package/api/resources/lists/types/RecipientSubscriptionsResponse.js +0 -5
  70. package/dist/api/resources/lists/client/requests/GetListRequest.d.ts +0 -13
  71. package/dist/api/resources/lists/client/requests/GetListRequest.js +0 -5
  72. package/dist/api/resources/lists/types/ListFindByRecipientIdParams.d.ts +0 -6
  73. package/dist/api/resources/lists/types/ListFindByRecipientIdParams.js +0 -5
  74. package/dist/api/resources/lists/types/ListFindByRecipientIdResponse.d.ts +0 -8
  75. package/dist/api/resources/lists/types/ListFindByRecipientIdResponse.js +0 -5
  76. package/dist/api/resources/lists/types/ListGetAllParams.d.ts +0 -7
  77. package/dist/api/resources/lists/types/ListGetAllParams.js +0 -5
  78. package/dist/api/resources/lists/types/ListGetSubscriptionsParams.d.ts +0 -6
  79. package/dist/api/resources/lists/types/ListGetSubscriptionsParams.js +0 -5
  80. package/dist/api/resources/lists/types/RecipientSubscriptionsResponse.d.ts +0 -8
  81. package/dist/api/resources/lists/types/RecipientSubscriptionsResponse.js +0 -5
  82. /package/api/resources/{lists/client/requests/GetListRequest.js → tenants/client/requests/ListTenantParams.js} +0 -0
  83. /package/api/resources/{lists/types/ListFindByRecipientIdParams.js → tenants/client/requests/ListUsersForTenantParams.js} +0 -0
  84. /package/{api/resources/lists/types/ListFindByRecipientIdResponse.js → dist/api/resources/tenants/client/requests/ListTenantParams.js} +0 -0
  85. /package/{api/resources/lists/types/ListGetAllParams.js → dist/api/resources/tenants/client/requests/ListUsersForTenantParams.js} +0 -0
@@ -70,7 +70,7 @@ class Lists {
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.0.8",
73
+ "X-Fern-SDK-Version": "v6.1.0",
74
74
  },
75
75
  contentType: "application/json",
76
76
  queryParameters: _queryParams,
@@ -110,17 +110,9 @@ class Lists {
110
110
  * Returns a list based on the list ID provided.
111
111
  * @throws {@link Courier.NotFoundError}
112
112
  */
113
- get(listId, request = {}, requestOptions) {
113
+ get(listId, requestOptions) {
114
114
  var _a, _b;
115
115
  return __awaiter(this, void 0, void 0, function* () {
116
- const { cursor, pattern } = request;
117
- const _queryParams = {};
118
- if (cursor != null) {
119
- _queryParams["cursor"] = cursor;
120
- }
121
- if (pattern != null) {
122
- _queryParams["pattern"] = pattern;
123
- }
124
116
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
125
117
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/lists/${listId}`),
126
118
  method: "GET",
@@ -128,10 +120,9 @@ class Lists {
128
120
  Authorization: yield this._getAuthorizationHeader(),
129
121
  "X-Fern-Language": "JavaScript",
130
122
  "X-Fern-SDK-Name": "@trycourier/courier",
131
- "X-Fern-SDK-Version": "v6.0.8",
123
+ "X-Fern-SDK-Version": "v6.1.0",
132
124
  },
133
125
  contentType: "application/json",
134
- queryParameters: _queryParams,
135
126
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
136
127
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
137
128
  });
@@ -177,7 +168,7 @@ class Lists {
177
168
  Authorization: yield this._getAuthorizationHeader(),
178
169
  "X-Fern-Language": "JavaScript",
179
170
  "X-Fern-SDK-Name": "@trycourier/courier",
180
- "X-Fern-SDK-Version": "v6.0.8",
171
+ "X-Fern-SDK-Version": "v6.1.0",
181
172
  },
182
173
  contentType: "application/json",
183
174
  body: request,
@@ -221,7 +212,7 @@ class Lists {
221
212
  Authorization: yield this._getAuthorizationHeader(),
222
213
  "X-Fern-Language": "JavaScript",
223
214
  "X-Fern-SDK-Name": "@trycourier/courier",
224
- "X-Fern-SDK-Version": "v6.0.8",
215
+ "X-Fern-SDK-Version": "v6.1.0",
225
216
  },
226
217
  contentType: "application/json",
227
218
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -264,7 +255,7 @@ class Lists {
264
255
  Authorization: yield this._getAuthorizationHeader(),
265
256
  "X-Fern-Language": "JavaScript",
266
257
  "X-Fern-SDK-Name": "@trycourier/courier",
267
- "X-Fern-SDK-Version": "v6.0.8",
258
+ "X-Fern-SDK-Version": "v6.1.0",
268
259
  },
269
260
  contentType: "application/json",
270
261
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -313,7 +304,7 @@ class Lists {
313
304
  Authorization: yield this._getAuthorizationHeader(),
314
305
  "X-Fern-Language": "JavaScript",
315
306
  "X-Fern-SDK-Name": "@trycourier/courier",
316
- "X-Fern-SDK-Version": "v6.0.8",
307
+ "X-Fern-SDK-Version": "v6.1.0",
317
308
  },
318
309
  contentType: "application/json",
319
310
  queryParameters: _queryParams,
@@ -363,7 +354,7 @@ class Lists {
363
354
  Authorization: yield this._getAuthorizationHeader(),
364
355
  "X-Fern-Language": "JavaScript",
365
356
  "X-Fern-SDK-Name": "@trycourier/courier",
366
- "X-Fern-SDK-Version": "v6.0.8",
357
+ "X-Fern-SDK-Version": "v6.1.0",
367
358
  },
368
359
  contentType: "application/json",
369
360
  body: request,
@@ -413,7 +404,7 @@ class Lists {
413
404
  Authorization: yield this._getAuthorizationHeader(),
414
405
  "X-Fern-Language": "JavaScript",
415
406
  "X-Fern-SDK-Name": "@trycourier/courier",
416
- "X-Fern-SDK-Version": "v6.0.8",
407
+ "X-Fern-SDK-Version": "v6.1.0",
417
408
  "Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined,
418
409
  "X-Idempotency-Expiration": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry) != null
419
410
  ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry.toString()
@@ -466,7 +457,7 @@ class Lists {
466
457
  Authorization: yield this._getAuthorizationHeader(),
467
458
  "X-Fern-Language": "JavaScript",
468
459
  "X-Fern-SDK-Name": "@trycourier/courier",
469
- "X-Fern-SDK-Version": "v6.0.8",
460
+ "X-Fern-SDK-Version": "v6.1.0",
470
461
  },
471
462
  contentType: "application/json",
472
463
  body: request,
@@ -511,7 +502,7 @@ class Lists {
511
502
  Authorization: yield this._getAuthorizationHeader(),
512
503
  "X-Fern-Language": "JavaScript",
513
504
  "X-Fern-SDK-Name": "@trycourier/courier",
514
- "X-Fern-SDK-Version": "v6.0.8",
505
+ "X-Fern-SDK-Version": "v6.1.0",
515
506
  },
516
507
  contentType: "application/json",
517
508
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -1,4 +1,3 @@
1
1
  export { GetAllListsRequest } from "./GetAllListsRequest";
2
- export { GetListRequest } from "./GetListRequest";
3
2
  export { GetSubscriptionForListRequest } from "./GetSubscriptionForListRequest";
4
3
  export { SubscribeUserToListRequest } from "./SubscribeUserToListRequest";
@@ -1,11 +1,6 @@
1
1
  export * from "./List";
2
- export * from "./RecipientSubscriptionsResponse";
3
2
  export * from "./ListPutParams";
4
- export * from "./ListGetAllParams";
5
3
  export * from "./ListGetAllResponse";
6
- export * from "./ListGetSubscriptionsParams";
7
4
  export * from "./ListSubscriptionRecipient";
8
5
  export * from "./ListGetSubscriptionsResponse";
9
- export * from "./ListFindByRecipientIdParams";
10
- export * from "./ListFindByRecipientIdResponse";
11
6
  export * from "./PutSubscriptionsRecipient";
@@ -15,13 +15,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./List"), exports);
18
- __exportStar(require("./RecipientSubscriptionsResponse"), exports);
19
18
  __exportStar(require("./ListPutParams"), exports);
20
- __exportStar(require("./ListGetAllParams"), exports);
21
19
  __exportStar(require("./ListGetAllResponse"), exports);
22
- __exportStar(require("./ListGetSubscriptionsParams"), exports);
23
20
  __exportStar(require("./ListSubscriptionRecipient"), exports);
24
21
  __exportStar(require("./ListGetSubscriptionsResponse"), exports);
25
- __exportStar(require("./ListFindByRecipientIdParams"), exports);
26
- __exportStar(require("./ListFindByRecipientIdResponse"), exports);
27
22
  __exportStar(require("./PutSubscriptionsRecipient"), exports);
@@ -96,7 +96,7 @@ class Messages {
96
96
  Authorization: yield this._getAuthorizationHeader(),
97
97
  "X-Fern-Language": "JavaScript",
98
98
  "X-Fern-SDK-Name": "@trycourier/courier",
99
- "X-Fern-SDK-Version": "v6.0.8",
99
+ "X-Fern-SDK-Version": "v6.1.0",
100
100
  },
101
101
  contentType: "application/json",
102
102
  queryParameters: _queryParams,
@@ -142,7 +142,7 @@ class Messages {
142
142
  Authorization: yield this._getAuthorizationHeader(),
143
143
  "X-Fern-Language": "JavaScript",
144
144
  "X-Fern-SDK-Name": "@trycourier/courier",
145
- "X-Fern-SDK-Version": "v6.0.8",
145
+ "X-Fern-SDK-Version": "v6.1.0",
146
146
  },
147
147
  contentType: "application/json",
148
148
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -192,7 +192,7 @@ class Messages {
192
192
  Authorization: yield this._getAuthorizationHeader(),
193
193
  "X-Fern-Language": "JavaScript",
194
194
  "X-Fern-SDK-Name": "@trycourier/courier",
195
- "X-Fern-SDK-Version": "v6.0.8",
195
+ "X-Fern-SDK-Version": "v6.1.0",
196
196
  "Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined,
197
197
  "X-Idempotency-Expiration": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry) != null
198
198
  ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry.toString()
@@ -246,7 +246,7 @@ class Messages {
246
246
  Authorization: yield this._getAuthorizationHeader(),
247
247
  "X-Fern-Language": "JavaScript",
248
248
  "X-Fern-SDK-Name": "@trycourier/courier",
249
- "X-Fern-SDK-Version": "v6.0.8",
249
+ "X-Fern-SDK-Version": "v6.1.0",
250
250
  },
251
251
  contentType: "application/json",
252
252
  queryParameters: _queryParams,
@@ -298,7 +298,7 @@ class Messages {
298
298
  Authorization: yield this._getAuthorizationHeader(),
299
299
  "X-Fern-Language": "JavaScript",
300
300
  "X-Fern-SDK-Name": "@trycourier/courier",
301
- "X-Fern-SDK-Version": "v6.0.8",
301
+ "X-Fern-SDK-Version": "v6.1.0",
302
302
  },
303
303
  contentType: "application/json",
304
304
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -345,7 +345,7 @@ class Messages {
345
345
  Authorization: yield this._getAuthorizationHeader(),
346
346
  "X-Fern-Language": "JavaScript",
347
347
  "X-Fern-SDK-Name": "@trycourier/courier",
348
- "X-Fern-SDK-Version": "v6.0.8",
348
+ "X-Fern-SDK-Version": "v6.1.0",
349
349
  },
350
350
  contentType: "application/json",
351
351
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -62,7 +62,7 @@ class Notifications {
62
62
  Authorization: yield this._getAuthorizationHeader(),
63
63
  "X-Fern-Language": "JavaScript",
64
64
  "X-Fern-SDK-Name": "@trycourier/courier",
65
- "X-Fern-SDK-Version": "v6.0.8",
65
+ "X-Fern-SDK-Version": "v6.1.0",
66
66
  },
67
67
  contentType: "application/json",
68
68
  queryParameters: _queryParams,
@@ -103,7 +103,7 @@ class Notifications {
103
103
  Authorization: yield this._getAuthorizationHeader(),
104
104
  "X-Fern-Language": "JavaScript",
105
105
  "X-Fern-SDK-Name": "@trycourier/courier",
106
- "X-Fern-SDK-Version": "v6.0.8",
106
+ "X-Fern-SDK-Version": "v6.1.0",
107
107
  },
108
108
  contentType: "application/json",
109
109
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -143,7 +143,7 @@ class Notifications {
143
143
  Authorization: yield this._getAuthorizationHeader(),
144
144
  "X-Fern-Language": "JavaScript",
145
145
  "X-Fern-SDK-Name": "@trycourier/courier",
146
- "X-Fern-SDK-Version": "v6.0.8",
146
+ "X-Fern-SDK-Version": "v6.1.0",
147
147
  },
148
148
  contentType: "application/json",
149
149
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -183,7 +183,7 @@ class Notifications {
183
183
  Authorization: yield this._getAuthorizationHeader(),
184
184
  "X-Fern-Language": "JavaScript",
185
185
  "X-Fern-SDK-Name": "@trycourier/courier",
186
- "X-Fern-SDK-Version": "v6.0.8",
186
+ "X-Fern-SDK-Version": "v6.1.0",
187
187
  },
188
188
  contentType: "application/json",
189
189
  body: request,
@@ -224,7 +224,7 @@ class Notifications {
224
224
  Authorization: yield this._getAuthorizationHeader(),
225
225
  "X-Fern-Language": "JavaScript",
226
226
  "X-Fern-SDK-Name": "@trycourier/courier",
227
- "X-Fern-SDK-Version": "v6.0.8",
227
+ "X-Fern-SDK-Version": "v6.1.0",
228
228
  },
229
229
  contentType: "application/json",
230
230
  body: request,
@@ -265,7 +265,7 @@ class Notifications {
265
265
  Authorization: yield this._getAuthorizationHeader(),
266
266
  "X-Fern-Language": "JavaScript",
267
267
  "X-Fern-SDK-Name": "@trycourier/courier",
268
- "X-Fern-SDK-Version": "v6.0.8",
268
+ "X-Fern-SDK-Version": "v6.1.0",
269
269
  },
270
270
  contentType: "application/json",
271
271
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -305,7 +305,7 @@ class Notifications {
305
305
  Authorization: yield this._getAuthorizationHeader(),
306
306
  "X-Fern-Language": "JavaScript",
307
307
  "X-Fern-SDK-Name": "@trycourier/courier",
308
- "X-Fern-SDK-Version": "v6.0.8",
308
+ "X-Fern-SDK-Version": "v6.1.0",
309
309
  },
310
310
  contentType: "application/json",
311
311
  body: request,
@@ -346,7 +346,7 @@ class Notifications {
346
346
  Authorization: yield this._getAuthorizationHeader(),
347
347
  "X-Fern-Language": "JavaScript",
348
348
  "X-Fern-SDK-Name": "@trycourier/courier",
349
- "X-Fern-SDK-Version": "v6.0.8",
349
+ "X-Fern-SDK-Version": "v6.1.0",
350
350
  },
351
351
  contentType: "application/json",
352
352
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -62,7 +62,7 @@ class Profiles {
62
62
  Authorization: yield this._getAuthorizationHeader(),
63
63
  "X-Fern-Language": "JavaScript",
64
64
  "X-Fern-SDK-Name": "@trycourier/courier",
65
- "X-Fern-SDK-Version": "v6.0.8",
65
+ "X-Fern-SDK-Version": "v6.1.0",
66
66
  },
67
67
  contentType: "application/json",
68
68
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -111,7 +111,7 @@ class Profiles {
111
111
  Authorization: yield this._getAuthorizationHeader(),
112
112
  "X-Fern-Language": "JavaScript",
113
113
  "X-Fern-SDK-Name": "@trycourier/courier",
114
- "X-Fern-SDK-Version": "v6.0.8",
114
+ "X-Fern-SDK-Version": "v6.1.0",
115
115
  "Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined,
116
116
  "X-Idempotency-Expiration": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry) != null
117
117
  ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry.toString()
@@ -168,7 +168,7 @@ class Profiles {
168
168
  Authorization: yield this._getAuthorizationHeader(),
169
169
  "X-Fern-Language": "JavaScript",
170
170
  "X-Fern-SDK-Name": "@trycourier/courier",
171
- "X-Fern-SDK-Version": "v6.0.8",
171
+ "X-Fern-SDK-Version": "v6.1.0",
172
172
  },
173
173
  contentType: "application/json",
174
174
  body: request,
@@ -218,7 +218,7 @@ class Profiles {
218
218
  Authorization: yield this._getAuthorizationHeader(),
219
219
  "X-Fern-Language": "JavaScript",
220
220
  "X-Fern-SDK-Name": "@trycourier/courier",
221
- "X-Fern-SDK-Version": "v6.0.8",
221
+ "X-Fern-SDK-Version": "v6.1.0",
222
222
  },
223
223
  contentType: "application/json",
224
224
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -272,7 +272,7 @@ class Profiles {
272
272
  Authorization: yield this._getAuthorizationHeader(),
273
273
  "X-Fern-Language": "JavaScript",
274
274
  "X-Fern-SDK-Name": "@trycourier/courier",
275
- "X-Fern-SDK-Version": "v6.0.8",
275
+ "X-Fern-SDK-Version": "v6.1.0",
276
276
  },
277
277
  contentType: "application/json",
278
278
  queryParameters: _queryParams,
@@ -322,7 +322,7 @@ class Profiles {
322
322
  Authorization: yield this._getAuthorizationHeader(),
323
323
  "X-Fern-Language": "JavaScript",
324
324
  "X-Fern-SDK-Name": "@trycourier/courier",
325
- "X-Fern-SDK-Version": "v6.0.8",
325
+ "X-Fern-SDK-Version": "v6.1.0",
326
326
  "Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined,
327
327
  "X-Idempotency-Expiration": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry) != null
328
328
  ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry.toString()
@@ -376,7 +376,7 @@ class Profiles {
376
376
  Authorization: yield this._getAuthorizationHeader(),
377
377
  "X-Fern-Language": "JavaScript",
378
378
  "X-Fern-SDK-Name": "@trycourier/courier",
379
- "X-Fern-SDK-Version": "v6.0.8",
379
+ "X-Fern-SDK-Version": "v6.1.0",
380
380
  },
381
381
  contentType: "application/json",
382
382
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -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.8",
68
+ "X-Fern-SDK-Version": "v6.1.0",
69
69
  },
70
70
  contentType: "application/json",
71
71
  queryParameters: _queryParams,
@@ -26,11 +26,11 @@ export declare class Tenants {
26
26
  * @throws {@link Courier.BadRequestError}
27
27
  */
28
28
  get(tenantId: string, requestOptions?: Tenants.RequestOptions): Promise<Courier.Tenant>;
29
- list(requestOptions?: Tenants.RequestOptions): Promise<Courier.TenantListResponse>;
29
+ list(request?: Courier.ListTenantParams, requestOptions?: Tenants.RequestOptions): Promise<Courier.TenantListResponse>;
30
30
  delete(tenantId: string, requestOptions?: Tenants.RequestOptions): Promise<void>;
31
31
  /**
32
32
  * @throws {@link Courier.BadRequestError}
33
33
  */
34
- getUsersByTenant(tenantId: string, requestOptions?: Tenants.RequestOptions): Promise<Courier.ListUsersForTenantResponse>;
34
+ getUsersByTenant(tenantId: string, request?: Courier.ListUsersForTenantParams, requestOptions?: Tenants.RequestOptions): Promise<Courier.ListUsersForTenantResponse>;
35
35
  protected _getAuthorizationHeader(): Promise<string>;
36
36
  }
@@ -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.8",
64
+ "X-Fern-SDK-Version": "v6.1.0",
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.8",
113
+ "X-Fern-SDK-Version": "v6.1.0",
114
114
  },
115
115
  contentType: "application/json",
116
116
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -145,9 +145,17 @@ class Tenants {
145
145
  }
146
146
  });
147
147
  }
148
- list(requestOptions) {
148
+ list(request = {}, requestOptions) {
149
149
  var _a, _b;
150
150
  return __awaiter(this, void 0, void 0, function* () {
151
+ const { limit, cursor } = request;
152
+ const _queryParams = {};
153
+ if (limit != null) {
154
+ _queryParams["limit"] = limit.toString();
155
+ }
156
+ if (cursor != null) {
157
+ _queryParams["cursor"] = cursor;
158
+ }
151
159
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
152
160
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, "/tenants"),
153
161
  method: "GET",
@@ -155,9 +163,10 @@ class Tenants {
155
163
  Authorization: yield this._getAuthorizationHeader(),
156
164
  "X-Fern-Language": "JavaScript",
157
165
  "X-Fern-SDK-Name": "@trycourier/courier",
158
- "X-Fern-SDK-Version": "v6.0.8",
166
+ "X-Fern-SDK-Version": "v6.1.0",
159
167
  },
160
168
  contentType: "application/json",
169
+ queryParameters: _queryParams,
161
170
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
162
171
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
163
172
  });
@@ -195,7 +204,7 @@ class Tenants {
195
204
  Authorization: yield this._getAuthorizationHeader(),
196
205
  "X-Fern-Language": "JavaScript",
197
206
  "X-Fern-SDK-Name": "@trycourier/courier",
198
- "X-Fern-SDK-Version": "v6.0.8",
207
+ "X-Fern-SDK-Version": "v6.1.0",
199
208
  },
200
209
  contentType: "application/json",
201
210
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -228,9 +237,17 @@ class Tenants {
228
237
  /**
229
238
  * @throws {@link Courier.BadRequestError}
230
239
  */
231
- getUsersByTenant(tenantId, requestOptions) {
240
+ getUsersByTenant(tenantId, request = {}, requestOptions) {
232
241
  var _a, _b;
233
242
  return __awaiter(this, void 0, void 0, function* () {
243
+ const { limit, cursor } = request;
244
+ const _queryParams = {};
245
+ if (limit != null) {
246
+ _queryParams["limit"] = limit.toString();
247
+ }
248
+ if (cursor != null) {
249
+ _queryParams["cursor"] = cursor;
250
+ }
234
251
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
235
252
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/tenants/${tenantId}/users`),
236
253
  method: "GET",
@@ -238,9 +255,10 @@ class Tenants {
238
255
  Authorization: yield this._getAuthorizationHeader(),
239
256
  "X-Fern-Language": "JavaScript",
240
257
  "X-Fern-SDK-Name": "@trycourier/courier",
241
- "X-Fern-SDK-Version": "v6.0.8",
258
+ "X-Fern-SDK-Version": "v6.1.0",
242
259
  },
243
260
  contentType: "application/json",
261
+ queryParameters: _queryParams,
244
262
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
245
263
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
246
264
  });
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface ListTenantParams {
5
+ /**
6
+ * The number of accousnts to return
7
+ * (defaults to 20, maximum value of 100)
8
+ */
9
+ limit?: number;
10
+ /**
11
+ * Continue the pagination with the next cursor
12
+ */
13
+ cursor?: string;
14
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface ListUsersForTenantParams {
5
+ /**
6
+ * The number of accounts to return
7
+ * (defaults to 20, maximum value of 100)
8
+ */
9
+ limit?: number;
10
+ /**
11
+ * Continue the pagination with the next cursor
12
+ */
13
+ cursor?: string;
14
+ }
@@ -1 +1,3 @@
1
1
  export { TenantCreateOrReplaceParams } from "./TenantCreateOrReplaceParams";
2
+ export { ListTenantParams } from "./ListTenantParams";
3
+ export { ListUsersForTenantParams } from "./ListUsersForTenantParams";
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import * as Courier from "../../..";
5
5
  export interface ListUsersForTenantResponse {
6
- items?: Courier.UserTenantAssociation;
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. */
@@ -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.8",
65
+ "X-Fern-SDK-Version": "v6.1.0",
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.8",
114
+ "X-Fern-SDK-Version": "v6.1.0",
115
115
  },
116
116
  contentType: "application/json",
117
117
  body: request,
@@ -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.8",
65
+ "X-Fern-SDK-Version": "v6.1.0",
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.8",
114
+ "X-Fern-SDK-Version": "v6.1.0",
115
115
  },
116
116
  contentType: "application/json",
117
117
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -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.8",
163
+ "X-Fern-SDK-Version": "v6.1.0",
164
164
  },
165
165
  contentType: "application/json",
166
166
  body: request,
@@ -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.8",
67
+ "X-Fern-SDK-Version": "v6.1.0",
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.8",
115
+ "X-Fern-SDK-Version": "v6.1.0",
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.8",
159
+ "X-Fern-SDK-Version": "v6.1.0",
160
160
  },
161
161
  contentType: "application/json",
162
162
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -199,7 +199,7 @@ class Tenants {
199
199
  Authorization: yield this._getAuthorizationHeader(),
200
200
  "X-Fern-Language": "JavaScript",
201
201
  "X-Fern-SDK-Name": "@trycourier/courier",
202
- "X-Fern-SDK-Version": "v6.0.8",
202
+ "X-Fern-SDK-Version": "v6.1.0",
203
203
  },
204
204
  contentType: "application/json",
205
205
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -235,13 +235,13 @@ class Tenants {
235
235
  list(userId, request = {}, requestOptions) {
236
236
  var _a, _b;
237
237
  return __awaiter(this, void 0, void 0, function* () {
238
- const { limit, starting_after: startingAfter } = request;
238
+ const { limit, cursor } = request;
239
239
  const _queryParams = {};
240
240
  if (limit != null) {
241
241
  _queryParams["limit"] = limit.toString();
242
242
  }
243
- if (startingAfter != null) {
244
- _queryParams["starting_after"] = startingAfter.toString();
243
+ if (cursor != null) {
244
+ _queryParams["cursor"] = cursor;
245
245
  }
246
246
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
247
247
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `users/${userId}/tenants`),
@@ -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.0.8",
253
+ "X-Fern-SDK-Version": "v6.1.0",
254
254
  },
255
255
  contentType: "application/json",
256
256
  queryParameters: _queryParams,
@@ -8,7 +8,7 @@ export interface ListTenantsForUserParams {
8
8
  */
9
9
  limit?: number;
10
10
  /**
11
- * Value of next_page from previous response
11
+ * Continue the pagination with the next cursor
12
12
  */
13
- starting_after?: number;
13
+ cursor?: string;
14
14
  }
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import * as Courier from "../../../../..";
5
5
  export interface ListTenantsForUserResponse {
6
- items?: Courier.UserTenantAssociation;
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. */