@trycourier/courier 6.0.8 → 6.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (176) hide show
  1. package/Client.js +1 -1
  2. package/README.md +5 -5
  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.d.ts +15 -0
  7. package/api/resources/automations/client/Client.js +17 -2
  8. package/{dist/api/resources/lists/types/ListGetSubscriptionsParams.d.ts → api/resources/automations/types/AccessorType.d.ts} +2 -2
  9. package/api/resources/automations/types/AutomationAddToBatchMaxItemsType.d.ts +4 -0
  10. package/api/resources/automations/types/AutomationAddToBatchRetain.d.ts +34 -0
  11. package/api/resources/automations/types/AutomationAddToBatchRetainType.d.ts +10 -0
  12. package/api/resources/automations/types/AutomationAddToBatchRetainType.js +12 -0
  13. package/api/resources/automations/types/AutomationAddToBatchScope.d.ts +9 -0
  14. package/api/resources/automations/types/AutomationAddToBatchScope.js +11 -0
  15. package/api/resources/automations/types/AutomationAddToBatchStep.d.ts +39 -0
  16. package/api/resources/automations/types/AutomationAddToDigestStep.d.ts +16 -0
  17. package/api/resources/automations/types/AutomationDelayStep.d.ts +3 -0
  18. package/api/resources/automations/types/AutomationFetchDataStep.d.ts +31 -0
  19. package/api/resources/automations/types/AutomationFetchDataWebhook.d.ts +11 -0
  20. package/api/resources/automations/types/AutomationFetchDataWebhookMethod.d.ts +8 -0
  21. package/api/resources/automations/types/AutomationFetchDataWebhookMethod.js +10 -0
  22. package/api/resources/automations/types/AutomationStepOption.d.ts +1 -1
  23. package/api/resources/automations/types/AutomationThrottleOnThrottle.d.ts +7 -0
  24. package/api/resources/automations/types/AutomationThrottleScope.d.ts +9 -0
  25. package/api/resources/automations/types/AutomationThrottleScope.js +11 -0
  26. package/api/resources/automations/types/AutomationThrottleStep.d.ts +31 -0
  27. package/api/resources/automations/types/index.d.ts +13 -1
  28. package/api/resources/automations/types/index.js +13 -1
  29. package/api/resources/brands/client/Client.js +5 -5
  30. package/api/resources/bulk/client/Client.js +5 -5
  31. package/api/resources/lists/client/Client.d.ts +1 -1
  32. package/api/resources/lists/client/Client.js +11 -20
  33. package/api/resources/lists/client/requests/index.d.ts +0 -1
  34. package/api/resources/lists/types/index.d.ts +0 -5
  35. package/api/resources/lists/types/index.js +0 -5
  36. package/api/resources/messages/client/Client.js +42 -12
  37. package/api/resources/messages/client/requests/ListMessagesRequest.d.ts +23 -3
  38. package/api/resources/messages/types/MessageStatus.d.ts +4 -0
  39. package/api/resources/messages/types/MessageStatus.js +1 -0
  40. package/api/resources/notifications/client/Client.js +8 -8
  41. package/api/resources/profiles/client/Client.js +7 -7
  42. package/api/resources/send/types/BaseMessageSendTo.d.ts +8 -0
  43. package/api/resources/send/types/ContentMessage.d.ts +1 -3
  44. package/api/resources/send/types/Recipient.d.ts +1 -1
  45. package/api/resources/{lists/types/ListFindByRecipientIdParams.d.ts → send/types/RecipientData.d.ts} +1 -3
  46. package/api/resources/send/types/TemplateMessage.d.ts +1 -3
  47. package/api/resources/send/types/index.d.ts +2 -0
  48. package/api/resources/send/types/index.js +2 -0
  49. package/api/resources/templates/client/Client.js +1 -1
  50. package/api/resources/tenants/client/Client.d.ts +2 -2
  51. package/api/resources/tenants/client/Client.js +25 -7
  52. package/api/resources/tenants/client/requests/ListTenantParams.d.ts +14 -0
  53. package/api/resources/tenants/client/requests/ListUsersForTenantParams.d.ts +14 -0
  54. package/api/resources/tenants/client/requests/ListUsersForTenantParams.js +5 -0
  55. package/api/resources/tenants/client/requests/index.d.ts +2 -0
  56. package/api/resources/tenants/types/ListUsersForTenantResponse.d.ts +1 -1
  57. package/api/resources/translations/client/Client.js +2 -2
  58. package/api/resources/users/resources/preferences/client/Client.d.ts +9 -0
  59. package/api/resources/users/resources/preferences/client/Client.js +12 -3
  60. package/api/resources/users/resources/preferences/client/requests/UserPreferencesUpdateParams.d.ts +11 -5
  61. package/api/resources/users/resources/preferences/types/TopicPreferenceUpdate.d.ts +10 -0
  62. package/api/resources/users/resources/preferences/types/TopicPreferenceUpdate.js +5 -0
  63. package/api/resources/users/resources/preferences/types/index.d.ts +1 -0
  64. package/api/resources/users/resources/preferences/types/index.js +1 -0
  65. package/api/resources/users/resources/tenants/client/Client.js +8 -8
  66. package/api/resources/users/resources/tenants/client/requests/ListTenantsForUserParams.d.ts +2 -2
  67. package/api/resources/users/resources/tenants/types/ListTenantsForUserResponse.d.ts +1 -1
  68. package/api/resources/users/resources/tokens/client/Client.js +5 -5
  69. package/core/fetcher/Fetcher.js +3 -5
  70. package/dist/Client.js +1 -1
  71. package/dist/api/resources/audiences/client/Client.js +5 -5
  72. package/dist/api/resources/auditEvents/client/Client.js +2 -2
  73. package/dist/api/resources/authTokens/client/Client.js +1 -1
  74. package/dist/api/resources/automations/client/Client.d.ts +15 -0
  75. package/dist/api/resources/automations/client/Client.js +17 -2
  76. package/{api/resources/lists/types/ListGetSubscriptionsParams.d.ts → dist/api/resources/automations/types/AccessorType.d.ts} +2 -2
  77. package/dist/api/resources/automations/types/AccessorType.js +5 -0
  78. package/dist/api/resources/automations/types/AutomationAddToBatchMaxItemsType.d.ts +4 -0
  79. package/dist/api/resources/automations/types/AutomationAddToBatchMaxItemsType.js +5 -0
  80. package/dist/api/resources/automations/types/AutomationAddToBatchRetain.d.ts +34 -0
  81. package/dist/api/resources/automations/types/AutomationAddToBatchRetain.js +5 -0
  82. package/dist/api/resources/automations/types/AutomationAddToBatchRetainType.d.ts +10 -0
  83. package/dist/api/resources/automations/types/AutomationAddToBatchRetainType.js +12 -0
  84. package/dist/api/resources/automations/types/AutomationAddToBatchScope.d.ts +9 -0
  85. package/dist/api/resources/automations/types/AutomationAddToBatchScope.js +11 -0
  86. package/dist/api/resources/automations/types/AutomationAddToBatchStep.d.ts +39 -0
  87. package/dist/api/resources/automations/types/AutomationAddToBatchStep.js +5 -0
  88. package/dist/api/resources/automations/types/AutomationAddToDigestStep.d.ts +16 -0
  89. package/dist/api/resources/automations/types/AutomationAddToDigestStep.js +5 -0
  90. package/dist/api/resources/automations/types/AutomationDelayStep.d.ts +3 -0
  91. package/dist/api/resources/automations/types/AutomationFetchDataStep.d.ts +31 -0
  92. package/dist/api/resources/automations/types/AutomationFetchDataStep.js +5 -0
  93. package/dist/api/resources/automations/types/AutomationFetchDataWebhook.d.ts +11 -0
  94. package/dist/api/resources/automations/types/AutomationFetchDataWebhook.js +5 -0
  95. package/dist/api/resources/automations/types/AutomationFetchDataWebhookMethod.d.ts +8 -0
  96. package/dist/api/resources/automations/types/AutomationFetchDataWebhookMethod.js +10 -0
  97. package/dist/api/resources/automations/types/AutomationStepOption.d.ts +1 -1
  98. package/dist/api/resources/automations/types/AutomationThrottleOnThrottle.d.ts +7 -0
  99. package/dist/api/resources/automations/types/AutomationThrottleOnThrottle.js +5 -0
  100. package/dist/api/resources/automations/types/AutomationThrottleScope.d.ts +9 -0
  101. package/dist/api/resources/automations/types/AutomationThrottleScope.js +11 -0
  102. package/dist/api/resources/automations/types/AutomationThrottleStep.d.ts +31 -0
  103. package/dist/api/resources/automations/types/AutomationThrottleStep.js +5 -0
  104. package/dist/api/resources/automations/types/index.d.ts +13 -1
  105. package/dist/api/resources/automations/types/index.js +13 -1
  106. package/dist/api/resources/brands/client/Client.js +5 -5
  107. package/dist/api/resources/bulk/client/Client.js +5 -5
  108. package/dist/api/resources/lists/client/Client.d.ts +1 -1
  109. package/dist/api/resources/lists/client/Client.js +11 -20
  110. package/dist/api/resources/lists/client/requests/index.d.ts +0 -1
  111. package/dist/api/resources/lists/types/index.d.ts +0 -5
  112. package/dist/api/resources/lists/types/index.js +0 -5
  113. package/dist/api/resources/messages/client/Client.js +42 -12
  114. package/dist/api/resources/messages/client/requests/ListMessagesRequest.d.ts +23 -3
  115. package/dist/api/resources/messages/types/MessageStatus.d.ts +4 -0
  116. package/dist/api/resources/messages/types/MessageStatus.js +1 -0
  117. package/dist/api/resources/notifications/client/Client.js +8 -8
  118. package/dist/api/resources/profiles/client/Client.js +7 -7
  119. package/dist/api/resources/send/types/BaseMessageSendTo.d.ts +8 -0
  120. package/dist/api/resources/send/types/BaseMessageSendTo.js +5 -0
  121. package/dist/api/resources/send/types/ContentMessage.d.ts +1 -3
  122. package/dist/api/resources/send/types/Recipient.d.ts +1 -1
  123. package/dist/api/resources/{lists/types/ListFindByRecipientIdParams.d.ts → send/types/RecipientData.d.ts} +1 -3
  124. package/dist/api/resources/send/types/RecipientData.js +5 -0
  125. package/dist/api/resources/send/types/TemplateMessage.d.ts +1 -3
  126. package/dist/api/resources/send/types/index.d.ts +2 -0
  127. package/dist/api/resources/send/types/index.js +2 -0
  128. package/dist/api/resources/templates/client/Client.js +1 -1
  129. package/dist/api/resources/tenants/client/Client.d.ts +2 -2
  130. package/dist/api/resources/tenants/client/Client.js +25 -7
  131. package/dist/api/resources/tenants/client/requests/ListTenantParams.d.ts +14 -0
  132. package/dist/api/resources/tenants/client/requests/ListTenantParams.js +5 -0
  133. package/dist/api/resources/tenants/client/requests/ListUsersForTenantParams.d.ts +14 -0
  134. package/dist/api/resources/tenants/client/requests/ListUsersForTenantParams.js +5 -0
  135. package/dist/api/resources/tenants/client/requests/index.d.ts +2 -0
  136. package/dist/api/resources/tenants/types/ListUsersForTenantResponse.d.ts +1 -1
  137. package/dist/api/resources/translations/client/Client.js +2 -2
  138. package/dist/api/resources/users/resources/preferences/client/Client.d.ts +9 -0
  139. package/dist/api/resources/users/resources/preferences/client/Client.js +12 -3
  140. package/dist/api/resources/users/resources/preferences/client/requests/UserPreferencesUpdateParams.d.ts +11 -5
  141. package/dist/api/resources/users/resources/preferences/types/TopicPreferenceUpdate.d.ts +10 -0
  142. package/dist/api/resources/users/resources/preferences/types/TopicPreferenceUpdate.js +5 -0
  143. package/dist/api/resources/users/resources/preferences/types/index.d.ts +1 -0
  144. package/dist/api/resources/users/resources/preferences/types/index.js +1 -0
  145. package/dist/api/resources/users/resources/tenants/client/Client.js +8 -8
  146. package/dist/api/resources/users/resources/tenants/client/requests/ListTenantsForUserParams.d.ts +2 -2
  147. package/dist/api/resources/users/resources/tenants/types/ListTenantsForUserResponse.d.ts +1 -1
  148. package/dist/api/resources/users/resources/tokens/client/Client.js +5 -5
  149. package/dist/core/fetcher/Fetcher.js +3 -5
  150. package/jest.config.js +5 -0
  151. package/package.json +6 -2
  152. package/tests/client.test.ts +11 -0
  153. package/api/resources/automations/types/AutomationStepAction.d.ts +0 -12
  154. package/api/resources/automations/types/AutomationStepAction.js +0 -14
  155. package/api/resources/lists/client/requests/GetListRequest.d.ts +0 -13
  156. package/api/resources/lists/types/ListFindByRecipientIdResponse.d.ts +0 -8
  157. package/api/resources/lists/types/ListGetAllParams.d.ts +0 -7
  158. package/api/resources/lists/types/RecipientSubscriptionsResponse.d.ts +0 -8
  159. package/dist/api/resources/automations/types/AutomationStepAction.d.ts +0 -12
  160. package/dist/api/resources/automations/types/AutomationStepAction.js +0 -14
  161. package/dist/api/resources/lists/client/requests/GetListRequest.d.ts +0 -13
  162. package/dist/api/resources/lists/types/ListFindByRecipientIdResponse.d.ts +0 -8
  163. package/dist/api/resources/lists/types/ListGetAllParams.d.ts +0 -7
  164. package/dist/api/resources/lists/types/RecipientSubscriptionsResponse.d.ts +0 -8
  165. /package/api/resources/{lists/client/requests/GetListRequest.js → automations/types/AccessorType.js} +0 -0
  166. /package/api/resources/{lists/types/ListFindByRecipientIdParams.js → automations/types/AutomationAddToBatchMaxItemsType.js} +0 -0
  167. /package/api/resources/{lists/types/ListFindByRecipientIdResponse.js → automations/types/AutomationAddToBatchRetain.js} +0 -0
  168. /package/api/resources/{lists/types/ListGetAllParams.js → automations/types/AutomationAddToBatchStep.js} +0 -0
  169. /package/api/resources/{lists/types/ListGetSubscriptionsParams.js → automations/types/AutomationAddToDigestStep.js} +0 -0
  170. /package/api/resources/{lists/types/RecipientSubscriptionsResponse.js → automations/types/AutomationFetchDataStep.js} +0 -0
  171. /package/{dist/api/resources/lists/client/requests/GetListRequest.js → api/resources/automations/types/AutomationFetchDataWebhook.js} +0 -0
  172. /package/{dist/api/resources/lists/types/ListFindByRecipientIdParams.js → api/resources/automations/types/AutomationThrottleOnThrottle.js} +0 -0
  173. /package/{dist/api/resources/lists/types/ListFindByRecipientIdResponse.js → api/resources/automations/types/AutomationThrottleStep.js} +0 -0
  174. /package/{dist/api/resources/lists/types/ListGetAllParams.js → api/resources/send/types/BaseMessageSendTo.js} +0 -0
  175. /package/{dist/api/resources/lists/types/ListGetSubscriptionsParams.js → api/resources/send/types/RecipientData.js} +0 -0
  176. /package/{dist/api/resources/lists/types/RecipientSubscriptionsResponse.js → api/resources/tenants/client/requests/ListTenantParams.js} +0 -0
package/Client.js CHANGED
@@ -74,7 +74,7 @@ class CourierClient {
74
74
  Authorization: yield this._getAuthorizationHeader(),
75
75
  "X-Fern-Language": "JavaScript",
76
76
  "X-Fern-SDK-Name": "@trycourier/courier",
77
- "X-Fern-SDK-Version": "v6.0.8",
77
+ "X-Fern-SDK-Version": "v6.1.1",
78
78
  "Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined,
79
79
  "X-Idempotency-Expiration": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry) != null
80
80
  ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry.toString()
package/README.md CHANGED
@@ -696,12 +696,12 @@ run();
696
696
 
697
697
  This package tries to use the native `fetch` client to make requests or falls back to a polyfill if the client doesn't exist in the environment it's running in.
698
698
 
699
- All network related promise rejections are not handled in any way. All successfully made requests that produce errors on the server side are resulting in promise rejections with custom `CourierHttpClientError` error type.
699
+ All network related promise rejections are not handled in any way. All successfully made requests that produce errors on the server side are resulting in promise rejections with custom `CourierError` error type.
700
700
 
701
- `CourierHttpClientError` extends native `Error` interface with two extra properties:
701
+ `CourierError` extends native `Error` interface with two extra properties:
702
702
 
703
- - `response`: this is the `fetch` response as is
704
- - `data`: this is the parsed body of the response
703
+ - `statusCode`: this is the status code of the response
704
+ - `body`: this is the body of the response
705
705
 
706
706
  ```javascript
707
707
  // Error handling example
@@ -714,7 +714,7 @@ try {
714
714
  } catch (error) {
715
715
  if (error instanceof CourierError) {
716
716
  console.log("Failed to send with status code:", error.statusCode);
717
- console.log("The Courier response is:", error.data);
717
+ console.log("The Courier body is:", error.body);
718
718
  console.log("The error message is:", error.message);
719
719
  } else {
720
720
  console.log(
@@ -61,7 +61,7 @@ class Audiences {
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.1",
65
65
  },
66
66
  contentType: "application/json",
67
67
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -104,7 +104,7 @@ class Audiences {
104
104
  Authorization: yield this._getAuthorizationHeader(),
105
105
  "X-Fern-Language": "JavaScript",
106
106
  "X-Fern-SDK-Name": "@trycourier/courier",
107
- "X-Fern-SDK-Version": "v6.0.8",
107
+ "X-Fern-SDK-Version": "v6.1.1",
108
108
  },
109
109
  contentType: "application/json",
110
110
  body: request,
@@ -148,7 +148,7 @@ class Audiences {
148
148
  Authorization: yield this._getAuthorizationHeader(),
149
149
  "X-Fern-Language": "JavaScript",
150
150
  "X-Fern-SDK-Name": "@trycourier/courier",
151
- "X-Fern-SDK-Version": "v6.0.8",
151
+ "X-Fern-SDK-Version": "v6.1.1",
152
152
  },
153
153
  contentType: "application/json",
154
154
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -197,7 +197,7 @@ class Audiences {
197
197
  Authorization: yield this._getAuthorizationHeader(),
198
198
  "X-Fern-Language": "JavaScript",
199
199
  "X-Fern-SDK-Name": "@trycourier/courier",
200
- "X-Fern-SDK-Version": "v6.0.8",
200
+ "X-Fern-SDK-Version": "v6.1.1",
201
201
  },
202
202
  contentType: "application/json",
203
203
  queryParameters: _queryParams,
@@ -252,7 +252,7 @@ class Audiences {
252
252
  Authorization: yield this._getAuthorizationHeader(),
253
253
  "X-Fern-Language": "JavaScript",
254
254
  "X-Fern-SDK-Name": "@trycourier/courier",
255
- "X-Fern-SDK-Version": "v6.0.8",
255
+ "X-Fern-SDK-Version": "v6.1.1",
256
256
  },
257
257
  contentType: "application/json",
258
258
  queryParameters: _queryParams,
@@ -65,7 +65,7 @@ class AuditEvents {
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.1",
69
69
  },
70
70
  contentType: "application/json",
71
71
  queryParameters: _queryParams,
@@ -109,7 +109,7 @@ class AuditEvents {
109
109
  Authorization: yield this._getAuthorizationHeader(),
110
110
  "X-Fern-Language": "JavaScript",
111
111
  "X-Fern-SDK-Name": "@trycourier/courier",
112
- "X-Fern-SDK-Version": "v6.0.8",
112
+ "X-Fern-SDK-Version": "v6.1.1",
113
113
  },
114
114
  contentType: "application/json",
115
115
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -60,7 +60,7 @@ class AuthTokens {
60
60
  Authorization: yield this._getAuthorizationHeader(),
61
61
  "X-Fern-Language": "JavaScript",
62
62
  "X-Fern-SDK-Name": "@trycourier/courier",
63
- "X-Fern-SDK-Version": "v6.0.8",
63
+ "X-Fern-SDK-Version": "v6.1.1",
64
64
  "Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined,
65
65
  "X-Idempotency-Expiration": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry) != null
66
66
  ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry.toString()
@@ -28,6 +28,21 @@ export declare class Automations {
28
28
  invokeAutomationTemplate(templateId: string, request: Courier.AutomationInvokeParams, requestOptions?: Automations.IdempotentRequestOptions): Promise<Courier.AutomationInvokeResponse>;
29
29
  /**
30
30
  * Invoke an ad hoc automation run. This endpoint accepts a JSON payload with a series of automation steps. For information about what steps are available, checkout the ad hoc automation guide [here](https://www.courier.com/docs/automations/steps/).
31
+ *
32
+ * @example
33
+ * await courier.automations.invokeAdHocAutomation({
34
+ * data: {
35
+ * "name": "Foo"
36
+ * },
37
+ * profile: {
38
+ * "tenant_id": "abc-123"
39
+ * },
40
+ * recipient: "user-yes",
41
+ * automation: {
42
+ * cancelation_token: "delay-send--user-yes--abc-123",
43
+ * steps: []
44
+ * }
45
+ * })
31
46
  */
32
47
  invokeAdHocAutomation(request: Courier.AutomationAdHocInvokeParams, requestOptions?: Automations.IdempotentRequestOptions): Promise<Courier.AutomationInvokeResponse>;
33
48
  protected _getAuthorizationHeader(): Promise<string>;
@@ -60,7 +60,7 @@ class Automations {
60
60
  Authorization: yield this._getAuthorizationHeader(),
61
61
  "X-Fern-Language": "JavaScript",
62
62
  "X-Fern-SDK-Name": "@trycourier/courier",
63
- "X-Fern-SDK-Version": "v6.0.8",
63
+ "X-Fern-SDK-Version": "v6.1.1",
64
64
  "Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined,
65
65
  "X-Idempotency-Expiration": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry) != null
66
66
  ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry.toString()
@@ -97,6 +97,21 @@ class Automations {
97
97
  }
98
98
  /**
99
99
  * Invoke an ad hoc automation run. This endpoint accepts a JSON payload with a series of automation steps. For information about what steps are available, checkout the ad hoc automation guide [here](https://www.courier.com/docs/automations/steps/).
100
+ *
101
+ * @example
102
+ * await courier.automations.invokeAdHocAutomation({
103
+ * data: {
104
+ * "name": "Foo"
105
+ * },
106
+ * profile: {
107
+ * "tenant_id": "abc-123"
108
+ * },
109
+ * recipient: "user-yes",
110
+ * automation: {
111
+ * cancelation_token: "delay-send--user-yes--abc-123",
112
+ * steps: []
113
+ * }
114
+ * })
100
115
  */
101
116
  invokeAdHocAutomation(request, requestOptions) {
102
117
  var _a, _b;
@@ -108,7 +123,7 @@ class Automations {
108
123
  Authorization: yield this._getAuthorizationHeader(),
109
124
  "X-Fern-Language": "JavaScript",
110
125
  "X-Fern-SDK-Name": "@trycourier/courier",
111
- "X-Fern-SDK-Version": "v6.0.8",
126
+ "X-Fern-SDK-Version": "v6.1.1",
112
127
  "Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined,
113
128
  "X-Idempotency-Expiration": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry) != null
114
129
  ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry.toString()
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export interface ListGetSubscriptionsParams {
5
- cursor?: string;
4
+ export interface AccessorType {
5
+ $ref: string;
6
6
  }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export declare type AutomationAddToBatchMaxItemsType = string | number;
@@ -0,0 +1,34 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Courier from "../../..";
5
+ /**
6
+ * Defines what items should be retained and passed along to the next steps when the batch is released
7
+ *
8
+ * @example
9
+ * {
10
+ * type: Courier.AutomationAddToBatchRetainType.Highest,
11
+ * count: 10,
12
+ * sort_key: "refs.data.my_custom_scoring"
13
+ * }
14
+ *
15
+ * @example
16
+ * {
17
+ * type: Courier.AutomationAddToBatchRetainType.Last,
18
+ * count: 10
19
+ * }
20
+ */
21
+ export interface AutomationAddToBatchRetain {
22
+ /**
23
+ * Keep N number of notifications based on the type. First/Last N based on notification received.
24
+ * highest/lowest based on a scoring key providing in the data accessed by sort_key
25
+ */
26
+ type: Courier.AutomationAddToBatchRetainType;
27
+ /**
28
+ * The number of records to keep in batch. Default is 10 and only configurable by requesting from support.
29
+ * When configurable minimum is 2 and maximum is 100.
30
+ */
31
+ count: number;
32
+ /** Defines the data value data[sort_key] that is used to sort the stored items. Required when type is set to highest or lowest. */
33
+ sort_key?: string;
34
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export declare type AutomationAddToBatchRetainType = "first" | "last" | "highest" | "lowest";
5
+ export declare const AutomationAddToBatchRetainType: {
6
+ readonly First: "first";
7
+ readonly Last: "last";
8
+ readonly Highest: "highest";
9
+ readonly Lowest: "lowest";
10
+ };
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.AutomationAddToBatchRetainType = void 0;
7
+ exports.AutomationAddToBatchRetainType = {
8
+ First: "first",
9
+ Last: "last",
10
+ Highest: "highest",
11
+ Lowest: "lowest",
12
+ };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export declare type AutomationAddToBatchScope = "user" | "global" | "dynamic";
5
+ export declare const AutomationAddToBatchScope: {
6
+ readonly User: "user";
7
+ readonly Global: "global";
8
+ readonly Dynamic: "dynamic";
9
+ };
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.AutomationAddToBatchScope = void 0;
7
+ exports.AutomationAddToBatchScope = {
8
+ User: "user",
9
+ Global: "global",
10
+ Dynamic: "dynamic",
11
+ };
@@ -0,0 +1,39 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Courier from "../../..";
5
+ /**
6
+ * @example
7
+ * {
8
+ * action: "add-to-batch",
9
+ * wait_period: "PT5M",
10
+ * max_wait_period: "PT1H",
11
+ * retain: {
12
+ * type: Courier.AutomationAddToBatchRetainType.Highest,
13
+ * count: 10,
14
+ * sort_key: "refs.data.my_custom_scoring"
15
+ * },
16
+ * scope: Courier.AutomationAddToBatchScope.User,
17
+ * category_key: "refs.data.status"
18
+ * }
19
+ */
20
+ export interface AutomationAddToBatchStep extends Courier.AutomationStep {
21
+ action: "add-to-batch";
22
+ /** Defines the period of inactivity before the batch is released. Specified as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations) */
23
+ wait_period: string;
24
+ /** Defines the maximum wait time before the batch should be released. Must be less than wait period. Maximum of 60 days. Specified as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations) */
25
+ max_wait_period: string;
26
+ /** If specified, the batch will release as soon as this number is reached */
27
+ max_items?: Courier.AutomationAddToBatchMaxItemsType;
28
+ retain: Courier.AutomationAddToBatchRetain;
29
+ /**
30
+ * Determine the scope of the batching. If user, chosen in this order: recipient, profile.user_id, data.user_id, data.userId.
31
+ * If dynamic, then specify where the batch_key or a reference to the batch_key
32
+ */
33
+ scope?: Courier.AutomationAddToBatchScope;
34
+ /** If using scope=dynamic, provide the key or a reference (e.g., refs.data.batch_key) */
35
+ batch_key?: string;
36
+ batch_id?: string;
37
+ /** Defines the field of the data object the batch is set to when complete. Defaults to `batch` */
38
+ category_key?: string;
39
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Courier from "../../..";
5
+ /**
6
+ * @example
7
+ * {
8
+ * action: "add-to-digest",
9
+ * subscription_topic_id: "RAJE97CMT04KDJJ88ZDS2TP1690S"
10
+ * }
11
+ */
12
+ export interface AutomationAddToDigestStep extends Courier.AutomationStep {
13
+ action: "add-to-digest";
14
+ /** The subscription topic that has digests enabled */
15
+ subscription_topic_id: string;
16
+ }
@@ -4,5 +4,8 @@
4
4
  import * as Courier from "../../..";
5
5
  export interface AutomationDelayStep extends Courier.AutomationStep {
6
6
  action: "delay";
7
+ /** The [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations) string for how long to delay for */
8
+ duration?: string;
9
+ /** The ISO 8601 timestamp for when the delay should end */
7
10
  until?: string;
8
11
  }
@@ -0,0 +1,31 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Courier from "../../..";
5
+ /**
6
+ * @example
7
+ * {
8
+ * action: "fetch-data",
9
+ * merge_strategy: Courier.MergeAlgorithm.None,
10
+ * webhook: {
11
+ * body: {
12
+ * "foo": "bar"
13
+ * },
14
+ * params: {
15
+ * "hello": "world"
16
+ * },
17
+ * headers: {
18
+ * "content-type": "application/json"
19
+ * },
20
+ * method: Courier.AutomationFetchDataWebhookMethod.Post,
21
+ * url: "https://bryan-at-courier.free.beeceptor.com"
22
+ * }
23
+ * }
24
+ */
25
+ export interface AutomationFetchDataStep extends Courier.AutomationStep {
26
+ action: "fetch-data";
27
+ webhook: Courier.AutomationFetchDataWebhook;
28
+ merge_strategy: Courier.MergeAlgorithm;
29
+ idempotency_expiry?: string;
30
+ idempotency_key?: string;
31
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Courier from "../../..";
5
+ export interface AutomationFetchDataWebhook {
6
+ body?: Record<string, any>;
7
+ headers?: Record<string, any>;
8
+ params?: Record<string, any>;
9
+ method: Courier.AutomationFetchDataWebhookMethod;
10
+ url: string;
11
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export declare type AutomationFetchDataWebhookMethod = "GET" | "POST";
5
+ export declare const AutomationFetchDataWebhookMethod: {
6
+ readonly Get: "GET";
7
+ readonly Post: "POST";
8
+ };
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.AutomationFetchDataWebhookMethod = void 0;
7
+ exports.AutomationFetchDataWebhookMethod = {
8
+ Get: "GET",
9
+ Post: "POST",
10
+ };
@@ -2,4 +2,4 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as Courier from "../../..";
5
- export declare type AutomationStepOption = Courier.AutomationCancelStep | Courier.AutomationDelayStep | Courier.AutomationInvokeStep | Courier.AutomationSendStep | Courier.AutomationV2SendStep | Courier.AutomationSendListStep | Courier.AutomationUpdateProfileStep;
5
+ export declare type AutomationStepOption = Courier.AutomationAddToDigestStep | Courier.AutomationAddToBatchStep | Courier.AutomationThrottleStep | Courier.AutomationCancelStep | Courier.AutomationDelayStep | Courier.AutomationFetchDataStep | Courier.AutomationInvokeStep | Courier.AutomationSendStep | Courier.AutomationV2SendStep | Courier.AutomationSendListStep | Courier.AutomationUpdateProfileStep;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface AutomationThrottleOnThrottle {
5
+ /** The node to go to if the request is throttled */
6
+ $node_id: string;
7
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export declare type AutomationThrottleScope = "user" | "global" | "dynamic";
5
+ export declare const AutomationThrottleScope: {
6
+ readonly User: "user";
7
+ readonly Global: "global";
8
+ readonly Dynamic: "dynamic";
9
+ };
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.AutomationThrottleScope = void 0;
7
+ exports.AutomationThrottleScope = {
8
+ User: "user",
9
+ Global: "global",
10
+ Dynamic: "dynamic",
11
+ };
@@ -0,0 +1,31 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Courier from "../../..";
5
+ /**
6
+ * @example
7
+ * {
8
+ * action: "throttle",
9
+ * max_allowed: 1,
10
+ * period: "PT5M",
11
+ * scope: Courier.AutomationThrottleScope.Dynamic,
12
+ * throttle_key: "refs.data.throttle_key",
13
+ * should_alert: false,
14
+ * on_throttle: {
15
+ * $node_id: "on-throttle-node-ref"
16
+ * }
17
+ * }
18
+ */
19
+ export interface AutomationThrottleStep extends Courier.AutomationStep {
20
+ action: "throttle";
21
+ /** Maximum number of allowed notifications in that timeframe */
22
+ max_allowed: number;
23
+ /** Defines the throttle period which corresponds to the max_allowed. Specified as an ISO 8601 duration, https://en.wikipedia.org/wiki/ISO_8601#Durations */
24
+ period: string;
25
+ scope: Courier.AutomationThrottleScope;
26
+ /** If using scope=dynamic, provide the reference (e.g., refs.data.throttle_key) to the how the throttle should be identified */
27
+ throttle_key?: string;
28
+ /** Value must be true */
29
+ should_alert: false;
30
+ on_throttle: Courier.AutomationThrottleOnThrottle;
31
+ }
@@ -1,13 +1,25 @@
1
- export * from "./AutomationStepAction";
1
+ export * from "./AccessorType";
2
2
  export * from "./MergeAlgorithm";
3
3
  export * from "./AutomationRunContext";
4
4
  export * from "./AutomationStep";
5
+ export * from "./AutomationAddToBatchScope";
6
+ export * from "./AutomationAddToBatchStep";
7
+ export * from "./AutomationAddToBatchMaxItemsType";
8
+ export * from "./AutomationAddToBatchRetainType";
9
+ export * from "./AutomationFetchDataWebhookMethod";
10
+ export * from "./AutomationFetchDataWebhook";
11
+ export * from "./AutomationThrottleScope";
12
+ export * from "./AutomationThrottleOnThrottle";
13
+ export * from "./AutomationAddToBatchRetain";
14
+ export * from "./AutomationAddToDigestStep";
5
15
  export * from "./AutomationCancelStep";
6
16
  export * from "./AutomationDelayStep";
17
+ export * from "./AutomationFetchDataStep";
7
18
  export * from "./AutomationInvokeStep";
8
19
  export * from "./AutomationSendStep";
9
20
  export * from "./AutomationV2SendStep";
10
21
  export * from "./AutomationSendListStep";
22
+ export * from "./AutomationThrottleStep";
11
23
  export * from "./AutomationUpdateProfileStep";
12
24
  export * from "./AutomationStepOption";
13
25
  export * from "./Automation";
@@ -14,16 +14,28 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./AutomationStepAction"), exports);
17
+ __exportStar(require("./AccessorType"), exports);
18
18
  __exportStar(require("./MergeAlgorithm"), exports);
19
19
  __exportStar(require("./AutomationRunContext"), exports);
20
20
  __exportStar(require("./AutomationStep"), exports);
21
+ __exportStar(require("./AutomationAddToBatchScope"), exports);
22
+ __exportStar(require("./AutomationAddToBatchStep"), exports);
23
+ __exportStar(require("./AutomationAddToBatchMaxItemsType"), exports);
24
+ __exportStar(require("./AutomationAddToBatchRetainType"), exports);
25
+ __exportStar(require("./AutomationFetchDataWebhookMethod"), exports);
26
+ __exportStar(require("./AutomationFetchDataWebhook"), exports);
27
+ __exportStar(require("./AutomationThrottleScope"), exports);
28
+ __exportStar(require("./AutomationThrottleOnThrottle"), exports);
29
+ __exportStar(require("./AutomationAddToBatchRetain"), exports);
30
+ __exportStar(require("./AutomationAddToDigestStep"), exports);
21
31
  __exportStar(require("./AutomationCancelStep"), exports);
22
32
  __exportStar(require("./AutomationDelayStep"), exports);
33
+ __exportStar(require("./AutomationFetchDataStep"), exports);
23
34
  __exportStar(require("./AutomationInvokeStep"), exports);
24
35
  __exportStar(require("./AutomationSendStep"), exports);
25
36
  __exportStar(require("./AutomationV2SendStep"), exports);
26
37
  __exportStar(require("./AutomationSendListStep"), exports);
38
+ __exportStar(require("./AutomationThrottleStep"), exports);
27
39
  __exportStar(require("./AutomationUpdateProfileStep"), exports);
28
40
  __exportStar(require("./AutomationStepOption"), exports);
29
41
  __exportStar(require("./Automation"), exports);
@@ -63,7 +63,7 @@ class Brands {
63
63
  Authorization: yield this._getAuthorizationHeader(),
64
64
  "X-Fern-Language": "JavaScript",
65
65
  "X-Fern-SDK-Name": "@trycourier/courier",
66
- "X-Fern-SDK-Version": "v6.0.8",
66
+ "X-Fern-SDK-Version": "v6.1.1",
67
67
  "Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined,
68
68
  "X-Idempotency-Expiration": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry) != null
69
69
  ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry.toString()
@@ -120,7 +120,7 @@ class Brands {
120
120
  Authorization: yield this._getAuthorizationHeader(),
121
121
  "X-Fern-Language": "JavaScript",
122
122
  "X-Fern-SDK-Name": "@trycourier/courier",
123
- "X-Fern-SDK-Version": "v6.0.8",
123
+ "X-Fern-SDK-Version": "v6.1.1",
124
124
  },
125
125
  contentType: "application/json",
126
126
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -168,7 +168,7 @@ class Brands {
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.1",
172
172
  },
173
173
  contentType: "application/json",
174
174
  queryParameters: _queryParams,
@@ -213,7 +213,7 @@ class Brands {
213
213
  Authorization: yield this._getAuthorizationHeader(),
214
214
  "X-Fern-Language": "JavaScript",
215
215
  "X-Fern-SDK-Name": "@trycourier/courier",
216
- "X-Fern-SDK-Version": "v6.0.8",
216
+ "X-Fern-SDK-Version": "v6.1.1",
217
217
  },
218
218
  contentType: "application/json",
219
219
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -261,7 +261,7 @@ class Brands {
261
261
  Authorization: yield this._getAuthorizationHeader(),
262
262
  "X-Fern-Language": "JavaScript",
263
263
  "X-Fern-SDK-Name": "@trycourier/courier",
264
- "X-Fern-SDK-Version": "v6.0.8",
264
+ "X-Fern-SDK-Version": "v6.1.1",
265
265
  },
266
266
  contentType: "application/json",
267
267
  body: request,
@@ -61,7 +61,7 @@ class Bulk {
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.1",
65
65
  "Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined,
66
66
  "X-Idempotency-Expiration": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry) != null
67
67
  ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry.toString()
@@ -114,7 +114,7 @@ class Bulk {
114
114
  Authorization: yield this._getAuthorizationHeader(),
115
115
  "X-Fern-Language": "JavaScript",
116
116
  "X-Fern-SDK-Name": "@trycourier/courier",
117
- "X-Fern-SDK-Version": "v6.0.8",
117
+ "X-Fern-SDK-Version": "v6.1.1",
118
118
  "Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined,
119
119
  "X-Idempotency-Expiration": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry) != null
120
120
  ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry.toString()
@@ -163,7 +163,7 @@ class Bulk {
163
163
  Authorization: yield this._getAuthorizationHeader(),
164
164
  "X-Fern-Language": "JavaScript",
165
165
  "X-Fern-SDK-Name": "@trycourier/courier",
166
- "X-Fern-SDK-Version": "v6.0.8",
166
+ "X-Fern-SDK-Version": "v6.1.1",
167
167
  "Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined,
168
168
  "X-Idempotency-Expiration": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry) != null
169
169
  ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry.toString()
@@ -216,7 +216,7 @@ class Bulk {
216
216
  Authorization: yield this._getAuthorizationHeader(),
217
217
  "X-Fern-Language": "JavaScript",
218
218
  "X-Fern-SDK-Name": "@trycourier/courier",
219
- "X-Fern-SDK-Version": "v6.0.8",
219
+ "X-Fern-SDK-Version": "v6.1.1",
220
220
  },
221
221
  contentType: "application/json",
222
222
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -265,7 +265,7 @@ class Bulk {
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.1",
269
269
  },
270
270
  contentType: "application/json",
271
271
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,