@trycourier/courier 6.7.0-alpha4 → 7.0.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 (278) hide show
  1. package/CHANGELOG.md +116 -0
  2. package/README.md +14 -8
  3. package/client.d.mts +32 -15
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +32 -15
  6. package/client.d.ts.map +1 -1
  7. package/client.js.map +1 -1
  8. package/client.mjs +1 -1
  9. package/client.mjs.map +1 -1
  10. package/package.json +2 -2
  11. package/resources/audiences.d.mts +4 -7
  12. package/resources/audiences.d.mts.map +1 -1
  13. package/resources/audiences.d.ts +4 -7
  14. package/resources/audiences.d.ts.map +1 -1
  15. package/resources/audiences.js.map +1 -1
  16. package/resources/audiences.mjs.map +1 -1
  17. package/resources/audit-events.d.mts +2 -2
  18. package/resources/audit-events.d.mts.map +1 -1
  19. package/resources/audit-events.d.ts +2 -2
  20. package/resources/audit-events.d.ts.map +1 -1
  21. package/resources/automations/automations.d.mts +6 -2
  22. package/resources/automations/automations.d.mts.map +1 -1
  23. package/resources/automations/automations.d.ts +6 -2
  24. package/resources/automations/automations.d.ts.map +1 -1
  25. package/resources/automations/automations.js.map +1 -1
  26. package/resources/automations/automations.mjs +1 -1
  27. package/resources/automations/automations.mjs.map +1 -1
  28. package/resources/automations/index.d.mts +2 -2
  29. package/resources/automations/index.d.mts.map +1 -1
  30. package/resources/automations/index.d.ts +2 -2
  31. package/resources/automations/index.d.ts.map +1 -1
  32. package/resources/automations/index.js.map +1 -1
  33. package/resources/automations/index.mjs +1 -1
  34. package/resources/automations/index.mjs.map +1 -1
  35. package/resources/automations/invoke.d.mts +4 -6
  36. package/resources/automations/invoke.d.mts.map +1 -1
  37. package/resources/automations/invoke.d.ts +4 -6
  38. package/resources/automations/invoke.d.ts.map +1 -1
  39. package/resources/automations/invoke.js.map +1 -1
  40. package/resources/automations/invoke.mjs.map +1 -1
  41. package/resources/brands.d.mts +2 -2
  42. package/resources/brands.d.mts.map +1 -1
  43. package/resources/brands.d.ts +2 -2
  44. package/resources/brands.d.ts.map +1 -1
  45. package/resources/bulk.d.mts +3 -6
  46. package/resources/bulk.d.mts.map +1 -1
  47. package/resources/bulk.d.ts +3 -6
  48. package/resources/bulk.d.ts.map +1 -1
  49. package/resources/bulk.js.map +1 -1
  50. package/resources/bulk.mjs.map +1 -1
  51. package/resources/index.d.mts +7 -7
  52. package/resources/index.d.mts.map +1 -1
  53. package/resources/index.d.ts +7 -7
  54. package/resources/index.d.ts.map +1 -1
  55. package/resources/index.js.map +1 -1
  56. package/resources/index.mjs +1 -1
  57. package/resources/index.mjs.map +1 -1
  58. package/resources/lists/index.d.mts +2 -2
  59. package/resources/lists/index.d.mts.map +1 -1
  60. package/resources/lists/index.d.ts +2 -2
  61. package/resources/lists/index.d.ts.map +1 -1
  62. package/resources/lists/index.js.map +1 -1
  63. package/resources/lists/index.mjs.map +1 -1
  64. package/resources/lists/lists.d.mts +13 -9
  65. package/resources/lists/lists.d.mts.map +1 -1
  66. package/resources/lists/lists.d.ts +13 -9
  67. package/resources/lists/lists.d.ts.map +1 -1
  68. package/resources/lists/lists.js.map +1 -1
  69. package/resources/lists/lists.mjs.map +1 -1
  70. package/resources/lists/subscriptions.d.mts +7 -26
  71. package/resources/lists/subscriptions.d.mts.map +1 -1
  72. package/resources/lists/subscriptions.d.ts +7 -26
  73. package/resources/lists/subscriptions.d.ts.map +1 -1
  74. package/resources/lists/subscriptions.js.map +1 -1
  75. package/resources/lists/subscriptions.mjs.map +1 -1
  76. package/resources/messages.d.mts +2 -2
  77. package/resources/messages.d.mts.map +1 -1
  78. package/resources/messages.d.ts +2 -2
  79. package/resources/messages.d.ts.map +1 -1
  80. package/resources/notifications/checks.d.mts +5 -12
  81. package/resources/notifications/checks.d.mts.map +1 -1
  82. package/resources/notifications/checks.d.ts +5 -12
  83. package/resources/notifications/checks.d.ts.map +1 -1
  84. package/resources/notifications/checks.js.map +1 -1
  85. package/resources/notifications/checks.mjs.map +1 -1
  86. package/resources/notifications/index.d.mts +2 -2
  87. package/resources/notifications/index.d.mts.map +1 -1
  88. package/resources/notifications/index.d.ts +2 -2
  89. package/resources/notifications/index.d.ts.map +1 -1
  90. package/resources/notifications/index.js.map +1 -1
  91. package/resources/notifications/index.mjs.map +1 -1
  92. package/resources/notifications/notifications.d.mts +12 -5
  93. package/resources/notifications/notifications.d.mts.map +1 -1
  94. package/resources/notifications/notifications.d.ts +12 -5
  95. package/resources/notifications/notifications.d.ts.map +1 -1
  96. package/resources/notifications/notifications.js.map +1 -1
  97. package/resources/notifications/notifications.mjs.map +1 -1
  98. package/resources/profiles/index.d.mts +1 -1
  99. package/resources/profiles/index.d.mts.map +1 -1
  100. package/resources/profiles/index.d.ts +1 -1
  101. package/resources/profiles/index.d.ts.map +1 -1
  102. package/resources/profiles/index.js.map +1 -1
  103. package/resources/profiles/index.mjs.map +1 -1
  104. package/resources/profiles/lists.d.mts +5 -11
  105. package/resources/profiles/lists.d.mts.map +1 -1
  106. package/resources/profiles/lists.d.ts +5 -11
  107. package/resources/profiles/lists.d.ts.map +1 -1
  108. package/resources/profiles/profiles.d.mts +7 -3
  109. package/resources/profiles/profiles.d.mts.map +1 -1
  110. package/resources/profiles/profiles.d.ts +7 -3
  111. package/resources/profiles/profiles.d.ts.map +1 -1
  112. package/resources/profiles/profiles.js.map +1 -1
  113. package/resources/profiles/profiles.mjs.map +1 -1
  114. package/resources/send.d.mts +9 -139
  115. package/resources/send.d.mts.map +1 -1
  116. package/resources/send.d.ts +9 -139
  117. package/resources/send.d.ts.map +1 -1
  118. package/resources/send.js +2 -2
  119. package/resources/send.js.map +1 -1
  120. package/resources/send.mjs +2 -2
  121. package/resources/send.mjs.map +1 -1
  122. package/resources/shared.d.mts +180 -13
  123. package/resources/shared.d.mts.map +1 -1
  124. package/resources/shared.d.ts +180 -13
  125. package/resources/shared.d.ts.map +1 -1
  126. package/resources/tenants/index.d.mts +3 -2
  127. package/resources/tenants/index.d.mts.map +1 -1
  128. package/resources/tenants/index.d.ts +3 -2
  129. package/resources/tenants/index.d.ts.map +1 -1
  130. package/resources/tenants/index.js +3 -1
  131. package/resources/tenants/index.js.map +1 -1
  132. package/resources/tenants/index.mjs +1 -0
  133. package/resources/tenants/index.mjs.map +1 -1
  134. package/resources/tenants/preferences/index.d.mts +3 -0
  135. package/resources/tenants/preferences/index.d.mts.map +1 -0
  136. package/resources/tenants/preferences/index.d.ts +3 -0
  137. package/resources/tenants/preferences/index.d.ts.map +1 -0
  138. package/resources/tenants/{default-preferences → preferences}/index.js +3 -3
  139. package/resources/tenants/preferences/index.js.map +1 -0
  140. package/resources/tenants/preferences/index.mjs +4 -0
  141. package/resources/tenants/preferences/index.mjs.map +1 -0
  142. package/resources/tenants/{default-preferences → preferences}/items.d.mts +12 -29
  143. package/resources/tenants/preferences/items.d.mts.map +1 -0
  144. package/resources/tenants/{default-preferences → preferences}/items.d.ts +12 -29
  145. package/resources/tenants/preferences/items.d.ts.map +1 -0
  146. package/resources/tenants/{default-preferences → preferences}/items.js +9 -13
  147. package/resources/tenants/preferences/items.js.map +1 -0
  148. package/resources/tenants/{default-preferences → preferences}/items.mjs +9 -13
  149. package/resources/tenants/preferences/items.mjs.map +1 -0
  150. package/resources/tenants/preferences/preferences.d.mts +10 -0
  151. package/resources/tenants/preferences/preferences.d.mts.map +1 -0
  152. package/resources/tenants/preferences/preferences.d.ts +10 -0
  153. package/resources/tenants/preferences/preferences.d.ts.map +1 -0
  154. package/resources/tenants/{default-preferences/default-preferences.js → preferences/preferences.js} +5 -5
  155. package/resources/tenants/preferences/preferences.js.map +1 -0
  156. package/resources/tenants/{default-preferences/default-preferences.mjs → preferences/preferences.mjs} +4 -4
  157. package/resources/tenants/preferences/preferences.mjs.map +1 -0
  158. package/resources/tenants/preferences.d.mts +2 -0
  159. package/resources/tenants/preferences.d.mts.map +1 -0
  160. package/resources/tenants/preferences.d.ts +2 -0
  161. package/resources/tenants/preferences.d.ts.map +1 -0
  162. package/resources/tenants/{default-preferences.js → preferences.js} +2 -2
  163. package/resources/tenants/preferences.js.map +1 -0
  164. package/resources/tenants/preferences.mjs +3 -0
  165. package/resources/tenants/preferences.mjs.map +1 -0
  166. package/resources/tenants/templates.d.mts +4 -35
  167. package/resources/tenants/templates.d.mts.map +1 -1
  168. package/resources/tenants/templates.d.ts +4 -35
  169. package/resources/tenants/templates.d.ts.map +1 -1
  170. package/resources/tenants/templates.js.map +1 -1
  171. package/resources/tenants/templates.mjs.map +1 -1
  172. package/resources/tenants/tenants.d.mts +64 -9
  173. package/resources/tenants/tenants.d.mts.map +1 -1
  174. package/resources/tenants/tenants.d.ts +64 -9
  175. package/resources/tenants/tenants.d.ts.map +1 -1
  176. package/resources/tenants/tenants.js +4 -2
  177. package/resources/tenants/tenants.js.map +1 -1
  178. package/resources/tenants/tenants.mjs +5 -3
  179. package/resources/tenants/tenants.mjs.map +1 -1
  180. package/resources/users/index.d.mts +2 -2
  181. package/resources/users/index.d.mts.map +1 -1
  182. package/resources/users/index.d.ts +2 -2
  183. package/resources/users/index.d.ts.map +1 -1
  184. package/resources/users/index.js.map +1 -1
  185. package/resources/users/index.mjs.map +1 -1
  186. package/resources/users/preferences.d.mts +8 -11
  187. package/resources/users/preferences.d.mts.map +1 -1
  188. package/resources/users/preferences.d.ts +8 -11
  189. package/resources/users/preferences.d.ts.map +1 -1
  190. package/resources/users/preferences.js.map +1 -1
  191. package/resources/users/preferences.mjs.map +1 -1
  192. package/resources/users/tenants.d.mts +4 -21
  193. package/resources/users/tenants.d.mts.map +1 -1
  194. package/resources/users/tenants.d.ts +4 -21
  195. package/resources/users/tenants.d.ts.map +1 -1
  196. package/resources/users/tenants.js.map +1 -1
  197. package/resources/users/tenants.mjs.map +1 -1
  198. package/resources/users/tokens.d.mts +18 -17
  199. package/resources/users/tokens.d.mts.map +1 -1
  200. package/resources/users/tokens.d.ts +18 -17
  201. package/resources/users/tokens.d.ts.map +1 -1
  202. package/resources/users/tokens.js +1 -0
  203. package/resources/users/tokens.js.map +1 -1
  204. package/resources/users/tokens.mjs +1 -0
  205. package/resources/users/tokens.mjs.map +1 -1
  206. package/resources/users/users.d.mts +4 -4
  207. package/resources/users/users.d.mts.map +1 -1
  208. package/resources/users/users.d.ts +4 -4
  209. package/resources/users/users.d.ts.map +1 -1
  210. package/resources/users/users.js.map +1 -1
  211. package/resources/users/users.mjs.map +1 -1
  212. package/src/client.ts +37 -22
  213. package/src/resources/audiences.ts +3 -9
  214. package/src/resources/audit-events.ts +2 -2
  215. package/src/resources/automations/automations.ts +7 -7
  216. package/src/resources/automations/index.ts +2 -7
  217. package/src/resources/automations/invoke.ts +6 -7
  218. package/src/resources/brands.ts +2 -2
  219. package/src/resources/bulk.ts +3 -6
  220. package/src/resources/index.ts +10 -13
  221. package/src/resources/lists/index.ts +2 -4
  222. package/src/resources/lists/lists.ts +14 -13
  223. package/src/resources/lists/subscriptions.ts +6 -31
  224. package/src/resources/messages.ts +2 -2
  225. package/src/resources/notifications/checks.ts +4 -17
  226. package/src/resources/notifications/index.ts +2 -2
  227. package/src/resources/notifications/notifications.ts +15 -6
  228. package/src/resources/profiles/index.ts +1 -0
  229. package/src/resources/profiles/lists.ts +5 -13
  230. package/src/resources/profiles/profiles.ts +9 -2
  231. package/src/resources/send.ts +9 -175
  232. package/src/resources/shared.ts +215 -11
  233. package/src/resources/tenants/index.ts +4 -2
  234. package/src/resources/tenants/preferences/index.ts +4 -0
  235. package/src/resources/tenants/{default-preferences → preferences}/items.ts +12 -38
  236. package/src/resources/tenants/{default-preferences/default-preferences.ts → preferences/preferences.ts} +4 -12
  237. package/src/resources/tenants/{default-preferences.ts → preferences.ts} +1 -1
  238. package/src/resources/tenants/templates.ts +3 -44
  239. package/src/resources/tenants/tenants.ts +77 -18
  240. package/src/resources/users/index.ts +0 -2
  241. package/src/resources/users/preferences.ts +7 -12
  242. package/src/resources/users/tenants.ts +3 -23
  243. package/src/resources/users/tokens.ts +19 -18
  244. package/src/resources/users/users.ts +0 -4
  245. package/src/version.ts +1 -1
  246. package/version.d.mts +1 -1
  247. package/version.d.mts.map +1 -1
  248. package/version.d.ts +1 -1
  249. package/version.d.ts.map +1 -1
  250. package/version.js +1 -1
  251. package/version.js.map +1 -1
  252. package/version.mjs +1 -1
  253. package/version.mjs.map +1 -1
  254. package/resources/tenants/default-preferences/default-preferences.d.mts +0 -10
  255. package/resources/tenants/default-preferences/default-preferences.d.mts.map +0 -1
  256. package/resources/tenants/default-preferences/default-preferences.d.ts +0 -10
  257. package/resources/tenants/default-preferences/default-preferences.d.ts.map +0 -1
  258. package/resources/tenants/default-preferences/default-preferences.js.map +0 -1
  259. package/resources/tenants/default-preferences/default-preferences.mjs.map +0 -1
  260. package/resources/tenants/default-preferences/index.d.mts +0 -3
  261. package/resources/tenants/default-preferences/index.d.mts.map +0 -1
  262. package/resources/tenants/default-preferences/index.d.ts +0 -3
  263. package/resources/tenants/default-preferences/index.d.ts.map +0 -1
  264. package/resources/tenants/default-preferences/index.js.map +0 -1
  265. package/resources/tenants/default-preferences/index.mjs +0 -4
  266. package/resources/tenants/default-preferences/index.mjs.map +0 -1
  267. package/resources/tenants/default-preferences/items.d.mts.map +0 -1
  268. package/resources/tenants/default-preferences/items.d.ts.map +0 -1
  269. package/resources/tenants/default-preferences/items.js.map +0 -1
  270. package/resources/tenants/default-preferences/items.mjs.map +0 -1
  271. package/resources/tenants/default-preferences.d.mts +0 -2
  272. package/resources/tenants/default-preferences.d.mts.map +0 -1
  273. package/resources/tenants/default-preferences.d.ts +0 -2
  274. package/resources/tenants/default-preferences.d.ts.map +0 -1
  275. package/resources/tenants/default-preferences.js.map +0 -1
  276. package/resources/tenants/default-preferences.mjs +0 -3
  277. package/resources/tenants/default-preferences.mjs.map +0 -1
  278. package/src/resources/tenants/default-preferences/index.ts +0 -10
package/resources/send.js CHANGED
@@ -5,7 +5,7 @@ exports.Send = void 0;
5
5
  const resource_1 = require("../core/resource.js");
6
6
  class Send extends resource_1.APIResource {
7
7
  /**
8
- * Use the send API to send a message to one or more recipients.
8
+ * Send a message to one or more recipients.
9
9
  *
10
10
  * @example
11
11
  * ```ts
@@ -13,7 +13,7 @@ class Send extends resource_1.APIResource {
13
13
  * message: {
14
14
  * to: { user_id: 'example_user' },
15
15
  * template: 'template_id',
16
- * data: { name: 'Example Name' },
16
+ * data: { foo: 'bar' },
17
17
  * },
18
18
  * });
19
19
  * ```
@@ -1 +1 @@
1
- {"version":3,"file":"send.js","sourceRoot":"","sources":["../src/resources/send.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAO/C,MAAa,IAAK,SAAQ,sBAAW;IACnC;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,IAAuB,EAAE,OAAwB;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1D,CAAC;CACF;AAlBD,oBAkBC"}
1
+ {"version":3,"file":"send.js","sourceRoot":"","sources":["../src/resources/send.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAK/C,MAAa,IAAK,SAAQ,sBAAW;IACnC;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,IAAuB,EAAE,OAAwB;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1D,CAAC;CACF;AAlBD,oBAkBC"}
@@ -2,7 +2,7 @@
2
2
  import { APIResource } from "../core/resource.mjs";
3
3
  export class Send extends APIResource {
4
4
  /**
5
- * Use the send API to send a message to one or more recipients.
5
+ * Send a message to one or more recipients.
6
6
  *
7
7
  * @example
8
8
  * ```ts
@@ -10,7 +10,7 @@ export class Send extends APIResource {
10
10
  * message: {
11
11
  * to: { user_id: 'example_user' },
12
12
  * template: 'template_id',
13
- * data: { name: 'Example Name' },
13
+ * data: { foo: 'bar' },
14
14
  * },
15
15
  * });
16
16
  * ```
@@ -1 +1 @@
1
- {"version":3,"file":"send.mjs","sourceRoot":"","sources":["../src/resources/send.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAOtB,MAAM,OAAO,IAAK,SAAQ,WAAW;IACnC;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,IAAuB,EAAE,OAAwB;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1D,CAAC;CACF"}
1
+ {"version":3,"file":"send.mjs","sourceRoot":"","sources":["../src/resources/send.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAKtB,MAAM,OAAO,IAAK,SAAQ,WAAW;IACnC;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,IAAuB,EAAE,OAAwB;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1D,CAAC;CACF"}
@@ -1,10 +1,11 @@
1
1
  import * as Shared from "./shared.mjs";
2
- import * as SendAPI from "./send.mjs";
3
- import * as PreferencesAPI from "./users/preferences.mjs";
4
- import * as ItemsAPI from "./tenants/default-preferences/items.mjs";
5
2
  export type Alignment = 'center' | 'left' | 'right' | 'full';
3
+ export type ChannelClassification = 'direct_message' | 'email' | 'push' | 'sms' | 'webhook' | 'inbox';
6
4
  export interface ChannelPreference {
7
- channel: ItemsAPI.ChannelClassification;
5
+ channel: ChannelClassification;
6
+ }
7
+ export interface ElementalActionNodeWithType extends ElementalBaseNode {
8
+ type?: 'action';
8
9
  }
9
10
  export interface ElementalBaseNode {
10
11
  channels?: Array<string> | null;
@@ -12,6 +13,55 @@ export interface ElementalBaseNode {
12
13
  loop?: string | null;
13
14
  ref?: string | null;
14
15
  }
16
+ /**
17
+ * The channel element allows a notification to be customized based on which
18
+ * channel it is sent through. For example, you may want to display a detailed
19
+ * message when the notification is sent through email, and a more concise message
20
+ * in a push notification. Channel elements are only valid as top-level elements;
21
+ * you cannot nest channel elements. If there is a channel element specified at the
22
+ * top-level of the document, all sibling elements must be channel elements. Note:
23
+ * As an alternative, most elements support a `channel` property. Which allows you
24
+ * to selectively display an individual element on a per channel basis. See the
25
+ * [control flow docs](https://www.courier.com/docs/platform/content/elemental/control-flow/)
26
+ * for more details.
27
+ */
28
+ export interface ElementalChannelNode extends ElementalBaseNode {
29
+ /**
30
+ * The channel the contents of this element should be applied to. Can be `email`,
31
+ * `push`, `direct_message`, `sms` or a provider such as slack
32
+ */
33
+ channel: string;
34
+ /**
35
+ * Raw data to apply to the channel. If `elements` has not been specified, `raw` is
36
+ * required.
37
+ */
38
+ raw?: {
39
+ [key: string]: unknown;
40
+ } | null;
41
+ }
42
+ /**
43
+ * The channel element allows a notification to be customized based on which
44
+ * channel it is sent through. For example, you may want to display a detailed
45
+ * message when the notification is sent through email, and a more concise message
46
+ * in a push notification. Channel elements are only valid as top-level elements;
47
+ * you cannot nest channel elements. If there is a channel element specified at the
48
+ * top-level of the document, all sibling elements must be channel elements. Note:
49
+ * As an alternative, most elements support a `channel` property. Which allows you
50
+ * to selectively display an individual element on a per channel basis. See the
51
+ * [control flow docs](https://www.courier.com/docs/platform/content/elemental/control-flow/)
52
+ * for more details.
53
+ */
54
+ export interface ElementalChannelNodeWithType extends ElementalChannelNode {
55
+ type?: 'channel';
56
+ }
57
+ export interface ElementalContent {
58
+ elements: Array<ElementalNode>;
59
+ /**
60
+ * For example, "2022-01-01"
61
+ */
62
+ version: string;
63
+ brand?: string | null;
64
+ }
15
65
  /**
16
66
  * Syntactic sugar to provide a fast shorthand for Courier Elemental Blocks.
17
67
  */
@@ -25,23 +75,119 @@ export interface ElementalContentSugar {
25
75
  */
26
76
  title: string;
27
77
  }
28
- export interface ListRecipient {
29
- data?: {
30
- [key: string]: unknown;
31
- } | null;
32
- list_id?: string | null;
78
+ export interface ElementalDividerNodeWithType extends ElementalBaseNode {
79
+ type?: 'divider';
80
+ }
81
+ export interface ElementalImageNodeWithType extends ElementalBaseNode {
82
+ type?: 'image';
83
+ }
84
+ export interface ElementalMetaNodeWithType extends ElementalBaseNode {
85
+ type?: 'meta';
86
+ }
87
+ /**
88
+ * The channel element allows a notification to be customized based on which
89
+ * channel it is sent through. For example, you may want to display a detailed
90
+ * message when the notification is sent through email, and a more concise message
91
+ * in a push notification. Channel elements are only valid as top-level elements;
92
+ * you cannot nest channel elements. If there is a channel element specified at the
93
+ * top-level of the document, all sibling elements must be channel elements. Note:
94
+ * As an alternative, most elements support a `channel` property. Which allows you
95
+ * to selectively display an individual element on a per channel basis. See the
96
+ * [control flow docs](https://www.courier.com/docs/platform/content/elemental/control-flow/)
97
+ * for more details.
98
+ */
99
+ export type ElementalNode = ElementalTextNodeWithType | ElementalMetaNodeWithType | ElementalChannelNodeWithType | ElementalImageNodeWithType | ElementalActionNodeWithType | ElementalDividerNodeWithType | ElementalQuoteNodeWithType;
100
+ export interface ElementalQuoteNodeWithType extends ElementalBaseNode {
101
+ type?: 'quote';
102
+ }
103
+ export interface ElementalTextNodeWithType extends ElementalBaseNode {
104
+ type?: 'text';
105
+ }
106
+ export interface MessageContext {
107
+ /**
108
+ * Tenant id used to load brand/default preferences/context.
109
+ */
110
+ tenant_id?: string | null;
33
111
  }
34
112
  export interface MessageRouting {
35
113
  channels: Array<MessageRoutingChannel>;
36
114
  method: 'all' | 'single';
37
115
  }
38
116
  export type MessageRoutingChannel = string | MessageRouting;
117
+ export interface NotificationPreferenceDetails {
118
+ status: PreferenceStatus;
119
+ channel_preferences?: Array<ChannelPreference> | null;
120
+ rules?: Array<Rule> | null;
121
+ }
122
+ export interface Paging {
123
+ more: boolean;
124
+ cursor?: string | null;
125
+ }
39
126
  export interface Preference {
40
- status: PreferencesAPI.PreferenceStatus;
127
+ status: PreferenceStatus;
41
128
  channel_preferences?: Array<ChannelPreference> | null;
42
129
  rules?: Array<Rule> | null;
43
130
  source?: 'subscription' | 'list' | 'recipient' | null;
44
131
  }
132
+ export type PreferenceStatus = 'OPTED_IN' | 'OPTED_OUT' | 'REQUIRED';
133
+ export interface Recipient {
134
+ /**
135
+ * Deprecated - Use `tenant_id` instead.
136
+ */
137
+ account_id?: string | null;
138
+ /**
139
+ * Context such as tenant_id to send the notification with.
140
+ */
141
+ context?: MessageContext | null;
142
+ data?: {
143
+ [key: string]: unknown;
144
+ } | null;
145
+ /**
146
+ * The user's email address.
147
+ */
148
+ email?: string | null;
149
+ /**
150
+ * The id of the list to send the message to.
151
+ */
152
+ list_id?: string | null;
153
+ /**
154
+ * The user's preferred ISO 639-1 language code.
155
+ */
156
+ locale?: string | null;
157
+ /**
158
+ * The user's phone number.
159
+ */
160
+ phone_number?: string | null;
161
+ preferences?: Recipient.Preferences | null;
162
+ /**
163
+ * The id of the tenant the user is associated with.
164
+ */
165
+ tenant_id?: string | null;
166
+ /**
167
+ * The user's unique identifier. Typically, this will match the user id of a user
168
+ * in your system.
169
+ */
170
+ user_id?: string | null;
171
+ }
172
+ export declare namespace Recipient {
173
+ interface Preferences {
174
+ notifications: {
175
+ [key: string]: Shared.Preference;
176
+ };
177
+ categories?: {
178
+ [key: string]: Shared.Preference;
179
+ } | null;
180
+ templateId?: string | null;
181
+ }
182
+ }
183
+ export interface RecipientPreferences {
184
+ categories?: {
185
+ [key: string]: NotificationPreferenceDetails;
186
+ } | null;
187
+ notifications?: {
188
+ [key: string]: NotificationPreferenceDetails;
189
+ } | null;
190
+ }
45
191
  export interface Rule {
46
192
  until: string;
47
193
  start?: string | null;
@@ -49,27 +195,41 @@ export interface Rule {
49
195
  export type TextStyle = 'text' | 'h1' | 'h2' | 'subtext';
50
196
  export interface UserRecipient {
51
197
  /**
52
- * Use `tenant_id` instead.
198
+ * Deprecated - Use `tenant_id` instead.
53
199
  */
54
200
  account_id?: string | null;
55
201
  /**
56
202
  * Context such as tenant_id to send the notification with.
57
203
  */
58
- context?: SendAPI.MessageContext | null;
204
+ context?: MessageContext | null;
59
205
  data?: {
60
206
  [key: string]: unknown;
61
207
  } | null;
208
+ /**
209
+ * The user's email address.
210
+ */
62
211
  email?: string | null;
212
+ /**
213
+ * The id of the list to send the message to.
214
+ */
215
+ list_id?: string | null;
63
216
  /**
64
217
  * The user's preferred ISO 639-1 language code.
65
218
  */
66
219
  locale?: string | null;
220
+ /**
221
+ * The user's phone number.
222
+ */
67
223
  phone_number?: string | null;
68
224
  preferences?: UserRecipient.Preferences | null;
69
225
  /**
70
- * Tenant id. Will load brand, default preferences and base context data.
226
+ * The id of the tenant the user is associated with.
71
227
  */
72
228
  tenant_id?: string | null;
229
+ /**
230
+ * The user's unique identifier. Typically, this will match the user id of a user
231
+ * in your system.
232
+ */
73
233
  user_id?: string | null;
74
234
  }
75
235
  export declare namespace UserRecipient {
@@ -83,4 +243,11 @@ export declare namespace UserRecipient {
83
243
  templateId?: string | null;
84
244
  }
85
245
  }
246
+ export interface Utm {
247
+ campaign?: string | null;
248
+ content?: string | null;
249
+ medium?: string | null;
250
+ source?: string | null;
251
+ term?: string | null;
252
+ }
86
253
  //# sourceMappingURL=shared.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"shared.d.mts","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":"OAEO,KAAK,MAAM;OACX,KAAK,OAAO;OACZ,KAAK,cAAc;OACnB,KAAK,QAAQ;AAEpB,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;AAE7D,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,QAAQ,CAAC,qBAAqB,CAAC;CACzC;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;IAEhC,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEnB,IAAI,C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AM,GAAG,IAAI,CAAC;CACtB"}
@@ -1,10 +1,11 @@
1
1
  import * as Shared from "./shared.js";
2
- import * as SendAPI from "./send.js";
3
- import * as PreferencesAPI from "./users/preferences.js";
4
- import * as ItemsAPI from "./tenants/default-preferences/items.js";
5
2
  export type Alignment = 'center' | 'left' | 'right' | 'full';
3
+ export type ChannelClassification = 'direct_message' | 'email' | 'push' | 'sms' | 'webhook' | 'inbox';
6
4
  export interface ChannelPreference {
7
- channel: ItemsAPI.ChannelClassification;
5
+ channel: ChannelClassification;
6
+ }
7
+ export interface ElementalActionNodeWithType extends ElementalBaseNode {
8
+ type?: 'action';
8
9
  }
9
10
  export interface ElementalBaseNode {
10
11
  channels?: Array<string> | null;
@@ -12,6 +13,55 @@ export interface ElementalBaseNode {
12
13
  loop?: string | null;
13
14
  ref?: string | null;
14
15
  }
16
+ /**
17
+ * The channel element allows a notification to be customized based on which
18
+ * channel it is sent through. For example, you may want to display a detailed
19
+ * message when the notification is sent through email, and a more concise message
20
+ * in a push notification. Channel elements are only valid as top-level elements;
21
+ * you cannot nest channel elements. If there is a channel element specified at the
22
+ * top-level of the document, all sibling elements must be channel elements. Note:
23
+ * As an alternative, most elements support a `channel` property. Which allows you
24
+ * to selectively display an individual element on a per channel basis. See the
25
+ * [control flow docs](https://www.courier.com/docs/platform/content/elemental/control-flow/)
26
+ * for more details.
27
+ */
28
+ export interface ElementalChannelNode extends ElementalBaseNode {
29
+ /**
30
+ * The channel the contents of this element should be applied to. Can be `email`,
31
+ * `push`, `direct_message`, `sms` or a provider such as slack
32
+ */
33
+ channel: string;
34
+ /**
35
+ * Raw data to apply to the channel. If `elements` has not been specified, `raw` is
36
+ * required.
37
+ */
38
+ raw?: {
39
+ [key: string]: unknown;
40
+ } | null;
41
+ }
42
+ /**
43
+ * The channel element allows a notification to be customized based on which
44
+ * channel it is sent through. For example, you may want to display a detailed
45
+ * message when the notification is sent through email, and a more concise message
46
+ * in a push notification. Channel elements are only valid as top-level elements;
47
+ * you cannot nest channel elements. If there is a channel element specified at the
48
+ * top-level of the document, all sibling elements must be channel elements. Note:
49
+ * As an alternative, most elements support a `channel` property. Which allows you
50
+ * to selectively display an individual element on a per channel basis. See the
51
+ * [control flow docs](https://www.courier.com/docs/platform/content/elemental/control-flow/)
52
+ * for more details.
53
+ */
54
+ export interface ElementalChannelNodeWithType extends ElementalChannelNode {
55
+ type?: 'channel';
56
+ }
57
+ export interface ElementalContent {
58
+ elements: Array<ElementalNode>;
59
+ /**
60
+ * For example, "2022-01-01"
61
+ */
62
+ version: string;
63
+ brand?: string | null;
64
+ }
15
65
  /**
16
66
  * Syntactic sugar to provide a fast shorthand for Courier Elemental Blocks.
17
67
  */
@@ -25,23 +75,119 @@ export interface ElementalContentSugar {
25
75
  */
26
76
  title: string;
27
77
  }
28
- export interface ListRecipient {
29
- data?: {
30
- [key: string]: unknown;
31
- } | null;
32
- list_id?: string | null;
78
+ export interface ElementalDividerNodeWithType extends ElementalBaseNode {
79
+ type?: 'divider';
80
+ }
81
+ export interface ElementalImageNodeWithType extends ElementalBaseNode {
82
+ type?: 'image';
83
+ }
84
+ export interface ElementalMetaNodeWithType extends ElementalBaseNode {
85
+ type?: 'meta';
86
+ }
87
+ /**
88
+ * The channel element allows a notification to be customized based on which
89
+ * channel it is sent through. For example, you may want to display a detailed
90
+ * message when the notification is sent through email, and a more concise message
91
+ * in a push notification. Channel elements are only valid as top-level elements;
92
+ * you cannot nest channel elements. If there is a channel element specified at the
93
+ * top-level of the document, all sibling elements must be channel elements. Note:
94
+ * As an alternative, most elements support a `channel` property. Which allows you
95
+ * to selectively display an individual element on a per channel basis. See the
96
+ * [control flow docs](https://www.courier.com/docs/platform/content/elemental/control-flow/)
97
+ * for more details.
98
+ */
99
+ export type ElementalNode = ElementalTextNodeWithType | ElementalMetaNodeWithType | ElementalChannelNodeWithType | ElementalImageNodeWithType | ElementalActionNodeWithType | ElementalDividerNodeWithType | ElementalQuoteNodeWithType;
100
+ export interface ElementalQuoteNodeWithType extends ElementalBaseNode {
101
+ type?: 'quote';
102
+ }
103
+ export interface ElementalTextNodeWithType extends ElementalBaseNode {
104
+ type?: 'text';
105
+ }
106
+ export interface MessageContext {
107
+ /**
108
+ * Tenant id used to load brand/default preferences/context.
109
+ */
110
+ tenant_id?: string | null;
33
111
  }
34
112
  export interface MessageRouting {
35
113
  channels: Array<MessageRoutingChannel>;
36
114
  method: 'all' | 'single';
37
115
  }
38
116
  export type MessageRoutingChannel = string | MessageRouting;
117
+ export interface NotificationPreferenceDetails {
118
+ status: PreferenceStatus;
119
+ channel_preferences?: Array<ChannelPreference> | null;
120
+ rules?: Array<Rule> | null;
121
+ }
122
+ export interface Paging {
123
+ more: boolean;
124
+ cursor?: string | null;
125
+ }
39
126
  export interface Preference {
40
- status: PreferencesAPI.PreferenceStatus;
127
+ status: PreferenceStatus;
41
128
  channel_preferences?: Array<ChannelPreference> | null;
42
129
  rules?: Array<Rule> | null;
43
130
  source?: 'subscription' | 'list' | 'recipient' | null;
44
131
  }
132
+ export type PreferenceStatus = 'OPTED_IN' | 'OPTED_OUT' | 'REQUIRED';
133
+ export interface Recipient {
134
+ /**
135
+ * Deprecated - Use `tenant_id` instead.
136
+ */
137
+ account_id?: string | null;
138
+ /**
139
+ * Context such as tenant_id to send the notification with.
140
+ */
141
+ context?: MessageContext | null;
142
+ data?: {
143
+ [key: string]: unknown;
144
+ } | null;
145
+ /**
146
+ * The user's email address.
147
+ */
148
+ email?: string | null;
149
+ /**
150
+ * The id of the list to send the message to.
151
+ */
152
+ list_id?: string | null;
153
+ /**
154
+ * The user's preferred ISO 639-1 language code.
155
+ */
156
+ locale?: string | null;
157
+ /**
158
+ * The user's phone number.
159
+ */
160
+ phone_number?: string | null;
161
+ preferences?: Recipient.Preferences | null;
162
+ /**
163
+ * The id of the tenant the user is associated with.
164
+ */
165
+ tenant_id?: string | null;
166
+ /**
167
+ * The user's unique identifier. Typically, this will match the user id of a user
168
+ * in your system.
169
+ */
170
+ user_id?: string | null;
171
+ }
172
+ export declare namespace Recipient {
173
+ interface Preferences {
174
+ notifications: {
175
+ [key: string]: Shared.Preference;
176
+ };
177
+ categories?: {
178
+ [key: string]: Shared.Preference;
179
+ } | null;
180
+ templateId?: string | null;
181
+ }
182
+ }
183
+ export interface RecipientPreferences {
184
+ categories?: {
185
+ [key: string]: NotificationPreferenceDetails;
186
+ } | null;
187
+ notifications?: {
188
+ [key: string]: NotificationPreferenceDetails;
189
+ } | null;
190
+ }
45
191
  export interface Rule {
46
192
  until: string;
47
193
  start?: string | null;
@@ -49,27 +195,41 @@ export interface Rule {
49
195
  export type TextStyle = 'text' | 'h1' | 'h2' | 'subtext';
50
196
  export interface UserRecipient {
51
197
  /**
52
- * Use `tenant_id` instead.
198
+ * Deprecated - Use `tenant_id` instead.
53
199
  */
54
200
  account_id?: string | null;
55
201
  /**
56
202
  * Context such as tenant_id to send the notification with.
57
203
  */
58
- context?: SendAPI.MessageContext | null;
204
+ context?: MessageContext | null;
59
205
  data?: {
60
206
  [key: string]: unknown;
61
207
  } | null;
208
+ /**
209
+ * The user's email address.
210
+ */
62
211
  email?: string | null;
212
+ /**
213
+ * The id of the list to send the message to.
214
+ */
215
+ list_id?: string | null;
63
216
  /**
64
217
  * The user's preferred ISO 639-1 language code.
65
218
  */
66
219
  locale?: string | null;
220
+ /**
221
+ * The user's phone number.
222
+ */
67
223
  phone_number?: string | null;
68
224
  preferences?: UserRecipient.Preferences | null;
69
225
  /**
70
- * Tenant id. Will load brand, default preferences and base context data.
226
+ * The id of the tenant the user is associated with.
71
227
  */
72
228
  tenant_id?: string | null;
229
+ /**
230
+ * The user's unique identifier. Typically, this will match the user id of a user
231
+ * in your system.
232
+ */
73
233
  user_id?: string | null;
74
234
  }
75
235
  export declare namespace UserRecipient {
@@ -83,4 +243,11 @@ export declare namespace UserRecipient {
83
243
  templateId?: string | null;
84
244
  }
85
245
  }
246
+ export interface Utm {
247
+ campaign?: string | null;
248
+ content?: string | null;
249
+ medium?: string | null;
250
+ source?: string | null;
251
+ term?: string | null;
252
+ }
86
253
  //# sourceMappingURL=shared.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":"OAEO,KAAK,MAAM;OACX,KAAK,OAAO;OACZ,KAAK,cAAc;OACnB,KAAK,QAAQ;AAEpB,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;AAE7D,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,QAAQ,CAAC,qBAAqB,CAAC;CACzC;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;IAEhC,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEnB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAErB,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,GAAG,IAAI,CAAC;IAEzC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,KAAK,CAAC,qBAAqB,CAAC,CAAC;IAEvC,MAAM,EAAE,KAAK,GAAG,QAAQ,CAAC;CAC1B;AAED,MAAM,MAAM,qBAAqB,GAAG,MAAM,GAAG,cAAc,CAAC;AAE5D,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,cAAc,CAAC,gBAAgB,CAAC;IAExC,mBAAmB,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,GA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AC;IAC7B,UAAiB,WAAW;QAC1B,aAAa,EAAE;YAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC,UAAU,CAAA;SAAE,CAAC;QAEpD,UAAU,CAAC,EAAE;YAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC,UAAU,CAAA;SAAE,GAAG,IAAI,CAAC;QAEzD,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KAC5B;CACF;AAED,MAAM,WAAW,GAAG;IAClB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAExB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB"}
@@ -1,3 +1,4 @@
1
- export { Templates, type BaseTemplateTenantAssociation, type ElementalContent, type TemplateListResponse, type TemplateRetrieveParams, type TemplateListParams, } from "./templates.mjs";
2
- export { Tenants, type DefaultPreferences, type Tenant, type TenantListResponse, type TenantListUsersResponse, type TenantUpdateParams, type TenantListParams, type TenantListUsersParams, } from "./tenants.mjs";
1
+ export { Preferences } from "./preferences/index.mjs";
2
+ export { Templates, type TemplateListResponse, type TemplateRetrieveParams, type TemplateListParams, } from "./templates.mjs";
3
+ export { Tenants, type BaseTemplateTenantAssociation, type DefaultPreferences, type SubscriptionTopicNew, type Tenant, type TenantAssociation, type TenantListResponse, type TenantListUsersResponse, type TenantUpdateParams, type TenantListParams, type TenantListUsersParams, } from "./tenants.mjs";
3
4
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/tenants/index.ts"],"names":[],"mappings":"OAEO,EACL,SAAS,EACT,KAAK,6BAA6B,EAClC,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,GACxB;OACM,EACL,OAAO,EACP,KAAK,kBAAkB,EACvB,KAAK,MAAM,EACX,KAAK,kBAAkB,EACvB,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,GAC3B"}
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/tenants/index.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EACL,SAAS,EACT,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,GACxB;OACM,EACL,OAAO,EACP,KAAK,6BAA6B,EAClC,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,MAAM,EACX,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,GAC3B"}
@@ -1,3 +1,4 @@
1
- export { Templates, type BaseTemplateTenantAssociation, type ElementalContent, type TemplateListResponse, type TemplateRetrieveParams, type TemplateListParams, } from "./templates.js";
2
- export { Tenants, type DefaultPreferences, type Tenant, type TenantListResponse, type TenantListUsersResponse, type TenantUpdateParams, type TenantListParams, type TenantListUsersParams, } from "./tenants.js";
1
+ export { Preferences } from "./preferences/index.js";
2
+ export { Templates, type TemplateListResponse, type TemplateRetrieveParams, type TemplateListParams, } from "./templates.js";
3
+ export { Tenants, type BaseTemplateTenantAssociation, type DefaultPreferences, type SubscriptionTopicNew, type Tenant, type TenantAssociation, type TenantListResponse, type TenantListUsersResponse, type TenantUpdateParams, type TenantListParams, type TenantListUsersParams, } from "./tenants.js";
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/tenants/index.ts"],"names":[],"mappings":"OAEO,EACL,SAAS,EACT,KAAK,6BAA6B,EAClC,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,GACxB;OACM,EACL,OAAO,EACP,KAAK,kBAAkB,EACvB,KAAK,MAAM,EACX,KAAK,kBAAkB,EACvB,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,GAC3B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/tenants/index.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EACL,SAAS,EACT,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,GACxB;OACM,EACL,OAAO,EACP,KAAK,6BAA6B,EAClC,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,MAAM,EACX,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,GAC3B"}
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
2
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.Tenants = exports.Templates = void 0;
4
+ exports.Tenants = exports.Templates = exports.Preferences = void 0;
5
+ var index_1 = require("./preferences/index.js");
6
+ Object.defineProperty(exports, "Preferences", { enumerable: true, get: function () { return index_1.Preferences; } });
5
7
  var templates_1 = require("./templates.js");
6
8
  Object.defineProperty(exports, "Templates", { enumerable: true, get: function () { return templates_1.Templates; } });
7
9
  var tenants_1 = require("./tenants.js");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/tenants/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,4CAOqB;AANnB,sGAAA,SAAS,OAAA;AAOX,wCASmB;AARjB,kGAAA,OAAO,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/tenants/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gDAAkD;AAAzC,oGAAA,WAAW,OAAA;AACpB,4CAKqB;AAJnB,sGAAA,SAAS,OAAA;AAKX,wCAYmB;AAXjB,kGAAA,OAAO,OAAA"}
@@ -1,4 +1,5 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ export { Preferences } from "./preferences/index.mjs";
2
3
  export { Templates, } from "./templates.mjs";
3
4
  export { Tenants, } from "./tenants.mjs";
4
5
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/tenants/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,SAAS,GAMV;OACM,EACL,OAAO,GAQR"}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/tenants/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,EACL,SAAS,GAIV;OACM,EACL,OAAO,GAWR"}
@@ -0,0 +1,3 @@
1
+ export { Items, type ItemUpdateParams, type ItemDeleteParams } from "./items.mjs";
2
+ export { Preferences } from "./preferences.mjs";
3
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/resources/tenants/preferences/index.ts"],"names":[],"mappings":"OAEO,EAAE,KAAK,EAAE,KAAK,gBAAgB,EAAE,KAAK,gBAAgB,EAAE;OACvD,EAAE,WAAW,EAAE"}