@trycourier/courier 6.1.0 → 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 (138) 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/api/resources/automations/types/AccessorType.d.ts +6 -0
  9. package/api/resources/automations/types/AccessorType.js +5 -0
  10. package/api/resources/automations/types/AutomationAddToBatchMaxItemsType.d.ts +4 -0
  11. package/api/resources/automations/types/AutomationAddToBatchMaxItemsType.js +5 -0
  12. package/api/resources/automations/types/AutomationAddToBatchRetain.d.ts +34 -0
  13. package/api/resources/automations/types/AutomationAddToBatchRetain.js +5 -0
  14. package/api/resources/automations/types/AutomationAddToBatchRetainType.d.ts +10 -0
  15. package/api/resources/automations/types/AutomationAddToBatchRetainType.js +12 -0
  16. package/api/resources/automations/types/AutomationAddToBatchScope.d.ts +9 -0
  17. package/api/resources/automations/types/AutomationAddToBatchScope.js +11 -0
  18. package/api/resources/automations/types/AutomationAddToBatchStep.d.ts +39 -0
  19. package/api/resources/automations/types/AutomationAddToBatchStep.js +5 -0
  20. package/api/resources/automations/types/AutomationAddToDigestStep.d.ts +16 -0
  21. package/api/resources/automations/types/AutomationAddToDigestStep.js +5 -0
  22. package/api/resources/automations/types/AutomationDelayStep.d.ts +3 -0
  23. package/api/resources/automations/types/AutomationFetchDataStep.d.ts +31 -0
  24. package/api/resources/automations/types/AutomationFetchDataStep.js +5 -0
  25. package/api/resources/automations/types/AutomationFetchDataWebhook.d.ts +11 -0
  26. package/api/resources/automations/types/AutomationFetchDataWebhook.js +5 -0
  27. package/api/resources/automations/types/AutomationFetchDataWebhookMethod.d.ts +8 -0
  28. package/api/resources/automations/types/AutomationFetchDataWebhookMethod.js +10 -0
  29. package/api/resources/automations/types/AutomationStepOption.d.ts +1 -1
  30. package/api/resources/automations/types/AutomationThrottleOnThrottle.d.ts +7 -0
  31. package/api/resources/automations/types/AutomationThrottleOnThrottle.js +5 -0
  32. package/api/resources/automations/types/AutomationThrottleScope.d.ts +9 -0
  33. package/api/resources/automations/types/AutomationThrottleScope.js +11 -0
  34. package/api/resources/automations/types/AutomationThrottleStep.d.ts +31 -0
  35. package/api/resources/automations/types/AutomationThrottleStep.js +5 -0
  36. package/api/resources/automations/types/index.d.ts +13 -1
  37. package/api/resources/automations/types/index.js +13 -1
  38. package/api/resources/brands/client/Client.js +5 -5
  39. package/api/resources/bulk/client/Client.js +5 -5
  40. package/api/resources/lists/client/Client.js +10 -10
  41. package/api/resources/messages/client/Client.js +42 -12
  42. package/api/resources/messages/client/requests/ListMessagesRequest.d.ts +23 -3
  43. package/api/resources/messages/types/MessageStatus.d.ts +4 -0
  44. package/api/resources/messages/types/MessageStatus.js +1 -0
  45. package/api/resources/notifications/client/Client.js +8 -8
  46. package/api/resources/profiles/client/Client.js +7 -7
  47. package/api/resources/send/types/BaseMessageSendTo.d.ts +8 -0
  48. package/api/resources/send/types/BaseMessageSendTo.js +5 -0
  49. package/api/resources/send/types/ContentMessage.d.ts +1 -3
  50. package/api/resources/send/types/Recipient.d.ts +1 -1
  51. package/api/resources/send/types/RecipientData.d.ts +4 -0
  52. package/api/resources/send/types/RecipientData.js +5 -0
  53. package/api/resources/send/types/TemplateMessage.d.ts +1 -3
  54. package/api/resources/send/types/index.d.ts +2 -0
  55. package/api/resources/send/types/index.js +2 -0
  56. package/api/resources/templates/client/Client.js +1 -1
  57. package/api/resources/tenants/client/Client.js +5 -5
  58. package/api/resources/translations/client/Client.js +2 -2
  59. package/api/resources/users/resources/preferences/client/Client.d.ts +9 -0
  60. package/api/resources/users/resources/preferences/client/Client.js +12 -3
  61. package/api/resources/users/resources/preferences/client/requests/UserPreferencesUpdateParams.d.ts +11 -5
  62. package/api/resources/users/resources/preferences/types/TopicPreferenceUpdate.d.ts +10 -0
  63. package/api/resources/users/resources/preferences/types/TopicPreferenceUpdate.js +5 -0
  64. package/api/resources/users/resources/preferences/types/index.d.ts +1 -0
  65. package/api/resources/users/resources/preferences/types/index.js +1 -0
  66. package/api/resources/users/resources/tenants/client/Client.js +5 -5
  67. package/api/resources/users/resources/tokens/client/Client.js +5 -5
  68. package/dist/Client.js +1 -1
  69. package/dist/api/resources/audiences/client/Client.js +5 -5
  70. package/dist/api/resources/auditEvents/client/Client.js +2 -2
  71. package/dist/api/resources/authTokens/client/Client.js +1 -1
  72. package/dist/api/resources/automations/client/Client.d.ts +15 -0
  73. package/dist/api/resources/automations/client/Client.js +17 -2
  74. package/dist/api/resources/automations/types/AccessorType.d.ts +6 -0
  75. package/dist/api/resources/automations/types/AccessorType.js +5 -0
  76. package/dist/api/resources/automations/types/AutomationAddToBatchMaxItemsType.d.ts +4 -0
  77. package/dist/api/resources/automations/types/AutomationAddToBatchMaxItemsType.js +5 -0
  78. package/dist/api/resources/automations/types/AutomationAddToBatchRetain.d.ts +34 -0
  79. package/dist/api/resources/automations/types/AutomationAddToBatchRetain.js +5 -0
  80. package/dist/api/resources/automations/types/AutomationAddToBatchRetainType.d.ts +10 -0
  81. package/dist/api/resources/automations/types/AutomationAddToBatchRetainType.js +12 -0
  82. package/dist/api/resources/automations/types/AutomationAddToBatchScope.d.ts +9 -0
  83. package/dist/api/resources/automations/types/AutomationAddToBatchScope.js +11 -0
  84. package/dist/api/resources/automations/types/AutomationAddToBatchStep.d.ts +39 -0
  85. package/dist/api/resources/automations/types/AutomationAddToBatchStep.js +5 -0
  86. package/dist/api/resources/automations/types/AutomationAddToDigestStep.d.ts +16 -0
  87. package/dist/api/resources/automations/types/AutomationAddToDigestStep.js +5 -0
  88. package/dist/api/resources/automations/types/AutomationDelayStep.d.ts +3 -0
  89. package/dist/api/resources/automations/types/AutomationFetchDataStep.d.ts +31 -0
  90. package/dist/api/resources/automations/types/AutomationFetchDataStep.js +5 -0
  91. package/dist/api/resources/automations/types/AutomationFetchDataWebhook.d.ts +11 -0
  92. package/dist/api/resources/automations/types/AutomationFetchDataWebhook.js +5 -0
  93. package/dist/api/resources/automations/types/AutomationFetchDataWebhookMethod.d.ts +8 -0
  94. package/dist/api/resources/automations/types/AutomationFetchDataWebhookMethod.js +10 -0
  95. package/dist/api/resources/automations/types/AutomationStepOption.d.ts +1 -1
  96. package/dist/api/resources/automations/types/AutomationThrottleOnThrottle.d.ts +7 -0
  97. package/dist/api/resources/automations/types/AutomationThrottleOnThrottle.js +5 -0
  98. package/dist/api/resources/automations/types/AutomationThrottleScope.d.ts +9 -0
  99. package/dist/api/resources/automations/types/AutomationThrottleScope.js +11 -0
  100. package/dist/api/resources/automations/types/AutomationThrottleStep.d.ts +31 -0
  101. package/dist/api/resources/automations/types/AutomationThrottleStep.js +5 -0
  102. package/dist/api/resources/automations/types/index.d.ts +13 -1
  103. package/dist/api/resources/automations/types/index.js +13 -1
  104. package/dist/api/resources/brands/client/Client.js +5 -5
  105. package/dist/api/resources/bulk/client/Client.js +5 -5
  106. package/dist/api/resources/lists/client/Client.js +10 -10
  107. package/dist/api/resources/messages/client/Client.js +42 -12
  108. package/dist/api/resources/messages/client/requests/ListMessagesRequest.d.ts +23 -3
  109. package/dist/api/resources/messages/types/MessageStatus.d.ts +4 -0
  110. package/dist/api/resources/messages/types/MessageStatus.js +1 -0
  111. package/dist/api/resources/notifications/client/Client.js +8 -8
  112. package/dist/api/resources/profiles/client/Client.js +7 -7
  113. package/dist/api/resources/send/types/BaseMessageSendTo.d.ts +8 -0
  114. package/dist/api/resources/send/types/BaseMessageSendTo.js +5 -0
  115. package/dist/api/resources/send/types/ContentMessage.d.ts +1 -3
  116. package/dist/api/resources/send/types/Recipient.d.ts +1 -1
  117. package/dist/api/resources/send/types/RecipientData.d.ts +4 -0
  118. package/dist/api/resources/send/types/RecipientData.js +5 -0
  119. package/dist/api/resources/send/types/TemplateMessage.d.ts +1 -3
  120. package/dist/api/resources/send/types/index.d.ts +2 -0
  121. package/dist/api/resources/send/types/index.js +2 -0
  122. package/dist/api/resources/templates/client/Client.js +1 -1
  123. package/dist/api/resources/tenants/client/Client.js +5 -5
  124. package/dist/api/resources/translations/client/Client.js +2 -2
  125. package/dist/api/resources/users/resources/preferences/client/Client.d.ts +9 -0
  126. package/dist/api/resources/users/resources/preferences/client/Client.js +12 -3
  127. package/dist/api/resources/users/resources/preferences/client/requests/UserPreferencesUpdateParams.d.ts +11 -5
  128. package/dist/api/resources/users/resources/preferences/types/TopicPreferenceUpdate.d.ts +10 -0
  129. package/dist/api/resources/users/resources/preferences/types/TopicPreferenceUpdate.js +5 -0
  130. package/dist/api/resources/users/resources/preferences/types/index.d.ts +1 -0
  131. package/dist/api/resources/users/resources/preferences/types/index.js +1 -0
  132. package/dist/api/resources/users/resources/tenants/client/Client.js +5 -5
  133. package/dist/api/resources/users/resources/tokens/client/Client.js +5 -5
  134. package/package.json +1 -1
  135. package/api/resources/automations/types/AutomationStepAction.d.ts +0 -12
  136. package/api/resources/automations/types/AutomationStepAction.js +0 -14
  137. package/dist/api/resources/automations/types/AutomationStepAction.d.ts +0 -12
  138. package/dist/api/resources/automations/types/AutomationStepAction.js +0 -14
@@ -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,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,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,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,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,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,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
+ }
@@ -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,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.1.0",
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.1.0",
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.1.0",
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.1.0",
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.1.0",
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.1.0",
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.1.0",
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.1.0",
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.1.0",
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.1.0",
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,
@@ -70,7 +70,7 @@ class Lists {
70
70
  Authorization: yield this._getAuthorizationHeader(),
71
71
  "X-Fern-Language": "JavaScript",
72
72
  "X-Fern-SDK-Name": "@trycourier/courier",
73
- "X-Fern-SDK-Version": "v6.1.0",
73
+ "X-Fern-SDK-Version": "v6.1.1",
74
74
  },
75
75
  contentType: "application/json",
76
76
  queryParameters: _queryParams,
@@ -120,7 +120,7 @@ class Lists {
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.1.0",
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 Lists {
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.1.0",
171
+ "X-Fern-SDK-Version": "v6.1.1",
172
172
  },
173
173
  contentType: "application/json",
174
174
  body: request,
@@ -212,7 +212,7 @@ class Lists {
212
212
  Authorization: yield this._getAuthorizationHeader(),
213
213
  "X-Fern-Language": "JavaScript",
214
214
  "X-Fern-SDK-Name": "@trycourier/courier",
215
- "X-Fern-SDK-Version": "v6.1.0",
215
+ "X-Fern-SDK-Version": "v6.1.1",
216
216
  },
217
217
  contentType: "application/json",
218
218
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -255,7 +255,7 @@ class Lists {
255
255
  Authorization: yield this._getAuthorizationHeader(),
256
256
  "X-Fern-Language": "JavaScript",
257
257
  "X-Fern-SDK-Name": "@trycourier/courier",
258
- "X-Fern-SDK-Version": "v6.1.0",
258
+ "X-Fern-SDK-Version": "v6.1.1",
259
259
  },
260
260
  contentType: "application/json",
261
261
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -304,7 +304,7 @@ class Lists {
304
304
  Authorization: yield this._getAuthorizationHeader(),
305
305
  "X-Fern-Language": "JavaScript",
306
306
  "X-Fern-SDK-Name": "@trycourier/courier",
307
- "X-Fern-SDK-Version": "v6.1.0",
307
+ "X-Fern-SDK-Version": "v6.1.1",
308
308
  },
309
309
  contentType: "application/json",
310
310
  queryParameters: _queryParams,
@@ -354,7 +354,7 @@ class Lists {
354
354
  Authorization: yield this._getAuthorizationHeader(),
355
355
  "X-Fern-Language": "JavaScript",
356
356
  "X-Fern-SDK-Name": "@trycourier/courier",
357
- "X-Fern-SDK-Version": "v6.1.0",
357
+ "X-Fern-SDK-Version": "v6.1.1",
358
358
  },
359
359
  contentType: "application/json",
360
360
  body: request,
@@ -404,7 +404,7 @@ class Lists {
404
404
  Authorization: yield this._getAuthorizationHeader(),
405
405
  "X-Fern-Language": "JavaScript",
406
406
  "X-Fern-SDK-Name": "@trycourier/courier",
407
- "X-Fern-SDK-Version": "v6.1.0",
407
+ "X-Fern-SDK-Version": "v6.1.1",
408
408
  "Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined,
409
409
  "X-Idempotency-Expiration": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry) != null
410
410
  ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry.toString()
@@ -457,7 +457,7 @@ class Lists {
457
457
  Authorization: yield this._getAuthorizationHeader(),
458
458
  "X-Fern-Language": "JavaScript",
459
459
  "X-Fern-SDK-Name": "@trycourier/courier",
460
- "X-Fern-SDK-Version": "v6.1.0",
460
+ "X-Fern-SDK-Version": "v6.1.1",
461
461
  },
462
462
  contentType: "application/json",
463
463
  body: request,
@@ -502,7 +502,7 @@ class Lists {
502
502
  Authorization: yield this._getAuthorizationHeader(),
503
503
  "X-Fern-Language": "JavaScript",
504
504
  "X-Fern-SDK-Name": "@trycourier/courier",
505
- "X-Fern-SDK-Version": "v6.1.0",
505
+ "X-Fern-SDK-Version": "v6.1.1",
506
506
  },
507
507
  contentType: "application/json",
508
508
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -54,7 +54,7 @@ class Messages {
54
54
  list(request = {}, requestOptions) {
55
55
  var _a, _b;
56
56
  return __awaiter(this, void 0, void 0, function* () {
57
- const { archived, cursor, event, list, messageId, notification, recipient, status, tags, enqueued_after: enqueuedAfter, traceId, } = request;
57
+ const { archived, cursor, event, list, message_id: messageId, messageId: messageId_, notification, provider, recipient, status, tag, tags, tenant_id: tenantId, enqueued_after: enqueuedAfter, trace_id: traceId, traceId: traceId_, } = request;
58
58
  const _queryParams = {};
59
59
  if (archived != null) {
60
60
  _queryParams["archived"] = archived.toString();
@@ -68,26 +68,56 @@ class Messages {
68
68
  if (list != null) {
69
69
  _queryParams["list"] = list;
70
70
  }
71
- if (messageId != null) {
72
- _queryParams["messageId"] = messageId;
71
+ if (messageId_ != null) {
72
+ _queryParams["message_id"] = messageId_;
73
+ }
74
+ if (messageId_ != null) {
75
+ _queryParams["messageId"] = messageId_;
73
76
  }
74
77
  if (notification != null) {
75
78
  _queryParams["notification"] = notification;
76
79
  }
80
+ if (provider != null) {
81
+ if (Array.isArray(provider)) {
82
+ _queryParams["provider"] = provider.map((item) => item);
83
+ }
84
+ else {
85
+ _queryParams["provider"] = provider;
86
+ }
87
+ }
77
88
  if (recipient != null) {
78
89
  _queryParams["recipient"] = recipient;
79
90
  }
80
91
  if (status != null) {
81
- _queryParams["status"] = status;
92
+ if (Array.isArray(status)) {
93
+ _queryParams["status"] = status.map((item) => item);
94
+ }
95
+ else {
96
+ _queryParams["status"] = status;
97
+ }
98
+ }
99
+ if (tag != null) {
100
+ if (Array.isArray(tag)) {
101
+ _queryParams["tag"] = tag.map((item) => item);
102
+ }
103
+ else {
104
+ _queryParams["tag"] = tag;
105
+ }
82
106
  }
83
107
  if (tags != null) {
84
108
  _queryParams["tags"] = tags;
85
109
  }
110
+ if (tenantId != null) {
111
+ _queryParams["tenant_id"] = tenantId;
112
+ }
86
113
  if (enqueuedAfter != null) {
87
114
  _queryParams["enqueued_after"] = enqueuedAfter;
88
115
  }
89
- if (traceId != null) {
90
- _queryParams["traceId"] = traceId;
116
+ if (traceId_ != null) {
117
+ _queryParams["trace_id"] = traceId_;
118
+ }
119
+ if (traceId_ != null) {
120
+ _queryParams["traceId"] = traceId_;
91
121
  }
92
122
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
93
123
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, "messages"),
@@ -96,7 +126,7 @@ class Messages {
96
126
  Authorization: yield this._getAuthorizationHeader(),
97
127
  "X-Fern-Language": "JavaScript",
98
128
  "X-Fern-SDK-Name": "@trycourier/courier",
99
- "X-Fern-SDK-Version": "v6.1.0",
129
+ "X-Fern-SDK-Version": "v6.1.1",
100
130
  },
101
131
  contentType: "application/json",
102
132
  queryParameters: _queryParams,
@@ -142,7 +172,7 @@ class Messages {
142
172
  Authorization: yield this._getAuthorizationHeader(),
143
173
  "X-Fern-Language": "JavaScript",
144
174
  "X-Fern-SDK-Name": "@trycourier/courier",
145
- "X-Fern-SDK-Version": "v6.1.0",
175
+ "X-Fern-SDK-Version": "v6.1.1",
146
176
  },
147
177
  contentType: "application/json",
148
178
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -192,7 +222,7 @@ class Messages {
192
222
  Authorization: yield this._getAuthorizationHeader(),
193
223
  "X-Fern-Language": "JavaScript",
194
224
  "X-Fern-SDK-Name": "@trycourier/courier",
195
- "X-Fern-SDK-Version": "v6.1.0",
225
+ "X-Fern-SDK-Version": "v6.1.1",
196
226
  "Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined,
197
227
  "X-Idempotency-Expiration": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry) != null
198
228
  ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry.toString()
@@ -246,7 +276,7 @@ class Messages {
246
276
  Authorization: yield this._getAuthorizationHeader(),
247
277
  "X-Fern-Language": "JavaScript",
248
278
  "X-Fern-SDK-Name": "@trycourier/courier",
249
- "X-Fern-SDK-Version": "v6.1.0",
279
+ "X-Fern-SDK-Version": "v6.1.1",
250
280
  },
251
281
  contentType: "application/json",
252
282
  queryParameters: _queryParams,
@@ -298,7 +328,7 @@ class Messages {
298
328
  Authorization: yield this._getAuthorizationHeader(),
299
329
  "X-Fern-Language": "JavaScript",
300
330
  "X-Fern-SDK-Name": "@trycourier/courier",
301
- "X-Fern-SDK-Version": "v6.1.0",
331
+ "X-Fern-SDK-Version": "v6.1.1",
302
332
  },
303
333
  contentType: "application/json",
304
334
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -345,7 +375,7 @@ class Messages {
345
375
  Authorization: yield this._getAuthorizationHeader(),
346
376
  "X-Fern-Language": "JavaScript",
347
377
  "X-Fern-SDK-Name": "@trycourier/courier",
348
- "X-Fern-SDK-Version": "v6.1.0",
378
+ "X-Fern-SDK-Version": "v6.1.1",
349
379
  },
350
380
  contentType: "application/json",
351
381
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -7,7 +7,7 @@ export interface ListMessagesRequest {
7
7
  */
8
8
  archived?: boolean;
9
9
  /**
10
- * A unique identifier that allows for fetching the next set of message statuses.
10
+ * A unique identifier that allows for fetching the next set of messages.
11
11
  */
12
12
  cursor?: string;
13
13
  /**
@@ -18,6 +18,10 @@ export interface ListMessagesRequest {
18
18
  * A unique identifier representing the list the message was sent to.
19
19
  */
20
20
  list?: string;
21
+ /**
22
+ * A unique identifier representing the message_id returned from either /send or /send/list.
23
+ */
24
+ message_id?: string;
21
25
  /**
22
26
  * A unique identifier representing the message_id returned from either /send or /send/list.
23
27
  */
@@ -26,22 +30,38 @@ export interface ListMessagesRequest {
26
30
  * A unique identifier representing the notification that was used to send the event.
27
31
  */
28
32
  notification?: string;
33
+ /**
34
+ * The key assocated to the provider you want to filter on. E.g., sendgrid, inbox, twilio, slack, msteams, etc. Allows multiple values to be set in query parameters.
35
+ */
36
+ provider?: string | string[];
29
37
  /**
30
38
  * A unique identifier representing the recipient associated with the requested profile.
31
39
  */
32
40
  recipient?: string;
33
41
  /**
34
- * An indicator of the current status of the message. Multiple status values can be passed in.
42
+ * An indicator of the current status of the message. Allows multiple values to be set in query parameters.
43
+ */
44
+ status?: string | string[];
45
+ /**
46
+ * A tag placed in the metadata.tags during a notification send. Allows multiple values to be set in query parameters.
35
47
  */
36
- status?: string;
48
+ tag?: string | string[];
37
49
  /**
38
50
  * A comma delimited list of 'tags'. Messages will be returned if they match any of the tags passed in.
39
51
  */
40
52
  tags?: string;
53
+ /**
54
+ * Messages sent with the context of a Tenant
55
+ */
56
+ tenant_id?: string;
41
57
  /**
42
58
  * The enqueued datetime of a message to filter out messages received before.
43
59
  */
44
60
  enqueued_after?: string;
61
+ /**
62
+ * The unique identifier used to trace the requests
63
+ */
64
+ trace_id?: string;
45
65
  /**
46
66
  * The unique identifier used to trace the requests
47
67
  */
@@ -20,6 +20,9 @@ export declare type MessageStatus =
20
20
  /**
21
21
  * The message has been accepted by the provider. */
22
22
  | "SENT"
23
+ /**
24
+ * The message was throttled by Courier. */
25
+ | "THROTTLED"
23
26
  /**
24
27
  * The message could not be delivered to at least one provider, or the provider could not deliver the message to the recipient. This can happen for multiple reasons: an error, insufficient profile data, invalid notification setup, invalid integration configuration, etc. */
25
28
  | "UNDELIVERABLE"
@@ -36,6 +39,7 @@ export declare const MessageStatus: {
36
39
  readonly Opened: "OPENED";
37
40
  readonly Canceled: "CANCELED";
38
41
  readonly Sent: "SENT";
42
+ readonly Throttled: "THROTTLED";
39
43
  readonly Undeliverable: "UNDELIVERABLE";
40
44
  readonly Unmapped: "UNMAPPED";
41
45
  readonly Unroutable: "UNROUTABLE";
@@ -11,6 +11,7 @@ exports.MessageStatus = {
11
11
  Opened: "OPENED",
12
12
  Canceled: "CANCELED",
13
13
  Sent: "SENT",
14
+ Throttled: "THROTTLED",
14
15
  Undeliverable: "UNDELIVERABLE",
15
16
  Unmapped: "UNMAPPED",
16
17
  Unroutable: "UNROUTABLE",