telnyx 7.21.0 → 7.23.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 (476) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/client.d.mts +39 -6
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +39 -6
  5. package/client.d.ts.map +1 -1
  6. package/client.js +33 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +33 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/ai/ai.d.mts +8 -4
  12. package/resources/ai/ai.d.mts.map +1 -1
  13. package/resources/ai/ai.d.ts +8 -4
  14. package/resources/ai/ai.d.ts.map +1 -1
  15. package/resources/ai/ai.js +4 -0
  16. package/resources/ai/ai.js.map +1 -1
  17. package/resources/ai/ai.mjs +5 -1
  18. package/resources/ai/ai.mjs.map +1 -1
  19. package/resources/ai/assistants/assistants.d.mts +408 -47
  20. package/resources/ai/assistants/assistants.d.mts.map +1 -1
  21. package/resources/ai/assistants/assistants.d.ts +408 -47
  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 +59 -12
  32. package/resources/ai/assistants/versions.d.mts.map +1 -1
  33. package/resources/ai/assistants/versions.d.ts +59 -12
  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 +59 -28
  42. package/resources/ai/chat.d.mts.map +1 -1
  43. package/resources/ai/chat.d.ts +59 -28
  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/index.d.mts +3 -2
  48. package/resources/ai/index.d.mts.map +1 -1
  49. package/resources/ai/index.d.ts +3 -2
  50. package/resources/ai/index.d.ts.map +1 -1
  51. package/resources/ai/index.js +3 -1
  52. package/resources/ai/index.js.map +1 -1
  53. package/resources/ai/index.mjs +2 -1
  54. package/resources/ai/index.mjs.map +1 -1
  55. package/resources/ai/openai/chat.d.mts +67 -29
  56. package/resources/ai/openai/chat.d.mts.map +1 -1
  57. package/resources/ai/openai/chat.d.ts +67 -29
  58. package/resources/ai/openai/chat.d.ts.map +1 -1
  59. package/resources/ai/openai/chat.js.map +1 -1
  60. package/resources/ai/openai/chat.mjs.map +1 -1
  61. package/resources/ai/openai/index.d.mts +1 -1
  62. package/resources/ai/openai/index.d.mts.map +1 -1
  63. package/resources/ai/openai/index.d.ts +1 -1
  64. package/resources/ai/openai/index.d.ts.map +1 -1
  65. package/resources/ai/openai/index.js.map +1 -1
  66. package/resources/ai/openai/index.mjs +1 -1
  67. package/resources/ai/openai/index.mjs.map +1 -1
  68. package/resources/ai/openai/openai.d.mts +2 -2
  69. package/resources/ai/openai/openai.d.mts.map +1 -1
  70. package/resources/ai/openai/openai.d.ts +2 -2
  71. package/resources/ai/openai/openai.d.ts.map +1 -1
  72. package/resources/ai/openai/openai.js.map +1 -1
  73. package/resources/ai/openai/openai.mjs.map +1 -1
  74. package/resources/ai/typesafe/index.d.mts +3 -0
  75. package/resources/ai/typesafe/index.d.mts.map +1 -0
  76. package/resources/ai/typesafe/index.d.ts +3 -0
  77. package/resources/ai/typesafe/index.d.ts.map +1 -0
  78. package/resources/ai/typesafe/index.js +9 -0
  79. package/resources/ai/typesafe/index.js.map +1 -0
  80. package/resources/ai/typesafe/index.mjs +4 -0
  81. package/resources/ai/typesafe/index.mjs.map +1 -0
  82. package/resources/ai/typesafe/typesafe.d.mts +10 -0
  83. package/resources/ai/typesafe/typesafe.d.mts.map +1 -0
  84. package/resources/ai/typesafe/typesafe.d.ts +10 -0
  85. package/resources/ai/typesafe/typesafe.d.ts.map +1 -0
  86. package/resources/ai/typesafe/typesafe.js +17 -0
  87. package/resources/ai/typesafe/typesafe.js.map +1 -0
  88. package/resources/ai/typesafe/typesafe.mjs +12 -0
  89. package/resources/ai/typesafe/typesafe.mjs.map +1 -0
  90. package/resources/ai/typesafe/v1.d.mts +274 -0
  91. package/resources/ai/typesafe/v1.d.mts.map +1 -0
  92. package/resources/ai/typesafe/v1.d.ts +274 -0
  93. package/resources/ai/typesafe/v1.d.ts.map +1 -0
  94. package/resources/ai/typesafe/v1.js +67 -0
  95. package/resources/ai/typesafe/v1.js.map +1 -0
  96. package/resources/ai/typesafe/v1.mjs +63 -0
  97. package/resources/ai/typesafe/v1.mjs.map +1 -0
  98. package/resources/ai/typesafe.d.mts +2 -0
  99. package/resources/ai/typesafe.d.mts.map +1 -0
  100. package/resources/ai/typesafe.d.ts +2 -0
  101. package/resources/ai/typesafe.d.ts.map +1 -0
  102. package/resources/ai/typesafe.js +6 -0
  103. package/resources/ai/typesafe.js.map +1 -0
  104. package/resources/ai/typesafe.mjs +3 -0
  105. package/resources/ai/typesafe.mjs.map +1 -0
  106. package/resources/bot-challenge.d.mts +80 -0
  107. package/resources/bot-challenge.d.mts.map +1 -0
  108. package/resources/bot-challenge.d.ts +80 -0
  109. package/resources/bot-challenge.d.ts.map +1 -0
  110. package/resources/bot-challenge.js +35 -0
  111. package/resources/bot-challenge.js.map +1 -0
  112. package/resources/bot-challenge.mjs +31 -0
  113. package/resources/bot-challenge.mjs.map +1 -0
  114. package/resources/bot-sessions.d.mts +49 -0
  115. package/resources/bot-sessions.d.mts.map +1 -0
  116. package/resources/bot-sessions.d.ts +49 -0
  117. package/resources/bot-sessions.d.ts.map +1 -0
  118. package/resources/bot-sessions.js +28 -0
  119. package/resources/bot-sessions.js.map +1 -0
  120. package/resources/bot-sessions.mjs +24 -0
  121. package/resources/bot-sessions.mjs.map +1 -0
  122. package/resources/bot-signup.d.mts +114 -0
  123. package/resources/bot-signup.d.mts.map +1 -0
  124. package/resources/bot-signup.d.ts +114 -0
  125. package/resources/bot-signup.d.ts.map +1 -0
  126. package/resources/bot-signup.js +63 -0
  127. package/resources/bot-signup.js.map +1 -0
  128. package/resources/bot-signup.mjs +59 -0
  129. package/resources/bot-signup.mjs.map +1 -0
  130. package/resources/calls/actions.d.mts +57 -11
  131. package/resources/calls/actions.d.mts.map +1 -1
  132. package/resources/calls/actions.d.ts +57 -11
  133. package/resources/calls/actions.d.ts.map +1 -1
  134. package/resources/calls/calls.d.mts +45 -5
  135. package/resources/calls/calls.d.mts.map +1 -1
  136. package/resources/calls/calls.d.ts +45 -5
  137. package/resources/calls/calls.d.ts.map +1 -1
  138. package/resources/calls/calls.js.map +1 -1
  139. package/resources/calls/calls.mjs.map +1 -1
  140. package/resources/compute/compute.d.mts +10 -0
  141. package/resources/compute/compute.d.mts.map +1 -0
  142. package/resources/compute/compute.d.ts +10 -0
  143. package/resources/compute/compute.d.ts.map +1 -0
  144. package/resources/compute/compute.js +17 -0
  145. package/resources/compute/compute.js.map +1 -0
  146. package/resources/compute/compute.mjs +12 -0
  147. package/resources/compute/compute.mjs.map +1 -0
  148. package/resources/compute/funcs/export.d.mts +121 -0
  149. package/resources/compute/funcs/export.d.mts.map +1 -0
  150. package/resources/compute/funcs/export.d.ts +121 -0
  151. package/resources/compute/funcs/export.d.ts.map +1 -0
  152. package/resources/compute/funcs/export.js +68 -0
  153. package/resources/compute/funcs/export.js.map +1 -0
  154. package/resources/compute/funcs/export.mjs +64 -0
  155. package/resources/compute/funcs/export.mjs.map +1 -0
  156. package/resources/compute/funcs/funcs.d.mts +214 -0
  157. package/resources/compute/funcs/funcs.d.mts.map +1 -0
  158. package/resources/compute/funcs/funcs.d.ts +214 -0
  159. package/resources/compute/funcs/funcs.d.ts.map +1 -0
  160. package/resources/compute/funcs/funcs.js +80 -0
  161. package/resources/compute/funcs/funcs.js.map +1 -0
  162. package/resources/compute/funcs/funcs.mjs +75 -0
  163. package/resources/compute/funcs/funcs.mjs.map +1 -0
  164. package/resources/compute/funcs/index.d.mts +3 -0
  165. package/resources/compute/funcs/index.d.mts.map +1 -0
  166. package/resources/compute/funcs/index.d.ts +3 -0
  167. package/resources/compute/funcs/index.d.ts.map +1 -0
  168. package/resources/compute/funcs/index.js +9 -0
  169. package/resources/compute/funcs/index.js.map +1 -0
  170. package/resources/compute/funcs/index.mjs +4 -0
  171. package/resources/compute/funcs/index.mjs.map +1 -0
  172. package/resources/compute/funcs.d.mts +2 -0
  173. package/resources/compute/funcs.d.mts.map +1 -0
  174. package/resources/compute/funcs.d.ts +2 -0
  175. package/resources/compute/funcs.d.ts.map +1 -0
  176. package/resources/compute/funcs.js +6 -0
  177. package/resources/compute/funcs.js.map +1 -0
  178. package/resources/compute/funcs.mjs +3 -0
  179. package/resources/compute/funcs.mjs.map +1 -0
  180. package/resources/compute/index.d.mts +3 -0
  181. package/resources/compute/index.d.mts.map +1 -0
  182. package/resources/compute/index.d.ts +3 -0
  183. package/resources/compute/index.d.ts.map +1 -0
  184. package/resources/compute/index.js +9 -0
  185. package/resources/compute/index.js.map +1 -0
  186. package/resources/compute/index.mjs +4 -0
  187. package/resources/compute/index.mjs.map +1 -0
  188. package/resources/compute.d.mts +2 -0
  189. package/resources/compute.d.mts.map +1 -0
  190. package/resources/compute.d.ts +2 -0
  191. package/resources/compute.d.ts.map +1 -0
  192. package/resources/compute.js +6 -0
  193. package/resources/compute.js.map +1 -0
  194. package/resources/compute.mjs +3 -0
  195. package/resources/compute.mjs.map +1 -0
  196. package/resources/connections.d.mts +109 -1
  197. package/resources/connections.d.mts.map +1 -1
  198. package/resources/connections.d.ts +109 -1
  199. package/resources/connections.d.ts.map +1 -1
  200. package/resources/connections.js +8 -0
  201. package/resources/connections.js.map +1 -1
  202. package/resources/connections.mjs +8 -0
  203. package/resources/connections.mjs.map +1 -1
  204. package/resources/credential-connections/credential-connections.d.mts +4 -1
  205. package/resources/credential-connections/credential-connections.d.mts.map +1 -1
  206. package/resources/credential-connections/credential-connections.d.ts +4 -1
  207. package/resources/credential-connections/credential-connections.d.ts.map +1 -1
  208. package/resources/credential-connections/credential-connections.js.map +1 -1
  209. package/resources/credential-connections/credential-connections.mjs.map +1 -1
  210. package/resources/detail-records.d.mts +18 -1
  211. package/resources/detail-records.d.mts.map +1 -1
  212. package/resources/detail-records.d.ts +18 -1
  213. package/resources/detail-records.d.ts.map +1 -1
  214. package/resources/email-inboxes/drafts.d.mts +7 -0
  215. package/resources/email-inboxes/drafts.d.mts.map +1 -1
  216. package/resources/email-inboxes/drafts.d.ts +7 -0
  217. package/resources/email-inboxes/drafts.d.ts.map +1 -1
  218. package/resources/email-messages/email-messages.d.mts +9 -3
  219. package/resources/email-messages/email-messages.d.mts.map +1 -1
  220. package/resources/email-messages/email-messages.d.ts +9 -3
  221. package/resources/email-messages/email-messages.d.ts.map +1 -1
  222. package/resources/email-messages/email-messages.js +5 -1
  223. package/resources/email-messages/email-messages.js.map +1 -1
  224. package/resources/email-messages/email-messages.mjs +5 -1
  225. package/resources/email-messages/email-messages.mjs.map +1 -1
  226. package/resources/fqdn-connections/fqdn-authentication.d.mts +4 -1
  227. package/resources/fqdn-connections/fqdn-authentication.d.mts.map +1 -1
  228. package/resources/fqdn-connections/fqdn-authentication.d.ts +4 -1
  229. package/resources/fqdn-connections/fqdn-authentication.d.ts.map +1 -1
  230. package/resources/fqdn-connections/fqdn-connections.d.mts +4 -1
  231. package/resources/fqdn-connections/fqdn-connections.d.mts.map +1 -1
  232. package/resources/fqdn-connections/fqdn-connections.d.ts +4 -1
  233. package/resources/fqdn-connections/fqdn-connections.d.ts.map +1 -1
  234. package/resources/fqdn-connections/fqdn-connections.js.map +1 -1
  235. package/resources/fqdn-connections/fqdn-connections.mjs.map +1 -1
  236. package/resources/index.d.mts +9 -3
  237. package/resources/index.d.mts.map +1 -1
  238. package/resources/index.d.ts +9 -3
  239. package/resources/index.d.ts.map +1 -1
  240. package/resources/index.js +16 -4
  241. package/resources/index.js.map +1 -1
  242. package/resources/index.mjs +6 -0
  243. package/resources/index.mjs.map +1 -1
  244. package/resources/machine-payments.d.mts +142 -0
  245. package/resources/machine-payments.d.mts.map +1 -0
  246. package/resources/machine-payments.d.ts +142 -0
  247. package/resources/machine-payments.d.ts.map +1 -0
  248. package/resources/machine-payments.js +56 -0
  249. package/resources/machine-payments.js.map +1 -0
  250. package/resources/machine-payments.mjs +52 -0
  251. package/resources/machine-payments.mjs.map +1 -0
  252. package/resources/messages/messages.d.mts +207 -22
  253. package/resources/messages/messages.d.mts.map +1 -1
  254. package/resources/messages/messages.d.ts +207 -22
  255. package/resources/messages/messages.d.ts.map +1 -1
  256. package/resources/messages/messages.js.map +1 -1
  257. package/resources/messages/messages.mjs.map +1 -1
  258. package/resources/messaging-profiles/index.d.mts +1 -1
  259. package/resources/messaging-profiles/index.d.mts.map +1 -1
  260. package/resources/messaging-profiles/index.d.ts +1 -1
  261. package/resources/messaging-profiles/index.d.ts.map +1 -1
  262. package/resources/messaging-profiles/index.js.map +1 -1
  263. package/resources/messaging-profiles/index.mjs.map +1 -1
  264. package/resources/messaging-profiles/messaging-profiles.d.mts +34 -1
  265. package/resources/messaging-profiles/messaging-profiles.d.mts.map +1 -1
  266. package/resources/messaging-profiles/messaging-profiles.d.ts +34 -1
  267. package/resources/messaging-profiles/messaging-profiles.d.ts.map +1 -1
  268. package/resources/messaging-profiles/messaging-profiles.js.map +1 -1
  269. package/resources/messaging-profiles/messaging-profiles.mjs.map +1 -1
  270. package/resources/noise-suppression-engines.d.mts +42 -0
  271. package/resources/noise-suppression-engines.d.mts.map +1 -0
  272. package/resources/noise-suppression-engines.d.ts +42 -0
  273. package/resources/noise-suppression-engines.d.ts.map +1 -0
  274. package/resources/noise-suppression-engines.js +21 -0
  275. package/resources/noise-suppression-engines.js.map +1 -0
  276. package/resources/noise-suppression-engines.mjs +17 -0
  277. package/resources/noise-suppression-engines.mjs.map +1 -0
  278. package/resources/speech-to-text/speech-to-text.d.mts +1 -1
  279. package/resources/speech-to-text/speech-to-text.d.mts.map +1 -1
  280. package/resources/speech-to-text/speech-to-text.d.ts +1 -1
  281. package/resources/speech-to-text/speech-to-text.d.ts.map +1 -1
  282. package/resources/texml/accounts/calls/calls.d.mts +117 -0
  283. package/resources/texml/accounts/calls/calls.d.mts.map +1 -1
  284. package/resources/texml/accounts/calls/calls.d.ts +117 -0
  285. package/resources/texml/accounts/calls/calls.d.ts.map +1 -1
  286. package/resources/texml/accounts/calls/calls.js.map +1 -1
  287. package/resources/texml/accounts/calls/calls.mjs.map +1 -1
  288. package/resources/texml/accounts/conferences/participants.d.mts +39 -0
  289. package/resources/texml/accounts/conferences/participants.d.mts.map +1 -1
  290. package/resources/texml/accounts/conferences/participants.d.ts +39 -0
  291. package/resources/texml/accounts/conferences/participants.d.ts.map +1 -1
  292. package/resources/texml/calls.d.mts +71 -0
  293. package/resources/texml/calls.d.mts.map +1 -0
  294. package/resources/texml/calls.d.ts +71 -0
  295. package/resources/texml/calls.d.ts.map +1 -0
  296. package/resources/texml/calls.js +33 -0
  297. package/resources/texml/calls.js.map +1 -0
  298. package/resources/texml/calls.mjs +29 -0
  299. package/resources/texml/calls.mjs.map +1 -0
  300. package/resources/texml/index.d.mts +1 -0
  301. package/resources/texml/index.d.mts.map +1 -1
  302. package/resources/texml/index.d.ts +1 -0
  303. package/resources/texml/index.d.ts.map +1 -1
  304. package/resources/texml/index.js +3 -1
  305. package/resources/texml/index.js.map +1 -1
  306. package/resources/texml/index.mjs +1 -0
  307. package/resources/texml/index.mjs.map +1 -1
  308. package/resources/texml/texml.d.mts +43 -0
  309. package/resources/texml/texml.d.mts.map +1 -1
  310. package/resources/texml/texml.d.ts +43 -0
  311. package/resources/texml/texml.d.ts.map +1 -1
  312. package/resources/texml/texml.js +4 -0
  313. package/resources/texml/texml.js.map +1 -1
  314. package/resources/texml/texml.mjs +4 -0
  315. package/resources/texml/texml.mjs.map +1 -1
  316. package/resources/uac-connections/uac-connections.d.mts +9 -2
  317. package/resources/uac-connections/uac-connections.d.mts.map +1 -1
  318. package/resources/uac-connections/uac-connections.d.ts +9 -2
  319. package/resources/uac-connections/uac-connections.d.ts.map +1 -1
  320. package/resources/uac-connections/uac-connections.js.map +1 -1
  321. package/resources/uac-connections/uac-connections.mjs.map +1 -1
  322. package/resources/voice-clones.d.mts +6 -4
  323. package/resources/voice-clones.d.mts.map +1 -1
  324. package/resources/voice-clones.d.ts +6 -4
  325. package/resources/voice-clones.d.ts.map +1 -1
  326. package/resources/voice-clones.js +4 -2
  327. package/resources/voice-clones.js.map +1 -1
  328. package/resources/voice-clones.mjs +4 -2
  329. package/resources/voice-clones.mjs.map +1 -1
  330. package/resources/webhooks.d.mts +154 -51
  331. package/resources/webhooks.d.mts.map +1 -1
  332. package/resources/webhooks.d.ts +154 -51
  333. package/resources/webhooks.d.ts.map +1 -1
  334. package/resources/whatsapp/business-accounts/phone-numbers.d.mts +33 -0
  335. package/resources/whatsapp/business-accounts/phone-numbers.d.mts.map +1 -1
  336. package/resources/whatsapp/business-accounts/phone-numbers.d.ts +33 -0
  337. package/resources/whatsapp/business-accounts/phone-numbers.d.ts.map +1 -1
  338. package/resources/whatsapp/index.d.mts +1 -1
  339. package/resources/whatsapp/index.d.mts.map +1 -1
  340. package/resources/whatsapp/index.d.ts +1 -1
  341. package/resources/whatsapp/index.d.ts.map +1 -1
  342. package/resources/whatsapp/index.js.map +1 -1
  343. package/resources/whatsapp/index.mjs.map +1 -1
  344. package/resources/whatsapp/phone-numbers/index.d.mts +1 -1
  345. package/resources/whatsapp/phone-numbers/index.d.mts.map +1 -1
  346. package/resources/whatsapp/phone-numbers/index.d.ts +1 -1
  347. package/resources/whatsapp/phone-numbers/index.d.ts.map +1 -1
  348. package/resources/whatsapp/phone-numbers/index.js.map +1 -1
  349. package/resources/whatsapp/phone-numbers/index.mjs.map +1 -1
  350. package/resources/whatsapp/phone-numbers/phone-numbers.d.mts +147 -1
  351. package/resources/whatsapp/phone-numbers/phone-numbers.d.mts.map +1 -1
  352. package/resources/whatsapp/phone-numbers/phone-numbers.d.ts +147 -1
  353. package/resources/whatsapp/phone-numbers/phone-numbers.d.ts.map +1 -1
  354. package/resources/whatsapp/phone-numbers/phone-numbers.js +16 -0
  355. package/resources/whatsapp/phone-numbers/phone-numbers.js.map +1 -1
  356. package/resources/whatsapp/phone-numbers/phone-numbers.mjs +16 -0
  357. package/resources/whatsapp/phone-numbers/phone-numbers.mjs.map +1 -1
  358. package/resources/whatsapp/whatsapp.d.mts +2 -2
  359. package/resources/whatsapp/whatsapp.d.mts.map +1 -1
  360. package/resources/whatsapp/whatsapp.d.ts +2 -2
  361. package/resources/whatsapp/whatsapp.d.ts.map +1 -1
  362. package/resources/whatsapp/whatsapp.js.map +1 -1
  363. package/resources/whatsapp/whatsapp.mjs.map +1 -1
  364. package/resources/x402/credit-account/credit-account.d.mts +226 -0
  365. package/resources/x402/credit-account/credit-account.d.mts.map +1 -0
  366. package/resources/x402/credit-account/credit-account.d.ts +226 -0
  367. package/resources/x402/credit-account/credit-account.d.ts.map +1 -0
  368. package/resources/x402/credit-account/credit-account.js +66 -0
  369. package/resources/x402/credit-account/credit-account.js.map +1 -0
  370. package/resources/x402/credit-account/credit-account.mjs +61 -0
  371. package/resources/x402/credit-account/credit-account.mjs.map +1 -0
  372. package/resources/x402/credit-account/index.d.mts +3 -0
  373. package/resources/x402/credit-account/index.d.mts.map +1 -0
  374. package/resources/x402/credit-account/index.d.ts +3 -0
  375. package/resources/x402/credit-account/index.d.ts.map +1 -0
  376. package/resources/x402/credit-account/index.js +9 -0
  377. package/resources/x402/credit-account/index.js.map +1 -0
  378. package/resources/x402/credit-account/index.mjs +4 -0
  379. package/resources/x402/credit-account/index.mjs.map +1 -0
  380. package/resources/x402/credit-account/payments.d.mts +90 -0
  381. package/resources/x402/credit-account/payments.d.mts.map +1 -0
  382. package/resources/x402/credit-account/payments.d.ts +90 -0
  383. package/resources/x402/credit-account/payments.d.ts.map +1 -0
  384. package/resources/x402/credit-account/payments.js +47 -0
  385. package/resources/x402/credit-account/payments.js.map +1 -0
  386. package/resources/x402/credit-account/payments.mjs +43 -0
  387. package/resources/x402/credit-account/payments.mjs.map +1 -0
  388. package/resources/x402/credit-account.d.mts +1 -221
  389. package/resources/x402/credit-account.d.mts.map +1 -1
  390. package/resources/x402/credit-account.d.ts +1 -221
  391. package/resources/x402/credit-account.d.ts.map +1 -1
  392. package/resources/x402/credit-account.js +2 -54
  393. package/resources/x402/credit-account.js.map +1 -1
  394. package/resources/x402/credit-account.mjs +1 -52
  395. package/resources/x402/credit-account.mjs.map +1 -1
  396. package/resources/x402/index.d.mts +1 -1
  397. package/resources/x402/index.d.mts.map +1 -1
  398. package/resources/x402/index.d.ts +1 -1
  399. package/resources/x402/index.d.ts.map +1 -1
  400. package/resources/x402/index.js +2 -2
  401. package/resources/x402/index.js.map +1 -1
  402. package/resources/x402/index.mjs +1 -1
  403. package/resources/x402/index.mjs.map +1 -1
  404. package/resources/x402/x402.d.mts +2 -2
  405. package/resources/x402/x402.d.mts.map +1 -1
  406. package/resources/x402/x402.d.ts +2 -2
  407. package/resources/x402/x402.d.ts.map +1 -1
  408. package/resources/x402/x402.js +2 -2
  409. package/resources/x402/x402.js.map +1 -1
  410. package/resources/x402/x402.mjs +2 -2
  411. package/resources/x402/x402.mjs.map +1 -1
  412. package/src/client.ts +91 -0
  413. package/src/resources/ai/ai.ts +15 -1
  414. package/src/resources/ai/assistants/assistants.ts +454 -45
  415. package/src/resources/ai/assistants/index.ts +1 -0
  416. package/src/resources/ai/assistants/versions.ts +61 -12
  417. package/src/resources/ai/audio.ts +93 -45
  418. package/src/resources/ai/chat.ts +66 -29
  419. package/src/resources/ai/index.ts +8 -1
  420. package/src/resources/ai/openai/chat.ts +75 -29
  421. package/src/resources/ai/openai/index.ts +6 -1
  422. package/src/resources/ai/openai/openai.ts +2 -1
  423. package/src/resources/ai/typesafe/index.ts +4 -0
  424. package/src/resources/ai/typesafe/typesafe.ts +19 -0
  425. package/src/resources/ai/typesafe/v1.ts +298 -0
  426. package/src/resources/ai/typesafe.ts +3 -0
  427. package/src/resources/bot-challenge.ts +101 -0
  428. package/src/resources/bot-sessions.ts +61 -0
  429. package/src/resources/bot-signup.ts +140 -0
  430. package/src/resources/calls/actions.ts +65 -10
  431. package/src/resources/calls/calls.ts +52 -5
  432. package/src/resources/compute/compute.ts +37 -0
  433. package/src/resources/compute/funcs/export.ts +156 -0
  434. package/src/resources/compute/funcs/funcs.ts +341 -0
  435. package/src/resources/compute/funcs/index.ts +15 -0
  436. package/src/resources/compute/funcs.ts +3 -0
  437. package/src/resources/compute/index.ts +15 -0
  438. package/src/resources/compute.ts +3 -0
  439. package/src/resources/connections.ts +133 -0
  440. package/src/resources/credential-connections/credential-connections.ts +4 -1
  441. package/src/resources/detail-records.ts +18 -1
  442. package/src/resources/email-inboxes/drafts.ts +8 -0
  443. package/src/resources/email-messages/email-messages.ts +9 -2
  444. package/src/resources/fqdn-connections/fqdn-authentication.ts +4 -1
  445. package/src/resources/fqdn-connections/fqdn-connections.ts +4 -1
  446. package/src/resources/index.ts +27 -0
  447. package/src/resources/machine-payments.ts +169 -0
  448. package/src/resources/messages/messages.ts +250 -22
  449. package/src/resources/messaging-profiles/index.ts +1 -0
  450. package/src/resources/messaging-profiles/messaging-profiles.ts +39 -0
  451. package/src/resources/noise-suppression-engines.ts +51 -0
  452. package/src/resources/speech-to-text/speech-to-text.ts +1 -0
  453. package/src/resources/texml/accounts/calls/calls.ts +138 -0
  454. package/src/resources/texml/accounts/conferences/participants.ts +46 -0
  455. package/src/resources/texml/calls.ts +90 -0
  456. package/src/resources/texml/index.ts +1 -0
  457. package/src/resources/texml/texml.ts +56 -0
  458. package/src/resources/uac-connections/uac-connections.ts +9 -2
  459. package/src/resources/voice-clones.ts +6 -4
  460. package/src/resources/webhooks.ts +208 -60
  461. package/src/resources/whatsapp/business-accounts/phone-numbers.ts +52 -0
  462. package/src/resources/whatsapp/index.ts +1 -0
  463. package/src/resources/whatsapp/phone-numbers/index.ts +1 -0
  464. package/src/resources/whatsapp/phone-numbers/phone-numbers.ts +222 -0
  465. package/src/resources/whatsapp/whatsapp.ts +2 -0
  466. package/src/resources/x402/credit-account/credit-account.ts +312 -0
  467. package/src/resources/x402/credit-account/index.ts +16 -0
  468. package/src/resources/x402/credit-account/payments.ts +126 -0
  469. package/src/resources/x402/credit-account.ts +1 -290
  470. package/src/resources/x402/index.ts +1 -1
  471. package/src/resources/x402/x402.ts +2 -2
  472. package/src/version.ts +1 -1
  473. package/version.d.mts +1 -1
  474. package/version.d.ts +1 -1
  475. package/version.js +1 -1
  476. package/version.mjs +1 -1
@@ -1,4 +1,5 @@
1
1
  import { APIResource } from "../../core/resource.mjs";
2
+ import * as AudioAPI from "./audio.mjs";
2
3
  import { APIPromise } from "../../core/api-promise.mjs";
3
4
  import { type Uploadable } from "../../core/uploads.mjs";
4
5
  import { RequestOptions } from "../../internal/request-options.mjs";
@@ -17,12 +18,49 @@ export declare class Audio extends APIResource {
17
18
  */
18
19
  transcribe(body: AudioTranscribeParams, options?: RequestOptions): APIPromise<AudioTranscribeResponse>;
19
20
  }
21
+ /**
22
+ * Word-level timing detail. Only present when using a `deepgram/*` model with
23
+ * `model_config` options that enable word timestamps.
24
+ */
25
+ export interface AudioTranscriptionResponseWord {
26
+ /**
27
+ * End time of the word in seconds.
28
+ */
29
+ end: number;
30
+ /**
31
+ * Start time of the word in seconds.
32
+ */
33
+ start: number;
34
+ /**
35
+ * The transcribed word.
36
+ */
37
+ word: string;
38
+ /**
39
+ * Confidence score for the word (0.0 to 1.0).
40
+ */
41
+ confidence?: number;
42
+ /**
43
+ * The transcribed word with punctuation and capitalisation applied. Only present
44
+ * when `punctuate` or `smart_format` is enabled via `model_config`.
45
+ */
46
+ punctuated_word?: string;
47
+ /**
48
+ * Speaker index. Only present when diarization is enabled via `model_config`.
49
+ */
50
+ speaker?: number;
51
+ /**
52
+ * Confidence score for the speaker assignment (0.0 to 1.0). Only present when
53
+ * diarization is enabled via `model_config`.
54
+ */
55
+ speaker_confidence?: number;
56
+ }
20
57
  /**
21
58
  * Response fields vary by model. `distil-whisper/distil-large-v2` returns `text`,
22
59
  * `duration`, and `segments` in `verbose_json` mode.
23
- * `openai/whisper-large-v3-turbo` returns `text` only. `deepgram/nova-3` returns
24
- * `text` and, depending on `model_config`, may include `words` with per-word
25
- * timestamps and speaker labels.
60
+ * `openai/whisper-large-v3-turbo` returns `text` only. The `deepgram/*` models
61
+ * return `text` and, depending on `model_config`, may include `words` with
62
+ * per-word timestamps and speaker labels. The Parakeet models
63
+ * (`nvidia/parakeet-v3`, `omi-health/omi-med-stt-v1`) return `text` only.
26
64
  */
27
65
  export interface AudioTranscribeResponse {
28
66
  /**
@@ -31,21 +69,23 @@ export interface AudioTranscribeResponse {
31
69
  text: string;
32
70
  /**
33
71
  * The duration of the audio file in seconds. Returned by
34
- * `distil-whisper/distil-large-v2` and `deepgram/nova-3` when `response_format` is
35
- * `verbose_json`. Not returned by `openai/whisper-large-v3-turbo`.
72
+ * `distil-whisper/distil-large-v2` and the `deepgram/*` models when
73
+ * `response_format` is `verbose_json`. Not returned by
74
+ * `openai/whisper-large-v3-turbo`.
36
75
  */
37
76
  duration?: number;
38
77
  /**
39
78
  * Segments of the transcribed text and their corresponding details. Returned by
40
- * `distil-whisper/distil-large-v2` when `response_format` is `verbose_json`. Not
41
- * returned by `openai/whisper-large-v3-turbo`.
79
+ * `distil-whisper/distil-large-v2` and the `deepgram/*` models when
80
+ * `response_format` is `verbose_json`; Deepgram segments also carry nested `words`
81
+ * and `speakers`. Not returned by `openai/whisper-large-v3-turbo`.
42
82
  */
43
83
  segments?: Array<AudioTranscribeResponse.Segment>;
44
84
  /**
45
- * Word-level timestamps and optional speaker labels. Only returned by
46
- * `deepgram/nova-3` when word-level output is enabled via `model_config`.
85
+ * Word-level timestamps and optional speaker labels. Only returned by the
86
+ * `deepgram/*` models when word-level output is enabled via `model_config`.
47
87
  */
48
- words?: Array<AudioTranscribeResponse.Word>;
88
+ words?: Array<AudioTranscriptionResponseWord>;
49
89
  }
50
90
  export declare namespace AudioTranscribeResponse {
51
91
  interface Segment {
@@ -65,65 +105,60 @@ export declare namespace AudioTranscribeResponse {
65
105
  * Text content of the segment.
66
106
  */
67
107
  text: string;
68
- }
69
- /**
70
- * Word-level timing detail. Only present when using `deepgram/nova-3` with
71
- * `model_config` options that enable word timestamps.
72
- */
73
- interface Word {
74
- /**
75
- * End time of the word in seconds.
76
- */
77
- end: number;
78
- /**
79
- * Start time of the word in seconds.
80
- */
81
- start: number;
82
- /**
83
- * The transcribed word.
84
- */
85
- word: string;
86
108
  /**
87
- * Confidence score for the word (0.0 to 1.0).
109
+ * Speaker indices heard in this segment. Returned by the `deepgram/*` models when
110
+ * `diarize` is enabled via `model_config`.
88
111
  */
89
- confidence?: number;
112
+ speakers?: Array<number>;
90
113
  /**
91
- * Speaker index. Only present when diarization is enabled via `model_config`.
114
+ * Word-level timing detail for this segment. Returned by the `deepgram/*` models
115
+ * when word-level output is enabled via `model_config`.
92
116
  */
93
- speaker?: number;
117
+ words?: Array<AudioAPI.AudioTranscriptionResponseWord>;
94
118
  }
95
119
  }
96
120
  export interface AudioTranscribeParams {
97
121
  /**
98
122
  * ID of the model to use. `distil-whisper/distil-large-v2` is lower latency but
99
123
  * English-only. `openai/whisper-large-v3-turbo` is multi-lingual but slightly
100
- * higher latency. `deepgram/nova-3` supports English variants (en, en-US, en-GB,
101
- * en-AU, en-NZ, en-IN) and only accepts mp3/wav files.
124
+ * higher latency. The `deepgram/*` models only accept mp3/wav files:
125
+ * `deepgram/nova-3` covers ~49 languages plus `multi` and `deepgram/nova-2` covers
126
+ * ~33, while the `-medical` variants are tuned for clinical vocabulary and accept
127
+ * English only (`en` and its regional variants, e.g. `en-US`, `en-GB`).
128
+ * `nvidia/parakeet-v3` is multilingual with automatic language detection;
129
+ * `omi-health/omi-med-stt-v1` is a medical model, English only.
102
130
  */
103
- model: 'distil-whisper/distil-large-v2' | 'openai/whisper-large-v3-turbo' | 'deepgram/nova-3';
131
+ model: 'distil-whisper/distil-large-v2' | 'openai/whisper-large-v3-turbo' | 'deepgram/nova-2' | 'deepgram/nova-2-medical' | 'deepgram/nova-3' | 'deepgram/nova-3-medical' | 'nvidia/parakeet-v3' | 'omi-health/omi-med-stt-v1';
104
132
  /**
105
133
  * The audio file object to transcribe, in one of these formats: flac, mp3, mp4,
106
134
  * mpeg, mpga, m4a, ogg, wav, or webm. File uploads are limited to 100 MB. Cannot
107
- * be used together with `file_url`. Note: `deepgram/nova-3` only supports mp3 and
108
- * wav formats.
135
+ * be used together with `file_url`. Note: the `deepgram/*` models only support mp3
136
+ * and wav formats.
109
137
  */
110
138
  file?: Uploadable;
111
139
  /**
112
140
  * Link to audio file in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a,
113
141
  * ogg, wav, or webm. Support for hosted files is limited to 100MB. Cannot be used
114
- * together with `file`. Note: `deepgram/nova-3` only supports mp3 and wav formats.
142
+ * together with `file`. Note: the `deepgram/*` models only support mp3 and wav
143
+ * formats.
115
144
  */
116
145
  file_url?: string;
117
146
  /**
118
- * The language of the audio to be transcribed. For `deepgram/nova-3`, only English
119
- * variants are supported: `en`, `en-US`, `en-GB`, `en-AU`, `en-NZ`, `en-IN`. For
147
+ * The language of the audio to be transcribed. `deepgram/nova-3` supports ~49
148
+ * languages plus `multi`, and `deepgram/nova-2` supports ~33 plus `multi`; the
149
+ * `-medical` variants are English only (`en` and its regional variants, e.g.
150
+ * `en-US`, `en-GB`). Deepgram models validate on the base language and forward the
151
+ * full tag, so regional variants such as `de-CH` and `pt-BR` are accepted where
152
+ * the base language is supported; an unsupported language returns a 400. For
120
153
  * `openai/whisper-large-v3-turbo`, supports multiple languages.
121
154
  * `distil-whisper/distil-large-v2` does not support language parameter.
155
+ * `nvidia/parakeet-v3` detects the language automatically;
156
+ * `omi-health/omi-med-stt-v1` is English only.
122
157
  */
123
158
  language?: string;
124
159
  /**
125
- * Additional model-specific configuration parameters. Only allowed with
126
- * `deepgram/nova-3` model. Can include Deepgram-specific options such as
160
+ * Additional model-specific configuration parameters. Only allowed with the
161
+ * `deepgram/*` models. Can include Deepgram-specific options such as
127
162
  * `smart_format`, `punctuate`, `diarize`, `utterance`, `numerals`, and `language`.
128
163
  * If `language` is provided both as a top-level parameter and in `model_config`,
129
164
  * the top-level parameter takes precedence.
@@ -144,6 +179,6 @@ export interface AudioTranscribeParams {
144
179
  'timestamp_granularities[]'?: 'segment';
145
180
  }
146
181
  export declare namespace Audio {
147
- export { type AudioTranscribeResponse as AudioTranscribeResponse, type AudioTranscribeParams as AudioTranscribeParams, };
182
+ export { type AudioTranscriptionResponseWord as AudioTranscriptionResponseWord, type AudioTranscribeResponse as AudioTranscribeResponse, type AudioTranscribeParams as AudioTranscribeParams, };
148
183
  }
149
184
  //# sourceMappingURL=audio.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"audio.d.mts","sourceRoot":"","sources":["../../src/resources/ai/audio.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,mCAA+B;AACpD,OAAO,EAAE,KAAK,UAAU,EAAE,+BAA2B;AACrD,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAGhE,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;;;OAWG;IACH,UAAU,CAAC,IAAI,EAAE,qBAAqB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC;CAMvG;AAED;;;;;;GAMG;AACH,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH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AC;CAC/C;AAED,yBAAiB,uBAAuB,CAAC;IACvC,UAAiB,OAAO;QACtB;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;QAEX;;WAEG;QACH,GAAG,EAAE,MAAM,CAAC;QAEZ;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;QAEd;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;QAEb;;;WAGG;QACH,QAAQ,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;QAEzB;;;WAGG;QACH,KAAK,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,8BAA8B,CAAC,CAAC;KACxD;CACF;AAED,MAAM,WAAW,qBAAqB;IACpC;;;;;;;;;OASG;IACH,KAAK,EACD,gCAAgC,GAChC,+BAA+B,GAC/B,iBAAiB,GACjB,yBAAyB,GACzB,iBAAiB,GACjB,yBAAyB,GACzB,oBAAoB,GACpB,2BAA2B,CAAC;IAEhC;;;;;OAKG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;IAElB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;;;OAMG;IACH,YAAY,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IAE1C;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,GAAG,cAAc,CAAC;IAE1C;;;;OAIG;IACH,2BAA2B,CAAC,EAAE,SAAS,CAAC;CACzC;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,qBAAqB,IAAI,qBAAqB,GACpD,CAAC;CACH"}
@@ -1,4 +1,5 @@
1
1
  import { APIResource } from "../../core/resource.js";
2
+ import * as AudioAPI from "./audio.js";
2
3
  import { APIPromise } from "../../core/api-promise.js";
3
4
  import { type Uploadable } from "../../core/uploads.js";
4
5
  import { RequestOptions } from "../../internal/request-options.js";
@@ -17,12 +18,49 @@ export declare class Audio extends APIResource {
17
18
  */
18
19
  transcribe(body: AudioTranscribeParams, options?: RequestOptions): APIPromise<AudioTranscribeResponse>;
19
20
  }
21
+ /**
22
+ * Word-level timing detail. Only present when using a `deepgram/*` model with
23
+ * `model_config` options that enable word timestamps.
24
+ */
25
+ export interface AudioTranscriptionResponseWord {
26
+ /**
27
+ * End time of the word in seconds.
28
+ */
29
+ end: number;
30
+ /**
31
+ * Start time of the word in seconds.
32
+ */
33
+ start: number;
34
+ /**
35
+ * The transcribed word.
36
+ */
37
+ word: string;
38
+ /**
39
+ * Confidence score for the word (0.0 to 1.0).
40
+ */
41
+ confidence?: number;
42
+ /**
43
+ * The transcribed word with punctuation and capitalisation applied. Only present
44
+ * when `punctuate` or `smart_format` is enabled via `model_config`.
45
+ */
46
+ punctuated_word?: string;
47
+ /**
48
+ * Speaker index. Only present when diarization is enabled via `model_config`.
49
+ */
50
+ speaker?: number;
51
+ /**
52
+ * Confidence score for the speaker assignment (0.0 to 1.0). Only present when
53
+ * diarization is enabled via `model_config`.
54
+ */
55
+ speaker_confidence?: number;
56
+ }
20
57
  /**
21
58
  * Response fields vary by model. `distil-whisper/distil-large-v2` returns `text`,
22
59
  * `duration`, and `segments` in `verbose_json` mode.
23
- * `openai/whisper-large-v3-turbo` returns `text` only. `deepgram/nova-3` returns
24
- * `text` and, depending on `model_config`, may include `words` with per-word
25
- * timestamps and speaker labels.
60
+ * `openai/whisper-large-v3-turbo` returns `text` only. The `deepgram/*` models
61
+ * return `text` and, depending on `model_config`, may include `words` with
62
+ * per-word timestamps and speaker labels. The Parakeet models
63
+ * (`nvidia/parakeet-v3`, `omi-health/omi-med-stt-v1`) return `text` only.
26
64
  */
27
65
  export interface AudioTranscribeResponse {
28
66
  /**
@@ -31,21 +69,23 @@ export interface AudioTranscribeResponse {
31
69
  text: string;
32
70
  /**
33
71
  * The duration of the audio file in seconds. Returned by
34
- * `distil-whisper/distil-large-v2` and `deepgram/nova-3` when `response_format` is
35
- * `verbose_json`. Not returned by `openai/whisper-large-v3-turbo`.
72
+ * `distil-whisper/distil-large-v2` and the `deepgram/*` models when
73
+ * `response_format` is `verbose_json`. Not returned by
74
+ * `openai/whisper-large-v3-turbo`.
36
75
  */
37
76
  duration?: number;
38
77
  /**
39
78
  * Segments of the transcribed text and their corresponding details. Returned by
40
- * `distil-whisper/distil-large-v2` when `response_format` is `verbose_json`. Not
41
- * returned by `openai/whisper-large-v3-turbo`.
79
+ * `distil-whisper/distil-large-v2` and the `deepgram/*` models when
80
+ * `response_format` is `verbose_json`; Deepgram segments also carry nested `words`
81
+ * and `speakers`. Not returned by `openai/whisper-large-v3-turbo`.
42
82
  */
43
83
  segments?: Array<AudioTranscribeResponse.Segment>;
44
84
  /**
45
- * Word-level timestamps and optional speaker labels. Only returned by
46
- * `deepgram/nova-3` when word-level output is enabled via `model_config`.
85
+ * Word-level timestamps and optional speaker labels. Only returned by the
86
+ * `deepgram/*` models when word-level output is enabled via `model_config`.
47
87
  */
48
- words?: Array<AudioTranscribeResponse.Word>;
88
+ words?: Array<AudioTranscriptionResponseWord>;
49
89
  }
50
90
  export declare namespace AudioTranscribeResponse {
51
91
  interface Segment {
@@ -65,65 +105,60 @@ export declare namespace AudioTranscribeResponse {
65
105
  * Text content of the segment.
66
106
  */
67
107
  text: string;
68
- }
69
- /**
70
- * Word-level timing detail. Only present when using `deepgram/nova-3` with
71
- * `model_config` options that enable word timestamps.
72
- */
73
- interface Word {
74
- /**
75
- * End time of the word in seconds.
76
- */
77
- end: number;
78
- /**
79
- * Start time of the word in seconds.
80
- */
81
- start: number;
82
- /**
83
- * The transcribed word.
84
- */
85
- word: string;
86
108
  /**
87
- * Confidence score for the word (0.0 to 1.0).
109
+ * Speaker indices heard in this segment. Returned by the `deepgram/*` models when
110
+ * `diarize` is enabled via `model_config`.
88
111
  */
89
- confidence?: number;
112
+ speakers?: Array<number>;
90
113
  /**
91
- * Speaker index. Only present when diarization is enabled via `model_config`.
114
+ * Word-level timing detail for this segment. Returned by the `deepgram/*` models
115
+ * when word-level output is enabled via `model_config`.
92
116
  */
93
- speaker?: number;
117
+ words?: Array<AudioAPI.AudioTranscriptionResponseWord>;
94
118
  }
95
119
  }
96
120
  export interface AudioTranscribeParams {
97
121
  /**
98
122
  * ID of the model to use. `distil-whisper/distil-large-v2` is lower latency but
99
123
  * English-only. `openai/whisper-large-v3-turbo` is multi-lingual but slightly
100
- * higher latency. `deepgram/nova-3` supports English variants (en, en-US, en-GB,
101
- * en-AU, en-NZ, en-IN) and only accepts mp3/wav files.
124
+ * higher latency. The `deepgram/*` models only accept mp3/wav files:
125
+ * `deepgram/nova-3` covers ~49 languages plus `multi` and `deepgram/nova-2` covers
126
+ * ~33, while the `-medical` variants are tuned for clinical vocabulary and accept
127
+ * English only (`en` and its regional variants, e.g. `en-US`, `en-GB`).
128
+ * `nvidia/parakeet-v3` is multilingual with automatic language detection;
129
+ * `omi-health/omi-med-stt-v1` is a medical model, English only.
102
130
  */
103
- model: 'distil-whisper/distil-large-v2' | 'openai/whisper-large-v3-turbo' | 'deepgram/nova-3';
131
+ model: 'distil-whisper/distil-large-v2' | 'openai/whisper-large-v3-turbo' | 'deepgram/nova-2' | 'deepgram/nova-2-medical' | 'deepgram/nova-3' | 'deepgram/nova-3-medical' | 'nvidia/parakeet-v3' | 'omi-health/omi-med-stt-v1';
104
132
  /**
105
133
  * The audio file object to transcribe, in one of these formats: flac, mp3, mp4,
106
134
  * mpeg, mpga, m4a, ogg, wav, or webm. File uploads are limited to 100 MB. Cannot
107
- * be used together with `file_url`. Note: `deepgram/nova-3` only supports mp3 and
108
- * wav formats.
135
+ * be used together with `file_url`. Note: the `deepgram/*` models only support mp3
136
+ * and wav formats.
109
137
  */
110
138
  file?: Uploadable;
111
139
  /**
112
140
  * Link to audio file in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a,
113
141
  * ogg, wav, or webm. Support for hosted files is limited to 100MB. Cannot be used
114
- * together with `file`. Note: `deepgram/nova-3` only supports mp3 and wav formats.
142
+ * together with `file`. Note: the `deepgram/*` models only support mp3 and wav
143
+ * formats.
115
144
  */
116
145
  file_url?: string;
117
146
  /**
118
- * The language of the audio to be transcribed. For `deepgram/nova-3`, only English
119
- * variants are supported: `en`, `en-US`, `en-GB`, `en-AU`, `en-NZ`, `en-IN`. For
147
+ * The language of the audio to be transcribed. `deepgram/nova-3` supports ~49
148
+ * languages plus `multi`, and `deepgram/nova-2` supports ~33 plus `multi`; the
149
+ * `-medical` variants are English only (`en` and its regional variants, e.g.
150
+ * `en-US`, `en-GB`). Deepgram models validate on the base language and forward the
151
+ * full tag, so regional variants such as `de-CH` and `pt-BR` are accepted where
152
+ * the base language is supported; an unsupported language returns a 400. For
120
153
  * `openai/whisper-large-v3-turbo`, supports multiple languages.
121
154
  * `distil-whisper/distil-large-v2` does not support language parameter.
155
+ * `nvidia/parakeet-v3` detects the language automatically;
156
+ * `omi-health/omi-med-stt-v1` is English only.
122
157
  */
123
158
  language?: string;
124
159
  /**
125
- * Additional model-specific configuration parameters. Only allowed with
126
- * `deepgram/nova-3` model. Can include Deepgram-specific options such as
160
+ * Additional model-specific configuration parameters. Only allowed with the
161
+ * `deepgram/*` models. Can include Deepgram-specific options such as
127
162
  * `smart_format`, `punctuate`, `diarize`, `utterance`, `numerals`, and `language`.
128
163
  * If `language` is provided both as a top-level parameter and in `model_config`,
129
164
  * the top-level parameter takes precedence.
@@ -144,6 +179,6 @@ export interface AudioTranscribeParams {
144
179
  'timestamp_granularities[]'?: 'segment';
145
180
  }
146
181
  export declare namespace Audio {
147
- export { type AudioTranscribeResponse as AudioTranscribeResponse, type AudioTranscribeParams as AudioTranscribeParams, };
182
+ export { type AudioTranscriptionResponseWord as AudioTranscriptionResponseWord, type AudioTranscribeResponse as AudioTranscribeResponse, type AudioTranscribeParams as AudioTranscribeParams, };
148
183
  }
149
184
  //# sourceMappingURL=audio.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"audio.d.ts","sourceRoot":"","sources":["../../src/resources/ai/audio.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,kCAA+B;AACpD,OAAO,EAAE,KAAK,UAAU,EAAE,8BAA2B;AACrD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAGhE,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;;;OAWG;IACH,UAAU,CAAC,IAAI,EAAE,qBAAqB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC;CAMvG;AAED;;;;;;GAMG;AACH,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC;IAElD;;;OAGG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,uBAAuB,CAAC,IAAI,CAAC,CAAC;CAC7C;AAED,yBAAiB,uBAAuB,CAAC;IACvC,UAAiB,OAAO;QACtB;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;QAEX;;WAEG;QACH,GAAG,EAAE,MAAM,CAAC;QAEZ;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;QAEd;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;KACd;IAED;;;OAGG;IACH,UAAiB,IAAI;QACnB;;WAEG;QACH,GAAG,EAAE,MAAM,CAAC;QAEZ;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;QAEd;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;QAEb;;WAEG;QACH,UAAU,CAAC,EAAE,MAAM,CAAC;QAEpB;;WAEG;QACH,OAAO,CAAC,EAAE,MAAM,CAAC;KA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AAC;IAElB;;;;;;OAMG;IACH,YAAY,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IAE1C;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,GAAG,cAAc,CAAC;IAE1C;;;;OAIG;IACH,2BAA2B,CAAC,EAAE,SAAS,CAAC;CACzC;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,qBAAqB,IAAI,qBAAqB,GACpD,CAAC;CACH"}
@@ -1 +1 @@
1
- {"version":3,"file":"audio.js","sourceRoot":"","sources":["../../src/resources/ai/audio.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAIlD,uDAAqE;AAErE,MAAa,KAAM,SAAQ,sBAAW;IACpC;;;;;;;;;;;OAWG;IACH,UAAU,CAAC,IAA2B,EAAE,OAAwB;QAC9D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,0BAA0B,EAC1B,IAAA,qCAA2B,EAAC,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,CAChE,CAAC;IACJ,CAAC;CACF;AAnBD,sBAmBC"}
1
+ {"version":3,"file":"audio.js","sourceRoot":"","sources":["../../src/resources/ai/audio.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAKlD,uDAAqE;AAErE,MAAa,KAAM,SAAQ,sBAAW;IACpC;;;;;;;;;;;OAWG;IACH,UAAU,CAAC,IAA2B,EAAE,OAAwB;QAC9D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,0BAA0B,EAC1B,IAAA,qCAA2B,EAAC,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,CAChE,CAAC;IACJ,CAAC;CACF;AAnBD,sBAmBC"}
@@ -1 +1 @@
1
- {"version":3,"file":"audio.mjs","sourceRoot":"","sources":["../../src/resources/ai/audio.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAIlD,OAAO,EAAE,2BAA2B,EAAE,mCAA+B;AAErE,MAAM,OAAO,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;;;OAWG;IACH,UAAU,CAAC,IAA2B,EAAE,OAAwB;QAC9D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,0BAA0B,EAC1B,2BAA2B,CAAC,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,CAChE,CAAC;IACJ,CAAC;CACF"}
1
+ {"version":3,"file":"audio.mjs","sourceRoot":"","sources":["../../src/resources/ai/audio.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAKlD,OAAO,EAAE,2BAA2B,EAAE,mCAA+B;AAErE,MAAM,OAAO,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;;;OAWG;IACH,UAAU,CAAC,IAA2B,EAAE,OAAwB;QAC9D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,0BAA0B,EAC1B,2BAA2B,CAAC,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,CAChE,CAAC;IACJ,CAAC;CACF"}
@@ -1,5 +1,6 @@
1
1
  import { APIResource } from "../../core/resource.mjs";
2
2
  import * as ChatAPI from "./chat.mjs";
3
+ import * as OpenAIChatAPI from "./openai/chat.mjs";
3
4
  export declare class Chat extends APIResource {
4
5
  }
5
6
  export interface BucketIDs {
@@ -47,21 +48,6 @@ export interface ChatCompletionRequest {
47
48
  * Higher values will penalize the model from repeating the same output tokens.
48
49
  */
49
50
  frequency_penalty?: number;
50
- /**
51
- * If specified, the output will be exactly one of the choices.
52
- */
53
- guided_choice?: Array<string>;
54
- /**
55
- * Must be a valid JSON schema. If specified, the output will follow the JSON
56
- * schema.
57
- */
58
- guided_json?: {
59
- [key: string]: unknown;
60
- };
61
- /**
62
- * If specified, the output will follow the regex pattern.
63
- */
64
- guided_regex?: string;
65
51
  /**
66
52
  * This is used with `use_beam_search` to prefer shorter or longer completions.
67
53
  */
@@ -119,10 +105,12 @@ export interface ChatCompletionRequest {
119
105
  */
120
106
  region?: 'USA' | 'EU' | 'AUS' | 'UAE';
121
107
  /**
122
- * Use this is you want to guarantee a JSON output without defining a schema. For
123
- * control over the schema, use `guided_json`.
108
+ * Controls the format of the model output. `json_object` guarantees valid JSON
109
+ * output without defining a schema; `json_schema` constrains the output to the
110
+ * JSON schema you supply via the `json_schema` property and is the supported way
111
+ * to get guaranteed structured output on Telnyx-hosted models.
124
112
  */
125
- response_format?: ChatCompletionRequest.ResponseFormat;
113
+ response_format?: ChatCompletionRequest.ResponseFormatText | ChatCompletionRequest.ResponseFormatJsonObject | ChatCompletionRequest.ResponseFormatJsonSchemaParam;
126
114
  /**
127
115
  * If specified, the system will make a best effort to sample deterministically,
128
116
  * such that repeated requests with the same `seed` and parameters should return
@@ -190,25 +178,68 @@ export declare namespace ChatCompletionRequest {
190
178
  }
191
179
  }
192
180
  /**
193
- * Use this is you want to guarantee a JSON output without defining a schema. For
194
- * control over the schema, use `guided_json`.
181
+ * Plain text output.
195
182
  */
196
- interface ResponseFormat {
197
- type: 'text' | 'json_object';
183
+ interface ResponseFormatText {
184
+ type: 'text';
198
185
  }
199
- interface Function {
200
- function: Function.Function;
201
- type: 'function';
186
+ /**
187
+ * JSON mode: the model output is valid JSON, without a schema.
188
+ */
189
+ interface ResponseFormatJsonObject {
190
+ type: 'json_object';
191
+ }
192
+ /**
193
+ * Structured output: the model output is constrained to the JSON schema supplied
194
+ * in `json_schema`.
195
+ */
196
+ interface ResponseFormatJsonSchemaParam {
197
+ /**
198
+ * The JSON schema configuration, required when `type` is `json_schema`. Matches
199
+ * the
200
+ * [OpenAI structured outputs](https://platform.openai.com/docs/guides/structured-outputs)
201
+ * `json_schema` response format.
202
+ */
203
+ json_schema: ResponseFormatJsonSchemaParam.JsonSchema;
204
+ type: 'json_schema';
202
205
  }
203
- namespace Function {
204
- interface Function {
206
+ namespace ResponseFormatJsonSchemaParam {
207
+ /**
208
+ * The JSON schema configuration, required when `type` is `json_schema`. Matches
209
+ * the
210
+ * [OpenAI structured outputs](https://platform.openai.com/docs/guides/structured-outputs)
211
+ * `json_schema` response format.
212
+ */
213
+ interface JsonSchema {
214
+ /**
215
+ * The name of the response format. Used for clarity only.
216
+ */
205
217
  name: string;
218
+ /**
219
+ * A description of what the response format is for, typically used to guide the
220
+ * model.
221
+ */
206
222
  description?: string;
207
- parameters?: {
223
+ /**
224
+ * The JSON schema the model output must conform to. A valid
225
+ * [JSON Schema](https://json-schema.org) object, e.g. a Pydantic
226
+ * `model_json_schema()` export.
227
+ */
228
+ schema?: {
208
229
  [key: string]: unknown;
209
230
  };
231
+ /**
232
+ * Enables strict schema adherence when supported by the model. If the generated
233
+ * output does not match the provided schema, the request fails instead of
234
+ * returning non-conformant output.
235
+ */
236
+ strict?: boolean;
210
237
  }
211
238
  }
239
+ interface Function {
240
+ function: OpenAIChatAPI.FunctionDefinition;
241
+ type: 'function';
242
+ }
212
243
  interface Retrieval {
213
244
  retrieval: ChatAPI.BucketIDs;
214
245
  type: 'retrieval';
@@ -1 +1 @@
1
- {"version":3,"file":"chat.d.mts","sourceRoot":"","sources":["../../src/resources/ai/chat.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,OAAO,mBAAe;AAElC,qBAAa,IAAK,SAAQ,WAAW;CAAG;AAExC,MAAM,WAAW,SAAS;IACxB;;;;OAIG;IACH,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAE1B;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WA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