@trycourier/courier 7.20.0 → 7.22.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 (358) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/client.d.mts +57 -3
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +57 -3
  5. package/client.d.ts.map +1 -1
  6. package/client.js +57 -3
  7. package/client.js.map +1 -1
  8. package/client.mjs +57 -3
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/audiences.d.mts +13 -5
  12. package/resources/audiences.d.mts.map +1 -1
  13. package/resources/audiences.d.ts +13 -5
  14. package/resources/audiences.d.ts.map +1 -1
  15. package/resources/audiences.js +13 -5
  16. package/resources/audiences.js.map +1 -1
  17. package/resources/audiences.mjs +13 -5
  18. package/resources/audiences.mjs.map +1 -1
  19. package/resources/audit-events.d.mts +7 -2
  20. package/resources/audit-events.d.mts.map +1 -1
  21. package/resources/audit-events.d.ts +7 -2
  22. package/resources/audit-events.d.ts.map +1 -1
  23. package/resources/audit-events.js +7 -2
  24. package/resources/audit-events.js.map +1 -1
  25. package/resources/audit-events.mjs +7 -2
  26. package/resources/audit-events.mjs.map +1 -1
  27. package/resources/auth.d.mts +5 -1
  28. package/resources/auth.d.mts.map +1 -1
  29. package/resources/auth.d.ts +5 -1
  30. package/resources/auth.d.ts.map +1 -1
  31. package/resources/auth.js +5 -1
  32. package/resources/auth.js.map +1 -1
  33. package/resources/auth.mjs +5 -1
  34. package/resources/auth.mjs.map +1 -1
  35. package/resources/automations/automations.d.mts +5 -1
  36. package/resources/automations/automations.d.mts.map +1 -1
  37. package/resources/automations/automations.d.ts +5 -1
  38. package/resources/automations/automations.d.ts.map +1 -1
  39. package/resources/automations/automations.js +5 -1
  40. package/resources/automations/automations.js.map +1 -1
  41. package/resources/automations/automations.mjs +5 -1
  42. package/resources/automations/automations.mjs.map +1 -1
  43. package/resources/automations/invoke.d.mts +74 -7
  44. package/resources/automations/invoke.d.mts.map +1 -1
  45. package/resources/automations/invoke.d.ts +74 -7
  46. package/resources/automations/invoke.d.ts.map +1 -1
  47. package/resources/automations/invoke.js +38 -9
  48. package/resources/automations/invoke.js.map +1 -1
  49. package/resources/automations/invoke.mjs +38 -9
  50. package/resources/automations/invoke.mjs.map +1 -1
  51. package/resources/brands.d.mts +42 -7
  52. package/resources/brands.d.mts.map +1 -1
  53. package/resources/brands.d.ts +42 -7
  54. package/resources/brands.d.ts.map +1 -1
  55. package/resources/brands.js +28 -8
  56. package/resources/brands.js.map +1 -1
  57. package/resources/brands.mjs +28 -8
  58. package/resources/brands.mjs.map +1 -1
  59. package/resources/digests/schedules.d.mts +5 -3
  60. package/resources/digests/schedules.d.mts.map +1 -1
  61. package/resources/digests/schedules.d.ts +5 -3
  62. package/resources/digests/schedules.d.ts.map +1 -1
  63. package/resources/digests/schedules.js +5 -3
  64. package/resources/digests/schedules.js.map +1 -1
  65. package/resources/digests/schedules.mjs +5 -3
  66. package/resources/digests/schedules.mjs.map +1 -1
  67. package/resources/inbound.d.mts +5 -1
  68. package/resources/inbound.d.mts.map +1 -1
  69. package/resources/inbound.d.ts +5 -1
  70. package/resources/inbound.d.ts.map +1 -1
  71. package/resources/inbound.js +5 -1
  72. package/resources/inbound.js.map +1 -1
  73. package/resources/inbound.mjs +5 -1
  74. package/resources/inbound.mjs.map +1 -1
  75. package/resources/inbox/inbox.d.mts +10 -0
  76. package/resources/inbox/inbox.d.mts.map +1 -0
  77. package/resources/inbox/inbox.d.ts +10 -0
  78. package/resources/inbox/inbox.d.ts.map +1 -0
  79. package/resources/inbox/inbox.js +17 -0
  80. package/resources/inbox/inbox.js.map +1 -0
  81. package/resources/inbox/inbox.mjs +12 -0
  82. package/resources/inbox/inbox.mjs.map +1 -0
  83. package/resources/inbox/index.d.mts +3 -0
  84. package/resources/inbox/index.d.mts.map +1 -0
  85. package/resources/inbox/index.d.ts +3 -0
  86. package/resources/inbox/index.d.ts.map +1 -0
  87. package/resources/inbox/index.js +9 -0
  88. package/resources/inbox/index.js.map +1 -0
  89. package/resources/inbox/index.mjs +4 -0
  90. package/resources/inbox/index.mjs.map +1 -0
  91. package/resources/inbox/messages.d.mts +23 -0
  92. package/resources/inbox/messages.d.mts.map +1 -0
  93. package/resources/inbox/messages.d.ts +23 -0
  94. package/resources/inbox/messages.d.ts.map +1 -0
  95. package/resources/inbox/messages.js +34 -0
  96. package/resources/inbox/messages.js.map +1 -0
  97. package/resources/inbox/messages.mjs +30 -0
  98. package/resources/inbox/messages.mjs.map +1 -0
  99. package/resources/inbox.d.mts +2 -0
  100. package/resources/inbox.d.mts.map +1 -0
  101. package/resources/inbox.d.ts +2 -0
  102. package/resources/inbox.d.ts.map +1 -0
  103. package/resources/inbox.js +6 -0
  104. package/resources/inbox.js.map +1 -0
  105. package/resources/inbox.mjs +3 -0
  106. package/resources/inbox.mjs.map +1 -0
  107. package/resources/index.d.mts +1 -1
  108. package/resources/index.d.mts.map +1 -1
  109. package/resources/index.d.ts +1 -1
  110. package/resources/index.d.ts.map +1 -1
  111. package/resources/index.js +3 -3
  112. package/resources/index.js.map +1 -1
  113. package/resources/index.mjs +1 -1
  114. package/resources/index.mjs.map +1 -1
  115. package/resources/journeys/journeys.d.mts +130 -39
  116. package/resources/journeys/journeys.d.mts.map +1 -1
  117. package/resources/journeys/journeys.d.ts +130 -39
  118. package/resources/journeys/journeys.d.ts.map +1 -1
  119. package/resources/journeys/journeys.js +79 -34
  120. package/resources/journeys/journeys.js.map +1 -1
  121. package/resources/journeys/journeys.mjs +79 -34
  122. package/resources/journeys/journeys.mjs.map +1 -1
  123. package/resources/journeys/templates.d.mts +60 -17
  124. package/resources/journeys/templates.d.mts.map +1 -1
  125. package/resources/journeys/templates.d.ts +60 -17
  126. package/resources/journeys/templates.d.ts.map +1 -1
  127. package/resources/journeys/templates.js +41 -20
  128. package/resources/journeys/templates.js.map +1 -1
  129. package/resources/journeys/templates.mjs +41 -20
  130. package/resources/journeys/templates.mjs.map +1 -1
  131. package/resources/lists/lists.d.mts +40 -5
  132. package/resources/lists/lists.d.mts.map +1 -1
  133. package/resources/lists/lists.d.ts +40 -5
  134. package/resources/lists/lists.d.ts.map +1 -1
  135. package/resources/lists/lists.js +40 -5
  136. package/resources/lists/lists.js.map +1 -1
  137. package/resources/lists/lists.mjs +40 -5
  138. package/resources/lists/lists.mjs.map +1 -1
  139. package/resources/lists/subscriptions.d.mts +65 -5
  140. package/resources/lists/subscriptions.d.mts.map +1 -1
  141. package/resources/lists/subscriptions.d.ts +65 -5
  142. package/resources/lists/subscriptions.d.ts.map +1 -1
  143. package/resources/lists/subscriptions.js +57 -6
  144. package/resources/lists/subscriptions.js.map +1 -1
  145. package/resources/lists/subscriptions.mjs +57 -6
  146. package/resources/lists/subscriptions.mjs.map +1 -1
  147. package/resources/messages.d.mts +15 -14
  148. package/resources/messages.d.mts.map +1 -1
  149. package/resources/messages.d.ts +15 -14
  150. package/resources/messages.d.ts.map +1 -1
  151. package/resources/messages.js +15 -14
  152. package/resources/messages.js.map +1 -1
  153. package/resources/messages.mjs +15 -14
  154. package/resources/messages.mjs.map +1 -1
  155. package/resources/notifications/checks.d.mts +9 -3
  156. package/resources/notifications/checks.d.mts.map +1 -1
  157. package/resources/notifications/checks.d.ts +9 -3
  158. package/resources/notifications/checks.d.ts.map +1 -1
  159. package/resources/notifications/checks.js +9 -3
  160. package/resources/notifications/checks.js.map +1 -1
  161. package/resources/notifications/checks.mjs +9 -3
  162. package/resources/notifications/checks.mjs.map +1 -1
  163. package/resources/notifications/notifications.d.mts +62 -29
  164. package/resources/notifications/notifications.d.mts.map +1 -1
  165. package/resources/notifications/notifications.d.ts +62 -29
  166. package/resources/notifications/notifications.d.ts.map +1 -1
  167. package/resources/notifications/notifications.js +49 -26
  168. package/resources/notifications/notifications.js.map +1 -1
  169. package/resources/notifications/notifications.mjs +49 -26
  170. package/resources/notifications/notifications.mjs.map +1 -1
  171. package/resources/profiles/lists.d.mts +49 -5
  172. package/resources/profiles/lists.d.mts.map +1 -1
  173. package/resources/profiles/lists.d.ts +49 -5
  174. package/resources/profiles/lists.d.ts.map +1 -1
  175. package/resources/profiles/lists.js +45 -6
  176. package/resources/profiles/lists.js.map +1 -1
  177. package/resources/profiles/lists.mjs +45 -6
  178. package/resources/profiles/lists.mjs.map +1 -1
  179. package/resources/profiles/profiles.d.mts +70 -11
  180. package/resources/profiles/profiles.d.mts.map +1 -1
  181. package/resources/profiles/profiles.d.ts +70 -11
  182. package/resources/profiles/profiles.d.ts.map +1 -1
  183. package/resources/profiles/profiles.js +65 -12
  184. package/resources/profiles/profiles.js.map +1 -1
  185. package/resources/profiles/profiles.mjs +65 -12
  186. package/resources/profiles/profiles.mjs.map +1 -1
  187. package/resources/providers/catalog.d.mts +10 -4
  188. package/resources/providers/catalog.d.mts.map +1 -1
  189. package/resources/providers/catalog.d.ts +10 -4
  190. package/resources/providers/catalog.d.ts.map +1 -1
  191. package/resources/providers/catalog.js +10 -4
  192. package/resources/providers/catalog.js.map +1 -1
  193. package/resources/providers/catalog.mjs +10 -4
  194. package/resources/providers/catalog.mjs.map +1 -1
  195. package/resources/providers/providers.d.mts +68 -22
  196. package/resources/providers/providers.d.mts.map +1 -1
  197. package/resources/providers/providers.d.ts +68 -22
  198. package/resources/providers/providers.d.ts.map +1 -1
  199. package/resources/providers/providers.js +57 -14
  200. package/resources/providers/providers.js.map +1 -1
  201. package/resources/providers/providers.mjs +57 -14
  202. package/resources/providers/providers.mjs.map +1 -1
  203. package/resources/requests.d.mts +5 -1
  204. package/resources/requests.d.mts.map +1 -1
  205. package/resources/requests.d.ts +5 -1
  206. package/resources/requests.d.ts.map +1 -1
  207. package/resources/requests.js +5 -1
  208. package/resources/requests.js.map +1 -1
  209. package/resources/requests.mjs +5 -1
  210. package/resources/requests.mjs.map +1 -1
  211. package/resources/routing-strategies.d.mts +30 -11
  212. package/resources/routing-strategies.d.mts.map +1 -1
  213. package/resources/routing-strategies.d.ts +30 -11
  214. package/resources/routing-strategies.d.ts.map +1 -1
  215. package/resources/routing-strategies.js +22 -6
  216. package/resources/routing-strategies.js.map +1 -1
  217. package/resources/routing-strategies.mjs +22 -6
  218. package/resources/routing-strategies.mjs.map +1 -1
  219. package/resources/send.d.mts +24 -4
  220. package/resources/send.d.mts.map +1 -1
  221. package/resources/send.d.ts +24 -4
  222. package/resources/send.d.ts.map +1 -1
  223. package/resources/send.js +21 -3
  224. package/resources/send.js.map +1 -1
  225. package/resources/send.mjs +21 -3
  226. package/resources/send.mjs.map +1 -1
  227. package/resources/tenants/preferences/items.d.mts +7 -2
  228. package/resources/tenants/preferences/items.d.mts.map +1 -1
  229. package/resources/tenants/preferences/items.d.ts +7 -2
  230. package/resources/tenants/preferences/items.d.ts.map +1 -1
  231. package/resources/tenants/preferences/items.js +7 -2
  232. package/resources/tenants/preferences/items.js.map +1 -1
  233. package/resources/tenants/preferences/items.mjs +7 -2
  234. package/resources/tenants/preferences/items.mjs.map +1 -1
  235. package/resources/tenants/templates/templates.d.mts +13 -19
  236. package/resources/tenants/templates/templates.d.mts.map +1 -1
  237. package/resources/tenants/templates/templates.d.ts +13 -19
  238. package/resources/tenants/templates/templates.d.ts.map +1 -1
  239. package/resources/tenants/templates/templates.js +13 -19
  240. package/resources/tenants/templates/templates.js.map +1 -1
  241. package/resources/tenants/templates/templates.mjs +13 -19
  242. package/resources/tenants/templates/templates.mjs.map +1 -1
  243. package/resources/tenants/templates/versions.d.mts +5 -7
  244. package/resources/tenants/templates/versions.d.mts.map +1 -1
  245. package/resources/tenants/templates/versions.d.ts +5 -7
  246. package/resources/tenants/templates/versions.d.ts.map +1 -1
  247. package/resources/tenants/templates/versions.js +5 -7
  248. package/resources/tenants/templates/versions.js.map +1 -1
  249. package/resources/tenants/templates/versions.mjs +5 -7
  250. package/resources/tenants/templates/versions.mjs.map +1 -1
  251. package/resources/tenants/tenants.d.mts +13 -5
  252. package/resources/tenants/tenants.d.mts.map +1 -1
  253. package/resources/tenants/tenants.d.ts +13 -5
  254. package/resources/tenants/tenants.d.ts.map +1 -1
  255. package/resources/tenants/tenants.js +13 -5
  256. package/resources/tenants/tenants.js.map +1 -1
  257. package/resources/tenants/tenants.mjs +13 -5
  258. package/resources/tenants/tenants.mjs.map +1 -1
  259. package/resources/translations.d.mts +7 -2
  260. package/resources/translations.d.mts.map +1 -1
  261. package/resources/translations.d.ts +7 -2
  262. package/resources/translations.d.ts.map +1 -1
  263. package/resources/translations.js +7 -2
  264. package/resources/translations.js.map +1 -1
  265. package/resources/translations.mjs +7 -2
  266. package/resources/translations.mjs.map +1 -1
  267. package/resources/users/preferences.d.mts +64 -42
  268. package/resources/users/preferences.d.mts.map +1 -1
  269. package/resources/users/preferences.d.ts +64 -42
  270. package/resources/users/preferences.d.ts.map +1 -1
  271. package/resources/users/preferences.js +30 -42
  272. package/resources/users/preferences.js.map +1 -1
  273. package/resources/users/preferences.mjs +30 -42
  274. package/resources/users/preferences.mjs.map +1 -1
  275. package/resources/users/tenants.d.mts +13 -10
  276. package/resources/users/tenants.d.mts.map +1 -1
  277. package/resources/users/tenants.d.ts +13 -10
  278. package/resources/users/tenants.d.ts.map +1 -1
  279. package/resources/users/tenants.js +13 -10
  280. package/resources/users/tenants.js.map +1 -1
  281. package/resources/users/tenants.mjs +13 -10
  282. package/resources/users/tenants.mjs.map +1 -1
  283. package/resources/users/tokens.d.mts +15 -6
  284. package/resources/users/tokens.d.mts.map +1 -1
  285. package/resources/users/tokens.d.ts +15 -6
  286. package/resources/users/tokens.d.ts.map +1 -1
  287. package/resources/users/tokens.js +15 -6
  288. package/resources/users/tokens.js.map +1 -1
  289. package/resources/users/tokens.mjs +15 -6
  290. package/resources/users/tokens.mjs.map +1 -1
  291. package/resources/workspace-preferences/topics.d.mts +40 -18
  292. package/resources/workspace-preferences/topics.d.mts.map +1 -1
  293. package/resources/workspace-preferences/topics.d.ts +40 -18
  294. package/resources/workspace-preferences/topics.d.ts.map +1 -1
  295. package/resources/workspace-preferences/topics.js +26 -11
  296. package/resources/workspace-preferences/topics.js.map +1 -1
  297. package/resources/workspace-preferences/topics.mjs +26 -11
  298. package/resources/workspace-preferences/topics.mjs.map +1 -1
  299. package/resources/workspace-preferences/workspace-preferences.d.mts +56 -19
  300. package/resources/workspace-preferences/workspace-preferences.d.mts.map +1 -1
  301. package/resources/workspace-preferences/workspace-preferences.d.ts +56 -19
  302. package/resources/workspace-preferences/workspace-preferences.d.ts.map +1 -1
  303. package/resources/workspace-preferences/workspace-preferences.js +41 -13
  304. package/resources/workspace-preferences/workspace-preferences.js.map +1 -1
  305. package/resources/workspace-preferences/workspace-preferences.mjs +41 -13
  306. package/resources/workspace-preferences/workspace-preferences.mjs.map +1 -1
  307. package/src/client.ts +59 -25
  308. package/src/resources/audiences.ts +13 -5
  309. package/src/resources/audit-events.ts +7 -2
  310. package/src/resources/auth.ts +5 -1
  311. package/src/resources/automations/automations.ts +5 -1
  312. package/src/resources/automations/invoke.ts +115 -9
  313. package/src/resources/brands.ts +62 -8
  314. package/src/resources/digests/schedules.ts +5 -3
  315. package/src/resources/inbound.ts +5 -1
  316. package/src/resources/inbox/inbox.ts +15 -0
  317. package/src/resources/inbox/index.ts +4 -0
  318. package/src/resources/inbox/messages.ts +40 -0
  319. package/src/resources/inbox.ts +3 -0
  320. package/src/resources/index.ts +1 -11
  321. package/src/resources/journeys/journeys.ts +212 -43
  322. package/src/resources/journeys/templates.ts +98 -20
  323. package/src/resources/lists/lists.ts +40 -5
  324. package/src/resources/lists/subscriptions.ts +82 -6
  325. package/src/resources/messages.ts +15 -14
  326. package/src/resources/notifications/checks.ts +9 -3
  327. package/src/resources/notifications/notifications.ts +102 -31
  328. package/src/resources/profiles/lists.ts +70 -6
  329. package/src/resources/profiles/profiles.ts +90 -12
  330. package/src/resources/providers/catalog.ts +10 -4
  331. package/src/resources/providers/providers.ts +86 -21
  332. package/src/resources/requests.ts +5 -1
  333. package/src/resources/routing-strategies.ts +50 -12
  334. package/src/resources/send.ts +45 -5
  335. package/src/resources/tenants/preferences/items.ts +7 -2
  336. package/src/resources/tenants/templates/templates.ts +13 -19
  337. package/src/resources/tenants/templates/versions.ts +5 -7
  338. package/src/resources/tenants/tenants.ts +13 -5
  339. package/src/resources/translations.ts +7 -2
  340. package/src/resources/users/preferences.ts +86 -44
  341. package/src/resources/users/tenants.ts +13 -10
  342. package/src/resources/users/tokens.ts +15 -6
  343. package/src/resources/workspace-preferences/topics.ts +60 -19
  344. package/src/resources/workspace-preferences/workspace-preferences.ts +96 -21
  345. package/src/version.ts +1 -1
  346. package/version.d.mts +1 -1
  347. package/version.d.ts +1 -1
  348. package/version.js +1 -1
  349. package/version.mjs +1 -1
  350. package/resources/bulk.d.mts +0 -155
  351. package/resources/bulk.d.mts.map +0 -1
  352. package/resources/bulk.d.ts +0 -155
  353. package/resources/bulk.d.ts.map +0 -1
  354. package/resources/bulk.js +0 -58
  355. package/resources/bulk.js.map +0 -1
  356. package/resources/bulk.mjs +0 -54
  357. package/resources/bulk.mjs.map +0 -1
  358. package/src/resources/bulk.ts +0 -210
@@ -1 +1 @@
1
- {"version":3,"file":"notifications.js","sourceRoot":"","sources":["../../src/resources/notifications/notifications.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAElD,+DAAsC;AACtC,wCAOkB;AAElB,uDAAsD;AAEtD,uDAAiD;AAEjD,MAAa,aAAc,SAAQ,sBAAW;IAA9C;;QACE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAuQhE,CAAC;IArQC;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,MAAM,CAAC,IAA8B,EAAE,OAAwB;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnE,CAAC;IAED;;;;;;;;;OASG;IACH,QAAQ,CACN,EAAU,EACV,QAAuD,EAAE,EACzD,OAAwB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C;IAC5E,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,eAAe,CACb,EAAU,EACV,QAA8D,EAAE,EAChE,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,kBAAkB,EAAE,UAAU,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;CACF;AAxQD,sCAwQC;AA8rBD,aAAa,CAAC,MAAM,GAAG,eAAM,CAAC"}
1
+ {"version":3,"file":"notifications.js","sourceRoot":"","sources":["../../src/resources/notifications/notifications.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAElD,+DAAsC;AACtC,wCAOkB;AAElB,uDAAsD;AAEtD,uDAAiD;AAEjD;;GAEG;AACH,MAAa,aAAc,SAAQ,sBAAW;IAA9C;;QACE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAsShE,CAAC;IApSC;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,MAAM,CACJ,MAAgC,EAChC,OAAwB;QAExB,MAAM,EACJ,iBAAiB,EAAE,cAAc,EACjC,0BAA0B,EAAE,sBAAsB,EAClD,GAAG,IAAI,EACR,GAAG,MAAM,CAAC;QACX,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE;YACzC,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB;oBACE,GAAG,CAAC,cAAc,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,iBAAiB,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;oBAC/E,GAAG,CAAC,sBAAsB,IAAI,IAAI,CAAC,CAAC;wBAClC,EAAE,0BAA0B,EAAE,sBAAsB,EAAE;wBACxD,CAAC,CAAC,SAAS,CAAC;iBACb;gBACD,OAAO,EAAE,OAAO;aACjB,CA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AwB;QAExB,MAAM,EAAE,EAAE,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,kBAAkB,EAAE,YAAY,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChG,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,OAAO,CACL,EAAU,EACV,IAA+B,EAC/B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,kBAAkB,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;IAED;;;;;;;;;;OAUG;IACH,eAAe,CACb,EAAU,EACV,QAA8D,EAAE,EAChE,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,kBAAkB,EAAE,UAAU,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;CACF;AAvSD,sCAuSC;AAmuBD,aAAa,CAAC,MAAM,GAAG,eAAM,CAAC"}
@@ -4,6 +4,9 @@ import * as ChecksAPI from "./checks.mjs";
4
4
  import { Checks, } from "./checks.mjs";
5
5
  import { buildHeaders } from "../../internal/headers.mjs";
6
6
  import { path } from "../../internal/utils/path.mjs";
7
+ /**
8
+ * Create, update, version, publish, and localize notification templates and their content.
9
+ */
7
10
  export class Notifications extends APIResource {
8
11
  constructor() {
9
12
  super(...arguments);
@@ -36,8 +39,21 @@ export class Notifications extends APIResource {
36
39
  * });
37
40
  * ```
38
41
  */
39
- create(body, options) {
40
- return this._client.post('/notifications', { body, ...options });
42
+ create(params, options) {
43
+ const { 'Idempotency-Key': idempotencyKey, 'x-idempotency-expiration': xIdempotencyExpiration, ...body } = params;
44
+ return this._client.post('/notifications', {
45
+ body,
46
+ ...options,
47
+ headers: buildHeaders([
48
+ {
49
+ ...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined),
50
+ ...(xIdempotencyExpiration != null ?
51
+ { 'x-idempotency-expiration': xIdempotencyExpiration }
52
+ : undefined),
53
+ },
54
+ options?.headers,
55
+ ]),
56
+ });
41
57
  }
42
58
  /**
43
59
  * Retrieve a notification template by ID. Returns the published version by
@@ -53,7 +69,8 @@ export class Notifications extends APIResource {
53
69
  return this._client.get(path `/notifications/${id}`, { query, ...options });
54
70
  }
55
71
  /**
56
- * List notification templates in your workspace.
72
+ * Lists the workspace's notification templates. Each carries a name, tags, brand,
73
+ * routing, and its draft or published state.
57
74
  *
58
75
  * @example
59
76
  * ```ts
@@ -64,7 +81,8 @@ export class Notifications extends APIResource {
64
81
  return this._client.get('/notifications', { query, ...options });
65
82
  }
66
83
  /**
67
- * Archive a notification template.
84
+ * Archives a notification template, preventing new sends from referencing it. The
85
+ * template stays retrievable for its version history.
68
86
  *
69
87
  * @example
70
88
  * ```ts
@@ -78,12 +96,9 @@ export class Notifications extends APIResource {
78
96
  });
79
97
  }
80
98
  /**
81
- * Duplicate a notification template. Creates a standalone copy within the same
82
- * workspace and environment, with " COPY" appended to the title. The copy clones
83
- * the source draft's tags, brand, subscription topic, routing strategy, channels,
84
- * and content, and is always created as a standalone template (it is not linked to
85
- * any journey or broadcast, even if the source was). Templates that are scoped to
86
- * a journey or a broadcast cannot be duplicated through this endpoint.
99
+ * Copies a notification template within the same workspace and environment,
100
+ * appending " COPY" to the title. The copy is standalone and independently
101
+ * editable.
87
102
  *
88
103
  * @example
89
104
  * ```ts
@@ -95,7 +110,8 @@ export class Notifications extends APIResource {
95
110
  return this._client.post(path `/notifications/${id}/duplicate`, options);
96
111
  }
97
112
  /**
98
- * List versions of a notification template.
113
+ * Returns a notification template's published versions, most recent first, for
114
+ * comparison or rollback. Paged.
99
115
  *
100
116
  * @example
101
117
  * ```ts
@@ -115,17 +131,26 @@ export class Notifications extends APIResource {
115
131
  * await client.notifications.publish('id');
116
132
  * ```
117
133
  */
118
- publish(id, body = {}, options) {
134
+ publish(id, params = {}, options) {
135
+ const { 'Idempotency-Key': idempotencyKey, 'x-idempotency-expiration': xIdempotencyExpiration, ...body } = params ?? {};
119
136
  return this._client.post(path `/notifications/${id}/publish`, {
120
137
  body,
121
138
  ...options,
122
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
139
+ headers: buildHeaders([
140
+ {
141
+ Accept: '*/*',
142
+ ...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined),
143
+ ...(xIdempotencyExpiration != null ?
144
+ { 'x-idempotency-expiration': xIdempotencyExpiration }
145
+ : undefined),
146
+ },
147
+ options?.headers,
148
+ ]),
123
149
  });
124
150
  }
125
151
  /**
126
- * Replace the elemental content of a notification template. Overwrites all
127
- * elements in the template with the provided content. Only supported for V2
128
- * (elemental) templates.
152
+ * Replaces all Elemental content in a template, overwriting every existing
153
+ * element. Supported for V2 templates only, not V1 blocks and channels.
129
154
  *
130
155
  * @example
131
156
  * ```ts
@@ -143,8 +168,8 @@ export class Notifications extends APIResource {
143
168
  return this._client.put(path `/notifications/${id}/content`, { body, ...options });
144
169
  }
145
170
  /**
146
- * Update a single element within a notification template. Only supported for V2
147
- * (elemental) templates.
171
+ * Replaces one Elemental element in a template, addressed by its element id.
172
+ * Supported for V2 templates only, not V1 blocks and channels.
148
173
  *
149
174
  * @example
150
175
  * ```ts
@@ -162,9 +187,8 @@ export class Notifications extends APIResource {
162
187
  return this._client.put(path `/notifications/${id}/elements/${elementID}`, { body, ...options });
163
188
  }
164
189
  /**
165
- * Set locale-specific content overrides for a notification template. Each element
166
- * override must reference an existing element by ID. Only supported for V2
167
- * (elemental) templates.
190
+ * Sets locale-specific content overrides for a template. Each override must
191
+ * reference an element that already exists in the default content.
168
192
  *
169
193
  * @example
170
194
  * ```ts
@@ -184,7 +208,8 @@ export class Notifications extends APIResource {
184
208
  return this._client.put(path `/notifications/${id}/locales/${localeID}`, { body, ...options });
185
209
  }
186
210
  /**
187
- * Replace a notification template. All fields are required.
211
+ * Replaces a notification template in full, so send every field rather than only
212
+ * the ones you want changed. Publish separately to make it live.
188
213
  *
189
214
  * @example
190
215
  * ```ts
@@ -209,10 +234,8 @@ export class Notifications extends APIResource {
209
234
  return this._client.put(path `/notifications/${id}`, { body, ...options });
210
235
  }
211
236
  /**
212
- * Retrieve the content of a notification template. The response shape depends on
213
- * whether the template uses V1 (blocks/channels) or V2 (elemental) content. Use
214
- * the `version` query parameter to select draft, published, or a specific
215
- * historical version.
237
+ * Returns a template's content and checksum. V2 templates return Elemental
238
+ * elements, while V1 templates return blocks and channels instead.
216
239
  *
217
240
  * @example
218
241
  * ```ts
@@ -1 +1 @@
1
- {"version":3,"file":"notifications.mjs","sourceRoot":"","sources":["../../src/resources/notifications/notifications.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAElD,OAAO,KAAK,SAAS,qBAAiB;AACtC,OAAO,EAML,MAAM,GACP,qBAAiB;AAElB,OAAO,EAAE,YAAY,EAAE,mCAA+B;AAEtD,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD,MAAM,OAAO,aAAc,SAAQ,WAAW;IAA9C;;QACE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAuQhE,CAAC;IArQC;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,MAAM,CAAC,IAA8B,EAAE,OAAwB;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnE,CAAC;IAED;;;;;;;;;OASG;IACH,QAAQ,CACN,EAAU,EACV,QAAuD,EAAE,EACzD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,kBA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,CAAC,IAAI,CAAA,kBAAkB,EAAE,UAAU,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;CACF;AA8rBD,aAAa,CAAC,MAAM,GAAG,MAAM,CAAC"}
1
+ {"version":3,"file":"notifications.mjs","sourceRoot":"","sources":["../../src/resources/notifications/notifications.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAElD,OAAO,KAAK,SAAS,qBAAiB;AACtC,OAAO,EAML,MAAM,GACP,qBAAiB;AAElB,OAAO,EAAE,YAAY,EAAE,mCAA+B;AAEtD,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD;;GAEG;AACH,MAAM,OAAO,aAAc,SAAQ,WAAW;IAA9C;;QACE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAsShE,CAAC;IApSC;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,MAAM,CACJ,MAAgC,EAChC,OAAwB;QAExB,MAAM,EACJ,iBAAiB,EAAE,cAAc,EACjC,0BAA0B,EAAE,sBAAsB,EAClD,GAAG,IAAI,EACR,GAAG,MAAM,CAAC;QACX,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE;YACzC,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB;oBACE,GAAG,CAAC,cAAc,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,iBAAiB,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;oBAC/E,GAAG,CAAC,sBAAsB,IAAI,IAAI,CAAC,CAAC;wBAClC,EAAE,0BAA0B,EAAE,sBAAsB,EAAE;wBACxD,CAAC,CAAC,SAAS,CAAC;iBACb;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;O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AAC,GAAG,CAAC,IAAI,CAAA,kBAAkB,EAAE,YAAY,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChG,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,OAAO,CACL,EAAU,EACV,IAA+B,EAC/B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,kBAAkB,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;IAED;;;;;;;;;;OAUG;IACH,eAAe,CACb,EAAU,EACV,QAA8D,EAAE,EAChE,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,kBAAkB,EAAE,UAAU,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;CACF;AAmuBD,aAAa,CAAC,MAAM,GAAG,MAAM,CAAC"}
@@ -3,20 +3,45 @@ import * as Shared from "../shared.mjs";
3
3
  import * as ProfilesAPI from "./profiles.mjs";
4
4
  import { APIPromise } from "../../core/api-promise.mjs";
5
5
  import { RequestOptions } from "../../internal/request-options.mjs";
6
+ /**
7
+ * Store the contact information Courier delivers to for each user — email, phone number, push tokens, and any custom data you send to.
8
+ */
6
9
  export declare class Lists extends APIResource {
7
10
  /**
8
- * Returns the subscribed lists for a specified user.
11
+ * Returns the lists a user is subscribed to, with paging. Use it to check what a
12
+ * recipient will receive before sending to a list.
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * const list = await client.profiles.lists.retrieve(
17
+ * 'user_id',
18
+ * );
19
+ * ```
9
20
  */
10
21
  retrieve(userID: string, query?: ListRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<ListRetrieveResponse>;
11
22
  /**
12
- * Removes all list subscriptions for given user.
23
+ * Removes every list subscription for a user at once. Their profile and
24
+ * preferences are untouched, so this only affects list-targeted sends.
25
+ *
26
+ * @example
27
+ * ```ts
28
+ * const list = await client.profiles.lists.delete('user_id');
29
+ * ```
13
30
  */
14
31
  delete(userID: string, options?: RequestOptions): APIPromise<ListDeleteResponse>;
15
32
  /**
16
- * Subscribes the given user to one or more lists. If the list does not exist, it
17
- * will be created.
33
+ * Subscribes a user to one or more lists, creating any list that does not yet
34
+ * exist. Optional preferences apply to each subscription.
35
+ *
36
+ * @example
37
+ * ```ts
38
+ * const response = await client.profiles.lists.subscribe(
39
+ * 'user_id',
40
+ * { lists: [{ listId: 'listId' }] },
41
+ * );
42
+ * ```
18
43
  */
19
- subscribe(userID: string, body: ListSubscribeParams, options?: RequestOptions): APIPromise<ListSubscribeResponse>;
44
+ subscribe(userID: string, params: ListSubscribeParams, options?: RequestOptions): APIPromise<ListSubscribeResponse>;
20
45
  }
21
46
  export interface ListRetrieveResponse {
22
47
  paging: Shared.Paging;
@@ -58,7 +83,26 @@ export interface ListRetrieveParams {
58
83
  cursor?: string | null;
59
84
  }
60
85
  export interface ListSubscribeParams {
86
+ /**
87
+ * Body param
88
+ */
61
89
  lists: Array<ProfilesAPI.SubscribeToListsRequestItem>;
90
+ /**
91
+ * Header param: A unique key that makes this request idempotent. If Courier
92
+ * receives another request with the same `Idempotency-Key`, it returns the stored
93
+ * response from the first request without performing the operation again
94
+ * (including the original status code and any error). Use it to safely retry
95
+ * `POST` requests after network failures without risking duplicate sends. The key
96
+ * is scoped to this endpoint.
97
+ */
98
+ 'Idempotency-Key'?: string;
99
+ /**
100
+ * Header param: How long the idempotency key remains valid, as a Unix epoch
101
+ * timestamp in seconds or an ISO 8601 date string. Only applies when
102
+ * `Idempotency-Key` is provided. If omitted, the key is retained for 25 hours; the
103
+ * maximum is 1 year.
104
+ */
105
+ 'x-idempotency-expiration'?: string;
62
106
  }
63
107
  export declare namespace Lists {
64
108
  export { type ListRetrieveResponse as ListRetrieveResponse, type ListDeleteResponse as ListDeleteResponse, type ListSubscribeResponse as ListSubscribeResponse, type ListRetrieveParams as ListRetrieveParams, type ListSubscribeParams as ListSubscribeParams, };
@@ -1 +1 @@
1
- {"version":3,"file":"lists.d.mts","sourceRoot":"","sources":["../../src/resources/profiles/lists.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,MAAM,sBAAkB;AACpC,OAAO,KAAK,WAAW,uBAAmB;AAC1C,OAAO,EAAE,UAAU,EAAE,mCAA+B;AACpD,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAGhE,qBAAa,KAAM,SAAQ,WAAW;IACpC;;OAEG;IACH,QAAQ,CACN,MAAM,EAAE,MAAM,EACd,KAAK,GAAE,kBAAkB,GAAG,IAAI,GAAG,SAAc,EACjD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,oBAAoB,CAAC;IAInC;;OAEG;IACH,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,kBAAkB,CAAC;IAIhF;;;OAGG;IACH,SAAS,CACP,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,mBAAmB,EACzB,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,qBAAqB,CAAC;CAGrC;AAED,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC;IAEtB;;OAEG;IACH,OAAO,EAAE,KAAK,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC;CAC7C;AAED,yBAAiB,oBAAoB,CAAC;IACpC,UAAiB,MAAM;QACrB,EAAE,EAAE,MAAM,CAAC;QAEX;;;WAGG;QACH,OAAO,EAAE,MAAM,CAAC;QAEhB;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;QAEb;;;WAGG;QACH,OAAO,EAAE,MAAM,CAAC;QAEhB,WAAW,CAAC,EAAE,MAAM,CAAC,oBAAoB,GAAG,IAAI,CAAC;KAClD;CACF;AAED,MAAM,WAAW,kBAAkB;IACjC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  import { APIPromise } from "../../core/api-promise.js";
5
5
  import { RequestOptions } from "../../internal/request-options.js";
6
+ /**
7
+ * Store the contact information Courier delivers to for each user — email, phone number, push tokens, and any custom data you send to.
8
+ */
6
9
  export declare class Lists extends APIResource {
7
10
  /**
8
- * Returns the subscribed lists for a specified user.
11
+ * Returns the lists a user is subscribed to, with paging. Use it to check what a
12
+ * recipient will receive before sending to a list.
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * const list = await client.profiles.lists.retrieve(
17
+ * 'user_id',
18
+ * );
19
+ * ```
9
20
  */
10
21
  retrieve(userID: string, query?: ListRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<ListRetrieveResponse>;
11
22
  /**
12
- * Removes all list subscriptions for given user.
23
+ * Removes every list subscription for a user at once. Their profile and
24
+ * preferences are untouched, so this only affects list-targeted sends.
25
+ *
26
+ * @example
27
+ * ```ts
28
+ * const list = await client.profiles.lists.delete('user_id');
29
+ * ```
13
30
  */
14
31
  delete(userID: string, options?: RequestOptions): APIPromise<ListDeleteResponse>;
15
32
  /**
16
- * Subscribes the given user to one or more lists. If the list does not exist, it
17
- * will be created.
33
+ * Subscribes a user to one or more lists, creating any list that does not yet
34
+ * exist. Optional preferences apply to each subscription.
35
+ *
36
+ * @example
37
+ * ```ts
38
+ * const response = await client.profiles.lists.subscribe(
39
+ * 'user_id',
40
+ * { lists: [{ listId: 'listId' }] },
41
+ * );
42
+ * ```
18
43
  */
19
- subscribe(userID: string, body: ListSubscribeParams, options?: RequestOptions): APIPromise<ListSubscribeResponse>;
44
+ subscribe(userID: string, params: ListSubscribeParams, options?: RequestOptions): APIPromise<ListSubscribeResponse>;
20
45
  }
21
46
  export interface ListRetrieveResponse {
22
47
  paging: Shared.Paging;
@@ -58,7 +83,26 @@ export interface ListRetrieveParams {
58
83
  cursor?: string | null;
59
84
  }
60
85
  export interface ListSubscribeParams {
86
+ /**
87
+ * Body param
88
+ */
61
89
  lists: Array<ProfilesAPI.SubscribeToListsRequestItem>;
90
+ /**
91
+ * Header param: A unique key that makes this request idempotent. If Courier
92
+ * receives another request with the same `Idempotency-Key`, it returns the stored
93
+ * response from the first request without performing the operation again
94
+ * (including the original status code and any error). Use it to safely retry
95
+ * `POST` requests after network failures without risking duplicate sends. The key
96
+ * is scoped to this endpoint.
97
+ */
98
+ 'Idempotency-Key'?: string;
99
+ /**
100
+ * Header param: How long the idempotency key remains valid, as a Unix epoch
101
+ * timestamp in seconds or an ISO 8601 date string. Only applies when
102
+ * `Idempotency-Key` is provided. If omitted, the key is retained for 25 hours; the
103
+ * maximum is 1 year.
104
+ */
105
+ 'x-idempotency-expiration'?: string;
62
106
  }
63
107
  export declare namespace Lists {
64
108
  export { type ListRetrieveResponse as ListRetrieveResponse, type ListDeleteResponse as ListDeleteResponse, type ListSubscribeResponse as ListSubscribeResponse, type ListRetrieveParams as ListRetrieveParams, type ListSubscribeParams as ListSubscribeParams, };
@@ -1 +1 @@
1
- {"version":3,"file":"lists.d.ts","sourceRoot":"","sources":["../../src/resources/profiles/lists.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,MAAM,qBAAkB;AACpC,OAAO,KAAK,WAAW,sBAAmB;AAC1C,OAAO,EAAE,UAAU,EAAE,kCAA+B;AACpD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAGhE,qBAAa,KAAM,SAAQ,WAAW;IACpC;;OAEG;IACH,QAAQ,CACN,MAAM,EAAE,MAAM,EACd,KAAK,GAAE,kBAAkB,GAAG,IAAI,GAAG,SAAc,EACjD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,oBAAoB,CAAC;IAInC;;OAEG;IACH,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,kBAAkB,CAAC;IAIhF;;;OAGG;IACH,SAAS,CACP,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,mBAAmB,EACzB,OAAO,CAAC,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ClC;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,2BAA2B,CAAC,CAAC;IAEtD;;;;;;;OAOG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;;;;OAKG;IACH,0BAA0B,CAAC,EAAE,MAAM,CAAC;CACrC;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
@@ -3,26 +3,65 @@
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.Lists = void 0;
5
5
  const resource_1 = require("../../core/resource.js");
6
+ const headers_1 = require("../../internal/headers.js");
6
7
  const path_1 = require("../../internal/utils/path.js");
8
+ /**
9
+ * Store the contact information Courier delivers to for each user — email, phone number, push tokens, and any custom data you send to.
10
+ */
7
11
  class Lists extends resource_1.APIResource {
8
12
  /**
9
- * Returns the subscribed lists for a specified user.
13
+ * Returns the lists a user is subscribed to, with paging. Use it to check what a
14
+ * recipient will receive before sending to a list.
15
+ *
16
+ * @example
17
+ * ```ts
18
+ * const list = await client.profiles.lists.retrieve(
19
+ * 'user_id',
20
+ * );
21
+ * ```
10
22
  */
11
23
  retrieve(userID, query = {}, options) {
12
24
  return this._client.get((0, path_1.path) `/profiles/${userID}/lists`, { query, ...options });
13
25
  }
14
26
  /**
15
- * Removes all list subscriptions for given user.
27
+ * Removes every list subscription for a user at once. Their profile and
28
+ * preferences are untouched, so this only affects list-targeted sends.
29
+ *
30
+ * @example
31
+ * ```ts
32
+ * const list = await client.profiles.lists.delete('user_id');
33
+ * ```
16
34
  */
17
35
  delete(userID, options) {
18
36
  return this._client.delete((0, path_1.path) `/profiles/${userID}/lists`, options);
19
37
  }
20
38
  /**
21
- * Subscribes the given user to one or more lists. If the list does not exist, it
22
- * will be created.
39
+ * Subscribes a user to one or more lists, creating any list that does not yet
40
+ * exist. Optional preferences apply to each subscription.
41
+ *
42
+ * @example
43
+ * ```ts
44
+ * const response = await client.profiles.lists.subscribe(
45
+ * 'user_id',
46
+ * { lists: [{ listId: 'listId' }] },
47
+ * );
48
+ * ```
23
49
  */
24
- subscribe(userID, body, options) {
25
- return this._client.post((0, path_1.path) `/profiles/${userID}/lists`, { body, ...options });
50
+ subscribe(userID, params, options) {
51
+ const { 'Idempotency-Key': idempotencyKey, 'x-idempotency-expiration': xIdempotencyExpiration, ...body } = params;
52
+ return this._client.post((0, path_1.path) `/profiles/${userID}/lists`, {
53
+ body,
54
+ ...options,
55
+ headers: (0, headers_1.buildHeaders)([
56
+ {
57
+ ...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined),
58
+ ...(xIdempotencyExpiration != null ?
59
+ { 'x-idempotency-expiration': xIdempotencyExpiration }
60
+ : undefined),
61
+ },
62
+ options?.headers,
63
+ ]),
64
+ });
26
65
  }
27
66
  }
28
67
  exports.Lists = Lists;
@@ -1 +1 @@
1
- {"version":3,"file":"lists.js","sourceRoot":"","sources":["../../src/resources/profiles/lists.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAKlD,uDAAiD;AAEjD,MAAa,KAAM,SAAQ,sBAAW;IACpC;;OAEG;IACH,QAAQ,CACN,MAAc,EACd,QAA+C,EAAE,EACjD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,aAAa,MAAM,QAAQ,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClF,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,MAAc,EAAE,OAAwB;QAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,aAAa,MAAM,QAAQ,EAAE,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,CAAC,CAAC,CAAC,EAAE,iBAAiB,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;oBAC/E,GAAG,CAAC,sBAAsB,IAAI,IAAI,CAAC,CAAC;wBAClC,EAAE,0BAA0B,EAAE,sBAAsB,EAAE;wBACxD,CAAC,CAAC,SAAS,CAAC;iBACb;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF;AArED,sBAqEC"}
@@ -1,25 +1,64 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
  import { APIResource } from "../../core/resource.mjs";
3
+ import { buildHeaders } from "../../internal/headers.mjs";
3
4
  import { path } from "../../internal/utils/path.mjs";
5
+ /**
6
+ * Store the contact information Courier delivers to for each user — email, phone number, push tokens, and any custom data you send to.
7
+ */
4
8
  export class Lists extends APIResource {
5
9
  /**
6
- * Returns the subscribed lists for a specified user.
10
+ * Returns the lists a user is subscribed to, with paging. Use it to check what a
11
+ * recipient will receive before sending to a list.
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * const list = await client.profiles.lists.retrieve(
16
+ * 'user_id',
17
+ * );
18
+ * ```
7
19
  */
8
20
  retrieve(userID, query = {}, options) {
9
21
  return this._client.get(path `/profiles/${userID}/lists`, { query, ...options });
10
22
  }
11
23
  /**
12
- * Removes all list subscriptions for given user.
24
+ * Removes every list subscription for a user at once. Their profile and
25
+ * preferences are untouched, so this only affects list-targeted sends.
26
+ *
27
+ * @example
28
+ * ```ts
29
+ * const list = await client.profiles.lists.delete('user_id');
30
+ * ```
13
31
  */
14
32
  delete(userID, options) {
15
33
  return this._client.delete(path `/profiles/${userID}/lists`, options);
16
34
  }
17
35
  /**
18
- * Subscribes the given user to one or more lists. If the list does not exist, it
19
- * will be created.
36
+ * Subscribes a user to one or more lists, creating any list that does not yet
37
+ * exist. Optional preferences apply to each subscription.
38
+ *
39
+ * @example
40
+ * ```ts
41
+ * const response = await client.profiles.lists.subscribe(
42
+ * 'user_id',
43
+ * { lists: [{ listId: 'listId' }] },
44
+ * );
45
+ * ```
20
46
  */
21
- subscribe(userID, body, options) {
22
- return this._client.post(path `/profiles/${userID}/lists`, { body, ...options });
47
+ subscribe(userID, params, options) {
48
+ const { 'Idempotency-Key': idempotencyKey, 'x-idempotency-expiration': xIdempotencyExpiration, ...body } = params;
49
+ return this._client.post(path `/profiles/${userID}/lists`, {
50
+ body,
51
+ ...options,
52
+ headers: buildHeaders([
53
+ {
54
+ ...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined),
55
+ ...(xIdempotencyExpiration != null ?
56
+ { 'x-idempotency-expiration': xIdempotencyExpiration }
57
+ : undefined),
58
+ },
59
+ options?.headers,
60
+ ]),
61
+ });
23
62
  }
24
63
  }
25
64
  //# sourceMappingURL=lists.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"lists.mjs","sourceRoot":"","sources":["../../src/resources/profiles/lists.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAKlD,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD,MAAM,OAAO,KAAM,SAAQ,WAAW;IACpC;;OAEG;IACH,QAAQ,CACN,MAAc,EACd,QAA+C,EAAE,EACjD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,aAAa,MAAM,QAAQ,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClF,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,MAAc,EAAE,OAAwB;QAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,aAAa,MAAM,QAAQ,EAAE,OAAO,CAAC,CAAC;IACvE,CAAC;IAED;;;OAGG;IACH,SAAS,CACP,MAAc,EACd,IAAyB,EACzB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,I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,IAAI,IAAI,CAAC,CAAC;wBAClC,EAAE,0BAA0B,EAAE,sBAAsB,EAAE;wBACxD,CAAC,CAAC,SAAS,CAAC;iBACb;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -4,31 +4,71 @@ import * as ListsAPI from "./lists.mjs";
4
4
  import { ListDeleteResponse, ListRetrieveParams, ListRetrieveResponse, ListSubscribeParams, ListSubscribeResponse, Lists } from "./lists.mjs";
5
5
  import { APIPromise } from "../../core/api-promise.mjs";
6
6
  import { RequestOptions } from "../../internal/request-options.mjs";
7
+ /**
8
+ * Store the contact information Courier delivers to for each user — email, phone number, push tokens, and any custom data you send to.
9
+ */
7
10
  export declare class Profiles extends APIResource {
8
11
  lists: ListsAPI.Lists;
9
12
  /**
10
- * Merge the supplied values with an existing profile or create a new profile if
11
- * one doesn't already exist.
13
+ * Merges the supplied values into a user's profile, creating it if absent and
14
+ * leaving any key you omit untouched. Prefer this for everyday writes.
15
+ *
16
+ * @example
17
+ * ```ts
18
+ * const profile = await client.profiles.create('user_id', {
19
+ * profile: { foo: 'bar' },
20
+ * });
21
+ * ```
12
22
  */
13
- create(userID: string, body: ProfileCreateParams, options?: RequestOptions): APIPromise<ProfileCreateResponse>;
23
+ create(userID: string, params: ProfileCreateParams, options?: RequestOptions): APIPromise<ProfileCreateResponse>;
14
24
  /**
15
- * Returns the specified user profile.
25
+ * Returns a user's stored profile and preferences, including the email address,
26
+ * phone number, and push tokens Courier can reach them on.
27
+ *
28
+ * @example
29
+ * ```ts
30
+ * const profile = await client.profiles.retrieve('user_id');
31
+ * ```
16
32
  */
17
33
  retrieve(userID: string, options?: RequestOptions): APIPromise<ProfileRetrieveResponse>;
18
34
  /**
19
- * Update a profile
35
+ * Applies a JSON Patch to a user profile, adding, removing, or replacing
36
+ * individual fields without sending the whole object.
37
+ *
38
+ * @example
39
+ * ```ts
40
+ * await client.profiles.update('user_id', {
41
+ * patch: [
42
+ * {
43
+ * op: 'op',
44
+ * path: 'path',
45
+ * value: 'value',
46
+ * },
47
+ * ],
48
+ * });
49
+ * ```
20
50
  */
21
51
  update(userID: string, body: ProfileUpdateParams, options?: RequestOptions): APIPromise<void>;
22
52
  /**
23
- * Deletes the specified user profile.
53
+ * Deletes a user's profile and stored contact details. List subscriptions and
54
+ * preferences are separate resources, so remove those too if required.
55
+ *
56
+ * @example
57
+ * ```ts
58
+ * await client.profiles.delete('user_id');
59
+ * ```
24
60
  */
25
61
  delete(userID: string, options?: RequestOptions): APIPromise<void>;
26
62
  /**
27
- * When using `PUT`, be sure to include all the key-value pairs required by the
28
- * recipient's profile. Any key-value pairs that exist in the profile but fail to
29
- * be included in the `PUT` request will be removed from the profile. Remember, a
30
- * `PUT` update is a full replacement of the data. For partial updates, use the
31
- * [Patch](https://www.courier.com/docs/reference/profiles/patch/) request.
63
+ * Overwrites a user profile in full, removing any key absent from the request
64
+ * body. Use the patch endpoint when changing a single field.
65
+ *
66
+ * @example
67
+ * ```ts
68
+ * const response = await client.profiles.replace('user_id', {
69
+ * profile: { foo: 'bar' },
70
+ * });
71
+ * ```
32
72
  */
33
73
  replace(userID: string, body: ProfileReplaceParams, options?: RequestOptions): APIPromise<ProfileReplaceResponse>;
34
74
  }
@@ -49,9 +89,28 @@ export interface ProfileReplaceResponse {
49
89
  status: 'SUCCESS';
50
90
  }
51
91
  export interface ProfileCreateParams {
92
+ /**
93
+ * Body param
94
+ */
52
95
  profile: {
53
96
  [key: string]: unknown;
54
97
  };
98
+ /**
99
+ * Header param: A unique key that makes this request idempotent. If Courier
100
+ * receives another request with the same `Idempotency-Key`, it returns the stored
101
+ * response from the first request without performing the operation again
102
+ * (including the original status code and any error). Use it to safely retry
103
+ * `POST` requests after network failures without risking duplicate sends. The key
104
+ * is scoped to this endpoint.
105
+ */
106
+ 'Idempotency-Key'?: string;
107
+ /**
108
+ * Header param: How long the idempotency key remains valid, as a Unix epoch
109
+ * timestamp in seconds or an ISO 8601 date string. Only applies when
110
+ * `Idempotency-Key` is provided. If omitted, the key is retained for 25 hours; the
111
+ * maximum is 1 year.
112
+ */
113
+ 'x-idempotency-expiration'?: string;
55
114
  }
56
115
  export interface ProfileUpdateParams {
57
116
  /**