telnyx 7.22.0 → 7.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (604) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/client.d.mts +42 -12
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +42 -12
  5. package/client.d.ts.map +1 -1
  6. package/client.js +30 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +30 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/ai/ai.d.mts +12 -4
  12. package/resources/ai/ai.d.mts.map +1 -1
  13. package/resources/ai/ai.d.ts +12 -4
  14. package/resources/ai/ai.d.ts.map +1 -1
  15. package/resources/ai/ai.js +8 -0
  16. package/resources/ai/ai.js.map +1 -1
  17. package/resources/ai/ai.mjs +9 -1
  18. package/resources/ai/ai.mjs.map +1 -1
  19. package/resources/ai/assistants/assistants.d.mts +409 -57
  20. package/resources/ai/assistants/assistants.d.mts.map +1 -1
  21. package/resources/ai/assistants/assistants.d.ts +409 -57
  22. package/resources/ai/assistants/assistants.d.ts.map +1 -1
  23. package/resources/ai/assistants/assistants.js.map +1 -1
  24. package/resources/ai/assistants/assistants.mjs.map +1 -1
  25. package/resources/ai/assistants/index.d.mts +1 -1
  26. package/resources/ai/assistants/index.d.mts.map +1 -1
  27. package/resources/ai/assistants/index.d.ts +1 -1
  28. package/resources/ai/assistants/index.d.ts.map +1 -1
  29. package/resources/ai/assistants/index.js.map +1 -1
  30. package/resources/ai/assistants/index.mjs.map +1 -1
  31. package/resources/ai/assistants/versions.d.mts +36 -14
  32. package/resources/ai/assistants/versions.d.mts.map +1 -1
  33. package/resources/ai/assistants/versions.d.ts +36 -14
  34. package/resources/ai/assistants/versions.d.ts.map +1 -1
  35. package/resources/ai/audio.d.mts +78 -43
  36. package/resources/ai/audio.d.mts.map +1 -1
  37. package/resources/ai/audio.d.ts +78 -43
  38. package/resources/ai/audio.d.ts.map +1 -1
  39. package/resources/ai/audio.js.map +1 -1
  40. package/resources/ai/audio.mjs.map +1 -1
  41. package/resources/ai/chat.d.mts +2 -10
  42. package/resources/ai/chat.d.mts.map +1 -1
  43. package/resources/ai/chat.d.ts +2 -10
  44. package/resources/ai/chat.d.ts.map +1 -1
  45. package/resources/ai/chat.js.map +1 -1
  46. package/resources/ai/chat.mjs.map +1 -1
  47. package/resources/ai/collections/collections.d.mts +3 -3
  48. package/resources/ai/collections/collections.d.mts.map +1 -1
  49. package/resources/ai/collections/collections.d.ts +3 -3
  50. package/resources/ai/collections/collections.d.ts.map +1 -1
  51. package/resources/ai/collections/collections.js.map +1 -1
  52. package/resources/ai/collections/collections.mjs.map +1 -1
  53. package/resources/ai/collections/index.d.mts +1 -1
  54. package/resources/ai/collections/index.d.mts.map +1 -1
  55. package/resources/ai/collections/index.d.ts +1 -1
  56. package/resources/ai/collections/index.d.ts.map +1 -1
  57. package/resources/ai/collections/index.js.map +1 -1
  58. package/resources/ai/collections/index.mjs.map +1 -1
  59. package/resources/ai/collections/sources.d.mts +32 -5
  60. package/resources/ai/collections/sources.d.mts.map +1 -1
  61. package/resources/ai/collections/sources.d.ts +32 -5
  62. package/resources/ai/collections/sources.d.ts.map +1 -1
  63. package/resources/ai/collections/sources.js.map +1 -1
  64. package/resources/ai/collections/sources.mjs.map +1 -1
  65. package/resources/ai/index.d.mts +4 -2
  66. package/resources/ai/index.d.mts.map +1 -1
  67. package/resources/ai/index.d.ts +4 -2
  68. package/resources/ai/index.d.ts.map +1 -1
  69. package/resources/ai/index.js +9 -5
  70. package/resources/ai/index.js.map +1 -1
  71. package/resources/ai/index.mjs +3 -1
  72. package/resources/ai/index.mjs.map +1 -1
  73. package/resources/ai/memory/index.d.mts +3 -0
  74. package/resources/ai/memory/index.d.mts.map +1 -0
  75. package/resources/ai/memory/index.d.ts +3 -0
  76. package/resources/ai/memory/index.d.ts.map +1 -0
  77. package/resources/ai/memory/index.js +9 -0
  78. package/resources/ai/memory/index.js.map +1 -0
  79. package/resources/ai/memory/index.mjs +4 -0
  80. package/resources/ai/memory/index.mjs.map +1 -0
  81. package/resources/ai/memory/memory.d.mts +10 -0
  82. package/resources/ai/memory/memory.d.mts.map +1 -0
  83. package/resources/ai/memory/memory.d.ts +10 -0
  84. package/resources/ai/memory/memory.d.ts.map +1 -0
  85. package/resources/ai/memory/memory.js +17 -0
  86. package/resources/ai/memory/memory.js.map +1 -0
  87. package/resources/ai/memory/memory.mjs +12 -0
  88. package/resources/ai/memory/memory.mjs.map +1 -0
  89. package/resources/ai/memory/namespaces/index.d.mts +4 -0
  90. package/resources/ai/memory/namespaces/index.d.mts.map +1 -0
  91. package/resources/ai/memory/namespaces/index.d.ts +4 -0
  92. package/resources/ai/memory/namespaces/index.d.ts.map +1 -0
  93. package/resources/ai/memory/namespaces/index.js +11 -0
  94. package/resources/ai/memory/namespaces/index.js.map +1 -0
  95. package/resources/ai/memory/namespaces/index.mjs +5 -0
  96. package/resources/ai/memory/namespaces/index.mjs.map +1 -0
  97. package/resources/ai/memory/namespaces/namespaces.d.mts +54 -0
  98. package/resources/ai/memory/namespaces/namespaces.d.mts.map +1 -0
  99. package/resources/ai/memory/namespaces/namespaces.d.ts +54 -0
  100. package/resources/ai/memory/namespaces/namespaces.d.ts.map +1 -0
  101. package/resources/ai/memory/namespaces/namespaces.js +43 -0
  102. package/resources/ai/memory/namespaces/namespaces.js.map +1 -0
  103. package/resources/ai/memory/namespaces/namespaces.mjs +38 -0
  104. package/resources/ai/memory/namespaces/namespaces.mjs.map +1 -0
  105. package/resources/ai/memory/namespaces/profiles/index.d.mts +4 -0
  106. package/resources/ai/memory/namespaces/profiles/index.d.mts.map +1 -0
  107. package/resources/ai/memory/namespaces/profiles/index.d.ts +4 -0
  108. package/resources/ai/memory/namespaces/profiles/index.d.ts.map +1 -0
  109. package/resources/ai/memory/namespaces/profiles/index.js +11 -0
  110. package/resources/ai/memory/namespaces/profiles/index.js.map +1 -0
  111. package/resources/ai/memory/namespaces/profiles/index.mjs +5 -0
  112. package/resources/ai/memory/namespaces/profiles/index.mjs.map +1 -0
  113. package/resources/ai/memory/namespaces/profiles/memories.d.mts +118 -0
  114. package/resources/ai/memory/namespaces/profiles/memories.d.mts.map +1 -0
  115. package/resources/ai/memory/namespaces/profiles/memories.d.ts +118 -0
  116. package/resources/ai/memory/namespaces/profiles/memories.d.ts.map +1 -0
  117. package/resources/ai/memory/namespaces/profiles/memories.js +63 -0
  118. package/resources/ai/memory/namespaces/profiles/memories.js.map +1 -0
  119. package/resources/ai/memory/namespaces/profiles/memories.mjs +59 -0
  120. package/resources/ai/memory/namespaces/profiles/memories.mjs.map +1 -0
  121. package/resources/ai/memory/namespaces/profiles/profiles.d.mts +324 -0
  122. package/resources/ai/memory/namespaces/profiles/profiles.d.mts.map +1 -0
  123. package/resources/ai/memory/namespaces/profiles/profiles.d.ts +324 -0
  124. package/resources/ai/memory/namespaces/profiles/profiles.d.ts.map +1 -0
  125. package/resources/ai/memory/namespaces/profiles/profiles.js +161 -0
  126. package/resources/ai/memory/namespaces/profiles/profiles.js.map +1 -0
  127. package/resources/ai/memory/namespaces/profiles/profiles.mjs +156 -0
  128. package/resources/ai/memory/namespaces/profiles/profiles.mjs.map +1 -0
  129. package/resources/ai/memory/namespaces/profiles/sources.d.mts +163 -0
  130. package/resources/ai/memory/namespaces/profiles/sources.d.mts.map +1 -0
  131. package/resources/ai/memory/namespaces/profiles/sources.d.ts +163 -0
  132. package/resources/ai/memory/namespaces/profiles/sources.d.ts.map +1 -0
  133. package/resources/ai/memory/namespaces/profiles/sources.js +80 -0
  134. package/resources/ai/memory/namespaces/profiles/sources.js.map +1 -0
  135. package/resources/ai/memory/namespaces/profiles/sources.mjs +76 -0
  136. package/resources/ai/memory/namespaces/profiles/sources.mjs.map +1 -0
  137. package/resources/ai/memory/namespaces/profiles.d.mts +2 -0
  138. package/resources/ai/memory/namespaces/profiles.d.mts.map +1 -0
  139. package/resources/ai/memory/namespaces/profiles.d.ts +2 -0
  140. package/resources/ai/memory/namespaces/profiles.d.ts.map +1 -0
  141. package/resources/ai/memory/namespaces/profiles.js +6 -0
  142. package/resources/ai/memory/namespaces/profiles.js.map +1 -0
  143. package/resources/ai/memory/namespaces/profiles.mjs +3 -0
  144. package/resources/ai/memory/namespaces/profiles.mjs.map +1 -0
  145. package/resources/ai/memory/namespaces/settings.d.mts +108 -0
  146. package/resources/ai/memory/namespaces/settings.d.mts.map +1 -0
  147. package/resources/ai/memory/namespaces/settings.d.ts +108 -0
  148. package/resources/ai/memory/namespaces/settings.d.ts.map +1 -0
  149. package/resources/ai/memory/namespaces/settings.js +54 -0
  150. package/resources/ai/memory/namespaces/settings.js.map +1 -0
  151. package/resources/ai/memory/namespaces/settings.mjs +50 -0
  152. package/resources/ai/memory/namespaces/settings.mjs.map +1 -0
  153. package/resources/ai/memory/namespaces.d.mts +2 -0
  154. package/resources/ai/memory/namespaces.d.mts.map +1 -0
  155. package/resources/ai/memory/namespaces.d.ts +2 -0
  156. package/resources/ai/memory/namespaces.d.ts.map +1 -0
  157. package/resources/ai/memory/namespaces.js +6 -0
  158. package/resources/ai/memory/namespaces.js.map +1 -0
  159. package/resources/ai/memory/namespaces.mjs +3 -0
  160. package/resources/ai/memory/namespaces.mjs.map +1 -0
  161. package/resources/ai/memory.d.mts +2 -0
  162. package/resources/ai/memory.d.mts.map +1 -0
  163. package/resources/ai/memory.d.ts +2 -0
  164. package/resources/ai/memory.d.ts.map +1 -0
  165. package/resources/ai/memory.js +6 -0
  166. package/resources/ai/memory.js.map +1 -0
  167. package/resources/ai/memory.mjs +3 -0
  168. package/resources/ai/memory.mjs.map +1 -0
  169. package/resources/ai/openai/chat.d.mts +10 -11
  170. package/resources/ai/openai/chat.d.mts.map +1 -1
  171. package/resources/ai/openai/chat.d.ts +10 -11
  172. package/resources/ai/openai/chat.d.ts.map +1 -1
  173. package/resources/ai/openai/chat.js.map +1 -1
  174. package/resources/ai/openai/chat.mjs.map +1 -1
  175. package/resources/ai/openai/index.d.mts +1 -1
  176. package/resources/ai/openai/index.d.mts.map +1 -1
  177. package/resources/ai/openai/index.d.ts +1 -1
  178. package/resources/ai/openai/index.d.ts.map +1 -1
  179. package/resources/ai/openai/index.js.map +1 -1
  180. package/resources/ai/openai/index.mjs +1 -1
  181. package/resources/ai/openai/index.mjs.map +1 -1
  182. package/resources/ai/openai/openai.d.mts +2 -2
  183. package/resources/ai/openai/openai.d.mts.map +1 -1
  184. package/resources/ai/openai/openai.d.ts +2 -2
  185. package/resources/ai/openai/openai.d.ts.map +1 -1
  186. package/resources/ai/openai/openai.js.map +1 -1
  187. package/resources/ai/openai/openai.mjs.map +1 -1
  188. package/resources/ai/typesafe/index.d.mts +3 -0
  189. package/resources/ai/typesafe/index.d.mts.map +1 -0
  190. package/resources/ai/typesafe/index.d.ts +3 -0
  191. package/resources/ai/typesafe/index.d.ts.map +1 -0
  192. package/resources/ai/typesafe/index.js +9 -0
  193. package/resources/ai/typesafe/index.js.map +1 -0
  194. package/resources/ai/typesafe/index.mjs +4 -0
  195. package/resources/ai/typesafe/index.mjs.map +1 -0
  196. package/resources/ai/typesafe/typesafe.d.mts +10 -0
  197. package/resources/ai/typesafe/typesafe.d.mts.map +1 -0
  198. package/resources/ai/typesafe/typesafe.d.ts +10 -0
  199. package/resources/ai/typesafe/typesafe.d.ts.map +1 -0
  200. package/resources/ai/typesafe/typesafe.js +17 -0
  201. package/resources/ai/typesafe/typesafe.js.map +1 -0
  202. package/resources/ai/typesafe/typesafe.mjs +12 -0
  203. package/resources/ai/typesafe/typesafe.mjs.map +1 -0
  204. package/resources/ai/typesafe/v1.d.mts +285 -0
  205. package/resources/ai/typesafe/v1.d.mts.map +1 -0
  206. package/resources/ai/typesafe/v1.d.ts +285 -0
  207. package/resources/ai/typesafe/v1.d.ts.map +1 -0
  208. package/resources/ai/typesafe/v1.js +72 -0
  209. package/resources/ai/typesafe/v1.js.map +1 -0
  210. package/resources/ai/typesafe/v1.mjs +68 -0
  211. package/resources/ai/typesafe/v1.mjs.map +1 -0
  212. package/resources/ai/typesafe.d.mts +2 -0
  213. package/resources/ai/typesafe.d.mts.map +1 -0
  214. package/resources/ai/typesafe.d.ts +2 -0
  215. package/resources/ai/typesafe.d.ts.map +1 -0
  216. package/resources/ai/typesafe.js +6 -0
  217. package/resources/ai/typesafe.js.map +1 -0
  218. package/resources/ai/typesafe.mjs +3 -0
  219. package/resources/ai/typesafe.mjs.map +1 -0
  220. package/resources/bot-challenge.d.mts +80 -0
  221. package/resources/bot-challenge.d.mts.map +1 -0
  222. package/resources/bot-challenge.d.ts +80 -0
  223. package/resources/bot-challenge.d.ts.map +1 -0
  224. package/resources/bot-challenge.js +35 -0
  225. package/resources/bot-challenge.js.map +1 -0
  226. package/resources/bot-challenge.mjs +31 -0
  227. package/resources/bot-challenge.mjs.map +1 -0
  228. package/resources/bot-sessions.d.mts +49 -0
  229. package/resources/bot-sessions.d.mts.map +1 -0
  230. package/resources/bot-sessions.d.ts +49 -0
  231. package/resources/bot-sessions.d.ts.map +1 -0
  232. package/resources/bot-sessions.js +28 -0
  233. package/resources/bot-sessions.js.map +1 -0
  234. package/resources/bot-sessions.mjs +24 -0
  235. package/resources/bot-sessions.mjs.map +1 -0
  236. package/resources/bot-signup.d.mts +114 -0
  237. package/resources/bot-signup.d.mts.map +1 -0
  238. package/resources/bot-signup.d.ts +114 -0
  239. package/resources/bot-signup.d.ts.map +1 -0
  240. package/resources/bot-signup.js +63 -0
  241. package/resources/bot-signup.js.map +1 -0
  242. package/resources/bot-signup.mjs +59 -0
  243. package/resources/bot-signup.mjs.map +1 -0
  244. package/resources/calls/actions.d.mts +100 -16
  245. package/resources/calls/actions.d.mts.map +1 -1
  246. package/resources/calls/actions.d.ts +100 -16
  247. package/resources/calls/actions.d.ts.map +1 -1
  248. package/resources/calls/calls.d.mts +55 -9
  249. package/resources/calls/calls.d.mts.map +1 -1
  250. package/resources/calls/calls.d.ts +55 -9
  251. package/resources/calls/calls.d.ts.map +1 -1
  252. package/resources/calls/calls.js.map +1 -1
  253. package/resources/calls/calls.mjs.map +1 -1
  254. package/resources/calls/index.d.mts +1 -1
  255. package/resources/calls/index.d.mts.map +1 -1
  256. package/resources/calls/index.d.ts +1 -1
  257. package/resources/calls/index.d.ts.map +1 -1
  258. package/resources/calls/index.js.map +1 -1
  259. package/resources/calls/index.mjs.map +1 -1
  260. package/resources/compute/compute.d.mts +2 -2
  261. package/resources/compute/compute.d.mts.map +1 -1
  262. package/resources/compute/compute.d.ts +2 -2
  263. package/resources/compute/compute.d.ts.map +1 -1
  264. package/resources/compute/compute.js +2 -2
  265. package/resources/compute/compute.js.map +1 -1
  266. package/resources/compute/compute.mjs +2 -2
  267. package/resources/compute/compute.mjs.map +1 -1
  268. package/resources/compute/funcs/export.d.mts +121 -0
  269. package/resources/compute/funcs/export.d.mts.map +1 -0
  270. package/resources/compute/funcs/export.d.ts +121 -0
  271. package/resources/compute/funcs/export.d.ts.map +1 -0
  272. package/resources/compute/funcs/export.js +68 -0
  273. package/resources/compute/funcs/export.js.map +1 -0
  274. package/resources/compute/funcs/export.mjs +64 -0
  275. package/resources/compute/funcs/export.mjs.map +1 -0
  276. package/resources/compute/funcs/funcs.d.mts +214 -0
  277. package/resources/compute/funcs/funcs.d.mts.map +1 -0
  278. package/resources/compute/funcs/funcs.d.ts +214 -0
  279. package/resources/compute/funcs/funcs.d.ts.map +1 -0
  280. package/resources/compute/funcs/funcs.js +80 -0
  281. package/resources/compute/funcs/funcs.js.map +1 -0
  282. package/resources/compute/funcs/funcs.mjs +75 -0
  283. package/resources/compute/funcs/funcs.mjs.map +1 -0
  284. package/resources/compute/funcs/index.d.mts +3 -0
  285. package/resources/compute/funcs/index.d.mts.map +1 -0
  286. package/resources/compute/funcs/index.d.ts +3 -0
  287. package/resources/compute/funcs/index.d.ts.map +1 -0
  288. package/resources/compute/funcs/index.js +9 -0
  289. package/resources/compute/funcs/index.js.map +1 -0
  290. package/resources/compute/funcs/index.mjs +4 -0
  291. package/resources/compute/funcs/index.mjs.map +1 -0
  292. package/resources/compute/funcs.d.mts +1 -178
  293. package/resources/compute/funcs.d.mts.map +1 -1
  294. package/resources/compute/funcs.d.ts +1 -178
  295. package/resources/compute/funcs.d.ts.map +1 -1
  296. package/resources/compute/funcs.js +2 -37
  297. package/resources/compute/funcs.js.map +1 -1
  298. package/resources/compute/funcs.mjs +1 -35
  299. package/resources/compute/funcs.mjs.map +1 -1
  300. package/resources/compute/index.d.mts +1 -1
  301. package/resources/compute/index.d.mts.map +1 -1
  302. package/resources/compute/index.d.ts +1 -1
  303. package/resources/compute/index.d.ts.map +1 -1
  304. package/resources/compute/index.js +2 -2
  305. package/resources/compute/index.js.map +1 -1
  306. package/resources/compute/index.mjs +1 -1
  307. package/resources/compute/index.mjs.map +1 -1
  308. package/resources/conferences/actions.d.mts +7 -1
  309. package/resources/conferences/actions.d.mts.map +1 -1
  310. package/resources/conferences/actions.d.ts +7 -1
  311. package/resources/conferences/actions.d.ts.map +1 -1
  312. package/resources/connections.d.mts +109 -1
  313. package/resources/connections.d.mts.map +1 -1
  314. package/resources/connections.d.ts +109 -1
  315. package/resources/connections.d.ts.map +1 -1
  316. package/resources/connections.js +8 -0
  317. package/resources/connections.js.map +1 -1
  318. package/resources/connections.mjs +8 -0
  319. package/resources/connections.mjs.map +1 -1
  320. package/resources/detail-records.d.mts +18 -1
  321. package/resources/detail-records.d.mts.map +1 -1
  322. package/resources/detail-records.d.ts +18 -1
  323. package/resources/detail-records.d.ts.map +1 -1
  324. package/resources/email-blocks/email-blocks.d.mts +12 -4
  325. package/resources/email-blocks/email-blocks.d.mts.map +1 -1
  326. package/resources/email-blocks/email-blocks.d.ts +12 -4
  327. package/resources/email-blocks/email-blocks.d.ts.map +1 -1
  328. package/resources/email-blocks/email-blocks.js +5 -3
  329. package/resources/email-blocks/email-blocks.js.map +1 -1
  330. package/resources/email-blocks/email-blocks.mjs +5 -3
  331. package/resources/email-blocks/email-blocks.mjs.map +1 -1
  332. package/resources/email-blocks/imports.d.mts +20 -4
  333. package/resources/email-blocks/imports.d.mts.map +1 -1
  334. package/resources/email-blocks/imports.d.ts +20 -4
  335. package/resources/email-blocks/imports.d.ts.map +1 -1
  336. package/resources/email-blocks/imports.js +17 -3
  337. package/resources/email-blocks/imports.js.map +1 -1
  338. package/resources/email-blocks/imports.mjs +17 -3
  339. package/resources/email-blocks/imports.mjs.map +1 -1
  340. package/resources/email-domains/email-domains.d.mts +98 -1
  341. package/resources/email-domains/email-domains.d.mts.map +1 -1
  342. package/resources/email-domains/email-domains.d.ts +98 -1
  343. package/resources/email-domains/email-domains.d.ts.map +1 -1
  344. package/resources/email-domains/email-domains.js +21 -0
  345. package/resources/email-domains/email-domains.js.map +1 -1
  346. package/resources/email-domains/email-domains.mjs +21 -0
  347. package/resources/email-domains/email-domains.mjs.map +1 -1
  348. package/resources/email-domains/index.d.mts +1 -1
  349. package/resources/email-domains/index.d.mts.map +1 -1
  350. package/resources/email-domains/index.d.ts +1 -1
  351. package/resources/email-domains/index.d.ts.map +1 -1
  352. package/resources/email-domains/index.js.map +1 -1
  353. package/resources/email-domains/index.mjs.map +1 -1
  354. package/resources/email-domains/webhooks.d.mts +6 -4
  355. package/resources/email-domains/webhooks.d.mts.map +1 -1
  356. package/resources/email-domains/webhooks.d.ts +6 -4
  357. package/resources/email-domains/webhooks.d.ts.map +1 -1
  358. package/resources/email-events.d.mts +162 -28
  359. package/resources/email-events.d.mts.map +1 -1
  360. package/resources/email-events.d.ts +162 -28
  361. package/resources/email-events.d.ts.map +1 -1
  362. package/resources/email-events.js +15 -6
  363. package/resources/email-events.js.map +1 -1
  364. package/resources/email-events.mjs +15 -6
  365. package/resources/email-events.mjs.map +1 -1
  366. package/resources/email-inboxes/drafts.d.mts +31 -1
  367. package/resources/email-inboxes/drafts.d.mts.map +1 -1
  368. package/resources/email-inboxes/drafts.d.ts +31 -1
  369. package/resources/email-inboxes/drafts.d.ts.map +1 -1
  370. package/resources/email-inboxes/drafts.js.map +1 -1
  371. package/resources/email-inboxes/drafts.mjs.map +1 -1
  372. package/resources/email-messages/email-messages.d.mts +178 -45
  373. package/resources/email-messages/email-messages.d.mts.map +1 -1
  374. package/resources/email-messages/email-messages.d.ts +178 -45
  375. package/resources/email-messages/email-messages.d.ts.map +1 -1
  376. package/resources/email-messages/email-messages.js +43 -9
  377. package/resources/email-messages/email-messages.js.map +1 -1
  378. package/resources/email-messages/email-messages.mjs +43 -9
  379. package/resources/email-messages/email-messages.mjs.map +1 -1
  380. package/resources/email-messages/index.d.mts +1 -1
  381. package/resources/email-messages/index.d.mts.map +1 -1
  382. package/resources/email-messages/index.d.ts +1 -1
  383. package/resources/email-messages/index.d.ts.map +1 -1
  384. package/resources/email-messages/index.js.map +1 -1
  385. package/resources/email-messages/index.mjs.map +1 -1
  386. package/resources/email-messages/recipients.d.mts +2 -2
  387. package/resources/email-messages/recipients.d.mts.map +1 -1
  388. package/resources/email-messages/recipients.d.ts +2 -2
  389. package/resources/email-messages/recipients.d.ts.map +1 -1
  390. package/resources/email-templates.d.mts +170 -0
  391. package/resources/email-templates.d.mts.map +1 -1
  392. package/resources/email-templates.d.ts +170 -0
  393. package/resources/email-templates.d.ts.map +1 -1
  394. package/resources/email-templates.js +6 -0
  395. package/resources/email-templates.js.map +1 -1
  396. package/resources/email-templates.mjs +6 -0
  397. package/resources/email-templates.mjs.map +1 -1
  398. package/resources/index.d.mts +11 -6
  399. package/resources/index.d.mts.map +1 -1
  400. package/resources/index.d.ts +11 -6
  401. package/resources/index.d.ts.map +1 -1
  402. package/resources/index.js +14 -4
  403. package/resources/index.js.map +1 -1
  404. package/resources/index.mjs +5 -0
  405. package/resources/index.mjs.map +1 -1
  406. package/resources/machine-payments.d.mts +142 -0
  407. package/resources/machine-payments.d.mts.map +1 -0
  408. package/resources/machine-payments.d.ts +142 -0
  409. package/resources/machine-payments.d.ts.map +1 -0
  410. package/resources/machine-payments.js +56 -0
  411. package/resources/machine-payments.js.map +1 -0
  412. package/resources/machine-payments.mjs +52 -0
  413. package/resources/machine-payments.mjs.map +1 -0
  414. package/resources/meeting-sessions/actions.d.mts +7 -1
  415. package/resources/meeting-sessions/actions.d.mts.map +1 -1
  416. package/resources/meeting-sessions/actions.d.ts +7 -1
  417. package/resources/meeting-sessions/actions.d.ts.map +1 -1
  418. package/resources/meeting-sessions/actions.js +7 -1
  419. package/resources/meeting-sessions/actions.js.map +1 -1
  420. package/resources/meeting-sessions/actions.mjs +7 -1
  421. package/resources/meeting-sessions/actions.mjs.map +1 -1
  422. package/resources/meeting-sessions/artifacts.d.mts +38 -11
  423. package/resources/meeting-sessions/artifacts.d.mts.map +1 -1
  424. package/resources/meeting-sessions/artifacts.d.ts +38 -11
  425. package/resources/meeting-sessions/artifacts.d.ts.map +1 -1
  426. package/resources/meeting-sessions/artifacts.js +11 -5
  427. package/resources/meeting-sessions/artifacts.js.map +1 -1
  428. package/resources/meeting-sessions/artifacts.mjs +11 -5
  429. package/resources/meeting-sessions/artifacts.mjs.map +1 -1
  430. package/resources/meeting-sessions/meeting-sessions.d.mts +63 -23
  431. package/resources/meeting-sessions/meeting-sessions.d.mts.map +1 -1
  432. package/resources/meeting-sessions/meeting-sessions.d.ts +63 -23
  433. package/resources/meeting-sessions/meeting-sessions.d.ts.map +1 -1
  434. package/resources/meeting-sessions/meeting-sessions.js +0 -2
  435. package/resources/meeting-sessions/meeting-sessions.js.map +1 -1
  436. package/resources/meeting-sessions/meeting-sessions.mjs +0 -2
  437. package/resources/meeting-sessions/meeting-sessions.mjs.map +1 -1
  438. package/resources/messages/messages.d.mts +135 -23
  439. package/resources/messages/messages.d.mts.map +1 -1
  440. package/resources/messages/messages.d.ts +135 -23
  441. package/resources/messages/messages.d.ts.map +1 -1
  442. package/resources/messages/messages.js.map +1 -1
  443. package/resources/messages/messages.mjs.map +1 -1
  444. package/resources/noise-suppression-engines.d.mts +42 -0
  445. package/resources/noise-suppression-engines.d.mts.map +1 -0
  446. package/resources/noise-suppression-engines.d.ts +42 -0
  447. package/resources/noise-suppression-engines.d.ts.map +1 -0
  448. package/resources/noise-suppression-engines.js +21 -0
  449. package/resources/noise-suppression-engines.js.map +1 -0
  450. package/resources/noise-suppression-engines.mjs +17 -0
  451. package/resources/noise-suppression-engines.mjs.map +1 -0
  452. package/resources/phone-numbers/phone-numbers.d.mts +12 -2
  453. package/resources/phone-numbers/phone-numbers.d.mts.map +1 -1
  454. package/resources/phone-numbers/phone-numbers.d.ts +12 -2
  455. package/resources/phone-numbers/phone-numbers.d.ts.map +1 -1
  456. package/resources/phone-numbers/phone-numbers.js.map +1 -1
  457. package/resources/phone-numbers/phone-numbers.mjs.map +1 -1
  458. package/resources/private-wireless-gateways.d.mts +61 -7
  459. package/resources/private-wireless-gateways.d.mts.map +1 -1
  460. package/resources/private-wireless-gateways.d.ts +61 -7
  461. package/resources/private-wireless-gateways.d.ts.map +1 -1
  462. package/resources/private-wireless-gateways.js +1 -1
  463. package/resources/private-wireless-gateways.js.map +1 -1
  464. package/resources/private-wireless-gateways.mjs +1 -1
  465. package/resources/private-wireless-gateways.mjs.map +1 -1
  466. package/resources/speech-to-text/speech-to-text.d.mts +1 -1
  467. package/resources/speech-to-text/speech-to-text.d.mts.map +1 -1
  468. package/resources/speech-to-text/speech-to-text.d.ts +1 -1
  469. package/resources/speech-to-text/speech-to-text.d.ts.map +1 -1
  470. package/resources/texml/accounts/calls/calls.d.mts +126 -9
  471. package/resources/texml/accounts/calls/calls.d.mts.map +1 -1
  472. package/resources/texml/accounts/calls/calls.d.ts +126 -9
  473. package/resources/texml/accounts/calls/calls.d.ts.map +1 -1
  474. package/resources/texml/accounts/calls/calls.js +12 -2
  475. package/resources/texml/accounts/calls/calls.js.map +1 -1
  476. package/resources/texml/accounts/calls/calls.mjs +12 -2
  477. package/resources/texml/accounts/calls/calls.mjs.map +1 -1
  478. package/resources/texml/accounts/conferences/participants.d.mts +39 -0
  479. package/resources/texml/accounts/conferences/participants.d.mts.map +1 -1
  480. package/resources/texml/accounts/conferences/participants.d.ts +39 -0
  481. package/resources/texml/accounts/conferences/participants.d.ts.map +1 -1
  482. package/resources/texml/calls.d.mts +71 -0
  483. package/resources/texml/calls.d.mts.map +1 -0
  484. package/resources/texml/calls.d.ts +71 -0
  485. package/resources/texml/calls.d.ts.map +1 -0
  486. package/resources/texml/calls.js +33 -0
  487. package/resources/texml/calls.js.map +1 -0
  488. package/resources/texml/calls.mjs +29 -0
  489. package/resources/texml/calls.mjs.map +1 -0
  490. package/resources/texml/index.d.mts +1 -0
  491. package/resources/texml/index.d.mts.map +1 -1
  492. package/resources/texml/index.d.ts +1 -0
  493. package/resources/texml/index.d.ts.map +1 -1
  494. package/resources/texml/index.js +3 -1
  495. package/resources/texml/index.js.map +1 -1
  496. package/resources/texml/index.mjs +1 -0
  497. package/resources/texml/index.mjs.map +1 -1
  498. package/resources/texml/texml.d.mts +43 -0
  499. package/resources/texml/texml.d.mts.map +1 -1
  500. package/resources/texml/texml.d.ts +43 -0
  501. package/resources/texml/texml.d.ts.map +1 -1
  502. package/resources/texml/texml.js +4 -0
  503. package/resources/texml/texml.js.map +1 -1
  504. package/resources/texml/texml.mjs +4 -0
  505. package/resources/texml/texml.mjs.map +1 -1
  506. package/resources/text-to-speech/text-to-speech.d.mts +61 -9
  507. package/resources/text-to-speech/text-to-speech.d.mts.map +1 -1
  508. package/resources/text-to-speech/text-to-speech.d.ts +61 -9
  509. package/resources/text-to-speech/text-to-speech.d.ts.map +1 -1
  510. package/resources/text-to-speech/text-to-speech.js +10 -3
  511. package/resources/text-to-speech/text-to-speech.js.map +1 -1
  512. package/resources/text-to-speech/text-to-speech.mjs +10 -3
  513. package/resources/text-to-speech/text-to-speech.mjs.map +1 -1
  514. package/resources/voice-clones.d.mts +6 -4
  515. package/resources/voice-clones.d.mts.map +1 -1
  516. package/resources/voice-clones.d.ts +6 -4
  517. package/resources/voice-clones.d.ts.map +1 -1
  518. package/resources/voice-clones.js +4 -2
  519. package/resources/voice-clones.js.map +1 -1
  520. package/resources/voice-clones.mjs +4 -2
  521. package/resources/voice-clones.mjs.map +1 -1
  522. package/resources/webhooks.d.mts +40 -53
  523. package/resources/webhooks.d.mts.map +1 -1
  524. package/resources/webhooks.d.ts +40 -53
  525. package/resources/webhooks.d.ts.map +1 -1
  526. package/src/client.ts +92 -6
  527. package/src/resources/ai/ai.ts +21 -1
  528. package/src/resources/ai/assistants/assistants.ts +502 -56
  529. package/src/resources/ai/assistants/index.ts +1 -0
  530. package/src/resources/ai/assistants/versions.ts +36 -14
  531. package/src/resources/ai/audio.ts +93 -45
  532. package/src/resources/ai/chat.ts +2 -11
  533. package/src/resources/ai/collections/collections.ts +3 -1
  534. package/src/resources/ai/collections/index.ts +2 -0
  535. package/src/resources/ai/collections/sources.ts +38 -4
  536. package/src/resources/ai/index.ts +9 -1
  537. package/src/resources/ai/memory/index.ts +4 -0
  538. package/src/resources/ai/memory/memory.ts +19 -0
  539. package/src/resources/ai/memory/namespaces/index.ts +21 -0
  540. package/src/resources/ai/memory/namespaces/namespaces.ts +116 -0
  541. package/src/resources/ai/memory/namespaces/profiles/index.ts +35 -0
  542. package/src/resources/ai/memory/namespaces/profiles/memories.ts +170 -0
  543. package/src/resources/ai/memory/namespaces/profiles/profiles.ts +482 -0
  544. package/src/resources/ai/memory/namespaces/profiles/sources.ts +226 -0
  545. package/src/resources/ai/memory/namespaces/profiles.ts +3 -0
  546. package/src/resources/ai/memory/namespaces/settings.ts +129 -0
  547. package/src/resources/ai/memory/namespaces.ts +3 -0
  548. package/src/resources/ai/memory.ts +3 -0
  549. package/src/resources/ai/openai/chat.ts +11 -11
  550. package/src/resources/ai/openai/index.ts +6 -1
  551. package/src/resources/ai/openai/openai.ts +2 -1
  552. package/src/resources/ai/typesafe/index.ts +4 -0
  553. package/src/resources/ai/typesafe/typesafe.ts +19 -0
  554. package/src/resources/ai/typesafe/v1.ts +310 -0
  555. package/src/resources/ai/typesafe.ts +3 -0
  556. package/src/resources/bot-challenge.ts +101 -0
  557. package/src/resources/bot-sessions.ts +61 -0
  558. package/src/resources/bot-signup.ts +140 -0
  559. package/src/resources/calls/actions.ts +115 -14
  560. package/src/resources/calls/calls.ts +64 -7
  561. package/src/resources/calls/index.ts +1 -0
  562. package/src/resources/compute/compute.ts +2 -2
  563. package/src/resources/compute/funcs/export.ts +156 -0
  564. package/src/resources/compute/funcs/funcs.ts +341 -0
  565. package/src/resources/compute/funcs/index.ts +15 -0
  566. package/src/resources/compute/funcs.ts +1 -296
  567. package/src/resources/compute/index.ts +1 -1
  568. package/src/resources/conferences/actions.ts +8 -1
  569. package/src/resources/connections.ts +133 -0
  570. package/src/resources/detail-records.ts +18 -1
  571. package/src/resources/email-blocks/email-blocks.ts +12 -4
  572. package/src/resources/email-blocks/imports.ts +20 -4
  573. package/src/resources/email-domains/email-domains.ts +120 -0
  574. package/src/resources/email-domains/index.ts +1 -0
  575. package/src/resources/email-domains/webhooks.ts +9 -4
  576. package/src/resources/email-events.ts +220 -35
  577. package/src/resources/email-inboxes/drafts.ts +32 -1
  578. package/src/resources/email-messages/email-messages.ts +195 -49
  579. package/src/resources/email-messages/index.ts +2 -1
  580. package/src/resources/email-messages/recipients.ts +6 -2
  581. package/src/resources/email-templates.ts +185 -0
  582. package/src/resources/index.ts +29 -3
  583. package/src/resources/machine-payments.ts +169 -0
  584. package/src/resources/meeting-sessions/actions.ts +7 -1
  585. package/src/resources/meeting-sessions/artifacts.ts +42 -11
  586. package/src/resources/meeting-sessions/meeting-sessions.ts +63 -24
  587. package/src/resources/messages/messages.ts +168 -23
  588. package/src/resources/noise-suppression-engines.ts +51 -0
  589. package/src/resources/phone-numbers/phone-numbers.ts +13 -2
  590. package/src/resources/private-wireless-gateways.ts +76 -8
  591. package/src/resources/speech-to-text/speech-to-text.ts +1 -0
  592. package/src/resources/texml/accounts/calls/calls.ts +158 -10
  593. package/src/resources/texml/accounts/conferences/participants.ts +46 -0
  594. package/src/resources/texml/calls.ts +90 -0
  595. package/src/resources/texml/index.ts +1 -0
  596. package/src/resources/texml/texml.ts +56 -0
  597. package/src/resources/text-to-speech/text-to-speech.ts +69 -9
  598. package/src/resources/voice-clones.ts +6 -4
  599. package/src/resources/webhooks.ts +47 -62
  600. package/src/version.ts +1 -1
  601. package/version.d.mts +1 -1
  602. package/version.d.ts +1 -1
  603. package/version.js +1 -1
  604. package/version.mjs +1 -1
@@ -0,0 +1,285 @@
1
+ import { APIResource } from "../../../core/resource.mjs";
2
+ import { APIPromise } from "../../../core/api-promise.mjs";
3
+ import { RequestOptions } from "../../../internal/request-options.mjs";
4
+ /**
5
+ * Beta API for evaluating shared context with typed questions and structured answers using Flash or Pro.
6
+ */
7
+ export declare class V1 extends APIResource {
8
+ /**
9
+ * **Beta API.** Choose telnyx/decision-flash for the lowest cost and latency, or
10
+ * telnyx/decision-pro for decisions that require long context, including inputs
11
+ * beyond Jev’s 32k per-decision limit. Omitted model defaults to
12
+ * telnyx/decision-flash.
13
+ *
14
+ * Evaluate shared context using named choice, noul (yes/no), and score questions.
15
+ * Returns TypeSafe System One-compatible answer shapes, the selected public model
16
+ * alias, and token usage. See the
17
+ * [decision model guide](https://developers.telnyx.com/docs/inference/decision-models)
18
+ * for examples and compatibility limits.
19
+ *
20
+ * The supported request subset requires instructions for every question, string
21
+ * descriptions for criteria (or null for choice descriptions), 1–64 questions, and
22
+ * 2–64 options for choice and score questions. The model field accepts only
23
+ * telnyx/decision-flash or telnyx/decision-pro. Unsupported model values and
24
+ * unknown fields are rejected. The endpoint is synchronous and does not stream.
25
+ *
26
+ * Use the TypeSafe Python SDK with base_url set to
27
+ * https://api.telnyx.com/v2/ai/typesafe and a Telnyx API key. The SDK appends
28
+ * /v1/systemone; explicitly set model to a supported Telnyx alias because its own
29
+ * default model is not supported. Compatibility covers this operation and the
30
+ * documented request subset; it does not include TypeSafe model listing. Scores
31
+ * describe relative preference, not calibrated correctness.
32
+ *
33
+ * @example
34
+ * ```ts
35
+ * const response = await client.ai.typesafe.v1.systemone({
36
+ * questions: {
37
+ * team: {
38
+ * type: 'choice',
39
+ * instructions:
40
+ * 'Choose the team that should handle this incident.',
41
+ * criteria: {
42
+ * billing: 'Payments and refunds',
43
+ * technical_support:
44
+ * 'Service faults and technical problems',
45
+ * sales: 'New purchases',
46
+ * },
47
+ * },
48
+ * production_incident: {
49
+ * type: 'noul',
50
+ * instructions:
51
+ * 'Does the message describe an active production incident?',
52
+ * },
53
+ * urgency: {
54
+ * type: 'score',
55
+ * instructions: 'Rate operational urgency.',
56
+ * criteria: ['Low', 'Normal', 'High', 'Critical'],
57
+ * },
58
+ * },
59
+ * state:
60
+ * 'Our production calls are failing. Every customer is affected.',
61
+ * model: 'telnyx/decision-flash',
62
+ * });
63
+ * ```
64
+ */
65
+ systemone(body: V1SystemoneParams, options?: RequestOptions): APIPromise<V1SystemoneResponse>;
66
+ }
67
+ /**
68
+ * A complete synchronous evaluation. Answers are returned directly without a data
69
+ * wrapper.
70
+ */
71
+ export interface V1SystemoneResponse {
72
+ /**
73
+ * Answers keyed by exactly the question IDs in the request. Each answer type
74
+ * matches its question.
75
+ */
76
+ answers: {
77
+ [key: string]: V1SystemoneResponse.DecisionModelChoiceAnswer | V1SystemoneResponse.DecisionModelNoulAnswer | V1SystemoneResponse.DecisionModelScoreAnswer;
78
+ };
79
+ /**
80
+ * Public model alias used to evaluate the request. Returns telnyx/decision-flash
81
+ * when model was omitted. The underlying model is managed by Telnyx.
82
+ */
83
+ model: 'telnyx/decision-flash' | 'telnyx/decision-pro';
84
+ /**
85
+ * Token usage for the completed evaluation.
86
+ */
87
+ usage: V1SystemoneResponse.Usage;
88
+ }
89
+ export declare namespace V1SystemoneResponse {
90
+ /**
91
+ * A selected option and the distribution across all supplied option keys.
92
+ */
93
+ interface DecisionModelChoiceAnswer {
94
+ /**
95
+ * The option key with the highest relative score. Ties favor the first option in
96
+ * request order.
97
+ */
98
+ choice: string;
99
+ /**
100
+ * Normalized entropy confidence: 1 - H(p) / ln(N), where H(p) = -sum(p \* ln(p))
101
+ * and N is the number of options. Zero indicates a uniform distribution; one
102
+ * indicates concentration on one option. This is neither the winning probability
103
+ * nor calibrated correctness.
104
+ */
105
+ confidence: number;
106
+ /**
107
+ * Relative scores normalized across the supplied options, summing approximately
108
+ * to 1. These are not calibrated probabilities of correctness.
109
+ */
110
+ probabilities: {
111
+ [key: string]: number;
112
+ };
113
+ /**
114
+ * Answer type.
115
+ */
116
+ type: 'choice';
117
+ }
118
+ /**
119
+ * A yes/no score with no separate confidence or probabilities fields.
120
+ */
121
+ interface DecisionModelNoulAnswer {
122
+ /**
123
+ * Score of the positive outcome. Values near 1 favor yes; values near 0 favor no.
124
+ * This is a number, not a Boolean, and is not calibrated correctness.
125
+ */
126
+ noul: number;
127
+ /**
128
+ * Answer type.
129
+ */
130
+ type: 'noul';
131
+ }
132
+ /**
133
+ * An expected rating over the ordered criteria.
134
+ */
135
+ interface DecisionModelScoreAnswer {
136
+ /**
137
+ * Normalized entropy confidence: 1 - H(p) / ln(N), where H(p) = -sum(p \* ln(p))
138
+ * and N is the number of options. Zero indicates a uniform distribution; one
139
+ * indicates concentration on one option. This is neither the winning probability
140
+ * nor calibrated correctness.
141
+ */
142
+ confidence: number;
143
+ /**
144
+ * Criterion descriptions keyed by stringified zero-based indices, such as "0",
145
+ * "1", and "2".
146
+ */
147
+ legend: {
148
+ [key: string]: string;
149
+ };
150
+ /**
151
+ * Relative scores keyed by the same stringified indices as legend.
152
+ */
153
+ probabilities: {
154
+ [key: string]: number;
155
+ };
156
+ /**
157
+ * Expected zero-based criterion index: sum(index \* probability). Ranges from 0 to
158
+ * N-1 for N criteria; fractional values are valid.
159
+ */
160
+ score: number;
161
+ /**
162
+ * Answer type.
163
+ */
164
+ type: 'score';
165
+ }
166
+ /**
167
+ * Token usage for the completed evaluation.
168
+ */
169
+ interface Usage {
170
+ /**
171
+ * Input tokens processed, including shared-context preparation and question
172
+ * evaluation. This can exceed the token count of the unique input text.
173
+ */
174
+ input_tokens: number;
175
+ /**
176
+ * Output tokens used for the evaluation, including shared-context preparation.
177
+ */
178
+ output_tokens: number;
179
+ }
180
+ }
181
+ export interface V1SystemoneParams {
182
+ /**
183
+ * Between 1 and 64 named questions. Each key identifies the corresponding answer.
184
+ */
185
+ questions: {
186
+ [key: string]: V1SystemoneParams.DecisionModelChoiceQuestion | V1SystemoneParams.DecisionModelNoulQuestion | V1SystemoneParams.DecisionModelScoreQuestion;
187
+ };
188
+ /**
189
+ * Shared context evaluated by every question.
190
+ */
191
+ state: string | {
192
+ [key: string]: unknown;
193
+ } | Array<unknown>;
194
+ /**
195
+ * Public model alias. telnyx/decision-flash offers the lowest cost and latency;
196
+ * telnyx/decision-pro supports decisions that require long context, including
197
+ * inputs beyond Jev’s 32k per-decision limit. Applies to every question in the
198
+ * request. Other values are rejected.
199
+ */
200
+ model?: 'telnyx/decision-flash' | 'telnyx/decision-pro';
201
+ }
202
+ export declare namespace V1SystemoneParams {
203
+ /**
204
+ * Select one of the supplied options.
205
+ */
206
+ interface DecisionModelChoiceQuestion {
207
+ /**
208
+ * Between 2 and 64 option keys mapped to description strings or null. A null
209
+ * description uses the option key as its text.
210
+ */
211
+ criteria: {
212
+ [key: string]: string | null;
213
+ };
214
+ /**
215
+ * Required instructions describing what to decide about the shared state.
216
+ */
217
+ instructions: string | {
218
+ [key: string]: unknown;
219
+ } | Array<unknown>;
220
+ /**
221
+ * Question type.
222
+ */
223
+ type: 'choice';
224
+ }
225
+ /**
226
+ * Evaluate a yes/no question. Omit criteria to use Yes and No descriptions.
227
+ */
228
+ interface DecisionModelNoulQuestion {
229
+ /**
230
+ * Required instructions describing what to decide about the shared state.
231
+ */
232
+ instructions: string | {
233
+ [key: string]: unknown;
234
+ } | Array<unknown>;
235
+ /**
236
+ * Question type.
237
+ */
238
+ type: 'noul';
239
+ /**
240
+ * Optional descriptions for the positive and negative outcomes. Descriptions must
241
+ * be strings.
242
+ */
243
+ criteria?: DecisionModelNoulQuestion.Criteria;
244
+ }
245
+ namespace DecisionModelNoulQuestion {
246
+ /**
247
+ * Optional descriptions for the positive and negative outcomes. Descriptions must
248
+ * be strings.
249
+ */
250
+ interface Criteria {
251
+ /**
252
+ * Description of the negative outcome.
253
+ */
254
+ false?: string;
255
+ /**
256
+ * Description of the positive outcome.
257
+ */
258
+ true?: string;
259
+ }
260
+ }
261
+ /**
262
+ * Rate the state against an ordered rubric.
263
+ */
264
+ interface DecisionModelScoreQuestion {
265
+ /**
266
+ * Between 2 and 64 description strings in ascending score order. Indices start at
267
+ * zero.
268
+ */
269
+ criteria: Array<string>;
270
+ /**
271
+ * Required instructions describing what to decide about the shared state.
272
+ */
273
+ instructions: string | {
274
+ [key: string]: unknown;
275
+ } | Array<unknown>;
276
+ /**
277
+ * Question type.
278
+ */
279
+ type: 'score';
280
+ }
281
+ }
282
+ export declare namespace V1 {
283
+ export { type V1SystemoneResponse as V1SystemoneResponse, type V1SystemoneParams as V1SystemoneParams };
284
+ }
285
+ //# sourceMappingURL=v1.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v1.d.mts","sourceRoot":"","sources":["../../../src/resources/ai/typesafe/v1.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,mCAA+B;AACrD,OAAO,EAAE,UAAU,EAAE,sCAAkC;AACvD,OAAO,EAAE,cAAc,EAAE,8CAA0C;AAEnE;;GAEG;AACH,qBAAa,EAAG,SAAQ,WAAW;IACjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAwDG;IACH,SAAS,CAAC,IAAI,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,mBAAmB,CAAC;CAG9F;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,OAAO,EAAE;QACP,CAAC,GAAG,EAAE,MAAM,GACR,mBAAmB,CAAC,yBAAyB,GAC7C,mBAAmB,CAAC,uBAAuB,GAC3C,mBAAmB,CAAC,wBAAwB,CAAC;KAClD,CAAC;IAEF;;;OAGG;IACH,KAAK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ACf;CACF;AAED,MAAM,CAAC,OAAO,WAAW,EAAE,CAAC;IAC1B,OAAO,EAAE,KAAK,mBAAmB,IAAI,mBAAmB,EAAE,KAAK,iBAAiB,IAAI,iBAAiB,EAAE,CAAC;CACzG"}
@@ -0,0 +1,285 @@
1
+ import { APIResource } from "../../../core/resource.js";
2
+ import { APIPromise } from "../../../core/api-promise.js";
3
+ import { RequestOptions } from "../../../internal/request-options.js";
4
+ /**
5
+ * Beta API for evaluating shared context with typed questions and structured answers using Flash or Pro.
6
+ */
7
+ export declare class V1 extends APIResource {
8
+ /**
9
+ * **Beta API.** Choose telnyx/decision-flash for the lowest cost and latency, or
10
+ * telnyx/decision-pro for decisions that require long context, including inputs
11
+ * beyond Jev’s 32k per-decision limit. Omitted model defaults to
12
+ * telnyx/decision-flash.
13
+ *
14
+ * Evaluate shared context using named choice, noul (yes/no), and score questions.
15
+ * Returns TypeSafe System One-compatible answer shapes, the selected public model
16
+ * alias, and token usage. See the
17
+ * [decision model guide](https://developers.telnyx.com/docs/inference/decision-models)
18
+ * for examples and compatibility limits.
19
+ *
20
+ * The supported request subset requires instructions for every question, string
21
+ * descriptions for criteria (or null for choice descriptions), 1–64 questions, and
22
+ * 2–64 options for choice and score questions. The model field accepts only
23
+ * telnyx/decision-flash or telnyx/decision-pro. Unsupported model values and
24
+ * unknown fields are rejected. The endpoint is synchronous and does not stream.
25
+ *
26
+ * Use the TypeSafe Python SDK with base_url set to
27
+ * https://api.telnyx.com/v2/ai/typesafe and a Telnyx API key. The SDK appends
28
+ * /v1/systemone; explicitly set model to a supported Telnyx alias because its own
29
+ * default model is not supported. Compatibility covers this operation and the
30
+ * documented request subset; it does not include TypeSafe model listing. Scores
31
+ * describe relative preference, not calibrated correctness.
32
+ *
33
+ * @example
34
+ * ```ts
35
+ * const response = await client.ai.typesafe.v1.systemone({
36
+ * questions: {
37
+ * team: {
38
+ * type: 'choice',
39
+ * instructions:
40
+ * 'Choose the team that should handle this incident.',
41
+ * criteria: {
42
+ * billing: 'Payments and refunds',
43
+ * technical_support:
44
+ * 'Service faults and technical problems',
45
+ * sales: 'New purchases',
46
+ * },
47
+ * },
48
+ * production_incident: {
49
+ * type: 'noul',
50
+ * instructions:
51
+ * 'Does the message describe an active production incident?',
52
+ * },
53
+ * urgency: {
54
+ * type: 'score',
55
+ * instructions: 'Rate operational urgency.',
56
+ * criteria: ['Low', 'Normal', 'High', 'Critical'],
57
+ * },
58
+ * },
59
+ * state:
60
+ * 'Our production calls are failing. Every customer is affected.',
61
+ * model: 'telnyx/decision-flash',
62
+ * });
63
+ * ```
64
+ */
65
+ systemone(body: V1SystemoneParams, options?: RequestOptions): APIPromise<V1SystemoneResponse>;
66
+ }
67
+ /**
68
+ * A complete synchronous evaluation. Answers are returned directly without a data
69
+ * wrapper.
70
+ */
71
+ export interface V1SystemoneResponse {
72
+ /**
73
+ * Answers keyed by exactly the question IDs in the request. Each answer type
74
+ * matches its question.
75
+ */
76
+ answers: {
77
+ [key: string]: V1SystemoneResponse.DecisionModelChoiceAnswer | V1SystemoneResponse.DecisionModelNoulAnswer | V1SystemoneResponse.DecisionModelScoreAnswer;
78
+ };
79
+ /**
80
+ * Public model alias used to evaluate the request. Returns telnyx/decision-flash
81
+ * when model was omitted. The underlying model is managed by Telnyx.
82
+ */
83
+ model: 'telnyx/decision-flash' | 'telnyx/decision-pro';
84
+ /**
85
+ * Token usage for the completed evaluation.
86
+ */
87
+ usage: V1SystemoneResponse.Usage;
88
+ }
89
+ export declare namespace V1SystemoneResponse {
90
+ /**
91
+ * A selected option and the distribution across all supplied option keys.
92
+ */
93
+ interface DecisionModelChoiceAnswer {
94
+ /**
95
+ * The option key with the highest relative score. Ties favor the first option in
96
+ * request order.
97
+ */
98
+ choice: string;
99
+ /**
100
+ * Normalized entropy confidence: 1 - H(p) / ln(N), where H(p) = -sum(p \* ln(p))
101
+ * and N is the number of options. Zero indicates a uniform distribution; one
102
+ * indicates concentration on one option. This is neither the winning probability
103
+ * nor calibrated correctness.
104
+ */
105
+ confidence: number;
106
+ /**
107
+ * Relative scores normalized across the supplied options, summing approximately
108
+ * to 1. These are not calibrated probabilities of correctness.
109
+ */
110
+ probabilities: {
111
+ [key: string]: number;
112
+ };
113
+ /**
114
+ * Answer type.
115
+ */
116
+ type: 'choice';
117
+ }
118
+ /**
119
+ * A yes/no score with no separate confidence or probabilities fields.
120
+ */
121
+ interface DecisionModelNoulAnswer {
122
+ /**
123
+ * Score of the positive outcome. Values near 1 favor yes; values near 0 favor no.
124
+ * This is a number, not a Boolean, and is not calibrated correctness.
125
+ */
126
+ noul: number;
127
+ /**
128
+ * Answer type.
129
+ */
130
+ type: 'noul';
131
+ }
132
+ /**
133
+ * An expected rating over the ordered criteria.
134
+ */
135
+ interface DecisionModelScoreAnswer {
136
+ /**
137
+ * Normalized entropy confidence: 1 - H(p) / ln(N), where H(p) = -sum(p \* ln(p))
138
+ * and N is the number of options. Zero indicates a uniform distribution; one
139
+ * indicates concentration on one option. This is neither the winning probability
140
+ * nor calibrated correctness.
141
+ */
142
+ confidence: number;
143
+ /**
144
+ * Criterion descriptions keyed by stringified zero-based indices, such as "0",
145
+ * "1", and "2".
146
+ */
147
+ legend: {
148
+ [key: string]: string;
149
+ };
150
+ /**
151
+ * Relative scores keyed by the same stringified indices as legend.
152
+ */
153
+ probabilities: {
154
+ [key: string]: number;
155
+ };
156
+ /**
157
+ * Expected zero-based criterion index: sum(index \* probability). Ranges from 0 to
158
+ * N-1 for N criteria; fractional values are valid.
159
+ */
160
+ score: number;
161
+ /**
162
+ * Answer type.
163
+ */
164
+ type: 'score';
165
+ }
166
+ /**
167
+ * Token usage for the completed evaluation.
168
+ */
169
+ interface Usage {
170
+ /**
171
+ * Input tokens processed, including shared-context preparation and question
172
+ * evaluation. This can exceed the token count of the unique input text.
173
+ */
174
+ input_tokens: number;
175
+ /**
176
+ * Output tokens used for the evaluation, including shared-context preparation.
177
+ */
178
+ output_tokens: number;
179
+ }
180
+ }
181
+ export interface V1SystemoneParams {
182
+ /**
183
+ * Between 1 and 64 named questions. Each key identifies the corresponding answer.
184
+ */
185
+ questions: {
186
+ [key: string]: V1SystemoneParams.DecisionModelChoiceQuestion | V1SystemoneParams.DecisionModelNoulQuestion | V1SystemoneParams.DecisionModelScoreQuestion;
187
+ };
188
+ /**
189
+ * Shared context evaluated by every question.
190
+ */
191
+ state: string | {
192
+ [key: string]: unknown;
193
+ } | Array<unknown>;
194
+ /**
195
+ * Public model alias. telnyx/decision-flash offers the lowest cost and latency;
196
+ * telnyx/decision-pro supports decisions that require long context, including
197
+ * inputs beyond Jev’s 32k per-decision limit. Applies to every question in the
198
+ * request. Other values are rejected.
199
+ */
200
+ model?: 'telnyx/decision-flash' | 'telnyx/decision-pro';
201
+ }
202
+ export declare namespace V1SystemoneParams {
203
+ /**
204
+ * Select one of the supplied options.
205
+ */
206
+ interface DecisionModelChoiceQuestion {
207
+ /**
208
+ * Between 2 and 64 option keys mapped to description strings or null. A null
209
+ * description uses the option key as its text.
210
+ */
211
+ criteria: {
212
+ [key: string]: string | null;
213
+ };
214
+ /**
215
+ * Required instructions describing what to decide about the shared state.
216
+ */
217
+ instructions: string | {
218
+ [key: string]: unknown;
219
+ } | Array<unknown>;
220
+ /**
221
+ * Question type.
222
+ */
223
+ type: 'choice';
224
+ }
225
+ /**
226
+ * Evaluate a yes/no question. Omit criteria to use Yes and No descriptions.
227
+ */
228
+ interface DecisionModelNoulQuestion {
229
+ /**
230
+ * Required instructions describing what to decide about the shared state.
231
+ */
232
+ instructions: string | {
233
+ [key: string]: unknown;
234
+ } | Array<unknown>;
235
+ /**
236
+ * Question type.
237
+ */
238
+ type: 'noul';
239
+ /**
240
+ * Optional descriptions for the positive and negative outcomes. Descriptions must
241
+ * be strings.
242
+ */
243
+ criteria?: DecisionModelNoulQuestion.Criteria;
244
+ }
245
+ namespace DecisionModelNoulQuestion {
246
+ /**
247
+ * Optional descriptions for the positive and negative outcomes. Descriptions must
248
+ * be strings.
249
+ */
250
+ interface Criteria {
251
+ /**
252
+ * Description of the negative outcome.
253
+ */
254
+ false?: string;
255
+ /**
256
+ * Description of the positive outcome.
257
+ */
258
+ true?: string;
259
+ }
260
+ }
261
+ /**
262
+ * Rate the state against an ordered rubric.
263
+ */
264
+ interface DecisionModelScoreQuestion {
265
+ /**
266
+ * Between 2 and 64 description strings in ascending score order. Indices start at
267
+ * zero.
268
+ */
269
+ criteria: Array<string>;
270
+ /**
271
+ * Required instructions describing what to decide about the shared state.
272
+ */
273
+ instructions: string | {
274
+ [key: string]: unknown;
275
+ } | Array<unknown>;
276
+ /**
277
+ * Question type.
278
+ */
279
+ type: 'score';
280
+ }
281
+ }
282
+ export declare namespace V1 {
283
+ export { type V1SystemoneResponse as V1SystemoneResponse, type V1SystemoneParams as V1SystemoneParams };
284
+ }
285
+ //# sourceMappingURL=v1.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v1.d.ts","sourceRoot":"","sources":["../../../src/resources/ai/typesafe/v1.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,kCAA+B;AACrD,OAAO,EAAE,UAAU,EAAE,qCAAkC;AACvD,OAAO,EAAE,cAAc,EAAE,6CAA0C;AAEnE;;GAEG;AACH,qBAAa,EAAG,SAAQ,WAAW;IACjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAwDG;IACH,SAAS,CAAC,IAAI,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,mBAAmB,CAAC;CAG9F;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,OAAO,EAAE;QACP,CAAC,GAAG,EAAE,MAAM,GACR,mBAAmB,CAAC,yBAAyB,GAC7C,mBAAmB,CAAC,uBAAuB,GAC3C,mBAAmB,CAAC,wBAAwB,CAAC;KAClD,CAAC;IAEF;;;OAGG;IACH,KAAK,EAAE,uBAAuB,GAAG,qBAAqB,CAAC;IA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AAE,CAAC;IAC1B,OAAO,EAAE,KAAK,mBAAmB,IAAI,mBAAmB,EAAE,KAAK,iBAAiB,IAAI,iBAAiB,EAAE,CAAC;CACzG"}
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.V1 = void 0;
5
+ const resource_1 = require("../../../core/resource.js");
6
+ /**
7
+ * Beta API for evaluating shared context with typed questions and structured answers using Flash or Pro.
8
+ */
9
+ class V1 extends resource_1.APIResource {
10
+ /**
11
+ * **Beta API.** Choose telnyx/decision-flash for the lowest cost and latency, or
12
+ * telnyx/decision-pro for decisions that require long context, including inputs
13
+ * beyond Jev’s 32k per-decision limit. Omitted model defaults to
14
+ * telnyx/decision-flash.
15
+ *
16
+ * Evaluate shared context using named choice, noul (yes/no), and score questions.
17
+ * Returns TypeSafe System One-compatible answer shapes, the selected public model
18
+ * alias, and token usage. See the
19
+ * [decision model guide](https://developers.telnyx.com/docs/inference/decision-models)
20
+ * for examples and compatibility limits.
21
+ *
22
+ * The supported request subset requires instructions for every question, string
23
+ * descriptions for criteria (or null for choice descriptions), 1–64 questions, and
24
+ * 2–64 options for choice and score questions. The model field accepts only
25
+ * telnyx/decision-flash or telnyx/decision-pro. Unsupported model values and
26
+ * unknown fields are rejected. The endpoint is synchronous and does not stream.
27
+ *
28
+ * Use the TypeSafe Python SDK with base_url set to
29
+ * https://api.telnyx.com/v2/ai/typesafe and a Telnyx API key. The SDK appends
30
+ * /v1/systemone; explicitly set model to a supported Telnyx alias because its own
31
+ * default model is not supported. Compatibility covers this operation and the
32
+ * documented request subset; it does not include TypeSafe model listing. Scores
33
+ * describe relative preference, not calibrated correctness.
34
+ *
35
+ * @example
36
+ * ```ts
37
+ * const response = await client.ai.typesafe.v1.systemone({
38
+ * questions: {
39
+ * team: {
40
+ * type: 'choice',
41
+ * instructions:
42
+ * 'Choose the team that should handle this incident.',
43
+ * criteria: {
44
+ * billing: 'Payments and refunds',
45
+ * technical_support:
46
+ * 'Service faults and technical problems',
47
+ * sales: 'New purchases',
48
+ * },
49
+ * },
50
+ * production_incident: {
51
+ * type: 'noul',
52
+ * instructions:
53
+ * 'Does the message describe an active production incident?',
54
+ * },
55
+ * urgency: {
56
+ * type: 'score',
57
+ * instructions: 'Rate operational urgency.',
58
+ * criteria: ['Low', 'Normal', 'High', 'Critical'],
59
+ * },
60
+ * },
61
+ * state:
62
+ * 'Our production calls are failing. Every customer is affected.',
63
+ * model: 'telnyx/decision-flash',
64
+ * });
65
+ * ```
66
+ */
67
+ systemone(body, options) {
68
+ return this._client.post('/ai/typesafe/v1/systemone', { body, ...options });
69
+ }
70
+ }
71
+ exports.V1 = V1;
72
+ //# sourceMappingURL=v1.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v1.js","sourceRoot":"","sources":["../../../src/resources/ai/typesafe/v1.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAIrD;;GAEG;AACH,MAAa,EAAG,SAAQ,sBAAW;IACjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAwDG;IACH,SAAS,CAAC,IAAuB,EAAE,OAAwB;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,2BAA2B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9E,CAAC;CACF;AA7DD,gBA6DC"}