telnyx 7.22.0 → 7.24.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 (604) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/client.d.mts +42 -12
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +42 -12
  5. package/client.d.ts.map +1 -1
  6. package/client.js +30 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +30 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/ai/ai.d.mts +12 -4
  12. package/resources/ai/ai.d.mts.map +1 -1
  13. package/resources/ai/ai.d.ts +12 -4
  14. package/resources/ai/ai.d.ts.map +1 -1
  15. package/resources/ai/ai.js +8 -0
  16. package/resources/ai/ai.js.map +1 -1
  17. package/resources/ai/ai.mjs +9 -1
  18. package/resources/ai/ai.mjs.map +1 -1
  19. package/resources/ai/assistants/assistants.d.mts +409 -57
  20. package/resources/ai/assistants/assistants.d.mts.map +1 -1
  21. package/resources/ai/assistants/assistants.d.ts +409 -57
  22. package/resources/ai/assistants/assistants.d.ts.map +1 -1
  23. package/resources/ai/assistants/assistants.js.map +1 -1
  24. package/resources/ai/assistants/assistants.mjs.map +1 -1
  25. package/resources/ai/assistants/index.d.mts +1 -1
  26. package/resources/ai/assistants/index.d.mts.map +1 -1
  27. package/resources/ai/assistants/index.d.ts +1 -1
  28. package/resources/ai/assistants/index.d.ts.map +1 -1
  29. package/resources/ai/assistants/index.js.map +1 -1
  30. package/resources/ai/assistants/index.mjs.map +1 -1
  31. package/resources/ai/assistants/versions.d.mts +36 -14
  32. package/resources/ai/assistants/versions.d.mts.map +1 -1
  33. package/resources/ai/assistants/versions.d.ts +36 -14
  34. package/resources/ai/assistants/versions.d.ts.map +1 -1
  35. package/resources/ai/audio.d.mts +78 -43
  36. package/resources/ai/audio.d.mts.map +1 -1
  37. package/resources/ai/audio.d.ts +78 -43
  38. package/resources/ai/audio.d.ts.map +1 -1
  39. package/resources/ai/audio.js.map +1 -1
  40. package/resources/ai/audio.mjs.map +1 -1
  41. package/resources/ai/chat.d.mts +2 -10
  42. package/resources/ai/chat.d.mts.map +1 -1
  43. package/resources/ai/chat.d.ts +2 -10
  44. package/resources/ai/chat.d.ts.map +1 -1
  45. package/resources/ai/chat.js.map +1 -1
  46. package/resources/ai/chat.mjs.map +1 -1
  47. package/resources/ai/collections/collections.d.mts +3 -3
  48. package/resources/ai/collections/collections.d.mts.map +1 -1
  49. package/resources/ai/collections/collections.d.ts +3 -3
  50. package/resources/ai/collections/collections.d.ts.map +1 -1
  51. package/resources/ai/collections/collections.js.map +1 -1
  52. package/resources/ai/collections/collections.mjs.map +1 -1
  53. package/resources/ai/collections/index.d.mts +1 -1
  54. package/resources/ai/collections/index.d.mts.map +1 -1
  55. package/resources/ai/collections/index.d.ts +1 -1
  56. package/resources/ai/collections/index.d.ts.map +1 -1
  57. package/resources/ai/collections/index.js.map +1 -1
  58. package/resources/ai/collections/index.mjs.map +1 -1
  59. package/resources/ai/collections/sources.d.mts +32 -5
  60. package/resources/ai/collections/sources.d.mts.map +1 -1
  61. package/resources/ai/collections/sources.d.ts +32 -5
  62. package/resources/ai/collections/sources.d.ts.map +1 -1
  63. package/resources/ai/collections/sources.js.map +1 -1
  64. package/resources/ai/collections/sources.mjs.map +1 -1
  65. package/resources/ai/index.d.mts +4 -2
  66. package/resources/ai/index.d.mts.map +1 -1
  67. package/resources/ai/index.d.ts +4 -2
  68. package/resources/ai/index.d.ts.map +1 -1
  69. package/resources/ai/index.js +9 -5
  70. package/resources/ai/index.js.map +1 -1
  71. package/resources/ai/index.mjs +3 -1
  72. package/resources/ai/index.mjs.map +1 -1
  73. package/resources/ai/memory/index.d.mts +3 -0
  74. package/resources/ai/memory/index.d.mts.map +1 -0
  75. package/resources/ai/memory/index.d.ts +3 -0
  76. package/resources/ai/memory/index.d.ts.map +1 -0
  77. package/resources/ai/memory/index.js +9 -0
  78. package/resources/ai/memory/index.js.map +1 -0
  79. package/resources/ai/memory/index.mjs +4 -0
  80. package/resources/ai/memory/index.mjs.map +1 -0
  81. package/resources/ai/memory/memory.d.mts +10 -0
  82. package/resources/ai/memory/memory.d.mts.map +1 -0
  83. package/resources/ai/memory/memory.d.ts +10 -0
  84. package/resources/ai/memory/memory.d.ts.map +1 -0
  85. package/resources/ai/memory/memory.js +17 -0
  86. package/resources/ai/memory/memory.js.map +1 -0
  87. package/resources/ai/memory/memory.mjs +12 -0
  88. package/resources/ai/memory/memory.mjs.map +1 -0
  89. package/resources/ai/memory/namespaces/index.d.mts +4 -0
  90. package/resources/ai/memory/namespaces/index.d.mts.map +1 -0
  91. package/resources/ai/memory/namespaces/index.d.ts +4 -0
  92. package/resources/ai/memory/namespaces/index.d.ts.map +1 -0
  93. package/resources/ai/memory/namespaces/index.js +11 -0
  94. package/resources/ai/memory/namespaces/index.js.map +1 -0
  95. package/resources/ai/memory/namespaces/index.mjs +5 -0
  96. package/resources/ai/memory/namespaces/index.mjs.map +1 -0
  97. package/resources/ai/memory/namespaces/namespaces.d.mts +54 -0
  98. package/resources/ai/memory/namespaces/namespaces.d.mts.map +1 -0
  99. package/resources/ai/memory/namespaces/namespaces.d.ts +54 -0
  100. package/resources/ai/memory/namespaces/namespaces.d.ts.map +1 -0
  101. package/resources/ai/memory/namespaces/namespaces.js +43 -0
  102. package/resources/ai/memory/namespaces/namespaces.js.map +1 -0
  103. package/resources/ai/memory/namespaces/namespaces.mjs +38 -0
  104. package/resources/ai/memory/namespaces/namespaces.mjs.map +1 -0
  105. package/resources/ai/memory/namespaces/profiles/index.d.mts +4 -0
  106. package/resources/ai/memory/namespaces/profiles/index.d.mts.map +1 -0
  107. package/resources/ai/memory/namespaces/profiles/index.d.ts +4 -0
  108. package/resources/ai/memory/namespaces/profiles/index.d.ts.map +1 -0
  109. package/resources/ai/memory/namespaces/profiles/index.js +11 -0
  110. package/resources/ai/memory/namespaces/profiles/index.js.map +1 -0
  111. package/resources/ai/memory/namespaces/profiles/index.mjs +5 -0
  112. package/resources/ai/memory/namespaces/profiles/index.mjs.map +1 -0
  113. package/resources/ai/memory/namespaces/profiles/memories.d.mts +118 -0
  114. package/resources/ai/memory/namespaces/profiles/memories.d.mts.map +1 -0
  115. package/resources/ai/memory/namespaces/profiles/memories.d.ts +118 -0
  116. package/resources/ai/memory/namespaces/profiles/memories.d.ts.map +1 -0
  117. package/resources/ai/memory/namespaces/profiles/memories.js +63 -0
  118. package/resources/ai/memory/namespaces/profiles/memories.js.map +1 -0
  119. package/resources/ai/memory/namespaces/profiles/memories.mjs +59 -0
  120. package/resources/ai/memory/namespaces/profiles/memories.mjs.map +1 -0
  121. package/resources/ai/memory/namespaces/profiles/profiles.d.mts +324 -0
  122. package/resources/ai/memory/namespaces/profiles/profiles.d.mts.map +1 -0
  123. package/resources/ai/memory/namespaces/profiles/profiles.d.ts +324 -0
  124. package/resources/ai/memory/namespaces/profiles/profiles.d.ts.map +1 -0
  125. package/resources/ai/memory/namespaces/profiles/profiles.js +161 -0
  126. package/resources/ai/memory/namespaces/profiles/profiles.js.map +1 -0
  127. package/resources/ai/memory/namespaces/profiles/profiles.mjs +156 -0
  128. package/resources/ai/memory/namespaces/profiles/profiles.mjs.map +1 -0
  129. package/resources/ai/memory/namespaces/profiles/sources.d.mts +163 -0
  130. package/resources/ai/memory/namespaces/profiles/sources.d.mts.map +1 -0
  131. package/resources/ai/memory/namespaces/profiles/sources.d.ts +163 -0
  132. package/resources/ai/memory/namespaces/profiles/sources.d.ts.map +1 -0
  133. package/resources/ai/memory/namespaces/profiles/sources.js +80 -0
  134. package/resources/ai/memory/namespaces/profiles/sources.js.map +1 -0
  135. package/resources/ai/memory/namespaces/profiles/sources.mjs +76 -0
  136. package/resources/ai/memory/namespaces/profiles/sources.mjs.map +1 -0
  137. package/resources/ai/memory/namespaces/profiles.d.mts +2 -0
  138. package/resources/ai/memory/namespaces/profiles.d.mts.map +1 -0
  139. package/resources/ai/memory/namespaces/profiles.d.ts +2 -0
  140. package/resources/ai/memory/namespaces/profiles.d.ts.map +1 -0
  141. package/resources/ai/memory/namespaces/profiles.js +6 -0
  142. package/resources/ai/memory/namespaces/profiles.js.map +1 -0
  143. package/resources/ai/memory/namespaces/profiles.mjs +3 -0
  144. package/resources/ai/memory/namespaces/profiles.mjs.map +1 -0
  145. package/resources/ai/memory/namespaces/settings.d.mts +108 -0
  146. package/resources/ai/memory/namespaces/settings.d.mts.map +1 -0
  147. package/resources/ai/memory/namespaces/settings.d.ts +108 -0
  148. package/resources/ai/memory/namespaces/settings.d.ts.map +1 -0
  149. package/resources/ai/memory/namespaces/settings.js +54 -0
  150. package/resources/ai/memory/namespaces/settings.js.map +1 -0
  151. package/resources/ai/memory/namespaces/settings.mjs +50 -0
  152. package/resources/ai/memory/namespaces/settings.mjs.map +1 -0
  153. package/resources/ai/memory/namespaces.d.mts +2 -0
  154. package/resources/ai/memory/namespaces.d.mts.map +1 -0
  155. package/resources/ai/memory/namespaces.d.ts +2 -0
  156. package/resources/ai/memory/namespaces.d.ts.map +1 -0
  157. package/resources/ai/memory/namespaces.js +6 -0
  158. package/resources/ai/memory/namespaces.js.map +1 -0
  159. package/resources/ai/memory/namespaces.mjs +3 -0
  160. package/resources/ai/memory/namespaces.mjs.map +1 -0
  161. package/resources/ai/memory.d.mts +2 -0
  162. package/resources/ai/memory.d.mts.map +1 -0
  163. package/resources/ai/memory.d.ts +2 -0
  164. package/resources/ai/memory.d.ts.map +1 -0
  165. package/resources/ai/memory.js +6 -0
  166. package/resources/ai/memory.js.map +1 -0
  167. package/resources/ai/memory.mjs +3 -0
  168. package/resources/ai/memory.mjs.map +1 -0
  169. package/resources/ai/openai/chat.d.mts +10 -11
  170. package/resources/ai/openai/chat.d.mts.map +1 -1
  171. package/resources/ai/openai/chat.d.ts +10 -11
  172. package/resources/ai/openai/chat.d.ts.map +1 -1
  173. package/resources/ai/openai/chat.js.map +1 -1
  174. package/resources/ai/openai/chat.mjs.map +1 -1
  175. package/resources/ai/openai/index.d.mts +1 -1
  176. package/resources/ai/openai/index.d.mts.map +1 -1
  177. package/resources/ai/openai/index.d.ts +1 -1
  178. package/resources/ai/openai/index.d.ts.map +1 -1
  179. package/resources/ai/openai/index.js.map +1 -1
  180. package/resources/ai/openai/index.mjs +1 -1
  181. package/resources/ai/openai/index.mjs.map +1 -1
  182. package/resources/ai/openai/openai.d.mts +2 -2
  183. package/resources/ai/openai/openai.d.mts.map +1 -1
  184. package/resources/ai/openai/openai.d.ts +2 -2
  185. package/resources/ai/openai/openai.d.ts.map +1 -1
  186. package/resources/ai/openai/openai.js.map +1 -1
  187. package/resources/ai/openai/openai.mjs.map +1 -1
  188. package/resources/ai/typesafe/index.d.mts +3 -0
  189. package/resources/ai/typesafe/index.d.mts.map +1 -0
  190. package/resources/ai/typesafe/index.d.ts +3 -0
  191. package/resources/ai/typesafe/index.d.ts.map +1 -0
  192. package/resources/ai/typesafe/index.js +9 -0
  193. package/resources/ai/typesafe/index.js.map +1 -0
  194. package/resources/ai/typesafe/index.mjs +4 -0
  195. package/resources/ai/typesafe/index.mjs.map +1 -0
  196. package/resources/ai/typesafe/typesafe.d.mts +10 -0
  197. package/resources/ai/typesafe/typesafe.d.mts.map +1 -0
  198. package/resources/ai/typesafe/typesafe.d.ts +10 -0
  199. package/resources/ai/typesafe/typesafe.d.ts.map +1 -0
  200. package/resources/ai/typesafe/typesafe.js +17 -0
  201. package/resources/ai/typesafe/typesafe.js.map +1 -0
  202. package/resources/ai/typesafe/typesafe.mjs +12 -0
  203. package/resources/ai/typesafe/typesafe.mjs.map +1 -0
  204. package/resources/ai/typesafe/v1.d.mts +285 -0
  205. package/resources/ai/typesafe/v1.d.mts.map +1 -0
  206. package/resources/ai/typesafe/v1.d.ts +285 -0
  207. package/resources/ai/typesafe/v1.d.ts.map +1 -0
  208. package/resources/ai/typesafe/v1.js +72 -0
  209. package/resources/ai/typesafe/v1.js.map +1 -0
  210. package/resources/ai/typesafe/v1.mjs +68 -0
  211. package/resources/ai/typesafe/v1.mjs.map +1 -0
  212. package/resources/ai/typesafe.d.mts +2 -0
  213. package/resources/ai/typesafe.d.mts.map +1 -0
  214. package/resources/ai/typesafe.d.ts +2 -0
  215. package/resources/ai/typesafe.d.ts.map +1 -0
  216. package/resources/ai/typesafe.js +6 -0
  217. package/resources/ai/typesafe.js.map +1 -0
  218. package/resources/ai/typesafe.mjs +3 -0
  219. package/resources/ai/typesafe.mjs.map +1 -0
  220. package/resources/bot-challenge.d.mts +80 -0
  221. package/resources/bot-challenge.d.mts.map +1 -0
  222. package/resources/bot-challenge.d.ts +80 -0
  223. package/resources/bot-challenge.d.ts.map +1 -0
  224. package/resources/bot-challenge.js +35 -0
  225. package/resources/bot-challenge.js.map +1 -0
  226. package/resources/bot-challenge.mjs +31 -0
  227. package/resources/bot-challenge.mjs.map +1 -0
  228. package/resources/bot-sessions.d.mts +49 -0
  229. package/resources/bot-sessions.d.mts.map +1 -0
  230. package/resources/bot-sessions.d.ts +49 -0
  231. package/resources/bot-sessions.d.ts.map +1 -0
  232. package/resources/bot-sessions.js +28 -0
  233. package/resources/bot-sessions.js.map +1 -0
  234. package/resources/bot-sessions.mjs +24 -0
  235. package/resources/bot-sessions.mjs.map +1 -0
  236. package/resources/bot-signup.d.mts +114 -0
  237. package/resources/bot-signup.d.mts.map +1 -0
  238. package/resources/bot-signup.d.ts +114 -0
  239. package/resources/bot-signup.d.ts.map +1 -0
  240. package/resources/bot-signup.js +63 -0
  241. package/resources/bot-signup.js.map +1 -0
  242. package/resources/bot-signup.mjs +59 -0
  243. package/resources/bot-signup.mjs.map +1 -0
  244. package/resources/calls/actions.d.mts +100 -16
  245. package/resources/calls/actions.d.mts.map +1 -1
  246. package/resources/calls/actions.d.ts +100 -16
  247. package/resources/calls/actions.d.ts.map +1 -1
  248. package/resources/calls/calls.d.mts +55 -9
  249. package/resources/calls/calls.d.mts.map +1 -1
  250. package/resources/calls/calls.d.ts +55 -9
  251. package/resources/calls/calls.d.ts.map +1 -1
  252. package/resources/calls/calls.js.map +1 -1
  253. package/resources/calls/calls.mjs.map +1 -1
  254. package/resources/calls/index.d.mts +1 -1
  255. package/resources/calls/index.d.mts.map +1 -1
  256. package/resources/calls/index.d.ts +1 -1
  257. package/resources/calls/index.d.ts.map +1 -1
  258. package/resources/calls/index.js.map +1 -1
  259. package/resources/calls/index.mjs.map +1 -1
  260. package/resources/compute/compute.d.mts +2 -2
  261. package/resources/compute/compute.d.mts.map +1 -1
  262. package/resources/compute/compute.d.ts +2 -2
  263. package/resources/compute/compute.d.ts.map +1 -1
  264. package/resources/compute/compute.js +2 -2
  265. package/resources/compute/compute.js.map +1 -1
  266. package/resources/compute/compute.mjs +2 -2
  267. package/resources/compute/compute.mjs.map +1 -1
  268. package/resources/compute/funcs/export.d.mts +121 -0
  269. package/resources/compute/funcs/export.d.mts.map +1 -0
  270. package/resources/compute/funcs/export.d.ts +121 -0
  271. package/resources/compute/funcs/export.d.ts.map +1 -0
  272. package/resources/compute/funcs/export.js +68 -0
  273. package/resources/compute/funcs/export.js.map +1 -0
  274. package/resources/compute/funcs/export.mjs +64 -0
  275. package/resources/compute/funcs/export.mjs.map +1 -0
  276. package/resources/compute/funcs/funcs.d.mts +214 -0
  277. package/resources/compute/funcs/funcs.d.mts.map +1 -0
  278. package/resources/compute/funcs/funcs.d.ts +214 -0
  279. package/resources/compute/funcs/funcs.d.ts.map +1 -0
  280. package/resources/compute/funcs/funcs.js +80 -0
  281. package/resources/compute/funcs/funcs.js.map +1 -0
  282. package/resources/compute/funcs/funcs.mjs +75 -0
  283. package/resources/compute/funcs/funcs.mjs.map +1 -0
  284. package/resources/compute/funcs/index.d.mts +3 -0
  285. package/resources/compute/funcs/index.d.mts.map +1 -0
  286. package/resources/compute/funcs/index.d.ts +3 -0
  287. package/resources/compute/funcs/index.d.ts.map +1 -0
  288. package/resources/compute/funcs/index.js +9 -0
  289. package/resources/compute/funcs/index.js.map +1 -0
  290. package/resources/compute/funcs/index.mjs +4 -0
  291. package/resources/compute/funcs/index.mjs.map +1 -0
  292. package/resources/compute/funcs.d.mts +1 -178
  293. package/resources/compute/funcs.d.mts.map +1 -1
  294. package/resources/compute/funcs.d.ts +1 -178
  295. package/resources/compute/funcs.d.ts.map +1 -1
  296. package/resources/compute/funcs.js +2 -37
  297. package/resources/compute/funcs.js.map +1 -1
  298. package/resources/compute/funcs.mjs +1 -35
  299. package/resources/compute/funcs.mjs.map +1 -1
  300. package/resources/compute/index.d.mts +1 -1
  301. package/resources/compute/index.d.mts.map +1 -1
  302. package/resources/compute/index.d.ts +1 -1
  303. package/resources/compute/index.d.ts.map +1 -1
  304. package/resources/compute/index.js +2 -2
  305. package/resources/compute/index.js.map +1 -1
  306. package/resources/compute/index.mjs +1 -1
  307. package/resources/compute/index.mjs.map +1 -1
  308. package/resources/conferences/actions.d.mts +7 -1
  309. package/resources/conferences/actions.d.mts.map +1 -1
  310. package/resources/conferences/actions.d.ts +7 -1
  311. package/resources/conferences/actions.d.ts.map +1 -1
  312. package/resources/connections.d.mts +109 -1
  313. package/resources/connections.d.mts.map +1 -1
  314. package/resources/connections.d.ts +109 -1
  315. package/resources/connections.d.ts.map +1 -1
  316. package/resources/connections.js +8 -0
  317. package/resources/connections.js.map +1 -1
  318. package/resources/connections.mjs +8 -0
  319. package/resources/connections.mjs.map +1 -1
  320. package/resources/detail-records.d.mts +18 -1
  321. package/resources/detail-records.d.mts.map +1 -1
  322. package/resources/detail-records.d.ts +18 -1
  323. package/resources/detail-records.d.ts.map +1 -1
  324. package/resources/email-blocks/email-blocks.d.mts +12 -4
  325. package/resources/email-blocks/email-blocks.d.mts.map +1 -1
  326. package/resources/email-blocks/email-blocks.d.ts +12 -4
  327. package/resources/email-blocks/email-blocks.d.ts.map +1 -1
  328. package/resources/email-blocks/email-blocks.js +5 -3
  329. package/resources/email-blocks/email-blocks.js.map +1 -1
  330. package/resources/email-blocks/email-blocks.mjs +5 -3
  331. package/resources/email-blocks/email-blocks.mjs.map +1 -1
  332. package/resources/email-blocks/imports.d.mts +20 -4
  333. package/resources/email-blocks/imports.d.mts.map +1 -1
  334. package/resources/email-blocks/imports.d.ts +20 -4
  335. package/resources/email-blocks/imports.d.ts.map +1 -1
  336. package/resources/email-blocks/imports.js +17 -3
  337. package/resources/email-blocks/imports.js.map +1 -1
  338. package/resources/email-blocks/imports.mjs +17 -3
  339. package/resources/email-blocks/imports.mjs.map +1 -1
  340. package/resources/email-domains/email-domains.d.mts +98 -1
  341. package/resources/email-domains/email-domains.d.mts.map +1 -1
  342. package/resources/email-domains/email-domains.d.ts +98 -1
  343. package/resources/email-domains/email-domains.d.ts.map +1 -1
  344. package/resources/email-domains/email-domains.js +21 -0
  345. package/resources/email-domains/email-domains.js.map +1 -1
  346. package/resources/email-domains/email-domains.mjs +21 -0
  347. package/resources/email-domains/email-domains.mjs.map +1 -1
  348. package/resources/email-domains/index.d.mts +1 -1
  349. package/resources/email-domains/index.d.mts.map +1 -1
  350. package/resources/email-domains/index.d.ts +1 -1
  351. package/resources/email-domains/index.d.ts.map +1 -1
  352. package/resources/email-domains/index.js.map +1 -1
  353. package/resources/email-domains/index.mjs.map +1 -1
  354. package/resources/email-domains/webhooks.d.mts +6 -4
  355. package/resources/email-domains/webhooks.d.mts.map +1 -1
  356. package/resources/email-domains/webhooks.d.ts +6 -4
  357. package/resources/email-domains/webhooks.d.ts.map +1 -1
  358. package/resources/email-events.d.mts +162 -28
  359. package/resources/email-events.d.mts.map +1 -1
  360. package/resources/email-events.d.ts +162 -28
  361. package/resources/email-events.d.ts.map +1 -1
  362. package/resources/email-events.js +15 -6
  363. package/resources/email-events.js.map +1 -1
  364. package/resources/email-events.mjs +15 -6
  365. package/resources/email-events.mjs.map +1 -1
  366. package/resources/email-inboxes/drafts.d.mts +31 -1
  367. package/resources/email-inboxes/drafts.d.mts.map +1 -1
  368. package/resources/email-inboxes/drafts.d.ts +31 -1
  369. package/resources/email-inboxes/drafts.d.ts.map +1 -1
  370. package/resources/email-inboxes/drafts.js.map +1 -1
  371. package/resources/email-inboxes/drafts.mjs.map +1 -1
  372. package/resources/email-messages/email-messages.d.mts +178 -45
  373. package/resources/email-messages/email-messages.d.mts.map +1 -1
  374. package/resources/email-messages/email-messages.d.ts +178 -45
  375. package/resources/email-messages/email-messages.d.ts.map +1 -1
  376. package/resources/email-messages/email-messages.js +43 -9
  377. package/resources/email-messages/email-messages.js.map +1 -1
  378. package/resources/email-messages/email-messages.mjs +43 -9
  379. package/resources/email-messages/email-messages.mjs.map +1 -1
  380. package/resources/email-messages/index.d.mts +1 -1
  381. package/resources/email-messages/index.d.mts.map +1 -1
  382. package/resources/email-messages/index.d.ts +1 -1
  383. package/resources/email-messages/index.d.ts.map +1 -1
  384. package/resources/email-messages/index.js.map +1 -1
  385. package/resources/email-messages/index.mjs.map +1 -1
  386. package/resources/email-messages/recipients.d.mts +2 -2
  387. package/resources/email-messages/recipients.d.mts.map +1 -1
  388. package/resources/email-messages/recipients.d.ts +2 -2
  389. package/resources/email-messages/recipients.d.ts.map +1 -1
  390. package/resources/email-templates.d.mts +170 -0
  391. package/resources/email-templates.d.mts.map +1 -1
  392. package/resources/email-templates.d.ts +170 -0
  393. package/resources/email-templates.d.ts.map +1 -1
  394. package/resources/email-templates.js +6 -0
  395. package/resources/email-templates.js.map +1 -1
  396. package/resources/email-templates.mjs +6 -0
  397. package/resources/email-templates.mjs.map +1 -1
  398. package/resources/index.d.mts +11 -6
  399. package/resources/index.d.mts.map +1 -1
  400. package/resources/index.d.ts +11 -6
  401. package/resources/index.d.ts.map +1 -1
  402. package/resources/index.js +14 -4
  403. package/resources/index.js.map +1 -1
  404. package/resources/index.mjs +5 -0
  405. package/resources/index.mjs.map +1 -1
  406. package/resources/machine-payments.d.mts +142 -0
  407. package/resources/machine-payments.d.mts.map +1 -0
  408. package/resources/machine-payments.d.ts +142 -0
  409. package/resources/machine-payments.d.ts.map +1 -0
  410. package/resources/machine-payments.js +56 -0
  411. package/resources/machine-payments.js.map +1 -0
  412. package/resources/machine-payments.mjs +52 -0
  413. package/resources/machine-payments.mjs.map +1 -0
  414. package/resources/meeting-sessions/actions.d.mts +7 -1
  415. package/resources/meeting-sessions/actions.d.mts.map +1 -1
  416. package/resources/meeting-sessions/actions.d.ts +7 -1
  417. package/resources/meeting-sessions/actions.d.ts.map +1 -1
  418. package/resources/meeting-sessions/actions.js +7 -1
  419. package/resources/meeting-sessions/actions.js.map +1 -1
  420. package/resources/meeting-sessions/actions.mjs +7 -1
  421. package/resources/meeting-sessions/actions.mjs.map +1 -1
  422. package/resources/meeting-sessions/artifacts.d.mts +38 -11
  423. package/resources/meeting-sessions/artifacts.d.mts.map +1 -1
  424. package/resources/meeting-sessions/artifacts.d.ts +38 -11
  425. package/resources/meeting-sessions/artifacts.d.ts.map +1 -1
  426. package/resources/meeting-sessions/artifacts.js +11 -5
  427. package/resources/meeting-sessions/artifacts.js.map +1 -1
  428. package/resources/meeting-sessions/artifacts.mjs +11 -5
  429. package/resources/meeting-sessions/artifacts.mjs.map +1 -1
  430. package/resources/meeting-sessions/meeting-sessions.d.mts +63 -23
  431. package/resources/meeting-sessions/meeting-sessions.d.mts.map +1 -1
  432. package/resources/meeting-sessions/meeting-sessions.d.ts +63 -23
  433. package/resources/meeting-sessions/meeting-sessions.d.ts.map +1 -1
  434. package/resources/meeting-sessions/meeting-sessions.js +0 -2
  435. package/resources/meeting-sessions/meeting-sessions.js.map +1 -1
  436. package/resources/meeting-sessions/meeting-sessions.mjs +0 -2
  437. package/resources/meeting-sessions/meeting-sessions.mjs.map +1 -1
  438. package/resources/messages/messages.d.mts +135 -23
  439. package/resources/messages/messages.d.mts.map +1 -1
  440. package/resources/messages/messages.d.ts +135 -23
  441. package/resources/messages/messages.d.ts.map +1 -1
  442. package/resources/messages/messages.js.map +1 -1
  443. package/resources/messages/messages.mjs.map +1 -1
  444. package/resources/noise-suppression-engines.d.mts +42 -0
  445. package/resources/noise-suppression-engines.d.mts.map +1 -0
  446. package/resources/noise-suppression-engines.d.ts +42 -0
  447. package/resources/noise-suppression-engines.d.ts.map +1 -0
  448. package/resources/noise-suppression-engines.js +21 -0
  449. package/resources/noise-suppression-engines.js.map +1 -0
  450. package/resources/noise-suppression-engines.mjs +17 -0
  451. package/resources/noise-suppression-engines.mjs.map +1 -0
  452. package/resources/phone-numbers/phone-numbers.d.mts +12 -2
  453. package/resources/phone-numbers/phone-numbers.d.mts.map +1 -1
  454. package/resources/phone-numbers/phone-numbers.d.ts +12 -2
  455. package/resources/phone-numbers/phone-numbers.d.ts.map +1 -1
  456. package/resources/phone-numbers/phone-numbers.js.map +1 -1
  457. package/resources/phone-numbers/phone-numbers.mjs.map +1 -1
  458. package/resources/private-wireless-gateways.d.mts +61 -7
  459. package/resources/private-wireless-gateways.d.mts.map +1 -1
  460. package/resources/private-wireless-gateways.d.ts +61 -7
  461. package/resources/private-wireless-gateways.d.ts.map +1 -1
  462. package/resources/private-wireless-gateways.js +1 -1
  463. package/resources/private-wireless-gateways.js.map +1 -1
  464. package/resources/private-wireless-gateways.mjs +1 -1
  465. package/resources/private-wireless-gateways.mjs.map +1 -1
  466. package/resources/speech-to-text/speech-to-text.d.mts +1 -1
  467. package/resources/speech-to-text/speech-to-text.d.mts.map +1 -1
  468. package/resources/speech-to-text/speech-to-text.d.ts +1 -1
  469. package/resources/speech-to-text/speech-to-text.d.ts.map +1 -1
  470. package/resources/texml/accounts/calls/calls.d.mts +126 -9
  471. package/resources/texml/accounts/calls/calls.d.mts.map +1 -1
  472. package/resources/texml/accounts/calls/calls.d.ts +126 -9
  473. package/resources/texml/accounts/calls/calls.d.ts.map +1 -1
  474. package/resources/texml/accounts/calls/calls.js +12 -2
  475. package/resources/texml/accounts/calls/calls.js.map +1 -1
  476. package/resources/texml/accounts/calls/calls.mjs +12 -2
  477. package/resources/texml/accounts/calls/calls.mjs.map +1 -1
  478. package/resources/texml/accounts/conferences/participants.d.mts +39 -0
  479. package/resources/texml/accounts/conferences/participants.d.mts.map +1 -1
  480. package/resources/texml/accounts/conferences/participants.d.ts +39 -0
  481. package/resources/texml/accounts/conferences/participants.d.ts.map +1 -1
  482. package/resources/texml/calls.d.mts +71 -0
  483. package/resources/texml/calls.d.mts.map +1 -0
  484. package/resources/texml/calls.d.ts +71 -0
  485. package/resources/texml/calls.d.ts.map +1 -0
  486. package/resources/texml/calls.js +33 -0
  487. package/resources/texml/calls.js.map +1 -0
  488. package/resources/texml/calls.mjs +29 -0
  489. package/resources/texml/calls.mjs.map +1 -0
  490. package/resources/texml/index.d.mts +1 -0
  491. package/resources/texml/index.d.mts.map +1 -1
  492. package/resources/texml/index.d.ts +1 -0
  493. package/resources/texml/index.d.ts.map +1 -1
  494. package/resources/texml/index.js +3 -1
  495. package/resources/texml/index.js.map +1 -1
  496. package/resources/texml/index.mjs +1 -0
  497. package/resources/texml/index.mjs.map +1 -1
  498. package/resources/texml/texml.d.mts +43 -0
  499. package/resources/texml/texml.d.mts.map +1 -1
  500. package/resources/texml/texml.d.ts +43 -0
  501. package/resources/texml/texml.d.ts.map +1 -1
  502. package/resources/texml/texml.js +4 -0
  503. package/resources/texml/texml.js.map +1 -1
  504. package/resources/texml/texml.mjs +4 -0
  505. package/resources/texml/texml.mjs.map +1 -1
  506. package/resources/text-to-speech/text-to-speech.d.mts +61 -9
  507. package/resources/text-to-speech/text-to-speech.d.mts.map +1 -1
  508. package/resources/text-to-speech/text-to-speech.d.ts +61 -9
  509. package/resources/text-to-speech/text-to-speech.d.ts.map +1 -1
  510. package/resources/text-to-speech/text-to-speech.js +10 -3
  511. package/resources/text-to-speech/text-to-speech.js.map +1 -1
  512. package/resources/text-to-speech/text-to-speech.mjs +10 -3
  513. package/resources/text-to-speech/text-to-speech.mjs.map +1 -1
  514. package/resources/voice-clones.d.mts +6 -4
  515. package/resources/voice-clones.d.mts.map +1 -1
  516. package/resources/voice-clones.d.ts +6 -4
  517. package/resources/voice-clones.d.ts.map +1 -1
  518. package/resources/voice-clones.js +4 -2
  519. package/resources/voice-clones.js.map +1 -1
  520. package/resources/voice-clones.mjs +4 -2
  521. package/resources/voice-clones.mjs.map +1 -1
  522. package/resources/webhooks.d.mts +40 -53
  523. package/resources/webhooks.d.mts.map +1 -1
  524. package/resources/webhooks.d.ts +40 -53
  525. package/resources/webhooks.d.ts.map +1 -1
  526. package/src/client.ts +92 -6
  527. package/src/resources/ai/ai.ts +21 -1
  528. package/src/resources/ai/assistants/assistants.ts +502 -56
  529. package/src/resources/ai/assistants/index.ts +1 -0
  530. package/src/resources/ai/assistants/versions.ts +36 -14
  531. package/src/resources/ai/audio.ts +93 -45
  532. package/src/resources/ai/chat.ts +2 -11
  533. package/src/resources/ai/collections/collections.ts +3 -1
  534. package/src/resources/ai/collections/index.ts +2 -0
  535. package/src/resources/ai/collections/sources.ts +38 -4
  536. package/src/resources/ai/index.ts +9 -1
  537. package/src/resources/ai/memory/index.ts +4 -0
  538. package/src/resources/ai/memory/memory.ts +19 -0
  539. package/src/resources/ai/memory/namespaces/index.ts +21 -0
  540. package/src/resources/ai/memory/namespaces/namespaces.ts +116 -0
  541. package/src/resources/ai/memory/namespaces/profiles/index.ts +35 -0
  542. package/src/resources/ai/memory/namespaces/profiles/memories.ts +170 -0
  543. package/src/resources/ai/memory/namespaces/profiles/profiles.ts +482 -0
  544. package/src/resources/ai/memory/namespaces/profiles/sources.ts +226 -0
  545. package/src/resources/ai/memory/namespaces/profiles.ts +3 -0
  546. package/src/resources/ai/memory/namespaces/settings.ts +129 -0
  547. package/src/resources/ai/memory/namespaces.ts +3 -0
  548. package/src/resources/ai/memory.ts +3 -0
  549. package/src/resources/ai/openai/chat.ts +11 -11
  550. package/src/resources/ai/openai/index.ts +6 -1
  551. package/src/resources/ai/openai/openai.ts +2 -1
  552. package/src/resources/ai/typesafe/index.ts +4 -0
  553. package/src/resources/ai/typesafe/typesafe.ts +19 -0
  554. package/src/resources/ai/typesafe/v1.ts +310 -0
  555. package/src/resources/ai/typesafe.ts +3 -0
  556. package/src/resources/bot-challenge.ts +101 -0
  557. package/src/resources/bot-sessions.ts +61 -0
  558. package/src/resources/bot-signup.ts +140 -0
  559. package/src/resources/calls/actions.ts +115 -14
  560. package/src/resources/calls/calls.ts +64 -7
  561. package/src/resources/calls/index.ts +1 -0
  562. package/src/resources/compute/compute.ts +2 -2
  563. package/src/resources/compute/funcs/export.ts +156 -0
  564. package/src/resources/compute/funcs/funcs.ts +341 -0
  565. package/src/resources/compute/funcs/index.ts +15 -0
  566. package/src/resources/compute/funcs.ts +1 -296
  567. package/src/resources/compute/index.ts +1 -1
  568. package/src/resources/conferences/actions.ts +8 -1
  569. package/src/resources/connections.ts +133 -0
  570. package/src/resources/detail-records.ts +18 -1
  571. package/src/resources/email-blocks/email-blocks.ts +12 -4
  572. package/src/resources/email-blocks/imports.ts +20 -4
  573. package/src/resources/email-domains/email-domains.ts +120 -0
  574. package/src/resources/email-domains/index.ts +1 -0
  575. package/src/resources/email-domains/webhooks.ts +9 -4
  576. package/src/resources/email-events.ts +220 -35
  577. package/src/resources/email-inboxes/drafts.ts +32 -1
  578. package/src/resources/email-messages/email-messages.ts +195 -49
  579. package/src/resources/email-messages/index.ts +2 -1
  580. package/src/resources/email-messages/recipients.ts +6 -2
  581. package/src/resources/email-templates.ts +185 -0
  582. package/src/resources/index.ts +29 -3
  583. package/src/resources/machine-payments.ts +169 -0
  584. package/src/resources/meeting-sessions/actions.ts +7 -1
  585. package/src/resources/meeting-sessions/artifacts.ts +42 -11
  586. package/src/resources/meeting-sessions/meeting-sessions.ts +63 -24
  587. package/src/resources/messages/messages.ts +168 -23
  588. package/src/resources/noise-suppression-engines.ts +51 -0
  589. package/src/resources/phone-numbers/phone-numbers.ts +13 -2
  590. package/src/resources/private-wireless-gateways.ts +76 -8
  591. package/src/resources/speech-to-text/speech-to-text.ts +1 -0
  592. package/src/resources/texml/accounts/calls/calls.ts +158 -10
  593. package/src/resources/texml/accounts/conferences/participants.ts +46 -0
  594. package/src/resources/texml/calls.ts +90 -0
  595. package/src/resources/texml/index.ts +1 -0
  596. package/src/resources/texml/texml.ts +56 -0
  597. package/src/resources/text-to-speech/text-to-speech.ts +69 -9
  598. package/src/resources/voice-clones.ts +6 -4
  599. package/src/resources/webhooks.ts +47 -62
  600. package/src/version.ts +1 -1
  601. package/version.d.mts +1 -1
  602. package/version.d.ts +1 -1
  603. package/version.js +1 -1
  604. package/version.mjs +1 -1
@@ -62,7 +62,7 @@ export interface EmailRecipient {
62
62
  /**
63
63
  * Current per-recipient delivery status.
64
64
  */
65
- status: 'queued' | 'sending' | 'sent' | 'deferred' | 'delivered' | 'bounced' | 'failed' | 'gw_reject' | 'cancelled';
65
+ status: 'queued' | 'sending' | 'sent' | 'deferred' | 'delivered' | 'bounced' | 'failed' | 'gw_reject' | 'cancelled' | 'injection_timeout' | 'expired';
66
66
  delivered_at?: string | null;
67
67
  failed_at?: string | null;
68
68
  sent_at?: string | null;
@@ -86,7 +86,7 @@ export interface RecipientListParams extends EmailCursorPaginationParams {
86
86
  /**
87
87
  * Filter recipients by status.
88
88
  */
89
- status?: 'queued' | 'sending' | 'sent' | 'deferred' | 'delivered' | 'bounced' | 'failed' | 'gw_reject' | 'cancelled';
89
+ status?: 'queued' | 'sending' | 'sent' | 'deferred' | 'delivered' | 'bounced' | 'failed' | 'gw_reject' | 'cancelled' | 'injection_timeout' | 'expired';
90
90
  }
91
91
  export interface RecipientRetrieveParams {
92
92
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"recipients.d.mts","sourceRoot":"","sources":["../../src/resources/email-messages/recipients.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,mCAA+B;AACpD,OAAO,EAAE,qBAAqB,EAAE,KAAK,2BAA2B,EAAE,WAAW,EAAE,kCAA8B;AAC7G,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAGhE;;GAEG;AACH,qBAAa,UAAW,SAAQ,WAAW;IACzC;;;;;;;;;;;;;;;OAeG;IACH,IAAI,CACF,OAAO,EAAE,MAAM,EACf,KAAK,GAAE,mBAAmB,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C,EACH,QAAQ,GACR,SAAS,GACT,MAAM,GACN,UAAU,GACV,WAAW,GACX,SAAS,GACT,QAAQ,GACR,WAAW,GACX,WAAW,CAAC;CACjB;AAED,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,WAAW,UAAU,CAAC;IAClC,OAAO,EACL,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,oCAAoC,IAAI,oCAAoC,EACjF,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,uBAAuB,IAAI,uBAAuB,GACxD,CAAC;CACH"}
1
+ {"version":3,"file":"recipients.d.mts","sourceRoot":"","sources":["../../src/resources/email-messages/recipients.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,mCAA+B;AACpD,OAAO,EAAE,qBAAqB,EAAE,KAAK,2BAA2B,EAAE,WAAW,EAAE,kCAA8B;AAC7G,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAGhE;;GAEG;AACH,qBAAa,UAAW,SAAQ,WAAW;IACzC;;;;;;;;;;;;;;;OAeG;IACH,IAAI,CACF,OAAO,EAAE,MAAM,EACf,KAAK,GAAE,mBAAmB,GAAG,IAAI,GAAG,SAAc,EAClD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,oCAAoC,EAAE,cAAc,CAAC;IAQpE;;;;;;;;;;;;;OAaG;IACH,QAAQ,CACN,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,uBAAuB,EAC/B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,yBAAyB,CAAC;CAIzC;AAED,MAAM,MAAM,oCAAoC,GAAG,qBAAqB,CAAC,cAAc,CAAC,CAAC;AAEzF,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX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KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,uBAAuB,IAAI,uBAAuB,GACxD,CAAC;CACH"}
@@ -62,7 +62,7 @@ export interface EmailRecipient {
62
62
  /**
63
63
  * Current per-recipient delivery status.
64
64
  */
65
- status: 'queued' | 'sending' | 'sent' | 'deferred' | 'delivered' | 'bounced' | 'failed' | 'gw_reject' | 'cancelled';
65
+ status: 'queued' | 'sending' | 'sent' | 'deferred' | 'delivered' | 'bounced' | 'failed' | 'gw_reject' | 'cancelled' | 'injection_timeout' | 'expired';
66
66
  delivered_at?: string | null;
67
67
  failed_at?: string | null;
68
68
  sent_at?: string | null;
@@ -86,7 +86,7 @@ export interface RecipientListParams extends EmailCursorPaginationParams {
86
86
  /**
87
87
  * Filter recipients by status.
88
88
  */
89
- status?: 'queued' | 'sending' | 'sent' | 'deferred' | 'delivered' | 'bounced' | 'failed' | 'gw_reject' | 'cancelled';
89
+ status?: 'queued' | 'sending' | 'sent' | 'deferred' | 'delivered' | 'bounced' | 'failed' | 'gw_reject' | 'cancelled' | 'injection_timeout' | 'expired';
90
90
  }
91
91
  export interface RecipientRetrieveParams {
92
92
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"recipients.d.ts","sourceRoot":"","sources":["../../src/resources/email-messages/recipients.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,kCAA+B;AACpD,OAAO,EAAE,qBAAqB,EAAE,KAAK,2BAA2B,EAAE,WAAW,EAAE,iCAA8B;AAC7G,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAGhE;;GAEG;AACH,qBAAa,UAAW,SAAQ,WAAW;IACzC;;;;;;;;;;;;;;;OAeG;IACH,IAAI,CACF,OAAO,EAAE,MAAM,EACf,KAAK,GAAE,mBAAmB,GAAG,IAAI,GAAG,SAAc,EAClD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,oCAAoC,EAAE,cAAc,CAAC;I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W,CAAC;CACjB;AAED,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,WAAW,UAAU,CAAC;IAClC,OAAO,EACL,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,oCAAoC,IAAI,oCAAoC,EACjF,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,uBAAuB,IAAI,uBAAuB,GACxD,CAAC;CACH"}
1
+ {"version":3,"file":"recipients.d.ts","sourceRoot":"","sources":["../../src/resources/email-messages/recipients.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,kCAA+B;AACpD,OAAO,EAAE,qBAAqB,EAAE,KAAK,2BAA2B,EAAE,WAAW,EAAE,iCAA8B;AAC7G,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAGhE;;GAEG;AACH,qBAAa,UAAW,SAAQ,WAAW;IACzC;;;;;;;;;;;;;;;OAeG;IACH,IAAI,CACF,OAAO,EAAE,MAAM,EACf,KAAK,GAAE,mBAAmB,GAAG,IAAI,GAAG,SAAc,EAClD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,oCAAoC,EAAE,cAAc,CAAC;IAQpE;;;;;;;;;;;;;OAaG;IACH,QAAQ,CACN,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,uBAAuB,EAC/B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,yBAAyB,CAAC;CAIzC;AAED,MAAM,MAAM,oCAAoC,GAAG,qBAAqB,CAAC,cAAc,CAAC,CAAC;AAEzF,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvB;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;IAElB,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@@ export declare class EmailTemplates extends APIResource {
91
91
  * Renders a template using the provided Liquid variables. Missing
92
92
  * `template_variables` defaults to `{}`.
93
93
  *
94
+ * When the template has `strict_variables` enabled and a required variable (per
95
+ * `variable_schema`) is missing, returns 422 naming the variable. When the
96
+ * template has `autoescape` enabled, the rendered `html_body` expression output is
97
+ * HTML-escaped at the output boundary; `subject` and `text_body` are not
98
+ * autoescaped.
99
+ *
94
100
  * @example
95
101
  * ```ts
96
102
  * const response = await client.emailTemplates.render(
@@ -104,24 +110,67 @@ export declare class EmailTemplates extends APIResource {
104
110
  export type EmailTemplatesEmailCursorPagination = EmailCursorPagination<EmailTemplate>;
105
111
  export interface EmailTemplate {
106
112
  id: string;
113
+ /**
114
+ * Whether HTML autoescaping is enabled for this template. When `true`, only
115
+ * rendered `html_body` expression output is HTML-escaped at the output boundary;
116
+ * `subject` and `text_body` are never autoescaped.
117
+ */
118
+ autoescape: boolean;
107
119
  created_at: string;
108
120
  html_body: string | null;
109
121
  name: string;
110
122
  record_type: 'email_template';
123
+ /**
124
+ * Whether strict variable validation is enabled for this template. When `true`,
125
+ * sends and renders that are missing a variable marked `required: true` in
126
+ * `variable_schema` fail with 422 naming the variable.
127
+ */
128
+ strict_variables: boolean;
111
129
  subject: string | null;
112
130
  text_body: string | null;
113
131
  updated_at: string;
132
+ /**
133
+ * Structured variable requirements, or `null` when the template uses only the
134
+ * legacy `variables` array.
135
+ */
136
+ variable_schema: {
137
+ [key: string]: EmailTemplate.VariableSchema;
138
+ } | null;
139
+ /**
140
+ * Legacy unstructured variable names. This path remains supported unchanged.
141
+ */
114
142
  variables: Array<string>;
115
143
  }
144
+ export declare namespace EmailTemplate {
145
+ interface VariableSchema {
146
+ /**
147
+ * Whether the variable must be supplied when strict variable validation is
148
+ * enabled.
149
+ */
150
+ required: boolean;
151
+ /**
152
+ * Default value for an optional variable. Rejected when `required` is `true`.
153
+ */
154
+ default?: string;
155
+ }
156
+ }
116
157
  export interface EmailTemplateResponse {
117
158
  data: EmailTemplate;
118
159
  }
119
160
  export interface UpdateEmailTemplateRequest {
161
+ /**
162
+ * Per-template HTML autoescaping setting.
163
+ */
164
+ autoescape?: boolean;
120
165
  /**
121
166
  * Liquid template HTML body.
122
167
  */
123
168
  html_body?: string | null;
124
169
  name?: string;
170
+ /**
171
+ * Per-template strict variable-validation setting.
172
+ */
173
+ strict_variables?: boolean;
125
174
  /**
126
175
  * Liquid template subject.
127
176
  */
@@ -130,8 +179,28 @@ export interface UpdateEmailTemplateRequest {
130
179
  * Liquid template text body.
131
180
  */
132
181
  text_body?: string | null;
182
+ /**
183
+ * Structured variable requirements. Required variables cannot define defaults;
184
+ * invalid combinations return 422. Set to `null` to clear the schema.
185
+ */
186
+ variable_schema?: {
187
+ [key: string]: UpdateEmailTemplateRequest.VariableSchema;
188
+ } | null;
133
189
  variables?: Array<string>;
134
190
  }
191
+ export declare namespace UpdateEmailTemplateRequest {
192
+ interface VariableSchema {
193
+ /**
194
+ * Whether the variable must be supplied when strict variable validation is
195
+ * enabled.
196
+ */
197
+ required: boolean;
198
+ /**
199
+ * Default value for an optional variable. Rejected when `required` is `true`.
200
+ */
201
+ default?: string;
202
+ }
203
+ }
135
204
  export interface EmailTemplateRenderResponse {
136
205
  /**
137
206
  * Template object with `subject`, `html_body`, and `text_body` replaced by their
@@ -156,10 +225,30 @@ export interface EmailTemplateCreateParams {
156
225
  * Body param: Letters, numbers, spaces, hyphens, and underscores only.
157
226
  */
158
227
  name: string;
228
+ /**
229
+ * Body param: Per-template HTML autoescaping setting. Defaults to `false` for
230
+ * backward compatibility. When `true`, the rendered `html_body` HTML-escapes each
231
+ * Liquid expression's output at the output boundary (after its filters run, before
232
+ * concatenation with literal template markup). Input values are never mutated and
233
+ * `subject`/`text_body` are never autoescaped. The boundary escape is idempotent:
234
+ * HTML entities already present in the output (e.g. from an explicit `escape`
235
+ * filter) are preserved, so an explicit `escape`/`escape_once` is never
236
+ * double-escaped, and markup introduced by any later filter in the chain is still
237
+ * escaped.
238
+ */
239
+ autoescape?: boolean;
159
240
  /**
160
241
  * Body param: Liquid template HTML body.
161
242
  */
162
243
  html_body?: string | null;
244
+ /**
245
+ * Body param: Per-template strict variable-validation setting. Defaults to `false`
246
+ * for backward compatibility. When `true`, a send or render that is missing a
247
+ * variable marked `required: true` in `variable_schema` fails with 422 naming the
248
+ * variable. Missing optional variables never fail; their schema `default` (when
249
+ * set) is applied to the render.
250
+ */
251
+ strict_variables?: boolean;
163
252
  /**
164
253
  * Body param: Liquid template subject.
165
254
  */
@@ -168,6 +257,18 @@ export interface EmailTemplateCreateParams {
168
257
  * Body param: Liquid template text body.
169
258
  */
170
259
  text_body?: string | null;
260
+ /**
261
+ * Body param: Structured variable requirements. Required variables cannot define
262
+ * defaults; invalid combinations return 422. This is independent of the legacy
263
+ * `variables` array. On render with `strict_variables` enabled: `required`
264
+ * variables must be supplied as non-empty values — absent, `null`, empty string,
265
+ * empty object `{}`, and empty array `[]` all fail with 422 naming the variable,
266
+ * while present values such as `false` and `0` pass (they are present, not empty).
267
+ * Optional variables fall back to their `default` when absent.
268
+ */
269
+ variable_schema?: {
270
+ [key: string]: EmailTemplateCreateParams.VariableSchema;
271
+ } | null;
171
272
  /**
172
273
  * Body param: Template variables. Auto-extracted from subject/body fields when
173
274
  * absent.
@@ -185,12 +286,33 @@ export interface EmailTemplateCreateParams {
185
286
  */
186
287
  'Idempotency-Key'?: string;
187
288
  }
289
+ export declare namespace EmailTemplateCreateParams {
290
+ interface VariableSchema {
291
+ /**
292
+ * Whether the variable must be supplied when strict variable validation is
293
+ * enabled.
294
+ */
295
+ required: boolean;
296
+ /**
297
+ * Default value for an optional variable. Rejected when `required` is `true`.
298
+ */
299
+ default?: string;
300
+ }
301
+ }
188
302
  export interface EmailTemplateReplaceParams {
303
+ /**
304
+ * Per-template HTML autoescaping setting.
305
+ */
306
+ autoescape?: boolean;
189
307
  /**
190
308
  * Liquid template HTML body.
191
309
  */
192
310
  html_body?: string | null;
193
311
  name?: string;
312
+ /**
313
+ * Per-template strict variable-validation setting.
314
+ */
315
+ strict_variables?: boolean;
194
316
  /**
195
317
  * Liquid template subject.
196
318
  */
@@ -199,14 +321,42 @@ export interface EmailTemplateReplaceParams {
199
321
  * Liquid template text body.
200
322
  */
201
323
  text_body?: string | null;
324
+ /**
325
+ * Structured variable requirements. Required variables cannot define defaults;
326
+ * invalid combinations return 422. Set to `null` to clear the schema.
327
+ */
328
+ variable_schema?: {
329
+ [key: string]: EmailTemplateReplaceParams.VariableSchema;
330
+ } | null;
202
331
  variables?: Array<string>;
203
332
  }
333
+ export declare namespace EmailTemplateReplaceParams {
334
+ interface VariableSchema {
335
+ /**
336
+ * Whether the variable must be supplied when strict variable validation is
337
+ * enabled.
338
+ */
339
+ required: boolean;
340
+ /**
341
+ * Default value for an optional variable. Rejected when `required` is `true`.
342
+ */
343
+ default?: string;
344
+ }
345
+ }
204
346
  export interface EmailTemplateUpdateParams {
347
+ /**
348
+ * Per-template HTML autoescaping setting.
349
+ */
350
+ autoescape?: boolean;
205
351
  /**
206
352
  * Liquid template HTML body.
207
353
  */
208
354
  html_body?: string | null;
209
355
  name?: string;
356
+ /**
357
+ * Per-template strict variable-validation setting.
358
+ */
359
+ strict_variables?: boolean;
210
360
  /**
211
361
  * Liquid template subject.
212
362
  */
@@ -215,8 +365,28 @@ export interface EmailTemplateUpdateParams {
215
365
  * Liquid template text body.
216
366
  */
217
367
  text_body?: string | null;
368
+ /**
369
+ * Structured variable requirements. Required variables cannot define defaults;
370
+ * invalid combinations return 422. Set to `null` to clear the schema.
371
+ */
372
+ variable_schema?: {
373
+ [key: string]: EmailTemplateUpdateParams.VariableSchema;
374
+ } | null;
218
375
  variables?: Array<string>;
219
376
  }
377
+ export declare namespace EmailTemplateUpdateParams {
378
+ interface VariableSchema {
379
+ /**
380
+ * Whether the variable must be supplied when strict variable validation is
381
+ * enabled.
382
+ */
383
+ required: boolean;
384
+ /**
385
+ * Default value for an optional variable. Rejected when `required` is `true`.
386
+ */
387
+ default?: string;
388
+ }
389
+ }
220
390
  export interface EmailTemplateRenderParams {
221
391
  /**
222
392
  * Variables for Liquid template rendering. Non-object values are silently treated
@@ -1 +1 @@
1
- {"version":3,"file":"email-templates.d.mts","sourceRoot":"","sources":["../src/resources/email-templates.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,KAAK,iBAAiB,8BAA0B;AACvD,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,qBAAqB,EAAE,KAAK,2BAA2B,EAAE,WAAW,EAAE,+BAA2B;AAE1G,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAG7D;;GAEG;AACH,qBAAa,cAAe,SAAQ,WAAW;IAC7C;;;;;;;;;;OAUG;IACH,IAAI,CACF,KAAK,GAAE,uBAAuB,GAAG,IAAI,GAAG,SAAc,EACtD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,mCAAmC,EAAE,aAAa,CAAC;IAOlE;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,MAAM,EAAE,yBAAyB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC;IAYtG;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAO9D;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC;IAIjF;;;;;;;;;;;;OAYG;IACH,OAAO,CACL,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,0BAA0B,EAChC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,qBAAqB,CAAC;IAIpC;;;;;;;;;;;;OAYG;IACH,MAAM,CACJ,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,yBAAyB,EAC/B,OAAO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D,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;CACH"}
@@ -91,6 +91,12 @@ export declare class EmailTemplates extends APIResource {
91
91
  * Renders a template using the provided Liquid variables. Missing
92
92
  * `template_variables` defaults to `{}`.
93
93
  *
94
+ * When the template has `strict_variables` enabled and a required variable (per
95
+ * `variable_schema`) is missing, returns 422 naming the variable. When the
96
+ * template has `autoescape` enabled, the rendered `html_body` expression output is
97
+ * HTML-escaped at the output boundary; `subject` and `text_body` are not
98
+ * autoescaped.
99
+ *
94
100
  * @example
95
101
  * ```ts
96
102
  * const response = await client.emailTemplates.render(
@@ -104,24 +110,67 @@ export declare class EmailTemplates extends APIResource {
104
110
  export type EmailTemplatesEmailCursorPagination = EmailCursorPagination<EmailTemplate>;
105
111
  export interface EmailTemplate {
106
112
  id: string;
113
+ /**
114
+ * Whether HTML autoescaping is enabled for this template. When `true`, only
115
+ * rendered `html_body` expression output is HTML-escaped at the output boundary;
116
+ * `subject` and `text_body` are never autoescaped.
117
+ */
118
+ autoescape: boolean;
107
119
  created_at: string;
108
120
  html_body: string | null;
109
121
  name: string;
110
122
  record_type: 'email_template';
123
+ /**
124
+ * Whether strict variable validation is enabled for this template. When `true`,
125
+ * sends and renders that are missing a variable marked `required: true` in
126
+ * `variable_schema` fail with 422 naming the variable.
127
+ */
128
+ strict_variables: boolean;
111
129
  subject: string | null;
112
130
  text_body: string | null;
113
131
  updated_at: string;
132
+ /**
133
+ * Structured variable requirements, or `null` when the template uses only the
134
+ * legacy `variables` array.
135
+ */
136
+ variable_schema: {
137
+ [key: string]: EmailTemplate.VariableSchema;
138
+ } | null;
139
+ /**
140
+ * Legacy unstructured variable names. This path remains supported unchanged.
141
+ */
114
142
  variables: Array<string>;
115
143
  }
144
+ export declare namespace EmailTemplate {
145
+ interface VariableSchema {
146
+ /**
147
+ * Whether the variable must be supplied when strict variable validation is
148
+ * enabled.
149
+ */
150
+ required: boolean;
151
+ /**
152
+ * Default value for an optional variable. Rejected when `required` is `true`.
153
+ */
154
+ default?: string;
155
+ }
156
+ }
116
157
  export interface EmailTemplateResponse {
117
158
  data: EmailTemplate;
118
159
  }
119
160
  export interface UpdateEmailTemplateRequest {
161
+ /**
162
+ * Per-template HTML autoescaping setting.
163
+ */
164
+ autoescape?: boolean;
120
165
  /**
121
166
  * Liquid template HTML body.
122
167
  */
123
168
  html_body?: string | null;
124
169
  name?: string;
170
+ /**
171
+ * Per-template strict variable-validation setting.
172
+ */
173
+ strict_variables?: boolean;
125
174
  /**
126
175
  * Liquid template subject.
127
176
  */
@@ -130,8 +179,28 @@ export interface UpdateEmailTemplateRequest {
130
179
  * Liquid template text body.
131
180
  */
132
181
  text_body?: string | null;
182
+ /**
183
+ * Structured variable requirements. Required variables cannot define defaults;
184
+ * invalid combinations return 422. Set to `null` to clear the schema.
185
+ */
186
+ variable_schema?: {
187
+ [key: string]: UpdateEmailTemplateRequest.VariableSchema;
188
+ } | null;
133
189
  variables?: Array<string>;
134
190
  }
191
+ export declare namespace UpdateEmailTemplateRequest {
192
+ interface VariableSchema {
193
+ /**
194
+ * Whether the variable must be supplied when strict variable validation is
195
+ * enabled.
196
+ */
197
+ required: boolean;
198
+ /**
199
+ * Default value for an optional variable. Rejected when `required` is `true`.
200
+ */
201
+ default?: string;
202
+ }
203
+ }
135
204
  export interface EmailTemplateRenderResponse {
136
205
  /**
137
206
  * Template object with `subject`, `html_body`, and `text_body` replaced by their
@@ -156,10 +225,30 @@ export interface EmailTemplateCreateParams {
156
225
  * Body param: Letters, numbers, spaces, hyphens, and underscores only.
157
226
  */
158
227
  name: string;
228
+ /**
229
+ * Body param: Per-template HTML autoescaping setting. Defaults to `false` for
230
+ * backward compatibility. When `true`, the rendered `html_body` HTML-escapes each
231
+ * Liquid expression's output at the output boundary (after its filters run, before
232
+ * concatenation with literal template markup). Input values are never mutated and
233
+ * `subject`/`text_body` are never autoescaped. The boundary escape is idempotent:
234
+ * HTML entities already present in the output (e.g. from an explicit `escape`
235
+ * filter) are preserved, so an explicit `escape`/`escape_once` is never
236
+ * double-escaped, and markup introduced by any later filter in the chain is still
237
+ * escaped.
238
+ */
239
+ autoescape?: boolean;
159
240
  /**
160
241
  * Body param: Liquid template HTML body.
161
242
  */
162
243
  html_body?: string | null;
244
+ /**
245
+ * Body param: Per-template strict variable-validation setting. Defaults to `false`
246
+ * for backward compatibility. When `true`, a send or render that is missing a
247
+ * variable marked `required: true` in `variable_schema` fails with 422 naming the
248
+ * variable. Missing optional variables never fail; their schema `default` (when
249
+ * set) is applied to the render.
250
+ */
251
+ strict_variables?: boolean;
163
252
  /**
164
253
  * Body param: Liquid template subject.
165
254
  */
@@ -168,6 +257,18 @@ export interface EmailTemplateCreateParams {
168
257
  * Body param: Liquid template text body.
169
258
  */
170
259
  text_body?: string | null;
260
+ /**
261
+ * Body param: Structured variable requirements. Required variables cannot define
262
+ * defaults; invalid combinations return 422. This is independent of the legacy
263
+ * `variables` array. On render with `strict_variables` enabled: `required`
264
+ * variables must be supplied as non-empty values — absent, `null`, empty string,
265
+ * empty object `{}`, and empty array `[]` all fail with 422 naming the variable,
266
+ * while present values such as `false` and `0` pass (they are present, not empty).
267
+ * Optional variables fall back to their `default` when absent.
268
+ */
269
+ variable_schema?: {
270
+ [key: string]: EmailTemplateCreateParams.VariableSchema;
271
+ } | null;
171
272
  /**
172
273
  * Body param: Template variables. Auto-extracted from subject/body fields when
173
274
  * absent.
@@ -185,12 +286,33 @@ export interface EmailTemplateCreateParams {
185
286
  */
186
287
  'Idempotency-Key'?: string;
187
288
  }
289
+ export declare namespace EmailTemplateCreateParams {
290
+ interface VariableSchema {
291
+ /**
292
+ * Whether the variable must be supplied when strict variable validation is
293
+ * enabled.
294
+ */
295
+ required: boolean;
296
+ /**
297
+ * Default value for an optional variable. Rejected when `required` is `true`.
298
+ */
299
+ default?: string;
300
+ }
301
+ }
188
302
  export interface EmailTemplateReplaceParams {
303
+ /**
304
+ * Per-template HTML autoescaping setting.
305
+ */
306
+ autoescape?: boolean;
189
307
  /**
190
308
  * Liquid template HTML body.
191
309
  */
192
310
  html_body?: string | null;
193
311
  name?: string;
312
+ /**
313
+ * Per-template strict variable-validation setting.
314
+ */
315
+ strict_variables?: boolean;
194
316
  /**
195
317
  * Liquid template subject.
196
318
  */
@@ -199,14 +321,42 @@ export interface EmailTemplateReplaceParams {
199
321
  * Liquid template text body.
200
322
  */
201
323
  text_body?: string | null;
324
+ /**
325
+ * Structured variable requirements. Required variables cannot define defaults;
326
+ * invalid combinations return 422. Set to `null` to clear the schema.
327
+ */
328
+ variable_schema?: {
329
+ [key: string]: EmailTemplateReplaceParams.VariableSchema;
330
+ } | null;
202
331
  variables?: Array<string>;
203
332
  }
333
+ export declare namespace EmailTemplateReplaceParams {
334
+ interface VariableSchema {
335
+ /**
336
+ * Whether the variable must be supplied when strict variable validation is
337
+ * enabled.
338
+ */
339
+ required: boolean;
340
+ /**
341
+ * Default value for an optional variable. Rejected when `required` is `true`.
342
+ */
343
+ default?: string;
344
+ }
345
+ }
204
346
  export interface EmailTemplateUpdateParams {
347
+ /**
348
+ * Per-template HTML autoescaping setting.
349
+ */
350
+ autoescape?: boolean;
205
351
  /**
206
352
  * Liquid template HTML body.
207
353
  */
208
354
  html_body?: string | null;
209
355
  name?: string;
356
+ /**
357
+ * Per-template strict variable-validation setting.
358
+ */
359
+ strict_variables?: boolean;
210
360
  /**
211
361
  * Liquid template subject.
212
362
  */
@@ -215,8 +365,28 @@ export interface EmailTemplateUpdateParams {
215
365
  * Liquid template text body.
216
366
  */
217
367
  text_body?: string | null;
368
+ /**
369
+ * Structured variable requirements. Required variables cannot define defaults;
370
+ * invalid combinations return 422. Set to `null` to clear the schema.
371
+ */
372
+ variable_schema?: {
373
+ [key: string]: EmailTemplateUpdateParams.VariableSchema;
374
+ } | null;
218
375
  variables?: Array<string>;
219
376
  }
377
+ export declare namespace EmailTemplateUpdateParams {
378
+ interface VariableSchema {
379
+ /**
380
+ * Whether the variable must be supplied when strict variable validation is
381
+ * enabled.
382
+ */
383
+ required: boolean;
384
+ /**
385
+ * Default value for an optional variable. Rejected when `required` is `true`.
386
+ */
387
+ default?: string;
388
+ }
389
+ }
220
390
  export interface EmailTemplateRenderParams {
221
391
  /**
222
392
  * Variables for Liquid template rendering. Non-object values are silently treated
@@ -1 +1 @@
1
- {"version":3,"file":"email-templates.d.ts","sourceRoot":"","sources":["../src/resources/email-templates.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,KAAK,iBAAiB,6BAA0B;AACvD,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,qBAAqB,EAAE,KAAK,2BAA2B,EAAE,WAAW,EAAE,8BAA2B;AAE1G,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAG7D;;GAEG;AACH,qBAAa,cAAe,SAAQ,WAAW;IAC7C;;;;;;;;;;OAUG;IACH,IAAI,CACF,KAAK,GAAE,uBAAuB,GAAG,IAAI,GAAG,SAAc,EACtD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,mCAAmC,EAAE,aAAa,CAAC;IAOlE;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,MAAM,EAAE,yBAAyB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC;IAYtG;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAO9D;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC;IAIjF;;;;;;;;;;;;OAYG;IACH,OAAO,CACL,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,0BAA0B,EAChC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,qBAAqB,CAAC;IAIpC;;;;;;;;;;;;OAYG;IACH,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AK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;CACH"}
@@ -120,6 +120,12 @@ class EmailTemplates extends resource_1.APIResource {
120
120
  * Renders a template using the provided Liquid variables. Missing
121
121
  * `template_variables` defaults to `{}`.
122
122
  *
123
+ * When the template has `strict_variables` enabled and a required variable (per
124
+ * `variable_schema`) is missing, returns 422 naming the variable. When the
125
+ * template has `autoescape` enabled, the rendered `html_body` expression output is
126
+ * HTML-escaped at the output boundary; `subject` and `text_body` are not
127
+ * autoescaped.
128
+ *
123
129
  * @example
124
130
  * ```ts
125
131
  * const response = await client.emailTemplates.render(
@@ -1 +1 @@
1
- {"version":3,"file":"email-templates.js","sourceRoot":"","sources":["../src/resources/email-templates.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,sDAA0G;AAC1G,oDAAmD;AAEnD,oDAA8C;AAE9C;;GAEG;AACH,MAAa,cAAe,SAAQ,sBAAW;IAC7C;;;;;;;;;;OAUG;IACH,IAAI,CACF,QAAoD,EAAE,EACtD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,kBAAkB,EAAE,CAAA,kCAAoC,CAAA,EAAE;YACvF,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,MAAiC,EAAE,OAAwB;QAChE,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC9D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,EAAE;YAC3C,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,GAAG,CAAC,cAAc,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,iBAAiB,EAAE,cAAc,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CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,oBAAoB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,OAAO,CACL,EAAU,EACV,IAAgC,EAChC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,oBAAoB,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9E,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,MAAM,CACJ,EAAU,EACV,IAA+B,EAC/B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,oBAAoB,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChF,CAAC;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,CACJ,EAAU,EACV,OAAqD,EAAE,EACvD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,oBAAoB,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtF,CAAC;CACF;AArJD,wCAqJC"}
@@ -117,6 +117,12 @@ export class EmailTemplates extends APIResource {
117
117
  * Renders a template using the provided Liquid variables. Missing
118
118
  * `template_variables` defaults to `{}`.
119
119
  *
120
+ * When the template has `strict_variables` enabled and a required variable (per
121
+ * `variable_schema`) is missing, returns 422 naming the variable. When the
122
+ * template has `autoescape` enabled, the rendered `html_body` expression output is
123
+ * HTML-escaped at the output boundary; `subject` and `text_body` are not
124
+ * autoescaped.
125
+ *
120
126
  * @example
121
127
  * ```ts
122
128
  * const response = await client.emailTemplates.render(