@trycourier/courier 7.3.0 → 7.8.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 (190) hide show
  1. package/CHANGELOG.md +136 -0
  2. package/LICENSE +1 -1
  3. package/README.md +34 -345
  4. package/client.d.mts +53 -8
  5. package/client.d.mts.map +1 -1
  6. package/client.d.ts +53 -8
  7. package/client.d.ts.map +1 -1
  8. package/client.js +26 -9
  9. package/client.js.map +1 -1
  10. package/client.mjs +27 -10
  11. package/client.mjs.map +1 -1
  12. package/internal/parse.d.mts.map +1 -1
  13. package/internal/parse.d.ts.map +1 -1
  14. package/internal/parse.js +5 -0
  15. package/internal/parse.js.map +1 -1
  16. package/internal/parse.mjs +5 -0
  17. package/internal/parse.mjs.map +1 -1
  18. package/internal/utils/query.d.mts +2 -0
  19. package/internal/utils/query.d.mts.map +1 -0
  20. package/internal/utils/query.d.ts +2 -0
  21. package/internal/utils/query.d.ts.map +1 -0
  22. package/internal/utils/query.js +10 -0
  23. package/internal/utils/query.js.map +1 -0
  24. package/internal/utils/query.mjs +6 -0
  25. package/internal/utils/query.mjs.map +1 -0
  26. package/internal/utils.d.mts +1 -0
  27. package/internal/utils.d.ts +1 -0
  28. package/internal/utils.js +1 -0
  29. package/internal/utils.js.map +1 -1
  30. package/internal/utils.mjs +1 -0
  31. package/package.json +12 -1
  32. package/resources/audiences.d.mts +11 -33
  33. package/resources/audiences.d.mts.map +1 -1
  34. package/resources/audiences.d.ts +11 -33
  35. package/resources/audiences.d.ts.map +1 -1
  36. package/resources/automations/automations.d.mts +54 -1
  37. package/resources/automations/automations.d.mts.map +1 -1
  38. package/resources/automations/automations.d.ts +54 -1
  39. package/resources/automations/automations.d.ts.map +1 -1
  40. package/resources/automations/automations.js +12 -0
  41. package/resources/automations/automations.js.map +1 -1
  42. package/resources/automations/automations.mjs +12 -0
  43. package/resources/automations/automations.mjs.map +1 -1
  44. package/resources/automations/index.d.mts +1 -1
  45. package/resources/automations/index.d.mts.map +1 -1
  46. package/resources/automations/index.d.ts +1 -1
  47. package/resources/automations/index.d.ts.map +1 -1
  48. package/resources/automations/index.js.map +1 -1
  49. package/resources/automations/index.mjs +1 -1
  50. package/resources/automations/index.mjs.map +1 -1
  51. package/resources/bulk.d.mts +80 -39
  52. package/resources/bulk.d.mts.map +1 -1
  53. package/resources/bulk.d.ts +80 -39
  54. package/resources/bulk.d.ts.map +1 -1
  55. package/resources/bulk.js +12 -2
  56. package/resources/bulk.js.map +1 -1
  57. package/resources/bulk.mjs +12 -2
  58. package/resources/bulk.mjs.map +1 -1
  59. package/resources/inbound.d.mts +1 -1
  60. package/resources/inbound.d.ts +1 -1
  61. package/resources/index.d.mts +4 -3
  62. package/resources/index.d.mts.map +1 -1
  63. package/resources/index.d.ts +4 -3
  64. package/resources/index.d.ts.map +1 -1
  65. package/resources/index.js +3 -1
  66. package/resources/index.js.map +1 -1
  67. package/resources/index.mjs +2 -1
  68. package/resources/index.mjs.map +1 -1
  69. package/resources/journeys.d.mts +143 -0
  70. package/resources/journeys.d.mts.map +1 -0
  71. package/resources/journeys.d.ts +143 -0
  72. package/resources/journeys.d.ts.map +1 -0
  73. package/resources/journeys.js +38 -0
  74. package/resources/journeys.js.map +1 -0
  75. package/resources/journeys.mjs +34 -0
  76. package/resources/journeys.mjs.map +1 -0
  77. package/resources/lists/subscriptions.d.mts +1 -1
  78. package/resources/lists/subscriptions.d.ts +1 -1
  79. package/resources/messages.d.mts +20 -20
  80. package/resources/messages.d.mts.map +1 -1
  81. package/resources/messages.d.ts +20 -20
  82. package/resources/messages.d.ts.map +1 -1
  83. package/resources/notifications/checks.d.mts +2 -2
  84. package/resources/notifications/checks.d.ts +2 -2
  85. package/resources/send.d.mts +8 -2
  86. package/resources/send.d.mts.map +1 -1
  87. package/resources/send.d.ts +8 -2
  88. package/resources/send.d.ts.map +1 -1
  89. package/resources/send.js +1 -1
  90. package/resources/send.mjs +1 -1
  91. package/resources/shared.d.mts +290 -52
  92. package/resources/shared.d.mts.map +1 -1
  93. package/resources/shared.d.ts +290 -52
  94. package/resources/shared.d.ts.map +1 -1
  95. package/resources/tenants/index.d.mts +2 -2
  96. package/resources/tenants/index.d.mts.map +1 -1
  97. package/resources/tenants/index.d.ts +2 -2
  98. package/resources/tenants/index.d.ts.map +1 -1
  99. package/resources/tenants/index.js +2 -2
  100. package/resources/tenants/index.js.map +1 -1
  101. package/resources/tenants/index.mjs +1 -1
  102. package/resources/tenants/index.mjs.map +1 -1
  103. package/resources/tenants/preferences/items.d.mts +2 -2
  104. package/resources/tenants/preferences/items.d.ts +2 -2
  105. package/resources/tenants/templates/index.d.mts +3 -0
  106. package/resources/tenants/templates/index.d.mts.map +1 -0
  107. package/resources/tenants/templates/index.d.ts +3 -0
  108. package/resources/tenants/templates/index.d.ts.map +1 -0
  109. package/resources/tenants/templates/index.js +9 -0
  110. package/resources/tenants/templates/index.js.map +1 -0
  111. package/resources/tenants/templates/index.mjs +4 -0
  112. package/resources/tenants/templates/index.mjs.map +1 -0
  113. package/resources/tenants/templates/templates.d.mts +159 -0
  114. package/resources/tenants/templates/templates.d.mts.map +1 -0
  115. package/resources/tenants/templates/templates.d.ts +159 -0
  116. package/resources/tenants/templates/templates.d.ts.map +1 -0
  117. package/resources/tenants/templates/templates.js +91 -0
  118. package/resources/tenants/templates/templates.js.map +1 -0
  119. package/resources/tenants/templates/templates.mjs +86 -0
  120. package/resources/tenants/templates/templates.mjs.map +1 -0
  121. package/resources/tenants/templates/versions.d.mts +39 -0
  122. package/resources/tenants/templates/versions.d.mts.map +1 -0
  123. package/resources/tenants/templates/versions.d.ts +39 -0
  124. package/resources/tenants/templates/versions.d.ts.map +1 -0
  125. package/resources/tenants/templates/versions.js +32 -0
  126. package/resources/tenants/templates/versions.js.map +1 -0
  127. package/resources/tenants/templates/versions.mjs +28 -0
  128. package/resources/tenants/templates/versions.mjs.map +1 -0
  129. package/resources/tenants/templates.d.mts +1 -90
  130. package/resources/tenants/templates.d.mts.map +1 -1
  131. package/resources/tenants/templates.d.ts +1 -90
  132. package/resources/tenants/templates.d.ts.map +1 -1
  133. package/resources/tenants/templates.js +2 -34
  134. package/resources/tenants/templates.js.map +1 -1
  135. package/resources/tenants/templates.mjs +1 -32
  136. package/resources/tenants/templates.mjs.map +1 -1
  137. package/resources/tenants/tenants.d.mts +147 -5
  138. package/resources/tenants/tenants.d.mts.map +1 -1
  139. package/resources/tenants/tenants.d.ts +147 -5
  140. package/resources/tenants/tenants.d.ts.map +1 -1
  141. package/resources/tenants/tenants.js +2 -2
  142. package/resources/tenants/tenants.js.map +1 -1
  143. package/resources/tenants/tenants.mjs +2 -2
  144. package/resources/tenants/tenants.mjs.map +1 -1
  145. package/resources/translations.d.mts +1 -1
  146. package/resources/translations.d.ts +1 -1
  147. package/resources/users/preferences.d.mts +1 -1
  148. package/resources/users/preferences.d.ts +1 -1
  149. package/resources/users/tenants.d.mts +1 -1
  150. package/resources/users/tenants.d.ts +1 -1
  151. package/resources/users/tokens.d.mts +3 -8
  152. package/resources/users/tokens.d.mts.map +1 -1
  153. package/resources/users/tokens.d.ts +3 -8
  154. package/resources/users/tokens.d.ts.map +1 -1
  155. package/resources/users/tokens.js +2 -3
  156. package/resources/users/tokens.js.map +1 -1
  157. package/resources/users/tokens.mjs +2 -3
  158. package/resources/users/tokens.mjs.map +1 -1
  159. package/src/client.ts +115 -19
  160. package/src/internal/parse.ts +6 -0
  161. package/src/internal/utils/query.ts +7 -0
  162. package/src/internal/utils.ts +1 -0
  163. package/src/resources/audiences.ts +11 -69
  164. package/src/resources/automations/automations.ts +74 -1
  165. package/src/resources/automations/index.ts +7 -1
  166. package/src/resources/bulk.ts +71 -32
  167. package/src/resources/inbound.ts +1 -1
  168. package/src/resources/index.ts +21 -3
  169. package/src/resources/journeys.ts +174 -0
  170. package/src/resources/lists/subscriptions.ts +1 -1
  171. package/src/resources/messages.ts +24 -24
  172. package/src/resources/notifications/checks.ts +2 -2
  173. package/src/resources/send.ts +28 -2
  174. package/src/resources/shared.ts +391 -49
  175. package/src/resources/tenants/index.ts +8 -1
  176. package/src/resources/tenants/preferences/items.ts +2 -2
  177. package/src/resources/tenants/templates/index.ts +11 -0
  178. package/src/resources/tenants/templates/templates.ts +222 -0
  179. package/src/resources/tenants/templates/versions.ts +55 -0
  180. package/src/resources/tenants/templates.ts +1 -122
  181. package/src/resources/tenants/tenants.ts +179 -3
  182. package/src/resources/translations.ts +1 -1
  183. package/src/resources/users/preferences.ts +1 -1
  184. package/src/resources/users/tenants.ts +1 -1
  185. package/src/resources/users/tokens.ts +4 -10
  186. package/src/version.ts +1 -1
  187. package/version.d.mts +1 -1
  188. package/version.d.ts +1 -1
  189. package/version.js +1 -1
  190. package/version.mjs +1 -1
@@ -1,14 +1,67 @@
1
1
  import { APIResource } from "../../core/resource.js";
2
2
  import * as InvokeAPI from "./invoke.js";
3
3
  import { Invoke, InvokeInvokeAdHocParams, InvokeInvokeByTemplateParams } from "./invoke.js";
4
+ import { APIPromise } from "../../core/api-promise.js";
5
+ import { RequestOptions } from "../../internal/request-options.js";
4
6
  export declare class Automations extends APIResource {
5
7
  invoke: InvokeAPI.Invoke;
8
+ /**
9
+ * Get the list of automations.
10
+ *
11
+ * @example
12
+ * ```ts
13
+ * const automationTemplateListResponse =
14
+ * await client.automations.list();
15
+ * ```
16
+ */
17
+ list(query?: AutomationListParams | null | undefined, options?: RequestOptions): APIPromise<AutomationTemplateListResponse>;
6
18
  }
7
19
  export interface AutomationInvokeResponse {
8
20
  runId: string;
9
21
  }
22
+ export interface AutomationTemplate {
23
+ /**
24
+ * The unique identifier of the automation template.
25
+ */
26
+ id: string;
27
+ /**
28
+ * The name of the automation template.
29
+ */
30
+ name: string;
31
+ /**
32
+ * The version of the template published or drafted.
33
+ */
34
+ version: 'published' | 'draft';
35
+ /**
36
+ * ISO 8601 timestamp when the template was created.
37
+ */
38
+ createdAt?: string;
39
+ /**
40
+ * ISO 8601 timestamp when the template was last updated.
41
+ */
42
+ updatedAt?: string;
43
+ }
44
+ export interface AutomationTemplateListResponse {
45
+ /**
46
+ * A cursor token for pagination. Present when there are more results available.
47
+ */
48
+ cursor?: string;
49
+ templates?: Array<AutomationTemplate>;
50
+ }
51
+ export interface AutomationListParams {
52
+ /**
53
+ * A cursor token for pagination. Use the cursor from the previous response to
54
+ * fetch the next page of results.
55
+ */
56
+ cursor?: string;
57
+ /**
58
+ * The version of templates to retrieve. Accepted values are published (for
59
+ * published templates) or draft (for draft templates). Defaults to published.
60
+ */
61
+ version?: 'published' | 'draft';
62
+ }
10
63
  export declare namespace Automations {
11
- export { type AutomationInvokeResponse as AutomationInvokeResponse };
64
+ export { type AutomationInvokeResponse as AutomationInvokeResponse, type AutomationTemplate as AutomationTemplate, type AutomationTemplateListResponse as AutomationTemplateListResponse, type AutomationListParams as AutomationListParams, };
12
65
  export { Invoke as Invoke, type InvokeInvokeAdHocParams as InvokeInvokeAdHocParams, type InvokeInvokeByTemplateParams as InvokeInvokeByTemplateParams, };
13
66
  }
14
67
  //# sourceMappingURL=automations.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"automations.d.ts","sourceRoot":"","sources":["../../src/resources/automations/automations.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,SAAS;OACd,EAAE,MAAM,EAAE,uBAAuB,EAAE,4BAA4B,EAAE;AAExE,qBAAa,WAAY,SAAQ,WAAW;IAC1C,MAAM,EAAE,SAAS,CAAC,MAAM,CAAsC;CAC/D;AAED,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,MAAM,CAAC;CACf;AAID,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EAAE,KAAK,wBAAwB,IAAI,wBAAwB,EAAE,CAAC;IAErE,OAAO,EACL,MAAM,IAAI,MAAM,EAChB,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,4BAA4B,IAAI,4BAA4B,GAClE,CAAC;CACH"}
1
+ {"version":3,"file":"automations.d.ts","source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EF,OAAO,EACL,MAAM,IAAI,MAAM,EAChB,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,4BAA4B,IAAI,4BAA4B,GAClE,CAAC;CACH"}
@@ -11,6 +11,18 @@ class Automations extends resource_1.APIResource {
11
11
  super(...arguments);
12
12
  this.invoke = new InvokeAPI.Invoke(this._client);
13
13
  }
14
+ /**
15
+ * Get the list of automations.
16
+ *
17
+ * @example
18
+ * ```ts
19
+ * const automationTemplateListResponse =
20
+ * await client.automations.list();
21
+ * ```
22
+ */
23
+ list(query = {}, options) {
24
+ return this._client.get('/automations', { query, ...options });
25
+ }
14
26
  }
15
27
  exports.Automations = Automations;
16
28
  Automations.Invoke = invoke_1.Invoke;
@@ -1 +1 @@
1
- {"version":3,"file":"automations.js","sourceRoot":"","sources":["../../src/resources/automations/automations.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,+DAAsC;AACtC,wCAAyF;AAEzF,MAAa,WAAY,SAAQ,sBAAW;IAA5C;;QACE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAChE,CAAC;CAAA;AAFD,kCAEC;AAMD,WAAW,CAAC,MAAM,GAAG,eAAM,CAAC"}
1
+ {"version":3,"file":"automations.js","sourceRoot":"","sources":["../../src/resources/automations/automations.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,+DAAsC;AACtC,wCAAyF;AAIzF,MAAa,WAAY,SAAQ,sBAAW;IAA5C;;QACE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAiBhE,CAAC;IAfC;;;;;;;;OAQG;IACH,IAAI,CACF,QAAiD,EAAE,EACnD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjE,CAAC;CACF;AAlBD,kCAkBC;AAwDD,WAAW,CAAC,MAAM,GAAG,eAAM,CAAC"}
@@ -7,6 +7,18 @@ export class Automations extends APIResource {
7
7
  super(...arguments);
8
8
  this.invoke = new InvokeAPI.Invoke(this._client);
9
9
  }
10
+ /**
11
+ * Get the list of automations.
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * const automationTemplateListResponse =
16
+ * await client.automations.list();
17
+ * ```
18
+ */
19
+ list(query = {}, options) {
20
+ return this._client.get('/automations', { query, ...options });
21
+ }
10
22
  }
11
23
  Automations.Invoke = Invoke;
12
24
  //# sourceMappingURL=automations.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"automations.mjs","sourceRoot":"","sources":["../../src/resources/automations/automations.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,SAAS;OACd,EAAE,MAAM,EAAyD;AAExE,MAAM,OAAO,WAAY,SAAQ,WAAW;IAA5C;;QACE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAChE,CAAC;CAAA;AAMD,WAAW,CAAC,MAAM,GAAG,MAAM,CAAC"}
1
+ {"version":3,"file":"automations.mjs","sourceRoot":"","sources":["../../src/resources/automations/automations.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,SAAS;OACd,EAAE,MAAM,EAAyD;AAIxE,MAAM,OAAO,WAAY,SAAQ,WAAW;IAA5C;;QACE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAiBhE,CAAC;IAfC;;;;;;;;OAQG;IACH,IAAI,CACF,QAAiD,EAAE,EACnD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjE,CAAC;CACF;AAwDD,WAAW,CAAC,MAAM,GAAG,MAAM,CAAC"}
@@ -1,3 +1,3 @@
1
- export { Automations, type AutomationInvokeResponse } from "./automations.mjs";
1
+ export { Automations, type AutomationInvokeResponse, type AutomationTemplate, type AutomationTemplateListResponse, type AutomationListParams, } from "./automations.mjs";
2
2
  export { Invoke, type InvokeInvokeAdHocParams, type InvokeInvokeByTemplateParams } from "./invoke.mjs";
3
3
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/automations/index.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE,KAAK,wBAAwB,EAAE;OAC9C,EAAE,MAAM,EAAE,KAAK,uBAAuB,EAAE,KAAK,4BAA4B,EAAE"}
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/automations/index.ts"],"names":[],"mappings":"OAEO,EACL,WAAW,EACX,KAAK,wBAAwB,EAC7B,KAAK,kBAAkB,EACvB,KAAK,8BAA8B,EACnC,KAAK,oBAAoB,GAC1B;OACM,EAAE,MAAM,EAAE,KAAK,uBAAuB,EAAE,KAAK,4BAA4B,EAAE"}
@@ -1,3 +1,3 @@
1
- export { Automations, type AutomationInvokeResponse } from "./automations.js";
1
+ export { Automations, type AutomationInvokeResponse, type AutomationTemplate, type AutomationTemplateListResponse, type AutomationListParams, } from "./automations.js";
2
2
  export { Invoke, type InvokeInvokeAdHocParams, type InvokeInvokeByTemplateParams } from "./invoke.js";
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/automations/index.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE,KAAK,wBAAwB,EAAE;OAC9C,EAAE,MAAM,EAAE,KAAK,uBAAuB,EAAE,KAAK,4BAA4B,EAAE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/automations/index.ts"],"names":[],"mappings":"OAEO,EACL,WAAW,EACX,KAAK,wBAAwB,EAC7B,KAAK,kBAAkB,EACvB,KAAK,8BAA8B,EACnC,KAAK,oBAAoB,GAC1B;OACM,EAAE,MAAM,EAAE,KAAK,uBAAuB,EAAE,KAAK,4BAA4B,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/automations/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gDAA2E;AAAlE,0GAAA,WAAW,OAAA;AACpB,sCAAmG;AAA1F,gGAAA,MAAM,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/automations/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gDAMuB;AALrB,0GAAA,WAAW,OAAA;AAMb,sCAAmG;AAA1F,gGAAA,MAAM,OAAA"}
@@ -1,4 +1,4 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- export { Automations } from "./automations.mjs";
2
+ export { Automations, } from "./automations.mjs";
3
3
  export { Invoke } from "./invoke.mjs";
4
4
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/automations/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAiC;OAC9C,EAAE,MAAM,EAAmE"}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/automations/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,WAAW,GAKZ;OACM,EAAE,MAAM,EAAmE"}
@@ -5,11 +5,21 @@ import { APIPromise } from "../core/api-promise.mjs";
5
5
  import { RequestOptions } from "../internal/request-options.mjs";
6
6
  export declare class Bulk extends APIResource {
7
7
  /**
8
- * Ingest user data into a Bulk Job
8
+ * Ingest user data into a Bulk Job.
9
+ *
10
+ * **Important**: For email-based bulk jobs, each user must include `profile.email`
11
+ * for provider routing to work correctly. The `to.email` field is not sufficient
12
+ * for email provider routing.
9
13
  */
10
14
  addUsers(jobID: string, body: BulkAddUsersParams, options?: RequestOptions): APIPromise<void>;
11
15
  /**
12
- * Create a bulk job
16
+ * Creates a new bulk job for sending messages to multiple recipients.
17
+ *
18
+ * **Required**: `message.event` (event ID or notification ID)
19
+ *
20
+ * **Optional (V2 format)**: `message.template` (notification ID) or
21
+ * `message.content` (Elemental content) can be provided to override the
22
+ * notification associated with the event.
13
23
  */
14
24
  createJob(body: BulkCreateJobParams, options?: RequestOptions): APIPromise<BulkCreateJobResponse>;
15
25
  /**
@@ -25,49 +35,66 @@ export declare class Bulk extends APIResource {
25
35
  */
26
36
  runJob(jobID: string, options?: RequestOptions): APIPromise<void>;
27
37
  }
28
- export type InboundBulkMessage = InboundBulkMessage.InboundBulkTemplateMessage | InboundBulkMessage.InboundBulkContentMessage;
29
- export declare namespace InboundBulkMessage {
30
- interface InboundBulkTemplateMessage {
31
- template: string;
32
- brand?: string | null;
33
- data?: {
34
- [key: string]: unknown;
35
- } | null;
36
- event?: string | null;
37
- locale?: {
38
- [key: string]: {
39
- [key: string]: unknown;
40
- };
41
- } | null;
42
- override?: {
43
- [key: string]: unknown;
44
- } | null;
45
- }
46
- interface InboundBulkContentMessage {
47
- /**
48
- * Syntactic sugar to provide a fast shorthand for Courier Elemental Blocks.
49
- */
50
- content: Shared.ElementalContentSugar | Shared.ElementalContent;
51
- brand?: string | null;
52
- data?: {
53
- [key: string]: unknown;
54
- } | null;
55
- event?: string | null;
56
- locale?: {
57
- [key: string]: {
58
- [key: string]: unknown;
59
- };
60
- } | null;
61
- override?: {
38
+ /**
39
+ * Bulk message definition. Supports two formats:
40
+ *
41
+ * - V1 format: Requires `event` field (event ID or notification ID)
42
+ * - V2 format: Optionally use `template` (notification ID) or `content` (Elemental
43
+ * content) in addition to `event`
44
+ */
45
+ export interface InboundBulkMessage {
46
+ /**
47
+ * Event ID or Notification ID (required). Can be either a Notification ID (e.g.,
48
+ * "FRH3QXM9E34W4RKP7MRC8NZ1T8V8") or a custom Event ID (e.g., "welcome-email")
49
+ * mapped to a notification.
50
+ */
51
+ event: string;
52
+ brand?: string | null;
53
+ /**
54
+ * Elemental content (optional, for V2 format). When provided, this will be used
55
+ * instead of the notification associated with the `event` field.
56
+ */
57
+ content?: Shared.ElementalContentSugar | Shared.ElementalContent | null;
58
+ data?: {
59
+ [key: string]: unknown;
60
+ } | null;
61
+ locale?: {
62
+ [key: string]: {
62
63
  [key: string]: unknown;
63
- } | null;
64
- }
64
+ };
65
+ } | null;
66
+ override?: {
67
+ [key: string]: unknown;
68
+ } | null;
69
+ /**
70
+ * Notification ID or template ID (optional, for V2 format). When provided, this
71
+ * will be used instead of the notification associated with the `event` field.
72
+ */
73
+ template?: string | null;
65
74
  }
66
75
  export interface InboundBulkMessageUser {
76
+ /**
77
+ * User-specific data that will be merged with message.data
78
+ */
67
79
  data?: unknown;
68
80
  preferences?: Shared.RecipientPreferences | null;
69
- profile?: unknown;
81
+ /**
82
+ * User profile information. For email-based bulk jobs, `profile.email` is required
83
+ * for provider routing to determine if the message can be delivered. The email
84
+ * address should be provided here rather than in `to.email`.
85
+ */
86
+ profile?: {
87
+ [key: string]: unknown;
88
+ } | null;
89
+ /**
90
+ * User ID (legacy field, use profile or to.user_id instead)
91
+ */
70
92
  recipient?: string | null;
93
+ /**
94
+ * Optional recipient information. Note: For email provider routing, use
95
+ * `profile.email` instead of `to.email`. The `to` field is primarily used for
96
+ * recipient identification and data merging.
97
+ */
71
98
  to?: Shared.UserRecipient | null;
72
99
  }
73
100
  export interface BulkCreateJobResponse {
@@ -88,6 +115,13 @@ export interface BulkRetrieveJobResponse {
88
115
  }
89
116
  export declare namespace BulkRetrieveJobResponse {
90
117
  interface Job {
118
+ /**
119
+ * Bulk message definition. Supports two formats:
120
+ *
121
+ * - V1 format: Requires `event` field (event ID or notification ID)
122
+ * - V2 format: Optionally use `template` (notification ID) or `content` (Elemental
123
+ * content) in addition to `event`
124
+ */
91
125
  definition: BulkAPI.InboundBulkMessage;
92
126
  enqueued: number;
93
127
  failures: number;
@@ -99,6 +133,13 @@ export interface BulkAddUsersParams {
99
133
  users: Array<InboundBulkMessageUser>;
100
134
  }
101
135
  export interface BulkCreateJobParams {
136
+ /**
137
+ * Bulk message definition. Supports two formats:
138
+ *
139
+ * - V1 format: Requires `event` field (event ID or notification ID)
140
+ * - V2 format: Optionally use `template` (notification ID) or `content` (Elemental
141
+ * content) in addition to `event`
142
+ */
102
143
  message: InboundBulkMessage;
103
144
  }
104
145
  export interface BulkListUsersParams {
@@ -1 +1 @@
1
- {"version":3,"file":"bulk.d.mts","sourceRoot":"","sources":["../src/resources/bulk.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,OAAO;OACZ,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB,qBAAa,IAAK,SAAQ,WAAW;IACnC;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAQ7F;;OAEG;IACH,SAAS,CAAC,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC;IAIjG;;OAEG;IACH,SAAS,CACP,KAAK,EAAE,MAAM,EACb,KAAK,GAAE,mBAAmB,GAAG,IAAI,GAAG,SAAc,EAClD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,qBAAqB,CAAC;IAIpC;;OAEG;IACH,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC;IAIzF;;OAEG;IACH,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;CAMlE;AAED,MAAM,MAA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AAO,CAAC,sBAAsB;QAC1D,MAAM,EAAE,SAAS,GAAG,UAAU,GAAG,OAAO,CAAC;QAEzC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KAC3B;CACF;AAED,MAAM,WAAW,uBAAuB;IACtC,GAAG,EAAE,uBAAuB,CAAC,GAAG,CAAC;CAClC;AAED,yBAAiB,uBAAuB,CAAC;IACvC,UAAiB,GAAG;QAClB;;;;;;WAMG;QACH,UAAU,EAAE,OAAO,CAAC,kBAAkB,CAAC;QAEvC,QAAQ,EAAE,MAAM,CAAC;QAEjB,QAAQ,EAAE,MAAM,CAAC;QAEjB,QAAQ,EAAE,MAAM,CAAC;QAEjB,MAAM,EAAE,SAAS,GAAG,YAAY,GAAG,WAAW,GAAG,OAAO,CAAC;KAC1D;CACF;AAED,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,KAAK,CAAC,sBAAsB,CAAC,CAAC;CACtC;AAED,MAAM,WAAW,mBAAmB;IAClC;;;;;;OAMG;IACH,OAAO,EAAE,kBAAkB,CAAC;CAC7B;AAED,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EACL,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
@@ -5,11 +5,21 @@ import { APIPromise } from "../core/api-promise.js";
5
5
  import { RequestOptions } from "../internal/request-options.js";
6
6
  export declare class Bulk extends APIResource {
7
7
  /**
8
- * Ingest user data into a Bulk Job
8
+ * Ingest user data into a Bulk Job.
9
+ *
10
+ * **Important**: For email-based bulk jobs, each user must include `profile.email`
11
+ * for provider routing to work correctly. The `to.email` field is not sufficient
12
+ * for email provider routing.
9
13
  */
10
14
  addUsers(jobID: string, body: BulkAddUsersParams, options?: RequestOptions): APIPromise<void>;
11
15
  /**
12
- * Create a bulk job
16
+ * Creates a new bulk job for sending messages to multiple recipients.
17
+ *
18
+ * **Required**: `message.event` (event ID or notification ID)
19
+ *
20
+ * **Optional (V2 format)**: `message.template` (notification ID) or
21
+ * `message.content` (Elemental content) can be provided to override the
22
+ * notification associated with the event.
13
23
  */
14
24
  createJob(body: BulkCreateJobParams, options?: RequestOptions): APIPromise<BulkCreateJobResponse>;
15
25
  /**
@@ -25,49 +35,66 @@ export declare class Bulk extends APIResource {
25
35
  */
26
36
  runJob(jobID: string, options?: RequestOptions): APIPromise<void>;
27
37
  }
28
- export type InboundBulkMessage = InboundBulkMessage.InboundBulkTemplateMessage | InboundBulkMessage.InboundBulkContentMessage;
29
- export declare namespace InboundBulkMessage {
30
- interface InboundBulkTemplateMessage {
31
- template: string;
32
- brand?: string | null;
33
- data?: {
34
- [key: string]: unknown;
35
- } | null;
36
- event?: string | null;
37
- locale?: {
38
- [key: string]: {
39
- [key: string]: unknown;
40
- };
41
- } | null;
42
- override?: {
43
- [key: string]: unknown;
44
- } | null;
45
- }
46
- interface InboundBulkContentMessage {
47
- /**
48
- * Syntactic sugar to provide a fast shorthand for Courier Elemental Blocks.
49
- */
50
- content: Shared.ElementalContentSugar | Shared.ElementalContent;
51
- brand?: string | null;
52
- data?: {
53
- [key: string]: unknown;
54
- } | null;
55
- event?: string | null;
56
- locale?: {
57
- [key: string]: {
58
- [key: string]: unknown;
59
- };
60
- } | null;
61
- override?: {
38
+ /**
39
+ * Bulk message definition. Supports two formats:
40
+ *
41
+ * - V1 format: Requires `event` field (event ID or notification ID)
42
+ * - V2 format: Optionally use `template` (notification ID) or `content` (Elemental
43
+ * content) in addition to `event`
44
+ */
45
+ export interface InboundBulkMessage {
46
+ /**
47
+ * Event ID or Notification ID (required). Can be either a Notification ID (e.g.,
48
+ * "FRH3QXM9E34W4RKP7MRC8NZ1T8V8") or a custom Event ID (e.g., "welcome-email")
49
+ * mapped to a notification.
50
+ */
51
+ event: string;
52
+ brand?: string | null;
53
+ /**
54
+ * Elemental content (optional, for V2 format). When provided, this will be used
55
+ * instead of the notification associated with the `event` field.
56
+ */
57
+ content?: Shared.ElementalContentSugar | Shared.ElementalContent | null;
58
+ data?: {
59
+ [key: string]: unknown;
60
+ } | null;
61
+ locale?: {
62
+ [key: string]: {
62
63
  [key: string]: unknown;
63
- } | null;
64
- }
64
+ };
65
+ } | null;
66
+ override?: {
67
+ [key: string]: unknown;
68
+ } | null;
69
+ /**
70
+ * Notification ID or template ID (optional, for V2 format). When provided, this
71
+ * will be used instead of the notification associated with the `event` field.
72
+ */
73
+ template?: string | null;
65
74
  }
66
75
  export interface InboundBulkMessageUser {
76
+ /**
77
+ * User-specific data that will be merged with message.data
78
+ */
67
79
  data?: unknown;
68
80
  preferences?: Shared.RecipientPreferences | null;
69
- profile?: unknown;
81
+ /**
82
+ * User profile information. For email-based bulk jobs, `profile.email` is required
83
+ * for provider routing to determine if the message can be delivered. The email
84
+ * address should be provided here rather than in `to.email`.
85
+ */
86
+ profile?: {
87
+ [key: string]: unknown;
88
+ } | null;
89
+ /**
90
+ * User ID (legacy field, use profile or to.user_id instead)
91
+ */
70
92
  recipient?: string | null;
93
+ /**
94
+ * Optional recipient information. Note: For email provider routing, use
95
+ * `profile.email` instead of `to.email`. The `to` field is primarily used for
96
+ * recipient identification and data merging.
97
+ */
71
98
  to?: Shared.UserRecipient | null;
72
99
  }
73
100
  export interface BulkCreateJobResponse {
@@ -88,6 +115,13 @@ export interface BulkRetrieveJobResponse {
88
115
  }
89
116
  export declare namespace BulkRetrieveJobResponse {
90
117
  interface Job {
118
+ /**
119
+ * Bulk message definition. Supports two formats:
120
+ *
121
+ * - V1 format: Requires `event` field (event ID or notification ID)
122
+ * - V2 format: Optionally use `template` (notification ID) or `content` (Elemental
123
+ * content) in addition to `event`
124
+ */
91
125
  definition: BulkAPI.InboundBulkMessage;
92
126
  enqueued: number;
93
127
  failures: number;
@@ -99,6 +133,13 @@ export interface BulkAddUsersParams {
99
133
  users: Array<InboundBulkMessageUser>;
100
134
  }
101
135
  export interface BulkCreateJobParams {
136
+ /**
137
+ * Bulk message definition. Supports two formats:
138
+ *
139
+ * - V1 format: Requires `event` field (event ID or notification ID)
140
+ * - V2 format: Optionally use `template` (notification ID) or `content` (Elemental
141
+ * content) in addition to `event`
142
+ */
102
143
  message: InboundBulkMessage;
103
144
  }
104
145
  export interface BulkListUsersParams {
@@ -1 +1 @@
1
- {"version":3,"file":"bulk.d.ts","sourceRoot":"","sources":["../src/resources/bulk.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,OAAO;OACZ,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB,qBAAa,IAAK,SAAQ,WAAW;IACnC;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAQ7F;;OAEG;IACH,SAAS,CAAC,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC;IAIjG;;OAEG;IACH,SAAS,CACP,KAAK,EAAE,MAAM,EACb,KAAK,GAAE,mBAAmB,GAAG,IAAI,GAAG,SAAc,EAClD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,qBAAqB,CAAC;IAIpC;;OAEG;IACH,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC;IAIzF;;OAEG;IACH,MAAM,CAAC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-7,7 +7,11 @@ const headers_1 = require("../internal/headers.js");
7
7
  const path_1 = require("../internal/utils/path.js");
8
8
  class Bulk extends resource_1.APIResource {
9
9
  /**
10
- * Ingest user data into a Bulk Job
10
+ * Ingest user data into a Bulk Job.
11
+ *
12
+ * **Important**: For email-based bulk jobs, each user must include `profile.email`
13
+ * for provider routing to work correctly. The `to.email` field is not sufficient
14
+ * for email provider routing.
11
15
  */
12
16
  addUsers(jobID, body, options) {
13
17
  return this._client.post((0, path_1.path) `/bulk/${jobID}`, {
@@ -17,7 +21,13 @@ class Bulk extends resource_1.APIResource {
17
21
  });
18
22
  }
19
23
  /**
20
- * Create a bulk job
24
+ * Creates a new bulk job for sending messages to multiple recipients.
25
+ *
26
+ * **Required**: `message.event` (event ID or notification ID)
27
+ *
28
+ * **Optional (V2 format)**: `message.template` (notification ID) or
29
+ * `message.content` (Elemental content) can be provided to override the
30
+ * notification associated with the event.
21
31
  */
22
32
  createJob(body, options) {
23
33
  return this._client.post('/bulk', { body, ...options });
@@ -1 +1 @@
1
- {"version":3,"file":"bulk.js","sourceRoot":"","sources":["../src/resources/bulk.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,oDAAmD;AAEnD,oDAA8C;AAE9C,MAAa,IAAK,SAAQ,sBAAW;IACnC;;OAEG;IACH,QAAQ,CAAC,KAAa,EAAE,IAAwB,EAAE,OAAwB;QACxE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,SAAS,KAAK,EAAE,EAAE;YAC7C,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,SAAS,CAAC,IAAyB,EAAE,OAAwB;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OA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AC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;OAQG;IACH,SAAS,CAAC,IAAyB,EAAE,OAAwB;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1D,CAAC;IAED;;OAEG;IACH,SAAS,CACP,KAAa,EACb,QAAgD,EAAE,EAClD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,SAAS,KAAK,QAAQ,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;IAED;;OAEG;IACH,WAAW,CAAC,KAAa,EAAE,OAAwB;QACjD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,SAAS,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;IACzD,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,KAAa,EAAE,OAAwB;QAC5C,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,SAAS,KAAK,MAAM,EAAE;YACjD,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF;AAxDD,oBAwDC"}
@@ -4,7 +4,11 @@ import { buildHeaders } from "../internal/headers.mjs";
4
4
  import { path } from "../internal/utils/path.mjs";
5
5
  export class Bulk extends APIResource {
6
6
  /**
7
- * Ingest user data into a Bulk Job
7
+ * Ingest user data into a Bulk Job.
8
+ *
9
+ * **Important**: For email-based bulk jobs, each user must include `profile.email`
10
+ * for provider routing to work correctly. The `to.email` field is not sufficient
11
+ * for email provider routing.
8
12
  */
9
13
  addUsers(jobID, body, options) {
10
14
  return this._client.post(path `/bulk/${jobID}`, {
@@ -14,7 +18,13 @@ export class Bulk extends APIResource {
14
18
  });
15
19
  }
16
20
  /**
17
- * Create a bulk job
21
+ * Creates a new bulk job for sending messages to multiple recipients.
22
+ *
23
+ * **Required**: `message.event` (event ID or notification ID)
24
+ *
25
+ * **Optional (V2 format)**: `message.template` (notification ID) or
26
+ * `message.content` (Elemental content) can be provided to override the
27
+ * notification associated with the event.
18
28
  */
19
29
  createJob(body, options) {
20
30
  return this._client.post('/bulk', { body, ...options });
@@ -1 +1 @@
1
- {"version":3,"file":"bulk.mjs","sourceRoot":"","sources":["../src/resources/bulk.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,IAAK,SAAQ,WAAW;IACnC;;OAEG;IACH,QAAQ,CAAC,KAAa,EAAE,IAAwB,EAAE,OAAwB;QACxE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,SAAS,KAAK,EAAE,EAAE;YAC7C,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,SAAS,CAAC,IAAyB,EAAE,OAAwB;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1D,CAAC;IAED;;OAEG;IACH,SAAS,CACP,KAAa,EACb,QAAgD,EAAE,EAClD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,SAAS,KAAK,QAAQ,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;IAED;;OAEG;IACH,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AG,CAAC,IAAI,CAAA,SAAS,KAAK,QAAQ,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;IAED;;OAEG;IACH,WAAW,CAAC,KAAa,EAAE,OAAwB;QACjD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,SAAS,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;IACzD,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,KAAa,EAAE,OAAwB;QAC5C,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,SAAS,KAAK,MAAM,EAAE;YACjD,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -45,7 +45,7 @@ export interface InboundTrackEventParams {
45
45
  };
46
46
  type: 'track';
47
47
  /**
48
- * The user id associatiated with the track
48
+ * The user id associated with the track
49
49
  */
50
50
  userId?: string | null;
51
51
  }
@@ -45,7 +45,7 @@ export interface InboundTrackEventParams {
45
45
  };
46
46
  type: 'track';
47
47
  /**
48
- * The user id associatiated with the track
48
+ * The user id associated with the track
49
49
  */
50
50
  userId?: string | null;
51
51
  }
@@ -1,18 +1,19 @@
1
1
  export * from "./shared.mjs";
2
- export { Audiences, type Audience, type Filter, type FilterConfig, type AudienceUpdateResponse, type AudienceListResponse, type AudienceListMembersResponse, type AudienceUpdateParams, type AudienceListParams, type AudienceListMembersParams, } from "./audiences.mjs";
2
+ export { Audiences, type Audience, type AudienceUpdateResponse, type AudienceListResponse, type AudienceListMembersResponse, type AudienceUpdateParams, type AudienceListParams, type AudienceListMembersParams, } from "./audiences.mjs";
3
3
  export { AuditEvents, type AuditEvent, type AuditEventListResponse, type AuditEventListParams, } from "./audit-events.mjs";
4
4
  export { Auth, type AuthIssueTokenResponse, type AuthIssueTokenParams } from "./auth.mjs";
5
- export { Automations, type AutomationInvokeResponse } from "./automations/automations.mjs";
5
+ export { Automations, type AutomationInvokeResponse, type AutomationTemplate, type AutomationTemplateListResponse, type AutomationListParams, } from "./automations/automations.mjs";
6
6
  export { Brands, type Brand, type BrandColors, type BrandSettings, type BrandSettingsEmail, type BrandSettingsInApp, type BrandSnippet, type BrandSnippets, type BrandTemplate, type EmailFooter, type EmailHead, type EmailHeader, type Icons, type Logo, type WidgetBackground, type BrandListResponse, type BrandCreateParams, type BrandUpdateParams, type BrandListParams, } from "./brands.mjs";
7
7
  export { Bulk, type InboundBulkMessage, type InboundBulkMessageUser, type BulkCreateJobResponse, type BulkListUsersResponse, type BulkRetrieveJobResponse, type BulkAddUsersParams, type BulkCreateJobParams, type BulkListUsersParams, } from "./bulk.mjs";
8
8
  export { Inbound, type InboundTrackEventResponse, type InboundTrackEventParams } from "./inbound.mjs";
9
+ export { Journeys, type Journey, type JourneysInvokeRequest, type JourneysInvokeResponse, type JourneysListResponse, type JourneyListParams, type JourneyInvokeParams, } from "./journeys.mjs";
9
10
  export { Lists, type PutSubscriptionsRecipient, type SubscriptionList, type ListListResponse, type ListUpdateParams, type ListListParams, type ListRestoreParams, } from "./lists/lists.mjs";
10
11
  export { Messages, type MessageDetails, type MessageRetrieveResponse, type MessageListResponse, type MessageContentResponse, type MessageHistoryResponse, type MessageListParams, type MessageHistoryParams, } from "./messages.mjs";
11
12
  export { Notifications, type BaseCheck, type Check, type NotificationGetContent, type NotificationListResponse, type NotificationListParams, } from "./notifications/notifications.mjs";
12
13
  export { Profiles, type SubscribeToListsRequestItem, type ProfileCreateResponse, type ProfileRetrieveResponse, type ProfileReplaceResponse, type ProfileCreateParams, type ProfileUpdateParams, type ProfileReplaceParams, } from "./profiles/profiles.mjs";
13
14
  export { Requests } from "./requests.mjs";
14
15
  export { Send, type SendMessageResponse, type SendMessageParams } from "./send.mjs";
15
- export { Tenants, type BaseTemplateTenantAssociation, type DefaultPreferences, type SubscriptionTopicNew, type Tenant, type TenantAssociation, type TenantListResponse, type TenantListUsersResponse, type TenantUpdateParams, type TenantListParams, type TenantListUsersParams, } from "./tenants/tenants.mjs";
16
+ export { Tenants, type BaseTemplateTenantAssociation, type DefaultPreferences, type PostTenantTemplatePublishRequest, type PostTenantTemplatePublishResponse, type PutTenantTemplateRequest, type PutTenantTemplateResponse, type SubscriptionTopicNew, type Tenant, type TenantAssociation, type TenantTemplateInput, type TenantListResponse, type TenantListUsersResponse, type TenantUpdateParams, type TenantListParams, type TenantListUsersParams, } from "./tenants/tenants.mjs";
16
17
  export { Translations, type TranslationRetrieveResponse, type TranslationRetrieveParams, type TranslationUpdateParams, } from "./translations.mjs";
17
18
  export { Users } from "./users/users.mjs";
18
19
  //# sourceMappingURL=index.d.mts.map