@trycourier/courier 6.4.2 → 6.5.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 (101) hide show
  1. package/Client.js +1 -1
  2. package/README.md +1 -1
  3. package/api/resources/audiences/client/Client.js +5 -5
  4. package/api/resources/auditEvents/client/Client.js +2 -2
  5. package/api/resources/authTokens/client/Client.js +1 -1
  6. package/api/resources/automations/client/Client.js +2 -2
  7. package/api/resources/brands/client/Client.js +5 -5
  8. package/api/resources/bulk/client/Client.js +5 -5
  9. package/api/resources/commons/types/BaseTemplateTenantAssociation.d.ts +15 -0
  10. package/api/resources/commons/types/BaseTemplateTenantAssociation.js +5 -0
  11. package/api/resources/commons/types/ListTemplateTenantAssociation.d.ts +7 -0
  12. package/api/resources/commons/types/ListTemplateTenantAssociation.js +5 -0
  13. package/api/resources/commons/types/SingleTemplateTenantAssociation.d.ts +7 -0
  14. package/api/resources/commons/types/SingleTemplateTenantAssociation.js +5 -0
  15. package/api/resources/commons/types/TenantTemplateData.d.ts +11 -0
  16. package/api/resources/commons/types/TenantTemplateData.js +5 -0
  17. package/api/resources/commons/types/TenantTemplateDataNoContent.d.ts +10 -0
  18. package/api/resources/commons/types/TenantTemplateDataNoContent.js +5 -0
  19. package/api/resources/commons/types/index.d.ts +5 -0
  20. package/api/resources/commons/types/index.js +5 -0
  21. package/api/resources/inbound/client/Client.js +1 -1
  22. package/api/resources/lists/client/Client.d.ts +3 -2
  23. package/api/resources/lists/client/Client.js +17 -15
  24. package/api/resources/lists/client/requests/RestoreListRequest.d.ts +9 -0
  25. package/api/resources/lists/client/requests/RestoreListRequest.js +5 -0
  26. package/api/resources/lists/client/requests/index.d.ts +1 -0
  27. package/api/resources/lists/types/List.d.ts +2 -2
  28. package/api/resources/messages/client/Client.js +6 -6
  29. package/api/resources/messages/types/Reason.d.ts +13 -1
  30. package/api/resources/messages/types/Reason.js +3 -0
  31. package/api/resources/notifications/client/Client.js +6 -6
  32. package/api/resources/profiles/client/Client.js +8 -8
  33. package/api/resources/templates/client/Client.js +1 -1
  34. package/api/resources/tenants/client/Client.d.ts +24 -0
  35. package/api/resources/tenants/client/Client.js +135 -7
  36. package/api/resources/tenants/client/requests/GetTemplateListByTenantParams.d.ts +17 -0
  37. package/api/resources/tenants/client/requests/GetTemplateListByTenantParams.js +5 -0
  38. package/api/resources/tenants/client/requests/index.d.ts +1 -0
  39. package/api/resources/tenants/types/GetTemplateByTenantResponse.d.ts +6 -0
  40. package/api/resources/tenants/types/GetTemplateByTenantResponse.js +5 -0
  41. package/api/resources/tenants/types/ListTemplatesByTenantResponse.d.ts +23 -0
  42. package/api/resources/tenants/types/ListTemplatesByTenantResponse.js +5 -0
  43. package/api/resources/tenants/types/index.d.ts +2 -0
  44. package/api/resources/tenants/types/index.js +2 -0
  45. package/api/resources/translations/client/Client.js +2 -2
  46. package/api/resources/users/resources/preferences/client/Client.js +3 -3
  47. package/api/resources/users/resources/tenants/client/Client.js +5 -5
  48. package/api/resources/users/resources/tokens/client/Client.js +6 -6
  49. package/dist/Client.js +1 -1
  50. package/dist/api/resources/audiences/client/Client.js +5 -5
  51. package/dist/api/resources/auditEvents/client/Client.js +2 -2
  52. package/dist/api/resources/authTokens/client/Client.js +1 -1
  53. package/dist/api/resources/automations/client/Client.js +2 -2
  54. package/dist/api/resources/brands/client/Client.js +5 -5
  55. package/dist/api/resources/bulk/client/Client.js +5 -5
  56. package/dist/api/resources/commons/types/BaseTemplateTenantAssociation.d.ts +15 -0
  57. package/dist/api/resources/commons/types/BaseTemplateTenantAssociation.js +5 -0
  58. package/dist/api/resources/commons/types/ListTemplateTenantAssociation.d.ts +7 -0
  59. package/dist/api/resources/commons/types/ListTemplateTenantAssociation.js +5 -0
  60. package/dist/api/resources/commons/types/SingleTemplateTenantAssociation.d.ts +7 -0
  61. package/dist/api/resources/commons/types/SingleTemplateTenantAssociation.js +5 -0
  62. package/dist/api/resources/commons/types/TenantTemplateData.d.ts +11 -0
  63. package/dist/api/resources/commons/types/TenantTemplateData.js +5 -0
  64. package/dist/api/resources/commons/types/TenantTemplateDataNoContent.d.ts +10 -0
  65. package/dist/api/resources/commons/types/TenantTemplateDataNoContent.js +5 -0
  66. package/dist/api/resources/commons/types/index.d.ts +5 -0
  67. package/dist/api/resources/commons/types/index.js +5 -0
  68. package/dist/api/resources/inbound/client/Client.js +1 -1
  69. package/dist/api/resources/lists/client/Client.d.ts +3 -2
  70. package/dist/api/resources/lists/client/Client.js +17 -15
  71. package/dist/api/resources/lists/client/requests/RestoreListRequest.d.ts +9 -0
  72. package/dist/api/resources/lists/client/requests/RestoreListRequest.js +5 -0
  73. package/dist/api/resources/lists/client/requests/index.d.ts +1 -0
  74. package/dist/api/resources/lists/types/List.d.ts +2 -2
  75. package/dist/api/resources/messages/client/Client.js +6 -6
  76. package/dist/api/resources/messages/types/Reason.d.ts +13 -1
  77. package/dist/api/resources/messages/types/Reason.js +3 -0
  78. package/dist/api/resources/notifications/client/Client.js +6 -6
  79. package/dist/api/resources/profiles/client/Client.js +8 -8
  80. package/dist/api/resources/templates/client/Client.js +1 -1
  81. package/dist/api/resources/tenants/client/Client.d.ts +24 -0
  82. package/dist/api/resources/tenants/client/Client.js +135 -7
  83. package/dist/api/resources/tenants/client/requests/GetTemplateListByTenantParams.d.ts +17 -0
  84. package/dist/api/resources/tenants/client/requests/GetTemplateListByTenantParams.js +5 -0
  85. package/dist/api/resources/tenants/client/requests/index.d.ts +1 -0
  86. package/dist/api/resources/tenants/types/GetTemplateByTenantResponse.d.ts +6 -0
  87. package/dist/api/resources/tenants/types/GetTemplateByTenantResponse.js +5 -0
  88. package/dist/api/resources/tenants/types/ListTemplatesByTenantResponse.d.ts +23 -0
  89. package/dist/api/resources/tenants/types/ListTemplatesByTenantResponse.js +5 -0
  90. package/dist/api/resources/tenants/types/index.d.ts +2 -0
  91. package/dist/api/resources/tenants/types/index.js +2 -0
  92. package/dist/api/resources/translations/client/Client.js +2 -2
  93. package/dist/api/resources/users/resources/preferences/client/Client.js +3 -3
  94. package/dist/api/resources/users/resources/tenants/client/Client.js +5 -5
  95. package/dist/api/resources/users/resources/tokens/client/Client.js +6 -6
  96. package/dist/version.d.ts +1 -1
  97. package/dist/version.js +1 -1
  98. package/package.json +1 -1
  99. package/reference.md +122 -2
  100. package/version.d.ts +1 -1
  101. package/version.js +1 -1
@@ -135,7 +135,7 @@ class Messages {
135
135
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
136
136
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, "messages"),
137
137
  method: "GET",
138
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.4.2", "User-Agent": "@trycourier/courier/6.4.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
138
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
139
139
  contentType: "application/json",
140
140
  queryParameters: _queryParams,
141
141
  requestType: "json",
@@ -191,7 +191,7 @@ class Messages {
191
191
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
192
192
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, `messages/${encodeURIComponent(messageId)}`),
193
193
  method: "GET",
194
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.4.2", "User-Agent": "@trycourier/courier/6.4.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
194
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
195
195
  contentType: "application/json",
196
196
  requestType: "json",
197
197
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -250,7 +250,7 @@ class Messages {
250
250
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
251
251
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, `messages/${encodeURIComponent(messageId)}/cancel`),
252
252
  method: "POST",
253
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.4.2", "User-Agent": "@trycourier/courier/6.4.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined, "X-Idempotency-Expiration": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry : undefined }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
253
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined, "X-Idempotency-Expiration": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry : undefined }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
254
254
  contentType: "application/json",
255
255
  requestType: "json",
256
256
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -311,7 +311,7 @@ class Messages {
311
311
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
312
312
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, `messages/${encodeURIComponent(messageId)}/history`),
313
313
  method: "GET",
314
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.4.2", "User-Agent": "@trycourier/courier/6.4.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
314
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
315
315
  contentType: "application/json",
316
316
  queryParameters: _queryParams,
317
317
  requestType: "json",
@@ -372,7 +372,7 @@ class Messages {
372
372
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
373
373
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, `messages/${encodeURIComponent(messageId)}/output`),
374
374
  method: "GET",
375
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.4.2", "User-Agent": "@trycourier/courier/6.4.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
375
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
376
376
  contentType: "application/json",
377
377
  requestType: "json",
378
378
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -429,7 +429,7 @@ class Messages {
429
429
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
430
430
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, `requests/${encodeURIComponent(requestId)}/archive`),
431
431
  method: "PUT",
432
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.4.2", "User-Agent": "@trycourier/courier/6.4.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
432
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
433
433
  contentType: "application/json",
434
434
  requestType: "json",
435
435
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -2,15 +2,24 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  export type Reason =
5
+ /**
6
+ * The message bounced and was not delivered. */
7
+ "BOUNCED"
8
+ /**
9
+ * The message failed to be delivered. */
10
+ | "FAILED"
5
11
  /**
6
12
  * The recipient did not receive the notification because of a condition that passed. */
7
- "FILTERED"
13
+ | "FILTERED"
8
14
  /**
9
15
  * The notification did not contain any valid channels. */
10
16
  | "NO_CHANNELS"
11
17
  /**
12
18
  * The notification did not contain a configured provider for a channel. */
13
19
  | "NO_PROVIDERS"
20
+ /**
21
+ * The recipient has not opted in to receive this type of notification. */
22
+ | "OPT_IN_REQUIRED"
14
23
  /**
15
24
  * The Integration provider had an error when sending a notification. */
16
25
  | "PROVIDER_ERROR"
@@ -21,9 +30,12 @@ export type Reason =
21
30
  * The recipient did not receive the notification because they chose to unsubscribe from it. */
22
31
  | "UNSUBSCRIBED";
23
32
  export declare const Reason: {
33
+ readonly Bounced: "BOUNCED";
34
+ readonly Failed: "FAILED";
24
35
  readonly Filtered: "FILTERED";
25
36
  readonly NoChannels: "NO_CHANNELS";
26
37
  readonly NoProviders: "NO_PROVIDERS";
38
+ readonly OptInRequired: "OPT_IN_REQUIRED";
27
39
  readonly ProviderError: "PROVIDER_ERROR";
28
40
  readonly Unpublished: "UNPUBLISHED";
29
41
  readonly Unsubscribed: "UNSUBSCRIBED";
@@ -5,9 +5,12 @@
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.Reason = void 0;
7
7
  exports.Reason = {
8
+ Bounced: "BOUNCED",
9
+ Failed: "FAILED",
8
10
  Filtered: "FILTERED",
9
11
  NoChannels: "NO_CHANNELS",
10
12
  NoProviders: "NO_PROVIDERS",
13
+ OptInRequired: "OPT_IN_REQUIRED",
11
14
  ProviderError: "PROVIDER_ERROR",
12
15
  Unpublished: "UNPUBLISHED",
13
16
  Unsubscribed: "UNSUBSCRIBED",
@@ -81,7 +81,7 @@ class Notifications {
81
81
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
82
82
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, "/notifications"),
83
83
  method: "GET",
84
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.4.2", "User-Agent": "@trycourier/courier/6.4.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
84
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
85
85
  contentType: "application/json",
86
86
  queryParameters: _queryParams,
87
87
  requestType: "json",
@@ -132,7 +132,7 @@ class Notifications {
132
132
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
133
133
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, `/notifications/${encodeURIComponent(id)}/content`),
134
134
  method: "GET",
135
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.4.2", "User-Agent": "@trycourier/courier/6.4.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
135
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
136
136
  contentType: "application/json",
137
137
  requestType: "json",
138
138
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -185,7 +185,7 @@ class Notifications {
185
185
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
186
186
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, `/notifications/${encodeURIComponent(id)}/draft/content`),
187
187
  method: "GET",
188
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.4.2", "User-Agent": "@trycourier/courier/6.4.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
188
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
189
189
  contentType: "application/json",
190
190
  requestType: "json",
191
191
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -239,7 +239,7 @@ class Notifications {
239
239
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
240
240
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, `/notifications/${encodeURIComponent(id)}/${encodeURIComponent(submissionId)}/checks`),
241
241
  method: "GET",
242
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.4.2", "User-Agent": "@trycourier/courier/6.4.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
242
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
243
243
  contentType: "application/json",
244
244
  requestType: "json",
245
245
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -301,7 +301,7 @@ class Notifications {
301
301
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
302
302
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, `/notifications/${encodeURIComponent(id)}/${encodeURIComponent(submissionId)}/checks`),
303
303
  method: "PUT",
304
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.4.2", "User-Agent": "@trycourier/courier/6.4.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
304
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
305
305
  contentType: "application/json",
306
306
  requestType: "json",
307
307
  body: request,
@@ -356,7 +356,7 @@ class Notifications {
356
356
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
357
357
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, `/notifications/${encodeURIComponent(id)}/${encodeURIComponent(submissionId)}/checks`),
358
358
  method: "DELETE",
359
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.4.2", "User-Agent": "@trycourier/courier/6.4.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
359
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
360
360
  contentType: "application/json",
361
361
  requestType: "json",
362
362
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -78,7 +78,7 @@ class Profiles {
78
78
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
79
79
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, `/profiles/${encodeURIComponent(userId)}`),
80
80
  method: "GET",
81
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.4.2", "User-Agent": "@trycourier/courier/6.4.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
81
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
82
82
  contentType: "application/json",
83
83
  requestType: "json",
84
84
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -144,7 +144,7 @@ class Profiles {
144
144
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
145
145
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, `/profiles/${encodeURIComponent(userId)}`),
146
146
  method: "POST",
147
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.4.2", "User-Agent": "@trycourier/courier/6.4.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined, "X-Idempotency-Expiration": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry : undefined }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
147
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined, "X-Idempotency-Expiration": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry : undefined }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
148
148
  contentType: "application/json",
149
149
  requestType: "json",
150
150
  body: request,
@@ -214,7 +214,7 @@ class Profiles {
214
214
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
215
215
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, `/profiles/${encodeURIComponent(userId)}`),
216
216
  method: "PUT",
217
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.4.2", "User-Agent": "@trycourier/courier/6.4.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
217
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
218
218
  contentType: "application/json",
219
219
  requestType: "json",
220
220
  body: request,
@@ -281,7 +281,7 @@ class Profiles {
281
281
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
282
282
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, `/profiles/${encodeURIComponent(userId)}`),
283
283
  method: "PATCH",
284
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.4.2", "User-Agent": "@trycourier/courier/6.4.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
284
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
285
285
  contentType: "application/json",
286
286
  requestType: "json",
287
287
  body: request,
@@ -336,7 +336,7 @@ class Profiles {
336
336
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
337
337
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, `/profiles/${encodeURIComponent(userId)}`),
338
338
  method: "DELETE",
339
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.4.2", "User-Agent": "@trycourier/courier/6.4.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
339
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
340
340
  contentType: "application/json",
341
341
  requestType: "json",
342
342
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -401,7 +401,7 @@ class Profiles {
401
401
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
402
402
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, `/profiles/${encodeURIComponent(userId)}/lists`),
403
403
  method: "GET",
404
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.4.2", "User-Agent": "@trycourier/courier/6.4.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
404
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
405
405
  contentType: "application/json",
406
406
  queryParameters: _queryParams,
407
407
  requestType: "json",
@@ -470,7 +470,7 @@ class Profiles {
470
470
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
471
471
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, `/profiles/${encodeURIComponent(userId)}/lists`),
472
472
  method: "POST",
473
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.4.2", "User-Agent": "@trycourier/courier/6.4.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined, "X-Idempotency-Expiration": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry : undefined }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
473
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined, "X-Idempotency-Expiration": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry : undefined }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
474
474
  contentType: "application/json",
475
475
  requestType: "json",
476
476
  body: request,
@@ -530,7 +530,7 @@ class Profiles {
530
530
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
531
531
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, `/profiles/${encodeURIComponent(userId)}/lists`),
532
532
  method: "DELETE",
533
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.4.2", "User-Agent": "@trycourier/courier/6.4.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
533
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
534
534
  contentType: "application/json",
535
535
  requestType: "json",
536
536
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -80,7 +80,7 @@ class Templates {
80
80
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
81
81
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, "/notifications"),
82
82
  method: "GET",
83
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.4.2", "User-Agent": "@trycourier/courier/6.4.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
83
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
84
84
  contentType: "application/json",
85
85
  queryParameters: _queryParams,
86
86
  requestType: "json",
@@ -111,5 +111,29 @@ export declare class Tenants {
111
111
  */
112
112
  removeDefaultPreferencesForTopic(tenantId: string, topicId: string, requestOptions?: Tenants.RequestOptions): core.HttpResponsePromise<void>;
113
113
  private __removeDefaultPreferencesForTopic;
114
+ /**
115
+ * @param {string} tenantId - Id of the tenant for which to retrieve the template.
116
+ * @param {string} templateId - Id of the template to be retrieved.
117
+ * @param {Tenants.RequestOptions} requestOptions - Request-specific configuration.
118
+ *
119
+ * @throws {@link Courier.BadRequestError}
120
+ *
121
+ * @example
122
+ * await client.tenants.getTemplateByTenant("tenant_id", "template_id")
123
+ */
124
+ getTemplateByTenant(tenantId: string, templateId: string, requestOptions?: Tenants.RequestOptions): core.HttpResponsePromise<Courier.GetTemplateByTenantResponse>;
125
+ private __getTemplateByTenant;
126
+ /**
127
+ * @param {string} tenantId - Id of the tenant for which to retrieve the templates.
128
+ * @param {Courier.GetTemplateListByTenantParams} request
129
+ * @param {Tenants.RequestOptions} requestOptions - Request-specific configuration.
130
+ *
131
+ * @throws {@link Courier.BadRequestError}
132
+ *
133
+ * @example
134
+ * await client.tenants.getTemplateListByTenant("tenant_id")
135
+ */
136
+ getTemplateListByTenant(tenantId: string, request?: Courier.GetTemplateListByTenantParams, requestOptions?: Tenants.RequestOptions): core.HttpResponsePromise<Courier.ListTemplatesByTenantResponse>;
137
+ private __getTemplateListByTenant;
114
138
  protected _getAuthorizationHeader(): Promise<string>;
115
139
  }
@@ -84,7 +84,7 @@ class Tenants {
84
84
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
85
85
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, `/tenants/${encodeURIComponent(tenantId)}`),
86
86
  method: "PUT",
87
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.4.2", "User-Agent": "@trycourier/courier/6.4.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
87
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
88
88
  contentType: "application/json",
89
89
  requestType: "json",
90
90
  body: request,
@@ -142,7 +142,7 @@ class Tenants {
142
142
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
143
143
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, `/tenants/${encodeURIComponent(tenantId)}`),
144
144
  method: "GET",
145
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.4.2", "User-Agent": "@trycourier/courier/6.4.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
145
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
146
146
  contentType: "application/json",
147
147
  requestType: "json",
148
148
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -208,7 +208,7 @@ class Tenants {
208
208
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
209
209
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, "/tenants"),
210
210
  method: "GET",
211
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.4.2", "User-Agent": "@trycourier/courier/6.4.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
211
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
212
212
  contentType: "application/json",
213
213
  queryParameters: _queryParams,
214
214
  requestType: "json",
@@ -259,7 +259,7 @@ class Tenants {
259
259
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
260
260
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, `/tenants/${encodeURIComponent(tenantId)}`),
261
261
  method: "DELETE",
262
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.4.2", "User-Agent": "@trycourier/courier/6.4.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
262
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
263
263
  contentType: "application/json",
264
264
  requestType: "json",
265
265
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -320,7 +320,7 @@ class Tenants {
320
320
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
321
321
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, `/tenants/${encodeURIComponent(tenantId)}/users`),
322
322
  method: "GET",
323
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.4.2", "User-Agent": "@trycourier/courier/6.4.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
323
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
324
324
  contentType: "application/json",
325
325
  queryParameters: _queryParams,
326
326
  requestType: "json",
@@ -382,7 +382,7 @@ class Tenants {
382
382
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
383
383
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, `/tenants/${encodeURIComponent(tenantId)}/default_preferences/items/${encodeURIComponent(topicId)}`),
384
384
  method: "PUT",
385
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.4.2", "User-Agent": "@trycourier/courier/6.4.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
385
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
386
386
  contentType: "application/json",
387
387
  requestType: "json",
388
388
  body: request,
@@ -434,7 +434,7 @@ class Tenants {
434
434
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
435
435
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, `/tenants/${encodeURIComponent(tenantId)}/default_preferences/items/${encodeURIComponent(topicId)}`),
436
436
  method: "DELETE",
437
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.4.2", "User-Agent": "@trycourier/courier/6.4.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
437
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
438
438
  contentType: "application/json",
439
439
  requestType: "json",
440
440
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -468,6 +468,134 @@ class Tenants {
468
468
  }
469
469
  });
470
470
  }
471
+ /**
472
+ * @param {string} tenantId - Id of the tenant for which to retrieve the template.
473
+ * @param {string} templateId - Id of the template to be retrieved.
474
+ * @param {Tenants.RequestOptions} requestOptions - Request-specific configuration.
475
+ *
476
+ * @throws {@link Courier.BadRequestError}
477
+ *
478
+ * @example
479
+ * await client.tenants.getTemplateByTenant("tenant_id", "template_id")
480
+ */
481
+ getTemplateByTenant(tenantId, templateId, requestOptions) {
482
+ return core.HttpResponsePromise.fromPromise(this.__getTemplateByTenant(tenantId, templateId, requestOptions));
483
+ }
484
+ __getTemplateByTenant(tenantId, templateId, requestOptions) {
485
+ return __awaiter(this, void 0, void 0, function* () {
486
+ var _a, _b, _c;
487
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
488
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, `/tenants/${encodeURIComponent(tenantId)}/templates/${encodeURIComponent(templateId)}`),
489
+ method: "GET",
490
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
491
+ contentType: "application/json",
492
+ requestType: "json",
493
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
494
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
495
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
496
+ });
497
+ if (_response.ok) {
498
+ return { data: _response.body, rawResponse: _response.rawResponse };
499
+ }
500
+ if (_response.error.reason === "status-code") {
501
+ switch (_response.error.statusCode) {
502
+ case 400:
503
+ throw new Courier.BadRequestError(_response.error.body, _response.rawResponse);
504
+ default:
505
+ throw new errors.CourierError({
506
+ statusCode: _response.error.statusCode,
507
+ body: _response.error.body,
508
+ rawResponse: _response.rawResponse,
509
+ });
510
+ }
511
+ }
512
+ switch (_response.error.reason) {
513
+ case "non-json":
514
+ throw new errors.CourierError({
515
+ statusCode: _response.error.statusCode,
516
+ body: _response.error.rawBody,
517
+ rawResponse: _response.rawResponse,
518
+ });
519
+ case "timeout":
520
+ throw new errors.CourierTimeoutError("Timeout exceeded when calling GET /tenants/{tenant_id}/templates/{template_id}.");
521
+ case "unknown":
522
+ throw new errors.CourierError({
523
+ message: _response.error.errorMessage,
524
+ rawResponse: _response.rawResponse,
525
+ });
526
+ }
527
+ });
528
+ }
529
+ /**
530
+ * @param {string} tenantId - Id of the tenant for which to retrieve the templates.
531
+ * @param {Courier.GetTemplateListByTenantParams} request
532
+ * @param {Tenants.RequestOptions} requestOptions - Request-specific configuration.
533
+ *
534
+ * @throws {@link Courier.BadRequestError}
535
+ *
536
+ * @example
537
+ * await client.tenants.getTemplateListByTenant("tenant_id")
538
+ */
539
+ getTemplateListByTenant(tenantId, request = {}, requestOptions) {
540
+ return core.HttpResponsePromise.fromPromise(this.__getTemplateListByTenant(tenantId, request, requestOptions));
541
+ }
542
+ __getTemplateListByTenant(tenantId_1) {
543
+ return __awaiter(this, arguments, void 0, function* (tenantId, request = {}, requestOptions) {
544
+ var _a, _b, _c;
545
+ const { limit, cursor } = request;
546
+ const _queryParams = {};
547
+ if (limit != null) {
548
+ _queryParams["limit"] = limit.toString();
549
+ }
550
+ if (cursor != null) {
551
+ _queryParams["cursor"] = cursor;
552
+ }
553
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
554
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CourierEnvironment.Production, `/tenants/${encodeURIComponent(tenantId)}/templates`),
555
+ method: "GET",
556
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@trycourier/courier", "X-Fern-SDK-Version": "6.5.0", "User-Agent": "@trycourier/courier/6.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
557
+ contentType: "application/json",
558
+ queryParameters: _queryParams,
559
+ requestType: "json",
560
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
561
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
562
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
563
+ });
564
+ if (_response.ok) {
565
+ return {
566
+ data: _response.body,
567
+ rawResponse: _response.rawResponse,
568
+ };
569
+ }
570
+ if (_response.error.reason === "status-code") {
571
+ switch (_response.error.statusCode) {
572
+ case 400:
573
+ throw new Courier.BadRequestError(_response.error.body, _response.rawResponse);
574
+ default:
575
+ throw new errors.CourierError({
576
+ statusCode: _response.error.statusCode,
577
+ body: _response.error.body,
578
+ rawResponse: _response.rawResponse,
579
+ });
580
+ }
581
+ }
582
+ switch (_response.error.reason) {
583
+ case "non-json":
584
+ throw new errors.CourierError({
585
+ statusCode: _response.error.statusCode,
586
+ body: _response.error.rawBody,
587
+ rawResponse: _response.rawResponse,
588
+ });
589
+ case "timeout":
590
+ throw new errors.CourierTimeoutError("Timeout exceeded when calling GET /tenants/{tenant_id}/templates.");
591
+ case "unknown":
592
+ throw new errors.CourierError({
593
+ message: _response.error.errorMessage,
594
+ rawResponse: _response.rawResponse,
595
+ });
596
+ }
597
+ });
598
+ }
471
599
  _getAuthorizationHeader() {
472
600
  return __awaiter(this, void 0, void 0, function* () {
473
601
  var _a;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {}
7
+ */
8
+ export interface GetTemplateListByTenantParams {
9
+ /**
10
+ * The number of templates to return (defaults to 20, maximum value of 100)
11
+ */
12
+ limit?: number;
13
+ /**
14
+ * Continue the pagination with the next cursor
15
+ */
16
+ cursor?: string;
17
+ }
@@ -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 });
@@ -1,3 +1,4 @@
1
1
  export { type TenantCreateOrReplaceParams } from "./TenantCreateOrReplaceParams";
2
2
  export { type ListTenantParams } from "./ListTenantParams";
3
3
  export { type ListUsersForTenantParams } from "./ListUsersForTenantParams";
4
+ export { type GetTemplateListByTenantParams } from "./GetTemplateListByTenantParams";
@@ -0,0 +1,6 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Courier from "../../../index";
5
+ export interface GetTemplateByTenantResponse extends Courier.SingleTemplateTenantAssociation {
6
+ }
@@ -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,23 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Courier from "../../../index";
5
+ export interface ListTemplatesByTenantResponse {
6
+ items?: Courier.ListTemplateTenantAssociation[];
7
+ /** Set to true when there are more pages that can be retrieved. */
8
+ has_more: boolean;
9
+ /** A url that may be used to generate these results. */
10
+ url: string;
11
+ /**
12
+ * A url that may be used to generate fetch the next set of results.
13
+ * Defined only when `has_more` is set to true
14
+ */
15
+ next_url?: string;
16
+ /**
17
+ * A pointer to the next page of results. Defined
18
+ * only when `has_more` is set to true
19
+ */
20
+ cursor?: string;
21
+ /** Always set to `list`. Represents the type of this object. */
22
+ type: "list";
23
+ }
@@ -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 });