telnyx 7.26.0 → 7.27.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 (456) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/client.d.mts +17 -8
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +17 -8
  5. package/client.d.ts.map +1 -1
  6. package/client.js +9 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +9 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/addresses/addresses.d.mts +22 -2
  12. package/resources/addresses/addresses.d.mts.map +1 -1
  13. package/resources/addresses/addresses.d.ts +22 -2
  14. package/resources/addresses/addresses.d.ts.map +1 -1
  15. package/resources/addresses/addresses.js +12 -0
  16. package/resources/addresses/addresses.js.map +1 -1
  17. package/resources/addresses/addresses.mjs +12 -0
  18. package/resources/addresses/addresses.mjs.map +1 -1
  19. package/resources/ai/ai.d.mts +2 -2
  20. package/resources/ai/ai.d.mts.map +1 -1
  21. package/resources/ai/ai.d.ts +2 -2
  22. package/resources/ai/ai.d.ts.map +1 -1
  23. package/resources/ai/ai.js.map +1 -1
  24. package/resources/ai/ai.mjs.map +1 -1
  25. package/resources/ai/assistants/assistants.d.mts +168 -33
  26. package/resources/ai/assistants/assistants.d.mts.map +1 -1
  27. package/resources/ai/assistants/assistants.d.ts +168 -33
  28. package/resources/ai/assistants/assistants.d.ts.map +1 -1
  29. package/resources/ai/assistants/assistants.js +4 -1
  30. package/resources/ai/assistants/assistants.js.map +1 -1
  31. package/resources/ai/assistants/assistants.mjs +4 -1
  32. package/resources/ai/assistants/assistants.mjs.map +1 -1
  33. package/resources/ai/assistants/versions.d.mts +11 -6
  34. package/resources/ai/assistants/versions.d.mts.map +1 -1
  35. package/resources/ai/assistants/versions.d.ts +11 -6
  36. package/resources/ai/assistants/versions.d.ts.map +1 -1
  37. package/resources/ai/assistants/versions.js +4 -1
  38. package/resources/ai/assistants/versions.js.map +1 -1
  39. package/resources/ai/assistants/versions.mjs +4 -1
  40. package/resources/ai/assistants/versions.mjs.map +1 -1
  41. package/resources/ai/audio.d.mts +17 -5
  42. package/resources/ai/audio.d.mts.map +1 -1
  43. package/resources/ai/audio.d.ts +17 -5
  44. package/resources/ai/audio.d.ts.map +1 -1
  45. package/resources/ai/avatars.d.mts +21 -8
  46. package/resources/ai/avatars.d.mts.map +1 -1
  47. package/resources/ai/avatars.d.ts +21 -8
  48. package/resources/ai/avatars.d.ts.map +1 -1
  49. package/resources/ai/avatars.js +3 -1
  50. package/resources/ai/avatars.js.map +1 -1
  51. package/resources/ai/avatars.mjs +3 -1
  52. package/resources/ai/avatars.mjs.map +1 -1
  53. package/resources/ai/index.d.mts +1 -1
  54. package/resources/ai/index.d.mts.map +1 -1
  55. package/resources/ai/index.d.ts +1 -1
  56. package/resources/ai/index.d.ts.map +1 -1
  57. package/resources/ai/index.js.map +1 -1
  58. package/resources/ai/index.mjs.map +1 -1
  59. package/resources/ai/tools.d.mts +13 -1
  60. package/resources/ai/tools.d.mts.map +1 -1
  61. package/resources/ai/tools.d.ts +13 -1
  62. package/resources/ai/tools.d.ts.map +1 -1
  63. package/resources/calls/actions.d.mts +202 -13
  64. package/resources/calls/actions.d.mts.map +1 -1
  65. package/resources/calls/actions.d.ts +202 -13
  66. package/resources/calls/actions.d.ts.map +1 -1
  67. package/resources/calls/calls.d.mts +2 -2
  68. package/resources/calls/calls.d.mts.map +1 -1
  69. package/resources/calls/calls.d.ts +2 -2
  70. package/resources/calls/calls.d.ts.map +1 -1
  71. package/resources/calls/calls.js.map +1 -1
  72. package/resources/calls/calls.mjs.map +1 -1
  73. package/resources/calls/index.d.mts +1 -1
  74. package/resources/calls/index.d.mts.map +1 -1
  75. package/resources/calls/index.d.ts +1 -1
  76. package/resources/calls/index.d.ts.map +1 -1
  77. package/resources/calls/index.js.map +1 -1
  78. package/resources/calls/index.mjs.map +1 -1
  79. package/resources/credential-connections/credential-connections.d.mts +38 -8
  80. package/resources/credential-connections/credential-connections.d.mts.map +1 -1
  81. package/resources/credential-connections/credential-connections.d.ts +38 -8
  82. package/resources/credential-connections/credential-connections.d.ts.map +1 -1
  83. package/resources/credential-connections/credential-connections.js.map +1 -1
  84. package/resources/credential-connections/credential-connections.mjs.map +1 -1
  85. package/resources/dial-metrics.d.mts +151 -0
  86. package/resources/dial-metrics.d.mts.map +1 -0
  87. package/resources/dial-metrics.d.ts +151 -0
  88. package/resources/dial-metrics.d.ts.map +1 -0
  89. package/resources/dial-metrics.js +44 -0
  90. package/resources/dial-metrics.js.map +1 -0
  91. package/resources/dial-metrics.mjs +40 -0
  92. package/resources/dial-metrics.mjs.map +1 -0
  93. package/resources/dir/dir.d.mts +2 -3
  94. package/resources/dir/dir.d.mts.map +1 -1
  95. package/resources/dir/dir.d.ts +2 -3
  96. package/resources/dir/dir.d.ts.map +1 -1
  97. package/resources/dir/dir.js +1 -2
  98. package/resources/dir/dir.js.map +1 -1
  99. package/resources/dir/dir.mjs +1 -2
  100. package/resources/dir/dir.mjs.map +1 -1
  101. package/resources/dir/references.d.mts +15 -9
  102. package/resources/dir/references.d.mts.map +1 -1
  103. package/resources/dir/references.d.ts +15 -9
  104. package/resources/dir/references.d.ts.map +1 -1
  105. package/resources/dir/references.js +15 -9
  106. package/resources/dir/references.js.map +1 -1
  107. package/resources/dir/references.mjs +15 -9
  108. package/resources/dir/references.mjs.map +1 -1
  109. package/resources/dir/verify-email.d.mts +17 -5
  110. package/resources/dir/verify-email.d.mts.map +1 -1
  111. package/resources/dir/verify-email.d.ts +17 -5
  112. package/resources/dir/verify-email.d.ts.map +1 -1
  113. package/resources/dir/verify-email.js +17 -5
  114. package/resources/dir/verify-email.js.map +1 -1
  115. package/resources/dir/verify-email.mjs +17 -5
  116. package/resources/dir/verify-email.mjs.map +1 -1
  117. package/resources/email-domains/email-domains.d.mts +1 -1
  118. package/resources/email-domains/email-domains.d.mts.map +1 -1
  119. package/resources/email-domains/email-domains.d.ts +1 -1
  120. package/resources/email-domains/email-domains.d.ts.map +1 -1
  121. package/resources/enterprises/verify-email.d.mts +1 -1
  122. package/resources/enterprises/verify-email.d.ts +1 -1
  123. package/resources/enterprises/verify-email.js +1 -1
  124. package/resources/enterprises/verify-email.mjs +1 -1
  125. package/resources/fqdn-connections/fqdn-connections.d.mts +38 -8
  126. package/resources/fqdn-connections/fqdn-connections.d.mts.map +1 -1
  127. package/resources/fqdn-connections/fqdn-connections.d.ts +38 -8
  128. package/resources/fqdn-connections/fqdn-connections.d.ts.map +1 -1
  129. package/resources/fqdn-connections/fqdn-connections.js.map +1 -1
  130. package/resources/fqdn-connections/fqdn-connections.mjs.map +1 -1
  131. package/resources/index.d.mts +6 -4
  132. package/resources/index.d.mts.map +1 -1
  133. package/resources/index.d.ts +6 -4
  134. package/resources/index.d.ts.map +1 -1
  135. package/resources/index.js +8 -4
  136. package/resources/index.js.map +1 -1
  137. package/resources/index.mjs +2 -0
  138. package/resources/index.mjs.map +1 -1
  139. package/resources/ip-connections.d.mts +36 -6
  140. package/resources/ip-connections.d.mts.map +1 -1
  141. package/resources/ip-connections.d.ts +36 -6
  142. package/resources/ip-connections.d.ts.map +1 -1
  143. package/resources/meeting-sessions/actions.d.mts +13 -7
  144. package/resources/meeting-sessions/actions.d.mts.map +1 -1
  145. package/resources/meeting-sessions/actions.d.ts +13 -7
  146. package/resources/meeting-sessions/actions.d.ts.map +1 -1
  147. package/resources/meeting-sessions/actions.js +13 -7
  148. package/resources/meeting-sessions/actions.js.map +1 -1
  149. package/resources/meeting-sessions/actions.mjs +13 -7
  150. package/resources/meeting-sessions/actions.mjs.map +1 -1
  151. package/resources/meeting-sessions/index.d.mts +1 -1
  152. package/resources/meeting-sessions/index.d.mts.map +1 -1
  153. package/resources/meeting-sessions/index.d.ts +1 -1
  154. package/resources/meeting-sessions/index.d.ts.map +1 -1
  155. package/resources/meeting-sessions/index.js.map +1 -1
  156. package/resources/meeting-sessions/index.mjs.map +1 -1
  157. package/resources/meeting-sessions/meeting-sessions.d.mts +46 -65
  158. package/resources/meeting-sessions/meeting-sessions.d.mts.map +1 -1
  159. package/resources/meeting-sessions/meeting-sessions.d.ts +46 -65
  160. package/resources/meeting-sessions/meeting-sessions.d.ts.map +1 -1
  161. package/resources/meeting-sessions/meeting-sessions.js +14 -23
  162. package/resources/meeting-sessions/meeting-sessions.js.map +1 -1
  163. package/resources/meeting-sessions/meeting-sessions.mjs +14 -23
  164. package/resources/meeting-sessions/meeting-sessions.mjs.map +1 -1
  165. package/resources/messages/messages.d.mts +581 -118
  166. package/resources/messages/messages.d.mts.map +1 -1
  167. package/resources/messages/messages.d.ts +581 -118
  168. package/resources/messages/messages.d.ts.map +1 -1
  169. package/resources/messages/messages.js +71 -14
  170. package/resources/messages/messages.js.map +1 -1
  171. package/resources/messages/messages.mjs +71 -14
  172. package/resources/messages/messages.mjs.map +1 -1
  173. package/resources/messages/rcs.d.mts +26 -6
  174. package/resources/messages/rcs.d.mts.map +1 -1
  175. package/resources/messages/rcs.d.ts +26 -6
  176. package/resources/messages/rcs.d.ts.map +1 -1
  177. package/resources/messages/rcs.js +11 -2
  178. package/resources/messages/rcs.js.map +1 -1
  179. package/resources/messages/rcs.mjs +11 -2
  180. package/resources/messages/rcs.mjs.map +1 -1
  181. package/resources/phone-numbers/csv-downloads.d.mts +9 -0
  182. package/resources/phone-numbers/csv-downloads.d.mts.map +1 -1
  183. package/resources/phone-numbers/csv-downloads.d.ts +9 -0
  184. package/resources/phone-numbers/csv-downloads.d.ts.map +1 -1
  185. package/resources/phone-numbers/csv-downloads.js +5 -2
  186. package/resources/phone-numbers/csv-downloads.js.map +1 -1
  187. package/resources/phone-numbers/csv-downloads.mjs +5 -2
  188. package/resources/phone-numbers/csv-downloads.mjs.map +1 -1
  189. package/resources/phone-numbers/index.d.mts +2 -2
  190. package/resources/phone-numbers/index.d.mts.map +1 -1
  191. package/resources/phone-numbers/index.d.ts +2 -2
  192. package/resources/phone-numbers/index.d.ts.map +1 -1
  193. package/resources/phone-numbers/index.js.map +1 -1
  194. package/resources/phone-numbers/index.mjs.map +1 -1
  195. package/resources/phone-numbers/jobs.d.mts +266 -15
  196. package/resources/phone-numbers/jobs.d.mts.map +1 -1
  197. package/resources/phone-numbers/jobs.d.ts +266 -15
  198. package/resources/phone-numbers/jobs.d.ts.map +1 -1
  199. package/resources/phone-numbers/jobs.js +1 -1
  200. package/resources/phone-numbers/jobs.js.map +1 -1
  201. package/resources/phone-numbers/jobs.mjs +1 -1
  202. package/resources/phone-numbers/jobs.mjs.map +1 -1
  203. package/resources/phone-numbers/phone-numbers.d.mts +28 -3
  204. package/resources/phone-numbers/phone-numbers.d.mts.map +1 -1
  205. package/resources/phone-numbers/phone-numbers.d.ts +28 -3
  206. package/resources/phone-numbers/phone-numbers.d.ts.map +1 -1
  207. package/resources/phone-numbers/phone-numbers.js.map +1 -1
  208. package/resources/phone-numbers/phone-numbers.mjs.map +1 -1
  209. package/resources/porting-orders/phone-number-blocks.d.mts +1 -1
  210. package/resources/porting-orders/phone-number-blocks.d.mts.map +1 -1
  211. package/resources/porting-orders/phone-number-blocks.d.ts +1 -1
  212. package/resources/porting-orders/phone-number-blocks.d.ts.map +1 -1
  213. package/resources/porting-orders/porting-orders.d.mts +1 -1
  214. package/resources/porting-orders/porting-orders.d.mts.map +1 -1
  215. package/resources/porting-orders/porting-orders.d.ts +1 -1
  216. package/resources/porting-orders/porting-orders.d.ts.map +1 -1
  217. package/resources/porting-orders/porting-orders.js.map +1 -1
  218. package/resources/porting-orders/porting-orders.mjs.map +1 -1
  219. package/resources/porting-phone-numbers.d.mts +1 -1
  220. package/resources/porting-phone-numbers.d.mts.map +1 -1
  221. package/resources/porting-phone-numbers.d.ts +1 -1
  222. package/resources/porting-phone-numbers.d.ts.map +1 -1
  223. package/resources/shared.d.mts +4 -0
  224. package/resources/shared.d.mts.map +1 -1
  225. package/resources/shared.d.ts +4 -0
  226. package/resources/shared.d.ts.map +1 -1
  227. package/resources/speech-to-text/speech-to-text.d.mts +12 -5
  228. package/resources/speech-to-text/speech-to-text.d.mts.map +1 -1
  229. package/resources/speech-to-text/speech-to-text.d.ts +12 -5
  230. package/resources/speech-to-text/speech-to-text.d.ts.map +1 -1
  231. package/resources/telephony-credentials.d.mts +11 -2
  232. package/resources/telephony-credentials.d.mts.map +1 -1
  233. package/resources/telephony-credentials.d.ts +11 -2
  234. package/resources/telephony-credentials.d.ts.map +1 -1
  235. package/resources/telephony-credentials.js +9 -2
  236. package/resources/telephony-credentials.js.map +1 -1
  237. package/resources/telephony-credentials.mjs +9 -2
  238. package/resources/telephony-credentials.mjs.map +1 -1
  239. package/resources/texml/accounts/accounts.d.mts +2 -2
  240. package/resources/texml/accounts/accounts.d.ts +2 -2
  241. package/resources/texml/accounts/accounts.js +2 -2
  242. package/resources/texml/accounts/accounts.mjs +2 -2
  243. package/resources/texml/accounts/calls/calls.d.mts +49 -14
  244. package/resources/texml/accounts/calls/calls.d.mts.map +1 -1
  245. package/resources/texml/accounts/calls/calls.d.ts +49 -14
  246. package/resources/texml/accounts/calls/calls.d.ts.map +1 -1
  247. package/resources/texml/accounts/calls/calls.js +7 -7
  248. package/resources/texml/accounts/calls/calls.js.map +1 -1
  249. package/resources/texml/accounts/calls/calls.mjs +7 -7
  250. package/resources/texml/accounts/calls/calls.mjs.map +1 -1
  251. package/resources/texml/accounts/calls/recordings-json.d.mts +14 -4
  252. package/resources/texml/accounts/calls/recordings-json.d.mts.map +1 -1
  253. package/resources/texml/accounts/calls/recordings-json.d.ts +14 -4
  254. package/resources/texml/accounts/calls/recordings-json.d.ts.map +1 -1
  255. package/resources/texml/accounts/calls/recordings-json.js +2 -2
  256. package/resources/texml/accounts/calls/recordings-json.mjs +2 -2
  257. package/resources/texml/accounts/calls/recordings.d.mts +10 -2
  258. package/resources/texml/accounts/calls/recordings.d.mts.map +1 -1
  259. package/resources/texml/accounts/calls/recordings.d.ts +10 -2
  260. package/resources/texml/accounts/calls/recordings.d.ts.map +1 -1
  261. package/resources/texml/accounts/calls/recordings.js +4 -1
  262. package/resources/texml/accounts/calls/recordings.js.map +1 -1
  263. package/resources/texml/accounts/calls/recordings.mjs +4 -1
  264. package/resources/texml/accounts/calls/recordings.mjs.map +1 -1
  265. package/resources/texml/accounts/calls/siprec.d.mts +10 -2
  266. package/resources/texml/accounts/calls/siprec.d.mts.map +1 -1
  267. package/resources/texml/accounts/calls/siprec.d.ts +10 -2
  268. package/resources/texml/accounts/calls/siprec.d.ts.map +1 -1
  269. package/resources/texml/accounts/calls/siprec.js +4 -1
  270. package/resources/texml/accounts/calls/siprec.js.map +1 -1
  271. package/resources/texml/accounts/calls/siprec.mjs +4 -1
  272. package/resources/texml/accounts/calls/siprec.mjs.map +1 -1
  273. package/resources/texml/accounts/calls/streams.d.mts +10 -2
  274. package/resources/texml/accounts/calls/streams.d.mts.map +1 -1
  275. package/resources/texml/accounts/calls/streams.d.ts +10 -2
  276. package/resources/texml/accounts/calls/streams.d.ts.map +1 -1
  277. package/resources/texml/accounts/calls/streams.js +4 -1
  278. package/resources/texml/accounts/calls/streams.js.map +1 -1
  279. package/resources/texml/accounts/calls/streams.mjs +4 -1
  280. package/resources/texml/accounts/calls/streams.mjs.map +1 -1
  281. package/resources/texml/accounts/conferences/conferences.d.mts +29 -9
  282. package/resources/texml/accounts/conferences/conferences.d.mts.map +1 -1
  283. package/resources/texml/accounts/conferences/conferences.d.ts +29 -9
  284. package/resources/texml/accounts/conferences/conferences.d.ts.map +1 -1
  285. package/resources/texml/accounts/conferences/conferences.js +5 -5
  286. package/resources/texml/accounts/conferences/conferences.js.map +1 -1
  287. package/resources/texml/accounts/conferences/conferences.mjs +5 -5
  288. package/resources/texml/accounts/conferences/conferences.mjs.map +1 -1
  289. package/resources/texml/accounts/conferences/participants.d.mts +35 -10
  290. package/resources/texml/accounts/conferences/participants.d.mts.map +1 -1
  291. package/resources/texml/accounts/conferences/participants.d.ts +35 -10
  292. package/resources/texml/accounts/conferences/participants.d.ts.map +1 -1
  293. package/resources/texml/accounts/conferences/participants.js +5 -5
  294. package/resources/texml/accounts/conferences/participants.mjs +5 -5
  295. package/resources/texml/accounts/queues.d.mts +25 -8
  296. package/resources/texml/accounts/queues.d.mts.map +1 -1
  297. package/resources/texml/accounts/queues.d.ts +25 -8
  298. package/resources/texml/accounts/queues.d.ts.map +1 -1
  299. package/resources/texml/accounts/queues.js +7 -5
  300. package/resources/texml/accounts/queues.js.map +1 -1
  301. package/resources/texml/accounts/queues.mjs +7 -5
  302. package/resources/texml/accounts/queues.mjs.map +1 -1
  303. package/resources/texml/accounts/recordings/json.d.mts +14 -4
  304. package/resources/texml/accounts/recordings/json.d.mts.map +1 -1
  305. package/resources/texml/accounts/recordings/json.d.ts +14 -4
  306. package/resources/texml/accounts/recordings/json.d.ts.map +1 -1
  307. package/resources/texml/accounts/recordings/json.js +2 -2
  308. package/resources/texml/accounts/recordings/json.mjs +2 -2
  309. package/resources/texml/accounts/transcriptions/json.d.mts +14 -4
  310. package/resources/texml/accounts/transcriptions/json.d.mts.map +1 -1
  311. package/resources/texml/accounts/transcriptions/json.d.ts +14 -4
  312. package/resources/texml/accounts/transcriptions/json.d.ts.map +1 -1
  313. package/resources/texml/accounts/transcriptions/json.js +2 -2
  314. package/resources/texml/accounts/transcriptions/json.mjs +2 -2
  315. package/resources/text-to-speech/text-to-speech.d.mts +15 -6
  316. package/resources/text-to-speech/text-to-speech.d.mts.map +1 -1
  317. package/resources/text-to-speech/text-to-speech.d.ts +15 -6
  318. package/resources/text-to-speech/text-to-speech.d.ts.map +1 -1
  319. package/resources/tts-integrations/actions.d.mts +4 -0
  320. package/resources/tts-integrations/actions.d.mts.map +1 -0
  321. package/resources/tts-integrations/actions.d.ts +4 -0
  322. package/resources/tts-integrations/actions.d.ts.map +1 -0
  323. package/resources/tts-integrations/actions.js +9 -0
  324. package/resources/tts-integrations/actions.js.map +1 -0
  325. package/resources/tts-integrations/actions.mjs +5 -0
  326. package/resources/tts-integrations/actions.mjs.map +1 -0
  327. package/resources/tts-integrations/index.d.mts +3 -0
  328. package/resources/tts-integrations/index.d.mts.map +1 -0
  329. package/resources/tts-integrations/index.d.ts +3 -0
  330. package/resources/tts-integrations/index.d.ts.map +1 -0
  331. package/resources/tts-integrations/index.js +9 -0
  332. package/resources/tts-integrations/index.js.map +1 -0
  333. package/resources/tts-integrations/index.mjs +4 -0
  334. package/resources/tts-integrations/index.mjs.map +1 -0
  335. package/resources/tts-integrations/tts-integrations.d.mts +10 -0
  336. package/resources/tts-integrations/tts-integrations.d.mts.map +1 -0
  337. package/resources/tts-integrations/tts-integrations.d.ts +10 -0
  338. package/resources/tts-integrations/tts-integrations.d.ts.map +1 -0
  339. package/resources/tts-integrations/tts-integrations.js +17 -0
  340. package/resources/tts-integrations/tts-integrations.js.map +1 -0
  341. package/resources/tts-integrations/tts-integrations.mjs +12 -0
  342. package/resources/tts-integrations/tts-integrations.mjs.map +1 -0
  343. package/resources/tts-integrations.d.mts +2 -0
  344. package/resources/tts-integrations.d.mts.map +1 -0
  345. package/resources/tts-integrations.d.ts +2 -0
  346. package/resources/tts-integrations.d.ts.map +1 -0
  347. package/resources/tts-integrations.js +6 -0
  348. package/resources/tts-integrations.js.map +1 -0
  349. package/resources/tts-integrations.mjs +3 -0
  350. package/resources/tts-integrations.mjs.map +1 -0
  351. package/resources/uac-connections/uac-connections.d.mts +36 -6
  352. package/resources/uac-connections/uac-connections.d.mts.map +1 -1
  353. package/resources/uac-connections/uac-connections.d.ts +36 -6
  354. package/resources/uac-connections/uac-connections.d.ts.map +1 -1
  355. package/resources/uac-connections/uac-connections.js.map +1 -1
  356. package/resources/uac-connections/uac-connections.mjs.map +1 -1
  357. package/resources/voice-clones.d.mts +57 -10
  358. package/resources/voice-clones.d.mts.map +1 -1
  359. package/resources/voice-clones.d.ts +57 -10
  360. package/resources/voice-clones.d.ts.map +1 -1
  361. package/resources/voice-clones.js +6 -4
  362. package/resources/voice-clones.js.map +1 -1
  363. package/resources/voice-clones.mjs +6 -4
  364. package/resources/voice-clones.mjs.map +1 -1
  365. package/resources/webhooks.d.mts +433 -81
  366. package/resources/webhooks.d.mts.map +1 -1
  367. package/resources/webhooks.d.ts +433 -81
  368. package/resources/webhooks.d.ts.map +1 -1
  369. package/resources/whatsapp/hosted-signups.d.mts +165 -0
  370. package/resources/whatsapp/hosted-signups.d.mts.map +1 -0
  371. package/resources/whatsapp/hosted-signups.d.ts +165 -0
  372. package/resources/whatsapp/hosted-signups.d.ts.map +1 -0
  373. package/resources/whatsapp/hosted-signups.js +56 -0
  374. package/resources/whatsapp/hosted-signups.js.map +1 -0
  375. package/resources/whatsapp/hosted-signups.mjs +52 -0
  376. package/resources/whatsapp/hosted-signups.mjs.map +1 -0
  377. package/resources/whatsapp/index.d.mts +1 -0
  378. package/resources/whatsapp/index.d.mts.map +1 -1
  379. package/resources/whatsapp/index.d.ts +1 -0
  380. package/resources/whatsapp/index.d.ts.map +1 -1
  381. package/resources/whatsapp/index.js +3 -1
  382. package/resources/whatsapp/index.js.map +1 -1
  383. package/resources/whatsapp/index.mjs +1 -0
  384. package/resources/whatsapp/index.mjs.map +1 -1
  385. package/resources/whatsapp/whatsapp.d.mts +4 -0
  386. package/resources/whatsapp/whatsapp.d.mts.map +1 -1
  387. package/resources/whatsapp/whatsapp.d.ts +4 -0
  388. package/resources/whatsapp/whatsapp.d.ts.map +1 -1
  389. package/resources/whatsapp/whatsapp.js +4 -0
  390. package/resources/whatsapp/whatsapp.js.map +1 -1
  391. package/resources/whatsapp/whatsapp.mjs +4 -0
  392. package/resources/whatsapp/whatsapp.mjs.map +1 -1
  393. package/src/client.ts +29 -4
  394. package/src/resources/addresses/addresses.ts +22 -2
  395. package/src/resources/ai/ai.ts +2 -0
  396. package/src/resources/ai/assistants/assistants.ts +179 -31
  397. package/src/resources/ai/assistants/versions.ts +11 -6
  398. package/src/resources/ai/audio.ts +18 -5
  399. package/src/resources/ai/avatars.ts +22 -8
  400. package/src/resources/ai/index.ts +1 -0
  401. package/src/resources/ai/tools.ts +16 -0
  402. package/src/resources/calls/actions.ts +281 -10
  403. package/src/resources/calls/calls.ts +2 -0
  404. package/src/resources/calls/index.ts +1 -0
  405. package/src/resources/credential-connections/credential-connections.ts +41 -8
  406. package/src/resources/dial-metrics.ts +185 -0
  407. package/src/resources/dir/dir.ts +4 -2
  408. package/src/resources/dir/references.ts +15 -9
  409. package/src/resources/dir/verify-email.ts +17 -5
  410. package/src/resources/email-domains/email-domains.ts +1 -1
  411. package/src/resources/enterprises/verify-email.ts +1 -1
  412. package/src/resources/fqdn-connections/fqdn-connections.ts +41 -8
  413. package/src/resources/index.ts +10 -2
  414. package/src/resources/ip-connections.ts +39 -6
  415. package/src/resources/meeting-sessions/actions.ts +13 -7
  416. package/src/resources/meeting-sessions/index.ts +0 -1
  417. package/src/resources/meeting-sessions/meeting-sessions.ts +48 -79
  418. package/src/resources/messages/messages.ts +786 -125
  419. package/src/resources/messages/rcs.ts +37 -7
  420. package/src/resources/phone-numbers/csv-downloads.ts +15 -2
  421. package/src/resources/phone-numbers/index.ts +3 -1
  422. package/src/resources/phone-numbers/jobs.ts +320 -16
  423. package/src/resources/phone-numbers/phone-numbers.ts +38 -2
  424. package/src/resources/porting-orders/phone-number-blocks.ts +1 -0
  425. package/src/resources/porting-orders/porting-orders.ts +1 -0
  426. package/src/resources/porting-phone-numbers.ts +1 -0
  427. package/src/resources/shared.ts +5 -0
  428. package/src/resources/speech-to-text/speech-to-text.ts +12 -4
  429. package/src/resources/telephony-credentials.ts +24 -2
  430. package/src/resources/texml/accounts/accounts.ts +2 -2
  431. package/src/resources/texml/accounts/calls/calls.ts +49 -14
  432. package/src/resources/texml/accounts/calls/recordings-json.ts +14 -4
  433. package/src/resources/texml/accounts/calls/recordings.ts +10 -2
  434. package/src/resources/texml/accounts/calls/siprec.ts +10 -2
  435. package/src/resources/texml/accounts/calls/streams.ts +10 -2
  436. package/src/resources/texml/accounts/conferences/conferences.ts +29 -9
  437. package/src/resources/texml/accounts/conferences/participants.ts +35 -10
  438. package/src/resources/texml/accounts/queues.ts +25 -8
  439. package/src/resources/texml/accounts/recordings/json.ts +14 -4
  440. package/src/resources/texml/accounts/transcriptions/json.ts +14 -4
  441. package/src/resources/text-to-speech/text-to-speech.ts +15 -6
  442. package/src/resources/tts-integrations/actions.ts +5 -0
  443. package/src/resources/tts-integrations/index.ts +4 -0
  444. package/src/resources/tts-integrations/tts-integrations.ts +15 -0
  445. package/src/resources/tts-integrations.ts +3 -0
  446. package/src/resources/uac-connections/uac-connections.ts +39 -6
  447. package/src/resources/voice-clones.ts +65 -9
  448. package/src/resources/webhooks.ts +517 -95
  449. package/src/resources/whatsapp/hosted-signups.ts +221 -0
  450. package/src/resources/whatsapp/index.ts +9 -0
  451. package/src/resources/whatsapp/whatsapp.ts +22 -0
  452. package/src/version.ts +1 -1
  453. package/version.d.mts +1 -1
  454. package/version.d.ts +1 -1
  455. package/version.js +1 -1
  456. package/version.mjs +1 -1
@@ -11,6 +11,7 @@ import {
11
11
  Rcs,
12
12
  } from './rcs';
13
13
  import { APIPromise } from '../../core/api-promise';
14
+ import { buildHeaders } from '../../internal/headers';
14
15
  import { RequestOptions } from '../../internal/request-options';
15
16
  import { path } from '../../internal/utils/path';
16
17
 
@@ -32,8 +33,16 @@ export class Messages extends APIResource {
32
33
  * });
33
34
  * ```
34
35
  */
35
- send(body: MessageSendParams, options?: RequestOptions): APIPromise<MessageSendResponse> {
36
- return this._client.post('/messages', { body, ...options });
36
+ send(params: MessageSendParams, options?: RequestOptions): APIPromise<MessageSendResponse> {
37
+ const { 'Idempotency-Key': idempotencyKey, ...body } = params;
38
+ return this._client.post('/messages', {
39
+ body,
40
+ ...options,
41
+ headers: buildHeaders([
42
+ { ...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined) },
43
+ options?.headers,
44
+ ]),
45
+ });
37
46
  }
38
47
 
39
48
  /**
@@ -49,10 +58,18 @@ export class Messages extends APIResource {
49
58
  * ```
50
59
  */
51
60
  sendLongCode(
52
- body: MessageSendLongCodeParams,
61
+ params: MessageSendLongCodeParams,
53
62
  options?: RequestOptions,
54
63
  ): APIPromise<MessageSendLongCodeResponse> {
55
- return this._client.post('/messages/long_code', { body, ...options });
64
+ const { 'Idempotency-Key': idempotencyKey, ...body } = params;
65
+ return this._client.post('/messages/long_code', {
66
+ body,
67
+ ...options,
68
+ headers: buildHeaders([
69
+ { ...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined) },
70
+ options?.headers,
71
+ ]),
72
+ });
56
73
  }
57
74
 
58
75
  /**
@@ -69,10 +86,18 @@ export class Messages extends APIResource {
69
86
  * ```
70
87
  */
71
88
  sendNumberPool(
72
- body: MessageSendNumberPoolParams,
89
+ params: MessageSendNumberPoolParams,
73
90
  options?: RequestOptions,
74
91
  ): APIPromise<MessageSendNumberPoolResponse> {
75
- return this._client.post('/messages/number_pool', { body, ...options });
92
+ const { 'Idempotency-Key': idempotencyKey, ...body } = params;
93
+ return this._client.post('/messages/number_pool', {
94
+ body,
95
+ ...options,
96
+ headers: buildHeaders([
97
+ { ...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined) },
98
+ options?.headers,
99
+ ]),
100
+ });
76
101
  }
77
102
 
78
103
  /**
@@ -88,10 +113,18 @@ export class Messages extends APIResource {
88
113
  * ```
89
114
  */
90
115
  sendShortCode(
91
- body: MessageSendShortCodeParams,
116
+ params: MessageSendShortCodeParams,
92
117
  options?: RequestOptions,
93
118
  ): APIPromise<MessageSendShortCodeResponse> {
94
- return this._client.post('/messages/short_code', { body, ...options });
119
+ const { 'Idempotency-Key': idempotencyKey, ...body } = params;
120
+ return this._client.post('/messages/short_code', {
121
+ body,
122
+ ...options,
123
+ headers: buildHeaders([
124
+ { ...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined) },
125
+ options?.headers,
126
+ ]),
127
+ });
95
128
  }
96
129
 
97
130
  /**
@@ -107,10 +140,18 @@ export class Messages extends APIResource {
107
140
  * ```
108
141
  */
109
142
  sendGroupMms(
110
- body: MessageSendGroupMmsParams,
143
+ params: MessageSendGroupMmsParams,
111
144
  options?: RequestOptions,
112
145
  ): APIPromise<MessageSendGroupMmsResponse> {
113
- return this._client.post('/messages/group_mms', { body, ...options });
146
+ const { 'Idempotency-Key': idempotencyKey, ...body } = params;
147
+ return this._client.post('/messages/group_mms', {
148
+ body,
149
+ ...options,
150
+ headers: buildHeaders([
151
+ { ...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined) },
152
+ options?.headers,
153
+ ]),
154
+ });
114
155
  }
115
156
 
116
157
  /**
@@ -180,10 +221,18 @@ export class Messages extends APIResource {
180
221
  * ```
181
222
  */
182
223
  sendWithAlphanumericSender(
183
- body: MessageSendWithAlphanumericSenderParams,
224
+ params: MessageSendWithAlphanumericSenderParams,
184
225
  options?: RequestOptions,
185
226
  ): APIPromise<MessageSendWithAlphanumericSenderResponse> {
186
- return this._client.post('/messages/alphanumeric_sender_id', { body, ...options });
227
+ const { 'Idempotency-Key': idempotencyKey, ...body } = params;
228
+ return this._client.post('/messages/alphanumeric_sender_id', {
229
+ body,
230
+ ...options,
231
+ headers: buildHeaders([
232
+ { ...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined) },
233
+ options?.headers,
234
+ ]),
235
+ });
187
236
  }
188
237
 
189
238
  /**
@@ -219,8 +268,16 @@ export class Messages extends APIResource {
219
268
  * });
220
269
  * ```
221
270
  */
222
- whatsapp(body: MessageWhatsappParams, options?: RequestOptions): APIPromise<MessageWhatsappResponse> {
223
- return this._client.post('/messages/whatsapp', { body, ...options });
271
+ whatsapp(params: MessageWhatsappParams, options?: RequestOptions): APIPromise<MessageWhatsappResponse> {
272
+ const { 'Idempotency-Key': idempotencyKey, ...body } = params;
273
+ return this._client.post('/messages/whatsapp', {
274
+ body,
275
+ ...options,
276
+ headers: buildHeaders([
277
+ { ...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined) },
278
+ options?.headers,
279
+ ]),
280
+ });
224
281
  }
225
282
  }
226
283
 
@@ -423,10 +480,18 @@ export namespace MessagingInboundMessagePayload {
423
480
  foreign_id?: string;
424
481
 
425
482
  /**
426
- * WhatsApp sender in E.164 format.
483
+ * WhatsApp sender in E.164 format. Empty when the user hides their phone number;
484
+ * `from_user_id` then identifies the sender.
427
485
  */
428
486
  from?: string;
429
487
 
488
+ /**
489
+ * Business-scoped user ID (BSUID) of the WhatsApp sender when Meta provides one,
490
+ * for example `US.13491208655302741918`. When `from` is empty, pass this value as
491
+ * `to` to reply.
492
+ */
493
+ from_user_id?: string;
494
+
430
495
  /**
431
496
  * Location shared in an RCS message.
432
497
  */
@@ -710,7 +775,8 @@ export interface MessagingOutboundMessagePayload {
710
775
  id?: string;
711
776
 
712
777
  /**
713
- * RCS webhook message body. Text messages use the text property.
778
+ * Message body for RCS and WhatsApp. RCS text messages use the text property.
779
+ * WhatsApp messages contain the `whatsapp_message` object from the send request.
714
780
  */
715
781
  body?: MessagingOutboundMessagePayload.Body;
716
782
 
@@ -817,6 +883,17 @@ export interface MessagingOutboundMessagePayload {
817
883
  */
818
884
  tcr_campaign_registered?: string | null;
819
885
 
886
+ /**
887
+ * Telnyx ID of the WhatsApp template used by the message, when known.
888
+ */
889
+ template_id?: string;
890
+
891
+ /**
892
+ * Name of the WhatsApp template used by the message. Present for WhatsApp template
893
+ * messages.
894
+ */
895
+ template_name?: string;
896
+
820
897
  /**
821
898
  * Message body (i.e., content) as a non-empty string.
822
899
  *
@@ -829,7 +906,7 @@ export interface MessagingOutboundMessagePayload {
829
906
  /**
830
907
  * The type of message.
831
908
  */
832
- type?: 'SMS' | 'MMS' | 'RCS';
909
+ type?: 'SMS' | 'MMS' | 'RCS' | 'WHATSAPP';
833
910
 
834
911
  /**
835
912
  * Message must be out of the queue by this time or else it will be discarded and
@@ -859,13 +936,16 @@ export interface MessagingOutboundMessagePayload {
859
936
 
860
937
  export namespace MessagingOutboundMessagePayload {
861
938
  /**
862
- * RCS webhook message body. Text messages use the text property.
939
+ * Message body for RCS and WhatsApp. RCS text messages use the text property.
940
+ * WhatsApp messages contain the `whatsapp_message` object from the send request.
863
941
  */
864
942
  export interface Body {
865
943
  /**
866
944
  * RCS text message.
867
945
  */
868
946
  text?: string;
947
+
948
+ [k: string]: unknown;
869
949
  }
870
950
 
871
951
  export interface Cc {
@@ -1030,7 +1110,8 @@ export interface OutboundMessagePayload {
1030
1110
  id?: string;
1031
1111
 
1032
1112
  /**
1033
- * RCS webhook message body. Text messages use the text property.
1113
+ * Message body for RCS and WhatsApp. RCS text messages use the text property.
1114
+ * WhatsApp messages contain the `whatsapp_message` object from the send request.
1034
1115
  */
1035
1116
  body?: OutboundMessagePayload.Body;
1036
1117
 
@@ -1137,6 +1218,17 @@ export interface OutboundMessagePayload {
1137
1218
  */
1138
1219
  tcr_campaign_registered?: string | null;
1139
1220
 
1221
+ /**
1222
+ * Telnyx ID of the WhatsApp template used by the message, when known.
1223
+ */
1224
+ template_id?: string;
1225
+
1226
+ /**
1227
+ * Name of the WhatsApp template used by the message. Present for WhatsApp template
1228
+ * messages.
1229
+ */
1230
+ template_name?: string;
1231
+
1140
1232
  /**
1141
1233
  * Message body (i.e., content) as a non-empty string.
1142
1234
  *
@@ -1149,7 +1241,7 @@ export interface OutboundMessagePayload {
1149
1241
  /**
1150
1242
  * The type of message.
1151
1243
  */
1152
- type?: 'SMS' | 'MMS' | 'RCS';
1244
+ type?: 'SMS' | 'MMS' | 'RCS' | 'WHATSAPP';
1153
1245
 
1154
1246
  /**
1155
1247
  * Message must be out of the queue by this time or else it will be discarded and
@@ -1179,13 +1271,16 @@ export interface OutboundMessagePayload {
1179
1271
 
1180
1272
  export namespace OutboundMessagePayload {
1181
1273
  /**
1182
- * RCS webhook message body. Text messages use the text property.
1274
+ * Message body for RCS and WhatsApp. RCS text messages use the text property.
1275
+ * WhatsApp messages contain the `whatsapp_message` object from the send request.
1183
1276
  */
1184
1277
  export interface Body {
1185
1278
  /**
1186
1279
  * RCS text message.
1187
1280
  */
1188
1281
  text?: string;
1282
+
1283
+ [k: string]: unknown;
1189
1284
  }
1190
1285
 
1191
1286
  export interface Cc {
@@ -2456,28 +2551,28 @@ export namespace MessageWhatsappResponse {
2456
2551
 
2457
2552
  export interface MessageSendParams {
2458
2553
  /**
2459
- * Receiving address (+E.164 formatted phone number or short code).
2554
+ * Body param: Receiving address (+E.164 formatted phone number or short code).
2460
2555
  */
2461
2556
  to: string;
2462
2557
 
2463
2558
  /**
2464
- * Automatically detect if an SMS message is unusually long and exceeds a
2465
- * recommended limit of message parts.
2559
+ * Body param: Automatically detect if an SMS message is unusually long and exceeds
2560
+ * a recommended limit of message parts.
2466
2561
  */
2467
2562
  auto_detect?: boolean;
2468
2563
 
2469
2564
  /**
2470
- * Encoding to use for the message. `auto` (default) uses smart encoding to
2471
- * automatically select the most efficient encoding. `gsm7` forces GSM-7 encoding
2472
- * (returns 400 if message contains characters that cannot be encoded). `ucs2`
2473
- * forces UCS-2 encoding and disables smart encoding. When set, this overrides the
2474
- * messaging profile's `smart_encoding` setting.
2565
+ * Body param: Encoding to use for the message. `auto` (default) uses smart
2566
+ * encoding to automatically select the most efficient encoding. `gsm7` forces
2567
+ * GSM-7 encoding (returns 400 if message contains characters that cannot be
2568
+ * encoded). `ucs2` forces UCS-2 encoding and disables smart encoding. When set,
2569
+ * this overrides the messaging profile's `smart_encoding` setting.
2475
2570
  */
2476
2571
  encoding?: 'auto' | 'gsm7' | 'ucs2';
2477
2572
 
2478
2573
  /**
2479
- * Sending address (+E.164 formatted phone number, alphanumeric sender ID, or short
2480
- * code).
2574
+ * Body param: Sending address (+E.164 formatted phone number, alphanumeric sender
2575
+ * ID, or short code).
2481
2576
  *
2482
2577
  * **Required if sending with a phone number, short code, or alphanumeric sender
2483
2578
  * ID.**
@@ -2485,311 +2580,371 @@ export interface MessageSendParams {
2485
2580
  from?: string;
2486
2581
 
2487
2582
  /**
2488
- * A list of media URLs. The total media size must be less than 1 MB.
2583
+ * Body param: A list of media URLs. The total media size must be less than 1 MB.
2489
2584
  *
2490
2585
  * **Required for MMS**
2491
2586
  */
2492
2587
  media_urls?: Array<string>;
2493
2588
 
2494
2589
  /**
2495
- * Unique identifier for a messaging profile.
2590
+ * Body param: Unique identifier for a messaging profile.
2496
2591
  *
2497
2592
  * **Required if sending via number pool or with an alphanumeric sender ID.**
2498
2593
  */
2499
2594
  messaging_profile_id?: string;
2500
2595
 
2501
2596
  /**
2502
- * ISO 8601 formatted date indicating when to send the message - accurate up till a
2503
- * minute.
2597
+ * Body param: ISO 8601 formatted date indicating when to send the message -
2598
+ * accurate up till a minute.
2504
2599
  */
2505
2600
  send_at?: string | null;
2506
2601
 
2507
2602
  /**
2508
- * Subject of multimedia message
2603
+ * Body param: Subject of multimedia message
2509
2604
  */
2510
2605
  subject?: string;
2511
2606
 
2512
2607
  /**
2513
- * Message body (i.e., content) as a non-empty string.
2608
+ * Body param: Message body (i.e., content) as a non-empty string.
2514
2609
  *
2515
2610
  * **Required for SMS**
2516
2611
  */
2517
2612
  text?: string;
2518
2613
 
2519
2614
  /**
2520
- * The protocol for sending the message, either SMS or MMS.
2615
+ * Body param: The protocol for sending the message, either SMS or MMS.
2521
2616
  */
2522
2617
  type?: 'SMS' | 'MMS';
2523
2618
 
2524
2619
  /**
2525
- * If the profile this number is associated with has webhooks, use them for
2526
- * delivery notifications. If webhooks are also specified on the message itself,
2527
- * they will be attempted first, then those on the profile.
2620
+ * Body param: If the profile this number is associated with has webhooks, use them
2621
+ * for delivery notifications. If webhooks are also specified on the message
2622
+ * itself, they will be attempted first, then those on the profile.
2528
2623
  */
2529
2624
  use_profile_webhooks?: boolean;
2530
2625
 
2531
2626
  /**
2532
- * The failover URL where webhooks related to this message will be sent if sending
2533
- * to the primary URL fails.
2627
+ * Body param: The failover URL where webhooks related to this message will be sent
2628
+ * if sending to the primary URL fails.
2534
2629
  */
2535
2630
  webhook_failover_url?: string;
2536
2631
 
2537
2632
  /**
2538
- * The URL where webhooks related to this message will be sent.
2633
+ * Body param: The URL where webhooks related to this message will be sent.
2539
2634
  */
2540
2635
  webhook_url?: string;
2636
+
2637
+ /**
2638
+ * Header param: Optional opaque, unquoted key for safely retrying the same logical
2639
+ * request. Keys must contain 1 to 255 letters, numbers, hyphens, or underscores.
2640
+ * Generate a unique UUID v4 for each operation and reuse it only when retrying
2641
+ * that operation with the same request. Invalid headers—including duplicate,
2642
+ * empty, malformed, or overlong values—return 400 with error code 10015. A request
2643
+ * already in progress with the same key returns 409; reusing the key with a
2644
+ * different request returns 422. Only successful responses are replayed, for up to
2645
+ * 24 hours. Do not include sensitive data in the key.
2646
+ */
2647
+ 'Idempotency-Key'?: string;
2541
2648
  }
2542
2649
 
2543
2650
  export interface MessageSendLongCodeParams {
2544
2651
  /**
2545
- * Phone number, in +E.164 format, used to send the message.
2652
+ * Body param: Phone number, in +E.164 format, used to send the message.
2546
2653
  */
2547
2654
  from: string;
2548
2655
 
2549
2656
  /**
2550
- * Receiving address (+E.164 formatted phone number or short code).
2657
+ * Body param: Receiving address (+E.164 formatted phone number or short code).
2551
2658
  */
2552
2659
  to: string;
2553
2660
 
2554
2661
  /**
2555
- * Automatically detect if an SMS message is unusually long and exceeds a
2556
- * recommended limit of message parts.
2662
+ * Body param: Automatically detect if an SMS message is unusually long and exceeds
2663
+ * a recommended limit of message parts.
2557
2664
  */
2558
2665
  auto_detect?: boolean;
2559
2666
 
2560
2667
  /**
2561
- * Encoding to use for the message. `auto` (default) uses smart encoding to
2562
- * automatically select the most efficient encoding. `gsm7` forces GSM-7 encoding
2563
- * (returns 400 if message contains characters that cannot be encoded). `ucs2`
2564
- * forces UCS-2 encoding and disables smart encoding. When set, this overrides the
2565
- * messaging profile's `smart_encoding` setting.
2668
+ * Body param: Encoding to use for the message. `auto` (default) uses smart
2669
+ * encoding to automatically select the most efficient encoding. `gsm7` forces
2670
+ * GSM-7 encoding (returns 400 if message contains characters that cannot be
2671
+ * encoded). `ucs2` forces UCS-2 encoding and disables smart encoding. When set,
2672
+ * this overrides the messaging profile's `smart_encoding` setting.
2566
2673
  */
2567
2674
  encoding?: 'auto' | 'gsm7' | 'ucs2';
2568
2675
 
2569
2676
  /**
2570
- * A list of media URLs. The total media size must be less than 1 MB.
2677
+ * Body param: A list of media URLs. The total media size must be less than 1 MB.
2571
2678
  *
2572
2679
  * **Required for MMS**
2573
2680
  */
2574
2681
  media_urls?: Array<string>;
2575
2682
 
2576
2683
  /**
2577
- * Subject of multimedia message
2684
+ * Body param: Subject of multimedia message
2578
2685
  */
2579
2686
  subject?: string;
2580
2687
 
2581
2688
  /**
2582
- * Message body (i.e., content) as a non-empty string.
2689
+ * Body param: Message body (i.e., content) as a non-empty string.
2583
2690
  *
2584
2691
  * **Required for SMS**
2585
2692
  */
2586
2693
  text?: string;
2587
2694
 
2588
2695
  /**
2589
- * The protocol for sending the message, either SMS or MMS.
2696
+ * Body param: The protocol for sending the message, either SMS or MMS.
2590
2697
  */
2591
2698
  type?: 'SMS' | 'MMS';
2592
2699
 
2593
2700
  /**
2594
- * If the profile this number is associated with has webhooks, use them for
2595
- * delivery notifications. If webhooks are also specified on the message itself,
2596
- * they will be attempted first, then those on the profile.
2701
+ * Body param: If the profile this number is associated with has webhooks, use them
2702
+ * for delivery notifications. If webhooks are also specified on the message
2703
+ * itself, they will be attempted first, then those on the profile.
2597
2704
  */
2598
2705
  use_profile_webhooks?: boolean;
2599
2706
 
2600
2707
  /**
2601
- * The failover URL where webhooks related to this message will be sent if sending
2602
- * to the primary URL fails.
2708
+ * Body param: The failover URL where webhooks related to this message will be sent
2709
+ * if sending to the primary URL fails.
2603
2710
  */
2604
2711
  webhook_failover_url?: string;
2605
2712
 
2606
2713
  /**
2607
- * The URL where webhooks related to this message will be sent.
2714
+ * Body param: The URL where webhooks related to this message will be sent.
2608
2715
  */
2609
2716
  webhook_url?: string;
2717
+
2718
+ /**
2719
+ * Header param: Optional opaque, unquoted key for safely retrying the same logical
2720
+ * request. Keys must contain 1 to 255 letters, numbers, hyphens, or underscores.
2721
+ * Generate a unique UUID v4 for each operation and reuse it only when retrying
2722
+ * that operation with the same request. Invalid headers—including duplicate,
2723
+ * empty, malformed, or overlong values—return 400 with error code 10015. A request
2724
+ * already in progress with the same key returns 409; reusing the key with a
2725
+ * different request returns 422. Only successful responses are replayed, for up to
2726
+ * 24 hours. Do not include sensitive data in the key.
2727
+ */
2728
+ 'Idempotency-Key'?: string;
2610
2729
  }
2611
2730
 
2612
2731
  export interface MessageSendNumberPoolParams {
2613
2732
  /**
2614
- * Unique identifier for a messaging profile.
2733
+ * Body param: Unique identifier for a messaging profile.
2615
2734
  */
2616
2735
  messaging_profile_id: string;
2617
2736
 
2618
2737
  /**
2619
- * Receiving address (+E.164 formatted phone number or short code).
2738
+ * Body param: Receiving address (+E.164 formatted phone number or short code).
2620
2739
  */
2621
2740
  to: string;
2622
2741
 
2623
2742
  /**
2624
- * Automatically detect if an SMS message is unusually long and exceeds a
2625
- * recommended limit of message parts.
2743
+ * Body param: Automatically detect if an SMS message is unusually long and exceeds
2744
+ * a recommended limit of message parts.
2626
2745
  */
2627
2746
  auto_detect?: boolean;
2628
2747
 
2629
2748
  /**
2630
- * Encoding to use for the message. `auto` (default) uses smart encoding to
2631
- * automatically select the most efficient encoding. `gsm7` forces GSM-7 encoding
2632
- * (returns 400 if message contains characters that cannot be encoded). `ucs2`
2633
- * forces UCS-2 encoding and disables smart encoding. When set, this overrides the
2634
- * messaging profile's `smart_encoding` setting.
2749
+ * Body param: Encoding to use for the message. `auto` (default) uses smart
2750
+ * encoding to automatically select the most efficient encoding. `gsm7` forces
2751
+ * GSM-7 encoding (returns 400 if message contains characters that cannot be
2752
+ * encoded). `ucs2` forces UCS-2 encoding and disables smart encoding. When set,
2753
+ * this overrides the messaging profile's `smart_encoding` setting.
2635
2754
  */
2636
2755
  encoding?: 'auto' | 'gsm7' | 'ucs2';
2637
2756
 
2638
2757
  /**
2639
- * A list of media URLs. The total media size must be less than 1 MB.
2758
+ * Body param: A list of media URLs. The total media size must be less than 1 MB.
2640
2759
  *
2641
2760
  * **Required for MMS**
2642
2761
  */
2643
2762
  media_urls?: Array<string>;
2644
2763
 
2645
2764
  /**
2646
- * Subject of multimedia message
2765
+ * Body param: Subject of multimedia message
2647
2766
  */
2648
2767
  subject?: string;
2649
2768
 
2650
2769
  /**
2651
- * Message body (i.e., content) as a non-empty string.
2770
+ * Body param: Message body (i.e., content) as a non-empty string.
2652
2771
  *
2653
2772
  * **Required for SMS**
2654
2773
  */
2655
2774
  text?: string;
2656
2775
 
2657
2776
  /**
2658
- * The protocol for sending the message, either SMS or MMS.
2777
+ * Body param: The protocol for sending the message, either SMS or MMS.
2659
2778
  */
2660
2779
  type?: 'SMS' | 'MMS';
2661
2780
 
2662
2781
  /**
2663
- * If the profile this number is associated with has webhooks, use them for
2664
- * delivery notifications. If webhooks are also specified on the message itself,
2665
- * they will be attempted first, then those on the profile.
2782
+ * Body param: If the profile this number is associated with has webhooks, use them
2783
+ * for delivery notifications. If webhooks are also specified on the message
2784
+ * itself, they will be attempted first, then those on the profile.
2666
2785
  */
2667
2786
  use_profile_webhooks?: boolean;
2668
2787
 
2669
2788
  /**
2670
- * The failover URL where webhooks related to this message will be sent if sending
2671
- * to the primary URL fails.
2789
+ * Body param: The failover URL where webhooks related to this message will be sent
2790
+ * if sending to the primary URL fails.
2672
2791
  */
2673
2792
  webhook_failover_url?: string;
2674
2793
 
2675
2794
  /**
2676
- * The URL where webhooks related to this message will be sent.
2795
+ * Body param: The URL where webhooks related to this message will be sent.
2677
2796
  */
2678
2797
  webhook_url?: string;
2798
+
2799
+ /**
2800
+ * Header param: Optional opaque, unquoted key for safely retrying the same logical
2801
+ * request. Keys must contain 1 to 255 letters, numbers, hyphens, or underscores.
2802
+ * Generate a unique UUID v4 for each operation and reuse it only when retrying
2803
+ * that operation with the same request. Invalid headers—including duplicate,
2804
+ * empty, malformed, or overlong values—return 400 with error code 10015. A request
2805
+ * already in progress with the same key returns 409; reusing the key with a
2806
+ * different request returns 422. Only successful responses are replayed, for up to
2807
+ * 24 hours. Do not include sensitive data in the key.
2808
+ */
2809
+ 'Idempotency-Key'?: string;
2679
2810
  }
2680
2811
 
2681
2812
  export interface MessageSendShortCodeParams {
2682
2813
  /**
2683
- * Phone number, in +E.164 format, used to send the message.
2814
+ * Body param: Phone number, in +E.164 format, used to send the message.
2684
2815
  */
2685
2816
  from: string;
2686
2817
 
2687
2818
  /**
2688
- * Receiving address (+E.164 formatted phone number or short code).
2819
+ * Body param: Receiving address (+E.164 formatted phone number or short code).
2689
2820
  */
2690
2821
  to: string;
2691
2822
 
2692
2823
  /**
2693
- * Automatically detect if an SMS message is unusually long and exceeds a
2694
- * recommended limit of message parts.
2824
+ * Body param: Automatically detect if an SMS message is unusually long and exceeds
2825
+ * a recommended limit of message parts.
2695
2826
  */
2696
2827
  auto_detect?: boolean;
2697
2828
 
2698
2829
  /**
2699
- * Encoding to use for the message. `auto` (default) uses smart encoding to
2700
- * automatically select the most efficient encoding. `gsm7` forces GSM-7 encoding
2701
- * (returns 400 if message contains characters that cannot be encoded). `ucs2`
2702
- * forces UCS-2 encoding and disables smart encoding. When set, this overrides the
2703
- * messaging profile's `smart_encoding` setting.
2830
+ * Body param: Encoding to use for the message. `auto` (default) uses smart
2831
+ * encoding to automatically select the most efficient encoding. `gsm7` forces
2832
+ * GSM-7 encoding (returns 400 if message contains characters that cannot be
2833
+ * encoded). `ucs2` forces UCS-2 encoding and disables smart encoding. When set,
2834
+ * this overrides the messaging profile's `smart_encoding` setting.
2704
2835
  */
2705
2836
  encoding?: 'auto' | 'gsm7' | 'ucs2';
2706
2837
 
2707
2838
  /**
2708
- * A list of media URLs. The total media size must be less than 1 MB.
2839
+ * Body param: A list of media URLs. The total media size must be less than 1 MB.
2709
2840
  *
2710
2841
  * **Required for MMS**
2711
2842
  */
2712
2843
  media_urls?: Array<string>;
2713
2844
 
2714
2845
  /**
2715
- * Subject of multimedia message
2846
+ * Body param: Subject of multimedia message
2716
2847
  */
2717
2848
  subject?: string;
2718
2849
 
2719
2850
  /**
2720
- * Message body (i.e., content) as a non-empty string.
2851
+ * Body param: Message body (i.e., content) as a non-empty string.
2721
2852
  *
2722
2853
  * **Required for SMS**
2723
2854
  */
2724
2855
  text?: string;
2725
2856
 
2726
2857
  /**
2727
- * The protocol for sending the message, either SMS or MMS.
2858
+ * Body param: The protocol for sending the message, either SMS or MMS.
2728
2859
  */
2729
2860
  type?: 'SMS' | 'MMS';
2730
2861
 
2731
2862
  /**
2732
- * If the profile this number is associated with has webhooks, use them for
2733
- * delivery notifications. If webhooks are also specified on the message itself,
2734
- * they will be attempted first, then those on the profile.
2863
+ * Body param: If the profile this number is associated with has webhooks, use them
2864
+ * for delivery notifications. If webhooks are also specified on the message
2865
+ * itself, they will be attempted first, then those on the profile.
2735
2866
  */
2736
2867
  use_profile_webhooks?: boolean;
2737
2868
 
2738
2869
  /**
2739
- * The failover URL where webhooks related to this message will be sent if sending
2740
- * to the primary URL fails.
2870
+ * Body param: The failover URL where webhooks related to this message will be sent
2871
+ * if sending to the primary URL fails.
2741
2872
  */
2742
2873
  webhook_failover_url?: string;
2743
2874
 
2744
2875
  /**
2745
- * The URL where webhooks related to this message will be sent.
2876
+ * Body param: The URL where webhooks related to this message will be sent.
2746
2877
  */
2747
2878
  webhook_url?: string;
2879
+
2880
+ /**
2881
+ * Header param: Optional opaque, unquoted key for safely retrying the same logical
2882
+ * request. Keys must contain 1 to 255 letters, numbers, hyphens, or underscores.
2883
+ * Generate a unique UUID v4 for each operation and reuse it only when retrying
2884
+ * that operation with the same request. Invalid headers—including duplicate,
2885
+ * empty, malformed, or overlong values—return 400 with error code 10015. A request
2886
+ * already in progress with the same key returns 409; reusing the key with a
2887
+ * different request returns 422. Only successful responses are replayed, for up to
2888
+ * 24 hours. Do not include sensitive data in the key.
2889
+ */
2890
+ 'Idempotency-Key'?: string;
2748
2891
  }
2749
2892
 
2750
2893
  export interface MessageSendGroupMmsParams {
2751
2894
  /**
2752
- * Phone number, in +E.164 format, used to send the message.
2895
+ * Body param: Phone number, in +E.164 format, used to send the message.
2753
2896
  */
2754
2897
  from: string;
2755
2898
 
2756
2899
  /**
2757
- * A list of destinations. No more than 8 destinations are allowed.
2900
+ * Body param: A list of destinations. No more than 8 destinations are allowed.
2758
2901
  */
2759
2902
  to: Array<string>;
2760
2903
 
2761
2904
  /**
2762
- * A list of media URLs. The total media size must be less than 1 MB.
2905
+ * Body param: A list of media URLs. The total media size must be less than 1 MB.
2763
2906
  */
2764
2907
  media_urls?: Array<string>;
2765
2908
 
2766
2909
  /**
2767
- * Subject of multimedia message
2910
+ * Body param: Subject of multimedia message
2768
2911
  */
2769
2912
  subject?: string;
2770
2913
 
2771
2914
  /**
2772
- * Message body (i.e., content) as a non-empty string.
2915
+ * Body param: Message body (i.e., content) as a non-empty string.
2773
2916
  */
2774
2917
  text?: string;
2775
2918
 
2776
2919
  /**
2777
- * If the profile this number is associated with has webhooks, use them for
2778
- * delivery notifications. If webhooks are also specified on the message itself,
2779
- * they will be attempted first, then those on the profile.
2920
+ * Body param: If the profile this number is associated with has webhooks, use them
2921
+ * for delivery notifications. If webhooks are also specified on the message
2922
+ * itself, they will be attempted first, then those on the profile.
2780
2923
  */
2781
2924
  use_profile_webhooks?: boolean;
2782
2925
 
2783
2926
  /**
2784
- * The failover URL where webhooks related to this message will be sent if sending
2785
- * to the primary URL fails.
2927
+ * Body param: The failover URL where webhooks related to this message will be sent
2928
+ * if sending to the primary URL fails.
2786
2929
  */
2787
2930
  webhook_failover_url?: string;
2788
2931
 
2789
2932
  /**
2790
- * The URL where webhooks related to this message will be sent.
2933
+ * Body param: The URL where webhooks related to this message will be sent.
2791
2934
  */
2792
2935
  webhook_url?: string;
2936
+
2937
+ /**
2938
+ * Header param: Optional opaque, unquoted key for safely retrying the same logical
2939
+ * request. Keys must contain 1 to 255 letters, numbers, hyphens, or underscores.
2940
+ * Generate a unique UUID v4 for each operation and reuse it only when retrying
2941
+ * that operation with the same request. Invalid headers—including duplicate,
2942
+ * empty, malformed, or overlong values—return 400 with error code 10015. A request
2943
+ * already in progress with the same key returns 409; reusing the key with a
2944
+ * different request returns 422. Only successful responses are replayed, for up to
2945
+ * 24 hours. Do not include sensitive data in the key.
2946
+ */
2947
+ 'Idempotency-Key'?: string;
2793
2948
  }
2794
2949
 
2795
2950
  export interface MessageScheduleParams {
@@ -2871,68 +3026,574 @@ export interface MessageScheduleParams {
2871
3026
 
2872
3027
  export interface MessageSendWithAlphanumericSenderParams {
2873
3028
  /**
2874
- * A valid alphanumeric sender ID on the user's account.
3029
+ * Body param: A valid alphanumeric sender ID on the user's account.
2875
3030
  */
2876
3031
  from: string;
2877
3032
 
2878
3033
  /**
2879
- * The messaging profile ID to use.
3034
+ * Body param: The messaging profile ID to use.
2880
3035
  */
2881
3036
  messaging_profile_id: string;
2882
3037
 
2883
3038
  /**
2884
- * The message body.
3039
+ * Body param: The message body.
2885
3040
  */
2886
3041
  text: string;
2887
3042
 
2888
3043
  /**
2889
- * Receiving address (+E.164 formatted phone number).
3044
+ * Body param: Receiving address (+E.164 formatted phone number).
2890
3045
  */
2891
3046
  to: string;
2892
3047
 
2893
3048
  /**
2894
- * If true, use the messaging profile's webhook settings.
3049
+ * Body param: If true, use the messaging profile's webhook settings.
2895
3050
  */
2896
3051
  use_profile_webhooks?: boolean;
2897
3052
 
2898
3053
  /**
2899
- * Failover callback URL for delivery status updates.
3054
+ * Body param: Failover callback URL for delivery status updates.
2900
3055
  */
2901
3056
  webhook_failover_url?: string | null;
2902
3057
 
2903
3058
  /**
2904
- * Callback URL for delivery status updates.
3059
+ * Body param: Callback URL for delivery status updates.
2905
3060
  */
2906
3061
  webhook_url?: string | null;
3062
+
3063
+ /**
3064
+ * Header param: Optional opaque, unquoted key for safely retrying the same logical
3065
+ * request. Keys must contain 1 to 255 letters, numbers, hyphens, or underscores.
3066
+ * Generate a unique UUID v4 for each operation and reuse it only when retrying
3067
+ * that operation with the same request. Invalid headers—including duplicate,
3068
+ * empty, malformed, or overlong values—return 400 with error code 10015. A request
3069
+ * already in progress with the same key returns 409; reusing the key with a
3070
+ * different request returns 422. Only successful responses are replayed, for up to
3071
+ * 24 hours. Do not include sensitive data in the key.
3072
+ */
3073
+ 'Idempotency-Key'?: string;
2907
3074
  }
2908
3075
 
2909
3076
  export interface MessageWhatsappParams {
2910
3077
  /**
2911
- * Phone number in +E.164 format associated with Whatsapp account
3078
+ * Body param: Phone number in +E.164 format associated with Whatsapp account
2912
3079
  */
2913
3080
  from: string;
2914
3081
 
2915
3082
  /**
2916
- * Phone number in +E.164 format
3083
+ * Body param: Recipient phone number in +E.164 format, or the business-scoped user
3084
+ * ID (BSUID) of a WhatsApp user who hides their phone number, for example
3085
+ * `US.13491208655302741918`. Authentication templates cannot be sent to a BSUID.
2917
3086
  */
2918
3087
  to: string;
2919
3088
 
2920
- whatsapp_message: WhatsappMessageContent;
3089
+ /**
3090
+ * Body param
3091
+ */
3092
+ whatsapp_message: MessageWhatsappParams.WhatsappMessage;
2921
3093
 
2922
3094
  /**
2923
- * Messaging profile ID - required if the 'from' number is not SMS-enabled
3095
+ * Body param: Messaging profile ID - required if the 'from' number is not
3096
+ * SMS-enabled
2924
3097
  */
2925
3098
  messaging_profile_id?: string;
2926
3099
 
2927
3100
  /**
2928
- * Message type - must be set to "WHATSAPP"
3101
+ * Body param: Message type - must be set to "WHATSAPP"
2929
3102
  */
2930
3103
  type?: 'WHATSAPP';
2931
3104
 
2932
3105
  /**
2933
- * The URL where webhooks related to this message will be sent.
3106
+ * Body param: The URL where webhooks related to this message will be sent.
2934
3107
  */
2935
3108
  webhook_url?: string;
3109
+
3110
+ /**
3111
+ * Header param: Optional opaque, unquoted key for safely retrying the same logical
3112
+ * request. Keys must contain 1 to 255 letters, numbers, hyphens, or underscores.
3113
+ * Generate a unique UUID v4 for each operation and reuse it only when retrying
3114
+ * that operation with the same request. Invalid headers—including duplicate,
3115
+ * empty, malformed, or overlong values—return 400 with error code 10015. A request
3116
+ * already in progress with the same key returns 409; reusing the key with a
3117
+ * different request returns 422. Only successful responses are replayed, for up to
3118
+ * 24 hours. Do not include sensitive data in the key.
3119
+ */
3120
+ 'Idempotency-Key'?: string;
3121
+ }
3122
+
3123
+ export namespace MessageWhatsappParams {
3124
+ export interface WhatsappMessage {
3125
+ audio?: MessagesAPI.WhatsappMedia;
3126
+
3127
+ /**
3128
+ * custom data to return with status update
3129
+ */
3130
+ biz_opaque_callback_data?: string;
3131
+
3132
+ contacts?: Array<WhatsappMessage.Contact>;
3133
+
3134
+ document?: MessagesAPI.WhatsappMedia;
3135
+
3136
+ image?: MessagesAPI.WhatsappMedia;
3137
+
3138
+ interactive?: WhatsappMessage.Interactive;
3139
+
3140
+ location?: MessagesAPI.WhatsappLocation;
3141
+
3142
+ reaction?: MessagesAPI.WhatsappReaction;
3143
+
3144
+ sticker?: MessagesAPI.WhatsappMedia;
3145
+
3146
+ /**
3147
+ * Template message object. Provide either template_id or name + language to
3148
+ * identify the template.
3149
+ */
3150
+ template?: WhatsappMessage.Template;
3151
+
3152
+ /**
3153
+ * Text message content. Can only be sent within a 24-hour customer service window.
3154
+ */
3155
+ text?: WhatsappMessage.Text;
3156
+
3157
+ type?:
3158
+ | 'audio'
3159
+ | 'document'
3160
+ | 'image'
3161
+ | 'sticker'
3162
+ | 'video'
3163
+ | 'interactive'
3164
+ | 'location'
3165
+ | 'template'
3166
+ | 'reaction'
3167
+ | 'contacts'
3168
+ | 'text';
3169
+
3170
+ video?: MessagesAPI.WhatsappMedia;
3171
+ }
3172
+
3173
+ export namespace WhatsappMessage {
3174
+ export interface Contact {
3175
+ addresses?: Array<Contact.Address>;
3176
+
3177
+ birthday?: string;
3178
+
3179
+ emails?: Array<Contact.Email>;
3180
+
3181
+ name?: Contact.Name;
3182
+
3183
+ org?: Contact.Org;
3184
+
3185
+ phones?: Array<Contact.Phone>;
3186
+
3187
+ urls?: Array<Contact.URL>;
3188
+ }
3189
+
3190
+ export namespace Contact {
3191
+ export interface Address {
3192
+ city?: string;
3193
+
3194
+ country?: string;
3195
+
3196
+ country_code?: string;
3197
+
3198
+ state?: string;
3199
+
3200
+ street?: string;
3201
+
3202
+ type?: string;
3203
+
3204
+ zip?: string;
3205
+ }
3206
+
3207
+ export interface Email {
3208
+ email?: string;
3209
+
3210
+ type?: string;
3211
+ }
3212
+
3213
+ export interface Name {
3214
+ /**
3215
+ * contact's full name as displayed in the message
3216
+ */
3217
+ formatted_name: string;
3218
+
3219
+ first_name?: string;
3220
+
3221
+ last_name?: string;
3222
+
3223
+ middle_name?: string;
3224
+
3225
+ prefix?: string;
3226
+
3227
+ suffix?: string;
3228
+ }
3229
+
3230
+ export interface Org {
3231
+ company?: string;
3232
+
3233
+ department?: string;
3234
+
3235
+ title?: string;
3236
+ }
3237
+
3238
+ export interface Phone {
3239
+ phone?: string;
3240
+
3241
+ type?: string;
3242
+
3243
+ wa_id?: string;
3244
+ }
3245
+
3246
+ export interface URL {
3247
+ type?: string;
3248
+
3249
+ url?: string;
3250
+ }
3251
+ }
3252
+
3253
+ export interface Interactive {
3254
+ action?: Interactive.Action;
3255
+
3256
+ body?: Interactive.Body;
3257
+
3258
+ footer?: Interactive.Footer;
3259
+
3260
+ header?: Interactive.Header;
3261
+
3262
+ type?: 'cta_url' | 'list' | 'carousel' | 'button' | 'location_request_message' | 'flow';
3263
+ }
3264
+
3265
+ export namespace Interactive {
3266
+ export interface Action {
3267
+ button?: string;
3268
+
3269
+ buttons?: Array<Action.Button>;
3270
+
3271
+ cards?: Array<Action.Card>;
3272
+
3273
+ catalog_id?: string;
3274
+
3275
+ mode?: string;
3276
+
3277
+ name?: string;
3278
+
3279
+ parameters?: Action.Parameters;
3280
+
3281
+ product_retailer_id?: string;
3282
+
3283
+ sections?: Array<Action.Section>;
3284
+ }
3285
+
3286
+ export namespace Action {
3287
+ export interface Button {
3288
+ reply?: Button.Reply;
3289
+
3290
+ type?: 'reply';
3291
+ }
3292
+
3293
+ export namespace Button {
3294
+ export interface Reply {
3295
+ /**
3296
+ * unique identifier for each button, 256 character maximum
3297
+ */
3298
+ id?: string;
3299
+
3300
+ /**
3301
+ * button label, 20 character maximum
3302
+ */
3303
+ title?: string;
3304
+ }
3305
+ }
3306
+
3307
+ export interface Card {
3308
+ action?: Card.Action;
3309
+
3310
+ body?: Card.Body;
3311
+
3312
+ /**
3313
+ * unique index for each card (0-9)
3314
+ */
3315
+ card_index?: number;
3316
+
3317
+ header?: Card.Header;
3318
+
3319
+ type?: 'cta_url';
3320
+ }
3321
+
3322
+ export namespace Card {
3323
+ export interface Action {
3324
+ /**
3325
+ * the unique ID of the catalog
3326
+ */
3327
+ catalog_id?: string;
3328
+
3329
+ /**
3330
+ * the unique retailer ID of the product
3331
+ */
3332
+ product_retailer_id?: string;
3333
+ }
3334
+
3335
+ export interface Body {
3336
+ /**
3337
+ * 160 character maximum, up to 2 line breaks
3338
+ */
3339
+ text?: string;
3340
+ }
3341
+
3342
+ export interface Header {
3343
+ image?: MessagesAPI.WhatsappMedia;
3344
+
3345
+ type?: 'image' | 'video';
3346
+
3347
+ video?: MessagesAPI.WhatsappMedia;
3348
+ }
3349
+ }
3350
+
3351
+ export interface Parameters {
3352
+ /**
3353
+ * button label text, 20 character maximum
3354
+ */
3355
+ display_text?: string;
3356
+
3357
+ /**
3358
+ * how the flow starts. navigate opens the screen in flow_action_payload;
3359
+ * data_exchange requests the first screen from the business's flow endpoint.
3360
+ * Defaults to navigate
3361
+ */
3362
+ flow_action?: 'navigate' | 'data_exchange';
3363
+
3364
+ /**
3365
+ * optional initial screen and data. When omitted, the flow opens on its first
3366
+ * entry screen. Must be omitted when flow_action is data_exchange
3367
+ */
3368
+ flow_action_payload?: Parameters.FlowActionPayload;
3369
+
3370
+ /**
3371
+ * text of the button that opens the flow, 1-20 characters, no emoji. Required for
3372
+ * flow messages
3373
+ */
3374
+ flow_cta?: string;
3375
+
3376
+ /**
3377
+ * ID of the flow to open. Provide exactly one of flow_id or flow_name
3378
+ */
3379
+ flow_id?: string;
3380
+
3381
+ /**
3382
+ * flow message version, must be 3. Required for flow messages
3383
+ */
3384
+ flow_message_version?: string;
3385
+
3386
+ /**
3387
+ * name of the flow to open. Provide exactly one of flow_id or flow_name
3388
+ */
3389
+ flow_name?: string;
3390
+
3391
+ /**
3392
+ * business-generated identifier for the flow session. Returned in the flow
3393
+ * response for correlation
3394
+ */
3395
+ flow_token?: string;
3396
+
3397
+ /**
3398
+ * use draft to test an unpublished flow. Defaults to published
3399
+ */
3400
+ mode?: 'draft' | 'published';
3401
+
3402
+ /**
3403
+ * button URL to load when tapped by the user
3404
+ */
3405
+ url?: string;
3406
+ }
3407
+
3408
+ export namespace Parameters {
3409
+ /**
3410
+ * optional initial screen and data. When omitted, the flow opens on its first
3411
+ * entry screen. Must be omitted when flow_action is data_exchange
3412
+ */
3413
+ export interface FlowActionPayload {
3414
+ /**
3415
+ * input data for the first screen. Must be a non-empty object when provided
3416
+ */
3417
+ data?: unknown;
3418
+
3419
+ /**
3420
+ * ID of the first screen to show
3421
+ */
3422
+ screen?: string;
3423
+ }
3424
+ }
3425
+
3426
+ export interface Section {
3427
+ product_items?: Array<Section.ProductItem>;
3428
+
3429
+ rows?: Array<Section.Row>;
3430
+
3431
+ /**
3432
+ * section title, 24 character maximum
3433
+ */
3434
+ title?: string;
3435
+ }
3436
+
3437
+ export namespace Section {
3438
+ export interface ProductItem {
3439
+ product_retailer_id?: string;
3440
+ }
3441
+
3442
+ export interface Row {
3443
+ /**
3444
+ * arbitrary string identifying the row, 200 character maximum
3445
+ */
3446
+ id?: string;
3447
+
3448
+ /**
3449
+ * row description, 72 character maximum
3450
+ */
3451
+ description?: string;
3452
+
3453
+ /**
3454
+ * row title, 24 character maximum
3455
+ */
3456
+ title?: string;
3457
+ }
3458
+ }
3459
+ }
3460
+
3461
+ export interface Body {
3462
+ /**
3463
+ * body text, 1024 character maximum
3464
+ */
3465
+ text?: string;
3466
+ }
3467
+
3468
+ export interface Footer {
3469
+ /**
3470
+ * footer text, 60 character maximum
3471
+ */
3472
+ text?: string;
3473
+ }
3474
+
3475
+ export interface Header {
3476
+ /**
3477
+ * header type. Required when a header is provided; the matching document, image,
3478
+ * text, or video field must be set
3479
+ */
3480
+ type: 'document' | 'image' | 'text' | 'video';
3481
+
3482
+ document?: MessagesAPI.WhatsappMedia;
3483
+
3484
+ image?: MessagesAPI.WhatsappMedia;
3485
+
3486
+ sub_text?: string;
3487
+
3488
+ /**
3489
+ * header text, 60 character maximum
3490
+ */
3491
+ text?: string;
3492
+
3493
+ video?: MessagesAPI.WhatsappMedia;
3494
+ }
3495
+ }
3496
+
3497
+ /**
3498
+ * Template message object. Provide either template_id or name + language to
3499
+ * identify the template.
3500
+ */
3501
+ export interface Template {
3502
+ /**
3503
+ * Template parameter values for header, body, and button components.
3504
+ */
3505
+ components?: Array<Template.Component>;
3506
+
3507
+ /**
3508
+ * Template language. Required unless template_id is provided.
3509
+ */
3510
+ language?: Template.Language;
3511
+
3512
+ /**
3513
+ * Template name as registered with Meta. Required unless template_id is provided.
3514
+ */
3515
+ name?: string;
3516
+
3517
+ /**
3518
+ * Telnyx template ID (the id field from template list/get responses). When
3519
+ * provided, name and language are resolved automatically.
3520
+ */
3521
+ template_id?: string;
3522
+ }
3523
+
3524
+ export namespace Template {
3525
+ export interface Component {
3526
+ /**
3527
+ * Button index (required for button components)
3528
+ */
3529
+ index?: number;
3530
+
3531
+ parameters?: Array<Component.Parameter>;
3532
+
3533
+ sub_type?: 'quick_reply' | 'url' | 'flow';
3534
+
3535
+ type?: 'header' | 'body' | 'button';
3536
+ }
3537
+
3538
+ export namespace Component {
3539
+ export interface Parameter {
3540
+ /**
3541
+ * Flow button parameters. Used with type action on a flow button component
3542
+ */
3543
+ action?: Parameter.Action;
3544
+
3545
+ text?: string;
3546
+
3547
+ type?: 'text' | 'image' | 'video' | 'document' | 'currency' | 'date_time' | 'action';
3548
+ }
3549
+
3550
+ export namespace Parameter {
3551
+ /**
3552
+ * Flow button parameters. Used with type action on a flow button component
3553
+ */
3554
+ export interface Action {
3555
+ /**
3556
+ * input data for the first screen of the flow
3557
+ */
3558
+ flow_action_data?: unknown;
3559
+
3560
+ /**
3561
+ * business-generated identifier for the flow session. Returned in the flow
3562
+ * response for correlation
3563
+ */
3564
+ flow_token?: string;
3565
+ }
3566
+ }
3567
+ }
3568
+
3569
+ /**
3570
+ * Template language. Required unless template_id is provided.
3571
+ */
3572
+ export interface Language {
3573
+ /**
3574
+ * Language code (e.g. en_US)
3575
+ */
3576
+ code: string;
3577
+
3578
+ policy?: string;
3579
+ }
3580
+ }
3581
+
3582
+ /**
3583
+ * Text message content. Can only be sent within a 24-hour customer service window.
3584
+ */
3585
+ export interface Text {
3586
+ /**
3587
+ * The text message body.
3588
+ */
3589
+ body: string;
3590
+
3591
+ /**
3592
+ * Whether to show a URL preview in the message.
3593
+ */
3594
+ preview_url?: boolean;
3595
+ }
3596
+ }
2936
3597
  }
2937
3598
 
2938
3599
  Messages.Rcs = Rcs;