telnyx 7.28.0 → 7.29.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 (534) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/client.d.mts +35 -4
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +35 -4
  5. package/client.d.ts.map +1 -1
  6. package/client.js +31 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +31 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/addresses/actions.d.mts +19 -4
  12. package/resources/addresses/actions.d.mts.map +1 -1
  13. package/resources/addresses/actions.d.ts +19 -4
  14. package/resources/addresses/actions.d.ts.map +1 -1
  15. package/resources/ai/ai.d.mts +4 -0
  16. package/resources/ai/ai.d.mts.map +1 -1
  17. package/resources/ai/ai.d.ts +4 -0
  18. package/resources/ai/ai.d.ts.map +1 -1
  19. package/resources/ai/ai.js +4 -0
  20. package/resources/ai/ai.js.map +1 -1
  21. package/resources/ai/ai.mjs +4 -0
  22. package/resources/ai/ai.mjs.map +1 -1
  23. package/resources/ai/assistants/assistants.d.mts +31 -27
  24. package/resources/ai/assistants/assistants.d.mts.map +1 -1
  25. package/resources/ai/assistants/assistants.d.ts +31 -27
  26. package/resources/ai/assistants/assistants.d.ts.map +1 -1
  27. package/resources/ai/assistants/assistants.js.map +1 -1
  28. package/resources/ai/assistants/assistants.mjs.map +1 -1
  29. package/resources/ai/avatars.d.mts +9 -9
  30. package/resources/ai/avatars.d.ts +9 -9
  31. package/resources/ai/avatars.js +9 -9
  32. package/resources/ai/avatars.mjs +9 -9
  33. package/resources/ai/index.d.mts +1 -0
  34. package/resources/ai/index.d.mts.map +1 -1
  35. package/resources/ai/index.d.ts +1 -0
  36. package/resources/ai/index.d.ts.map +1 -1
  37. package/resources/ai/index.js +5 -3
  38. package/resources/ai/index.js.map +1 -1
  39. package/resources/ai/index.mjs +1 -0
  40. package/resources/ai/index.mjs.map +1 -1
  41. package/resources/ai/tests/index.d.mts +4 -0
  42. package/resources/ai/tests/index.d.mts.map +1 -0
  43. package/resources/ai/tests/index.d.ts +4 -0
  44. package/resources/ai/tests/index.d.ts.map +1 -0
  45. package/resources/ai/tests/index.js +11 -0
  46. package/resources/ai/tests/index.js.map +1 -0
  47. package/resources/ai/tests/index.mjs +5 -0
  48. package/resources/ai/tests/index.mjs.map +1 -0
  49. package/resources/ai/tests/schedules/index.d.mts +3 -0
  50. package/resources/ai/tests/schedules/index.d.mts.map +1 -0
  51. package/resources/ai/tests/schedules/index.d.ts +3 -0
  52. package/resources/ai/tests/schedules/index.d.ts.map +1 -0
  53. package/resources/ai/tests/schedules/index.js +9 -0
  54. package/resources/ai/tests/schedules/index.js.map +1 -0
  55. package/resources/ai/tests/schedules/index.mjs +4 -0
  56. package/resources/ai/tests/schedules/index.mjs.map +1 -0
  57. package/resources/ai/tests/schedules/schedules.d.mts +10 -0
  58. package/resources/ai/tests/schedules/schedules.d.mts.map +1 -0
  59. package/resources/ai/tests/schedules/schedules.d.ts +10 -0
  60. package/resources/ai/tests/schedules/schedules.d.ts.map +1 -0
  61. package/resources/ai/tests/schedules/schedules.js +17 -0
  62. package/resources/ai/tests/schedules/schedules.js.map +1 -0
  63. package/resources/ai/tests/schedules/schedules.mjs +12 -0
  64. package/resources/ai/tests/schedules/schedules.mjs.map +1 -0
  65. package/resources/ai/tests/schedules/v1/cron-jobs.d.mts +171 -0
  66. package/resources/ai/tests/schedules/v1/cron-jobs.d.mts.map +1 -0
  67. package/resources/ai/tests/schedules/v1/cron-jobs.d.ts +171 -0
  68. package/resources/ai/tests/schedules/v1/cron-jobs.d.ts.map +1 -0
  69. package/resources/ai/tests/schedules/v1/cron-jobs.js +88 -0
  70. package/resources/ai/tests/schedules/v1/cron-jobs.js.map +1 -0
  71. package/resources/ai/tests/schedules/v1/cron-jobs.mjs +84 -0
  72. package/resources/ai/tests/schedules/v1/cron-jobs.mjs.map +1 -0
  73. package/resources/ai/tests/schedules/v1/index.d.mts +3 -0
  74. package/resources/ai/tests/schedules/v1/index.d.mts.map +1 -0
  75. package/resources/ai/tests/schedules/v1/index.d.ts +3 -0
  76. package/resources/ai/tests/schedules/v1/index.d.ts.map +1 -0
  77. package/resources/ai/tests/schedules/v1/index.js +9 -0
  78. package/resources/ai/tests/schedules/v1/index.js.map +1 -0
  79. package/resources/ai/tests/schedules/v1/index.mjs +4 -0
  80. package/resources/ai/tests/schedules/v1/index.mjs.map +1 -0
  81. package/resources/ai/tests/schedules/v1/v1.d.mts +10 -0
  82. package/resources/ai/tests/schedules/v1/v1.d.mts.map +1 -0
  83. package/resources/ai/tests/schedules/v1/v1.d.ts +10 -0
  84. package/resources/ai/tests/schedules/v1/v1.d.ts.map +1 -0
  85. package/resources/ai/tests/schedules/v1/v1.js +17 -0
  86. package/resources/ai/tests/schedules/v1/v1.js.map +1 -0
  87. package/resources/ai/tests/schedules/v1/v1.mjs +12 -0
  88. package/resources/ai/tests/schedules/v1/v1.mjs.map +1 -0
  89. package/resources/ai/tests/schedules/v1.d.mts +2 -0
  90. package/resources/ai/tests/schedules/v1.d.mts.map +1 -0
  91. package/resources/ai/tests/schedules/v1.d.ts +2 -0
  92. package/resources/ai/tests/schedules/v1.d.ts.map +1 -0
  93. package/resources/ai/tests/schedules/v1.js +6 -0
  94. package/resources/ai/tests/schedules/v1.js.map +1 -0
  95. package/resources/ai/tests/schedules/v1.mjs +3 -0
  96. package/resources/ai/tests/schedules/v1.mjs.map +1 -0
  97. package/resources/ai/tests/schedules.d.mts +2 -0
  98. package/resources/ai/tests/schedules.d.mts.map +1 -0
  99. package/resources/ai/tests/schedules.d.ts +2 -0
  100. package/resources/ai/tests/schedules.d.ts.map +1 -0
  101. package/resources/ai/tests/schedules.js +6 -0
  102. package/resources/ai/tests/schedules.js.map +1 -0
  103. package/resources/ai/tests/schedules.mjs +3 -0
  104. package/resources/ai/tests/schedules.mjs.map +1 -0
  105. package/resources/ai/tests/test-framework/index.d.mts +3 -0
  106. package/resources/ai/tests/test-framework/index.d.mts.map +1 -0
  107. package/resources/ai/tests/test-framework/index.d.ts +3 -0
  108. package/resources/ai/tests/test-framework/index.d.ts.map +1 -0
  109. package/resources/ai/tests/test-framework/index.js +9 -0
  110. package/resources/ai/tests/test-framework/index.js.map +1 -0
  111. package/resources/ai/tests/test-framework/index.mjs +4 -0
  112. package/resources/ai/tests/test-framework/index.mjs.map +1 -0
  113. package/resources/ai/tests/test-framework/test-framework.d.mts +10 -0
  114. package/resources/ai/tests/test-framework/test-framework.d.mts.map +1 -0
  115. package/resources/ai/tests/test-framework/test-framework.d.ts +10 -0
  116. package/resources/ai/tests/test-framework/test-framework.d.ts.map +1 -0
  117. package/resources/ai/tests/test-framework/test-framework.js +17 -0
  118. package/resources/ai/tests/test-framework/test-framework.js.map +1 -0
  119. package/resources/ai/tests/test-framework/test-framework.mjs +12 -0
  120. package/resources/ai/tests/test-framework/test-framework.mjs.map +1 -0
  121. package/resources/ai/tests/test-framework/v1/aiagents.d.mts +216 -0
  122. package/resources/ai/tests/test-framework/v1/aiagents.d.mts.map +1 -0
  123. package/resources/ai/tests/test-framework/v1/aiagents.d.ts +216 -0
  124. package/resources/ai/tests/test-framework/v1/aiagents.d.ts.map +1 -0
  125. package/resources/ai/tests/test-framework/v1/aiagents.js +93 -0
  126. package/resources/ai/tests/test-framework/v1/aiagents.js.map +1 -0
  127. package/resources/ai/tests/test-framework/v1/aiagents.mjs +89 -0
  128. package/resources/ai/tests/test-framework/v1/aiagents.mjs.map +1 -0
  129. package/resources/ai/tests/test-framework/v1/index.d.mts +6 -0
  130. package/resources/ai/tests/test-framework/v1/index.d.mts.map +1 -0
  131. package/resources/ai/tests/test-framework/v1/index.d.ts +6 -0
  132. package/resources/ai/tests/test-framework/v1/index.d.ts.map +1 -0
  133. package/resources/ai/tests/test-framework/v1/index.js +15 -0
  134. package/resources/ai/tests/test-framework/v1/index.js.map +1 -0
  135. package/resources/ai/tests/test-framework/v1/index.mjs +7 -0
  136. package/resources/ai/tests/test-framework/v1/index.mjs.map +1 -0
  137. package/resources/ai/tests/test-framework/v1/metrics.d.mts +339 -0
  138. package/resources/ai/tests/test-framework/v1/metrics.d.mts.map +1 -0
  139. package/resources/ai/tests/test-framework/v1/metrics.d.ts +339 -0
  140. package/resources/ai/tests/test-framework/v1/metrics.d.ts.map +1 -0
  141. package/resources/ai/tests/test-framework/v1/metrics.js +145 -0
  142. package/resources/ai/tests/test-framework/v1/metrics.js.map +1 -0
  143. package/resources/ai/tests/test-framework/v1/metrics.mjs +141 -0
  144. package/resources/ai/tests/test-framework/v1/metrics.mjs.map +1 -0
  145. package/resources/ai/tests/test-framework/v1/results.d.mts +207 -0
  146. package/resources/ai/tests/test-framework/v1/results.d.mts.map +1 -0
  147. package/resources/ai/tests/test-framework/v1/results.d.ts +207 -0
  148. package/resources/ai/tests/test-framework/v1/results.d.ts.map +1 -0
  149. package/resources/ai/tests/test-framework/v1/results.js +65 -0
  150. package/resources/ai/tests/test-framework/v1/results.js.map +1 -0
  151. package/resources/ai/tests/test-framework/v1/results.mjs +61 -0
  152. package/resources/ai/tests/test-framework/v1/results.mjs.map +1 -0
  153. package/resources/ai/tests/test-framework/v1/scenarios.d.mts +528 -0
  154. package/resources/ai/tests/test-framework/v1/scenarios.d.mts.map +1 -0
  155. package/resources/ai/tests/test-framework/v1/scenarios.d.ts +528 -0
  156. package/resources/ai/tests/test-framework/v1/scenarios.d.ts.map +1 -0
  157. package/resources/ai/tests/test-framework/v1/scenarios.js +222 -0
  158. package/resources/ai/tests/test-framework/v1/scenarios.js.map +1 -0
  159. package/resources/ai/tests/test-framework/v1/scenarios.mjs +218 -0
  160. package/resources/ai/tests/test-framework/v1/scenarios.mjs.map +1 -0
  161. package/resources/ai/tests/test-framework/v1/v1.d.mts +83 -0
  162. package/resources/ai/tests/test-framework/v1/v1.d.mts.map +1 -0
  163. package/resources/ai/tests/test-framework/v1/v1.d.ts +83 -0
  164. package/resources/ai/tests/test-framework/v1/v1.d.ts.map +1 -0
  165. package/resources/ai/tests/test-framework/v1/v1.js +46 -0
  166. package/resources/ai/tests/test-framework/v1/v1.js.map +1 -0
  167. package/resources/ai/tests/test-framework/v1/v1.mjs +41 -0
  168. package/resources/ai/tests/test-framework/v1/v1.mjs.map +1 -0
  169. package/resources/ai/tests/test-framework/v1.d.mts +2 -0
  170. package/resources/ai/tests/test-framework/v1.d.mts.map +1 -0
  171. package/resources/ai/tests/test-framework/v1.d.ts +2 -0
  172. package/resources/ai/tests/test-framework/v1.d.ts.map +1 -0
  173. package/resources/ai/tests/test-framework/v1.js +6 -0
  174. package/resources/ai/tests/test-framework/v1.js.map +1 -0
  175. package/resources/ai/tests/test-framework/v1.mjs +3 -0
  176. package/resources/ai/tests/test-framework/v1.mjs.map +1 -0
  177. package/resources/ai/tests/test-framework.d.mts +2 -0
  178. package/resources/ai/tests/test-framework.d.mts.map +1 -0
  179. package/resources/ai/tests/test-framework.d.ts +2 -0
  180. package/resources/ai/tests/test-framework.d.ts.map +1 -0
  181. package/resources/ai/tests/test-framework.js +6 -0
  182. package/resources/ai/tests/test-framework.js.map +1 -0
  183. package/resources/ai/tests/test-framework.mjs +3 -0
  184. package/resources/ai/tests/test-framework.mjs.map +1 -0
  185. package/resources/ai/tests/tests.d.mts +14 -0
  186. package/resources/ai/tests/tests.d.mts.map +1 -0
  187. package/resources/ai/tests/tests.d.ts +14 -0
  188. package/resources/ai/tests/tests.d.ts.map +1 -0
  189. package/resources/ai/tests/tests.js +21 -0
  190. package/resources/ai/tests/tests.js.map +1 -0
  191. package/resources/ai/tests/tests.mjs +16 -0
  192. package/resources/ai/tests/tests.mjs.map +1 -0
  193. package/resources/ai/tests.d.mts +2 -0
  194. package/resources/ai/tests.d.mts.map +1 -0
  195. package/resources/ai/tests.d.ts +2 -0
  196. package/resources/ai/tests.d.ts.map +1 -0
  197. package/resources/ai/tests.js +6 -0
  198. package/resources/ai/tests.js.map +1 -0
  199. package/resources/ai/tests.mjs +3 -0
  200. package/resources/ai/tests.mjs.map +1 -0
  201. package/resources/artifact-downloads.d.mts +21 -0
  202. package/resources/artifact-downloads.d.mts.map +1 -0
  203. package/resources/artifact-downloads.d.ts +21 -0
  204. package/resources/artifact-downloads.d.ts.map +1 -0
  205. package/resources/artifact-downloads.js +26 -0
  206. package/resources/artifact-downloads.js.map +1 -0
  207. package/resources/artifact-downloads.mjs +22 -0
  208. package/resources/artifact-downloads.mjs.map +1 -0
  209. package/resources/bot-challenge.js +1 -1
  210. package/resources/bot-challenge.js.map +1 -1
  211. package/resources/bot-challenge.mjs +1 -1
  212. package/resources/bot-challenge.mjs.map +1 -1
  213. package/resources/bot-sessions.js +1 -1
  214. package/resources/bot-sessions.js.map +1 -1
  215. package/resources/bot-sessions.mjs +1 -1
  216. package/resources/bot-sessions.mjs.map +1 -1
  217. package/resources/bot-signup.js +2 -2
  218. package/resources/bot-signup.js.map +1 -1
  219. package/resources/bot-signup.mjs +2 -2
  220. package/resources/bot-signup.mjs.map +1 -1
  221. package/resources/browser-sessions/actions.d.mts +542 -0
  222. package/resources/browser-sessions/actions.d.mts.map +1 -0
  223. package/resources/browser-sessions/actions.d.ts +542 -0
  224. package/resources/browser-sessions/actions.d.ts.map +1 -0
  225. package/resources/browser-sessions/actions.js +55 -0
  226. package/resources/browser-sessions/actions.js.map +1 -0
  227. package/resources/browser-sessions/actions.mjs +51 -0
  228. package/resources/browser-sessions/actions.mjs.map +1 -0
  229. package/resources/browser-sessions/browser-sessions.d.mts +165 -0
  230. package/resources/browser-sessions/browser-sessions.d.mts.map +1 -0
  231. package/resources/browser-sessions/browser-sessions.d.ts +165 -0
  232. package/resources/browser-sessions/browser-sessions.d.ts.map +1 -0
  233. package/resources/browser-sessions/browser-sessions.js +87 -0
  234. package/resources/browser-sessions/browser-sessions.js.map +1 -0
  235. package/resources/browser-sessions/browser-sessions.mjs +82 -0
  236. package/resources/browser-sessions/browser-sessions.mjs.map +1 -0
  237. package/resources/browser-sessions/index.d.mts +3 -0
  238. package/resources/browser-sessions/index.d.mts.map +1 -0
  239. package/resources/browser-sessions/index.d.ts +3 -0
  240. package/resources/browser-sessions/index.d.ts.map +1 -0
  241. package/resources/browser-sessions/index.js +9 -0
  242. package/resources/browser-sessions/index.js.map +1 -0
  243. package/resources/browser-sessions/index.mjs +4 -0
  244. package/resources/browser-sessions/index.mjs.map +1 -0
  245. package/resources/browser-sessions.d.mts +2 -0
  246. package/resources/browser-sessions.d.mts.map +1 -0
  247. package/resources/browser-sessions.d.ts +2 -0
  248. package/resources/browser-sessions.d.ts.map +1 -0
  249. package/resources/browser-sessions.js +6 -0
  250. package/resources/browser-sessions.js.map +1 -0
  251. package/resources/browser-sessions.mjs +3 -0
  252. package/resources/browser-sessions.mjs.map +1 -0
  253. package/resources/call-control-applications.d.mts +2 -2
  254. package/resources/call-control-applications.d.ts +2 -2
  255. package/resources/calls/actions.d.mts +35 -28
  256. package/resources/calls/actions.d.mts.map +1 -1
  257. package/resources/calls/actions.d.ts +35 -28
  258. package/resources/calls/actions.d.ts.map +1 -1
  259. package/resources/conferences/actions.d.mts +3 -2
  260. package/resources/conferences/actions.d.mts.map +1 -1
  261. package/resources/conferences/actions.d.ts +3 -2
  262. package/resources/conferences/actions.d.ts.map +1 -1
  263. package/resources/email/dedicated-ips/actions.d.mts +73 -0
  264. package/resources/email/dedicated-ips/actions.d.mts.map +1 -0
  265. package/resources/email/dedicated-ips/actions.d.ts +73 -0
  266. package/resources/email/dedicated-ips/actions.d.ts.map +1 -0
  267. package/resources/email/dedicated-ips/actions.js +84 -0
  268. package/resources/email/dedicated-ips/actions.js.map +1 -0
  269. package/resources/email/dedicated-ips/actions.mjs +80 -0
  270. package/resources/email/dedicated-ips/actions.mjs.map +1 -0
  271. package/resources/email/dedicated-ips/dedicated-ips.d.mts +444 -0
  272. package/resources/email/dedicated-ips/dedicated-ips.d.mts.map +1 -0
  273. package/resources/email/dedicated-ips/dedicated-ips.d.ts +444 -0
  274. package/resources/email/dedicated-ips/dedicated-ips.d.ts.map +1 -0
  275. package/resources/email/dedicated-ips/dedicated-ips.js +142 -0
  276. package/resources/email/dedicated-ips/dedicated-ips.js.map +1 -0
  277. package/resources/email/dedicated-ips/dedicated-ips.mjs +137 -0
  278. package/resources/email/dedicated-ips/dedicated-ips.mjs.map +1 -0
  279. package/resources/email/dedicated-ips/index.d.mts +3 -0
  280. package/resources/email/dedicated-ips/index.d.mts.map +1 -0
  281. package/resources/email/dedicated-ips/index.d.ts +3 -0
  282. package/resources/email/dedicated-ips/index.d.ts.map +1 -0
  283. package/resources/email/dedicated-ips/index.js +9 -0
  284. package/resources/email/dedicated-ips/index.js.map +1 -0
  285. package/resources/email/dedicated-ips/index.mjs +4 -0
  286. package/resources/email/dedicated-ips/index.mjs.map +1 -0
  287. package/resources/email/dedicated-ips.d.mts +2 -0
  288. package/resources/email/dedicated-ips.d.mts.map +1 -0
  289. package/resources/email/dedicated-ips.d.ts +2 -0
  290. package/resources/email/dedicated-ips.d.ts.map +1 -0
  291. package/resources/email/dedicated-ips.js +6 -0
  292. package/resources/email/dedicated-ips.js.map +1 -0
  293. package/resources/email/dedicated-ips.mjs +3 -0
  294. package/resources/email/dedicated-ips.mjs.map +1 -0
  295. package/resources/email/email.d.mts +14 -0
  296. package/resources/email/email.d.mts.map +1 -0
  297. package/resources/email/email.d.ts +14 -0
  298. package/resources/email/email.d.ts.map +1 -0
  299. package/resources/email/email.js +21 -0
  300. package/resources/email/email.js.map +1 -0
  301. package/resources/email/email.mjs +16 -0
  302. package/resources/email/email.mjs.map +1 -0
  303. package/resources/email/index.d.mts +4 -0
  304. package/resources/email/index.d.mts.map +1 -0
  305. package/resources/email/index.d.ts +4 -0
  306. package/resources/email/index.d.ts.map +1 -0
  307. package/resources/email/index.js +11 -0
  308. package/resources/email/index.js.map +1 -0
  309. package/resources/email/index.mjs +5 -0
  310. package/resources/email/index.mjs.map +1 -0
  311. package/resources/email/ip-pools/index.d.mts +3 -0
  312. package/resources/email/ip-pools/index.d.mts.map +1 -0
  313. package/resources/email/ip-pools/index.d.ts +3 -0
  314. package/resources/email/ip-pools/index.d.ts.map +1 -0
  315. package/resources/email/ip-pools/index.js +9 -0
  316. package/resources/email/ip-pools/index.js.map +1 -0
  317. package/resources/email/ip-pools/index.mjs +4 -0
  318. package/resources/email/ip-pools/index.mjs.map +1 -0
  319. package/resources/email/ip-pools/ip-pools.d.mts +184 -0
  320. package/resources/email/ip-pools/ip-pools.d.mts.map +1 -0
  321. package/resources/email/ip-pools/ip-pools.d.ts +184 -0
  322. package/resources/email/ip-pools/ip-pools.d.ts.map +1 -0
  323. package/resources/email/ip-pools/ip-pools.js +102 -0
  324. package/resources/email/ip-pools/ip-pools.js.map +1 -0
  325. package/resources/email/ip-pools/ip-pools.mjs +97 -0
  326. package/resources/email/ip-pools/ip-pools.mjs.map +1 -0
  327. package/resources/email/ip-pools/ips.d.mts +83 -0
  328. package/resources/email/ip-pools/ips.d.mts.map +1 -0
  329. package/resources/email/ip-pools/ips.d.ts +83 -0
  330. package/resources/email/ip-pools/ips.d.ts.map +1 -0
  331. package/resources/email/ip-pools/ips.js +54 -0
  332. package/resources/email/ip-pools/ips.js.map +1 -0
  333. package/resources/email/ip-pools/ips.mjs +50 -0
  334. package/resources/email/ip-pools/ips.mjs.map +1 -0
  335. package/resources/email/ip-pools.d.mts +2 -0
  336. package/resources/email/ip-pools.d.mts.map +1 -0
  337. package/resources/email/ip-pools.d.ts +2 -0
  338. package/resources/email/ip-pools.d.ts.map +1 -0
  339. package/resources/email/ip-pools.js +6 -0
  340. package/resources/email/ip-pools.js.map +1 -0
  341. package/resources/email/ip-pools.mjs +3 -0
  342. package/resources/email/ip-pools.mjs.map +1 -0
  343. package/resources/email.d.mts +2 -0
  344. package/resources/email.d.mts.map +1 -0
  345. package/resources/email.d.ts +2 -0
  346. package/resources/email.d.ts.map +1 -0
  347. package/resources/email.js +6 -0
  348. package/resources/email.js.map +1 -0
  349. package/resources/email.mjs +3 -0
  350. package/resources/email.mjs.map +1 -0
  351. package/resources/fax-applications.d.mts +6 -6
  352. package/resources/fax-applications.d.ts +6 -6
  353. package/resources/fqdn-connections/fqdn-connections.d.mts +2 -2
  354. package/resources/fqdn-connections/fqdn-connections.d.ts +2 -2
  355. package/resources/index.d.mts +8 -2
  356. package/resources/index.d.mts.map +1 -1
  357. package/resources/index.d.ts +8 -2
  358. package/resources/index.d.ts.map +1 -1
  359. package/resources/index.js +16 -4
  360. package/resources/index.js.map +1 -1
  361. package/resources/index.mjs +6 -0
  362. package/resources/index.mjs.map +1 -1
  363. package/resources/ip-connections.d.mts +4 -4
  364. package/resources/ip-connections.d.ts +4 -4
  365. package/resources/messaging-profiles/index.d.mts +1 -1
  366. package/resources/messaging-profiles/index.d.mts.map +1 -1
  367. package/resources/messaging-profiles/index.d.ts +1 -1
  368. package/resources/messaging-profiles/index.d.ts.map +1 -1
  369. package/resources/messaging-profiles/index.js.map +1 -1
  370. package/resources/messaging-profiles/index.mjs.map +1 -1
  371. package/resources/messaging-profiles/messaging-profiles.d.mts +26 -1
  372. package/resources/messaging-profiles/messaging-profiles.d.mts.map +1 -1
  373. package/resources/messaging-profiles/messaging-profiles.d.ts +26 -1
  374. package/resources/messaging-profiles/messaging-profiles.d.ts.map +1 -1
  375. package/resources/messaging-profiles/messaging-profiles.js.map +1 -1
  376. package/resources/messaging-profiles/messaging-profiles.mjs.map +1 -1
  377. package/resources/network-routes.d.mts +257 -0
  378. package/resources/network-routes.d.mts.map +1 -0
  379. package/resources/network-routes.d.ts +257 -0
  380. package/resources/network-routes.d.ts.map +1 -0
  381. package/resources/network-routes.js +83 -0
  382. package/resources/network-routes.js.map +1 -0
  383. package/resources/network-routes.mjs +79 -0
  384. package/resources/network-routes.mjs.map +1 -0
  385. package/resources/pay-connectors.d.mts +378 -0
  386. package/resources/pay-connectors.d.mts.map +1 -0
  387. package/resources/pay-connectors.d.ts +378 -0
  388. package/resources/pay-connectors.d.ts.map +1 -0
  389. package/resources/pay-connectors.js +116 -0
  390. package/resources/pay-connectors.js.map +1 -0
  391. package/resources/pay-connectors.mjs +112 -0
  392. package/resources/pay-connectors.mjs.map +1 -0
  393. package/resources/public-internet-gateways.d.mts +0 -8
  394. package/resources/public-internet-gateways.d.mts.map +1 -1
  395. package/resources/public-internet-gateways.d.ts +0 -8
  396. package/resources/public-internet-gateways.d.ts.map +1 -1
  397. package/resources/spend-limits.d.mts +150 -32
  398. package/resources/spend-limits.d.mts.map +1 -1
  399. package/resources/spend-limits.d.ts +150 -32
  400. package/resources/spend-limits.d.ts.map +1 -1
  401. package/resources/spend-limits.js +26 -7
  402. package/resources/spend-limits.js.map +1 -1
  403. package/resources/spend-limits.mjs +26 -7
  404. package/resources/spend-limits.mjs.map +1 -1
  405. package/resources/texml-applications.d.mts +6 -6
  406. package/resources/texml-applications.d.ts +6 -6
  407. package/resources/text-to-speech/text-to-speech.d.mts +1 -6
  408. package/resources/text-to-speech/text-to-speech.d.mts.map +1 -1
  409. package/resources/text-to-speech/text-to-speech.d.ts +1 -6
  410. package/resources/text-to-speech/text-to-speech.d.ts.map +1 -1
  411. package/resources/text-to-speech/text-to-speech.js +1 -2
  412. package/resources/text-to-speech/text-to-speech.js.map +1 -1
  413. package/resources/text-to-speech/text-to-speech.mjs +1 -2
  414. package/resources/text-to-speech/text-to-speech.mjs.map +1 -1
  415. package/resources/tunnels/actions.d.mts +29 -0
  416. package/resources/tunnels/actions.d.mts.map +1 -0
  417. package/resources/tunnels/actions.d.ts +29 -0
  418. package/resources/tunnels/actions.d.ts.map +1 -0
  419. package/resources/tunnels/actions.js +28 -0
  420. package/resources/tunnels/actions.js.map +1 -0
  421. package/resources/tunnels/actions.mjs +24 -0
  422. package/resources/tunnels/actions.mjs.map +1 -0
  423. package/resources/tunnels/index.d.mts +3 -0
  424. package/resources/tunnels/index.d.mts.map +1 -0
  425. package/resources/tunnels/index.d.ts +3 -0
  426. package/resources/tunnels/index.d.ts.map +1 -0
  427. package/resources/tunnels/index.js +9 -0
  428. package/resources/tunnels/index.js.map +1 -0
  429. package/resources/tunnels/index.mjs +4 -0
  430. package/resources/tunnels/index.mjs.map +1 -0
  431. package/resources/tunnels/tunnels.d.mts +194 -0
  432. package/resources/tunnels/tunnels.d.mts.map +1 -0
  433. package/resources/tunnels/tunnels.d.ts +194 -0
  434. package/resources/tunnels/tunnels.d.ts.map +1 -0
  435. package/resources/tunnels/tunnels.js +82 -0
  436. package/resources/tunnels/tunnels.js.map +1 -0
  437. package/resources/tunnels/tunnels.mjs +77 -0
  438. package/resources/tunnels/tunnels.mjs.map +1 -0
  439. package/resources/tunnels.d.mts +2 -0
  440. package/resources/tunnels.d.mts.map +1 -0
  441. package/resources/tunnels.d.ts +2 -0
  442. package/resources/tunnels.d.ts.map +1 -0
  443. package/resources/tunnels.js +6 -0
  444. package/resources/tunnels.js.map +1 -0
  445. package/resources/tunnels.mjs +3 -0
  446. package/resources/tunnels.mjs.map +1 -0
  447. package/resources/voice-clones.d.mts +54 -8
  448. package/resources/voice-clones.d.mts.map +1 -1
  449. package/resources/voice-clones.d.ts +54 -8
  450. package/resources/voice-clones.d.ts.map +1 -1
  451. package/resources/voice-clones.js +6 -5
  452. package/resources/voice-clones.js.map +1 -1
  453. package/resources/voice-clones.mjs +6 -5
  454. package/resources/voice-clones.mjs.map +1 -1
  455. package/resources/whatsapp/hosted-signups.d.mts +2 -1
  456. package/resources/whatsapp/hosted-signups.d.mts.map +1 -1
  457. package/resources/whatsapp/hosted-signups.d.ts +2 -1
  458. package/resources/whatsapp/hosted-signups.d.ts.map +1 -1
  459. package/resources/wireguard-interfaces.d.mts +0 -8
  460. package/resources/wireguard-interfaces.d.mts.map +1 -1
  461. package/resources/wireguard-interfaces.d.ts +0 -8
  462. package/resources/wireguard-interfaces.d.ts.map +1 -1
  463. package/src/client.ts +126 -0
  464. package/src/resources/addresses/actions.ts +23 -4
  465. package/src/resources/ai/ai.ts +6 -0
  466. package/src/resources/ai/assistants/assistants.ts +31 -24
  467. package/src/resources/ai/avatars.ts +9 -9
  468. package/src/resources/ai/index.ts +1 -0
  469. package/src/resources/ai/tests/index.ts +5 -0
  470. package/src/resources/ai/tests/schedules/index.ts +4 -0
  471. package/src/resources/ai/tests/schedules/schedules.ts +15 -0
  472. package/src/resources/ai/tests/schedules/v1/cron-jobs.ts +248 -0
  473. package/src/resources/ai/tests/schedules/v1/index.ts +12 -0
  474. package/src/resources/ai/tests/schedules/v1/v1.ts +31 -0
  475. package/src/resources/ai/tests/schedules/v1.ts +3 -0
  476. package/src/resources/ai/tests/schedules.ts +3 -0
  477. package/src/resources/ai/tests/test-framework/index.ts +4 -0
  478. package/src/resources/ai/tests/test-framework/test-framework.ts +15 -0
  479. package/src/resources/ai/tests/test-framework/v1/aiagents.ts +304 -0
  480. package/src/resources/ai/tests/test-framework/v1/index.ts +54 -0
  481. package/src/resources/ai/tests/test-framework/v1/metrics.ts +491 -0
  482. package/src/resources/ai/tests/test-framework/v1/results.ts +304 -0
  483. package/src/resources/ai/tests/test-framework/v1/scenarios.ts +774 -0
  484. package/src/resources/ai/tests/test-framework/v1/v1.ts +214 -0
  485. package/src/resources/ai/tests/test-framework/v1.ts +3 -0
  486. package/src/resources/ai/tests/test-framework.ts +3 -0
  487. package/src/resources/ai/tests/tests.ts +21 -0
  488. package/src/resources/ai/tests.ts +3 -0
  489. package/src/resources/artifact-downloads.ts +39 -0
  490. package/src/resources/bot-challenge.ts +1 -1
  491. package/src/resources/bot-sessions.ts +1 -1
  492. package/src/resources/bot-signup.ts +2 -2
  493. package/src/resources/browser-sessions/actions.ts +778 -0
  494. package/src/resources/browser-sessions/browser-sessions.ts +278 -0
  495. package/src/resources/browser-sessions/index.ts +31 -0
  496. package/src/resources/browser-sessions.ts +3 -0
  497. package/src/resources/call-control-applications.ts +2 -2
  498. package/src/resources/calls/actions.ts +38 -27
  499. package/src/resources/conferences/actions.ts +3 -2
  500. package/src/resources/email/dedicated-ips/actions.ts +87 -0
  501. package/src/resources/email/dedicated-ips/dedicated-ips.ts +563 -0
  502. package/src/resources/email/dedicated-ips/index.ts +13 -0
  503. package/src/resources/email/dedicated-ips.ts +3 -0
  504. package/src/resources/email/email.ts +55 -0
  505. package/src/resources/email/index.ts +22 -0
  506. package/src/resources/email/ip-pools/index.ts +12 -0
  507. package/src/resources/email/ip-pools/ip-pools.ts +247 -0
  508. package/src/resources/email/ip-pools/ips.ts +112 -0
  509. package/src/resources/email/ip-pools.ts +3 -0
  510. package/src/resources/email.ts +3 -0
  511. package/src/resources/fax-applications.ts +6 -6
  512. package/src/resources/fqdn-connections/fqdn-connections.ts +2 -2
  513. package/src/resources/index.ts +46 -0
  514. package/src/resources/ip-connections.ts +4 -4
  515. package/src/resources/messaging-profiles/index.ts +1 -0
  516. package/src/resources/messaging-profiles/messaging-profiles.ts +31 -0
  517. package/src/resources/network-routes.ts +332 -0
  518. package/src/resources/pay-connectors.ts +482 -0
  519. package/src/resources/public-internet-gateways.ts +0 -10
  520. package/src/resources/spend-limits.ts +179 -36
  521. package/src/resources/texml-applications.ts +6 -6
  522. package/src/resources/text-to-speech/text-to-speech.ts +1 -7
  523. package/src/resources/tunnels/actions.ts +36 -0
  524. package/src/resources/tunnels/index.ts +13 -0
  525. package/src/resources/tunnels/tunnels.ts +260 -0
  526. package/src/resources/tunnels.ts +3 -0
  527. package/src/resources/voice-clones.ts +88 -8
  528. package/src/resources/whatsapp/hosted-signups.ts +2 -1
  529. package/src/resources/wireguard-interfaces.ts +0 -10
  530. package/src/version.ts +1 -1
  531. package/version.d.mts +1 -1
  532. package/version.d.ts +1 -1
  533. package/version.js +1 -1
  534. package/version.mjs +1 -1
@@ -0,0 +1,339 @@
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
+ * Test agents, evaluator scenarios, metrics, and run results for the AI test framework.
6
+ */
7
+ export declare class Metrics extends APIResource {
8
+ /**
9
+ * Returns the metrics available in your organization, optionally filtered by test
10
+ * agent. Each metric scores one aspect of a conversation or scenario run.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const aiTestMetrics =
15
+ * await client.ai.tests.testFramework.v1.metrics.list();
16
+ * ```
17
+ */
18
+ list(query?: MetricListParams | null | undefined, options?: RequestOptions): APIPromise<MetricListResponse>;
19
+ /**
20
+ * Creates a metric in your organization.
21
+ *
22
+ * @example
23
+ * ```ts
24
+ * const aiTestMetric =
25
+ * await client.ai.tests.testFramework.v1.metrics.create({
26
+ * name: 'Escalates on refund denial',
27
+ * agents: [1259],
28
+ * description:
29
+ * "Returns a score for whether the assistant escalates when the caller's refund is denied.",
30
+ * eval_type: 'continuous_qualitative',
31
+ * observability_enabled: true,
32
+ * prompt:
33
+ * "Score the assistant's escalation behaviour between 0.0 and 1.0.",
34
+ * simulation_enabled: true,
35
+ * type: 'llm_judge',
36
+ * });
37
+ * ```
38
+ */
39
+ create(body: MetricCreateParams, options?: RequestOptions): APIPromise<AITestMetric>;
40
+ /**
41
+ * Creates several metrics in one request. Accepts an array of metric objects and
42
+ * returns the created metrics.
43
+ *
44
+ * @example
45
+ * ```ts
46
+ * const aiTestMetrics =
47
+ * await client.ai.tests.testFramework.v1.metrics.bulkCreate(
48
+ * { body: [{ name: 'Greets within 5 seconds' }] },
49
+ * );
50
+ * ```
51
+ */
52
+ bulkCreate(params: MetricBulkCreateParams, options?: RequestOptions): APIPromise<MetricBulkCreateResponse>;
53
+ /**
54
+ * Starts background generation of suggested metrics for a test agent. Returns a
55
+ * progress ID to poll with the get-test-metric-generation-progress endpoint.
56
+ *
57
+ * @example
58
+ * ```ts
59
+ * const scenarioGenerationResponse =
60
+ * await client.ai.tests.testFramework.v1.metrics.generateMetrics(
61
+ * {
62
+ * agent_id: 1259,
63
+ * num_metrics: 5,
64
+ * scenarios: [9512],
65
+ * },
66
+ * );
67
+ * ```
68
+ */
69
+ generateMetrics(body: MetricGenerateMetricsParams, options?: RequestOptions): APIPromise<ScenarioGenerationResponse>;
70
+ /**
71
+ * Returns the status of a background metric-generation job started with the
72
+ * generate-test-metrics endpoint.
73
+ *
74
+ * @example
75
+ * ```ts
76
+ * const response =
77
+ * await client.ai.tests.testFramework.v1.metrics.retrieveGenerateMetricsProgress(
78
+ * { progress_id: 'progress_id' },
79
+ * );
80
+ * ```
81
+ */
82
+ retrieveGenerateMetricsProgress(query: MetricRetrieveGenerateMetricsProgressParams, options?: RequestOptions): APIPromise<MetricRetrieveGenerateMetricsProgressResponse>;
83
+ /**
84
+ * Deletes the specified metric.
85
+ *
86
+ * @example
87
+ * ```ts
88
+ * const metric =
89
+ * await client.ai.tests.testFramework.v1.metrics.delete(0);
90
+ * ```
91
+ */
92
+ delete(id: number, options?: RequestOptions): APIPromise<unknown>;
93
+ /**
94
+ * Returns the specified metric.
95
+ *
96
+ * @example
97
+ * ```ts
98
+ * const aiTestMetric =
99
+ * await client.ai.tests.testFramework.v1.metrics.retrieve(
100
+ * 0,
101
+ * );
102
+ * ```
103
+ */
104
+ retrieve(id: number, options?: RequestOptions): APIPromise<AITestMetric>;
105
+ /**
106
+ * Updates the specified metric.
107
+ *
108
+ * @example
109
+ * ```ts
110
+ * const aiTestMetric =
111
+ * await client.ai.tests.testFramework.v1.metrics.update(0, {
112
+ * audio_enabled: true,
113
+ * name: 'Escalates on refund denial',
114
+ * prompt:
115
+ * "Score the assistant's escalation behaviour between 0.0 and 1.0, considering tone.",
116
+ * });
117
+ * ```
118
+ */
119
+ update(id: number, body: MetricUpdateParams, options?: RequestOptions): APIPromise<AITestMetric>;
120
+ }
121
+ export interface AITestMetric {
122
+ id: number;
123
+ /**
124
+ * What the metric scores: numeric, continuous_qualitative, or
125
+ * binary_workflow_adherence.
126
+ */
127
+ eval_type: string;
128
+ name: string;
129
+ /**
130
+ * How the metric is evaluated: custom_code or llm_judge.
131
+ */
132
+ type: string;
133
+ /**
134
+ * Whether the metric is attached to newly created test agents by default.
135
+ */
136
+ add_to_new_agents?: boolean | null;
137
+ agent?: number | null;
138
+ agent_names?: Array<string>;
139
+ /**
140
+ * Test agent IDs the metric is attached to.
141
+ */
142
+ agents?: Array<number>;
143
+ alert_filters?: {
144
+ [key: string]: unknown;
145
+ } | null;
146
+ alert_type?: string;
147
+ audio_enabled?: boolean;
148
+ configuration?: {
149
+ [key: string]: unknown;
150
+ } | null;
151
+ description?: string;
152
+ display_order?: number;
153
+ /**
154
+ * Allowed values for qualitative enum metrics.
155
+ */
156
+ enum_values?: Array<string>;
157
+ evaluation_trigger?: string;
158
+ evaluation_trigger_custom_code?: string;
159
+ evaluation_trigger_prompt?: string;
160
+ /**
161
+ * Smoothing factor for the alert trend.
162
+ */
163
+ ewma_alpha?: number;
164
+ /**
165
+ * Built-in evaluation function used by custom_code metrics.
166
+ */
167
+ function_name?: string | null;
168
+ kb_file_ids?: Array<number>;
169
+ knowledge_base_files?: Array<string>;
170
+ metric_cost?: number;
171
+ observability_enabled?: boolean;
172
+ overall_score?: number | string;
173
+ priority_assignment_prompt?: string;
174
+ project?: number | null;
175
+ /**
176
+ * Judge prompt used by llm_judge metrics.
177
+ */
178
+ prompt?: string;
179
+ sample_rate?: number | null;
180
+ sampling_enabled?: boolean;
181
+ significant_change_alert_direction?: string;
182
+ significant_change_alert_status?: string;
183
+ simulation_enabled?: boolean;
184
+ /**
185
+ * Stable identifier of a built-in metric.
186
+ */
187
+ slug?: string | null;
188
+ /**
189
+ * Standard-deviation multiplier for significant-change alerts.
190
+ */
191
+ std_multiplier?: number;
192
+ total_score?: number | string;
193
+ trigger_type?: string;
194
+ user_defined?: boolean;
195
+ uses_llm_judge?: boolean;
196
+ /**
197
+ * Sliding window size the alert status is computed over.
198
+ */
199
+ window_size?: number;
200
+ }
201
+ export interface CreateAITestMetricRequest {
202
+ name: string;
203
+ add_to_new_agents?: boolean | null;
204
+ agents?: Array<number>;
205
+ assistant_id?: string;
206
+ audio_enabled?: boolean;
207
+ description?: string;
208
+ display_order?: number;
209
+ enum_values?: Array<string>;
210
+ /**
211
+ * What the metric scores: numeric, continuous_qualitative, or
212
+ * binary_workflow_adherence.
213
+ */
214
+ eval_type?: string;
215
+ observability_enabled?: boolean;
216
+ /**
217
+ * Judge prompt used by llm_judge metrics.
218
+ */
219
+ prompt?: string;
220
+ sampling_enabled?: boolean;
221
+ simulation_enabled?: boolean;
222
+ /**
223
+ * How the metric is evaluated: custom_code or llm_judge.
224
+ */
225
+ type?: string;
226
+ }
227
+ export interface ScenarioGenerationResponse {
228
+ /**
229
+ * Identifier to poll generation progress with.
230
+ */
231
+ progress_id: string;
232
+ }
233
+ export type MetricListResponse = Array<AITestMetric>;
234
+ export type MetricDeleteResponse = unknown;
235
+ export type MetricBulkCreateResponse = Array<AITestMetric>;
236
+ export interface MetricRetrieveGenerateMetricsProgressResponse {
237
+ agent_id: number;
238
+ current_step: string;
239
+ error: string | null;
240
+ metrics: Array<MetricRetrieveGenerateMetricsProgressResponse.Metric>;
241
+ status: 'queued' | 'processing' | 'completed' | 'failed';
242
+ }
243
+ export declare namespace MetricRetrieveGenerateMetricsProgressResponse {
244
+ interface Metric {
245
+ agent?: number;
246
+ description?: string;
247
+ eval_type?: string;
248
+ name?: string;
249
+ scenarios?: Array<number>;
250
+ }
251
+ }
252
+ export interface MetricListParams {
253
+ /**
254
+ * Filter metrics attached to the specified test agent.
255
+ */
256
+ agent_id?: number;
257
+ /**
258
+ * Filter metrics attached to the specified Telnyx assistant.
259
+ */
260
+ assistant_id?: string;
261
+ }
262
+ export interface MetricCreateParams {
263
+ name: string;
264
+ add_to_new_agents?: boolean | null;
265
+ agents?: Array<number>;
266
+ assistant_id?: string;
267
+ audio_enabled?: boolean;
268
+ description?: string;
269
+ display_order?: number;
270
+ enum_values?: Array<string>;
271
+ /**
272
+ * What the metric scores: numeric, continuous_qualitative, or
273
+ * binary_workflow_adherence.
274
+ */
275
+ eval_type?: string;
276
+ observability_enabled?: boolean;
277
+ /**
278
+ * Judge prompt used by llm_judge metrics.
279
+ */
280
+ prompt?: string;
281
+ sampling_enabled?: boolean;
282
+ simulation_enabled?: boolean;
283
+ /**
284
+ * How the metric is evaluated: custom_code or llm_judge.
285
+ */
286
+ type?: string;
287
+ }
288
+ export interface MetricBulkCreateParams {
289
+ body: Array<CreateAITestMetricRequest>;
290
+ }
291
+ export interface MetricGenerateMetricsParams {
292
+ /**
293
+ * Test agent to suggest metrics for.
294
+ */
295
+ agent_id: number;
296
+ /**
297
+ * How many metrics to suggest.
298
+ */
299
+ num_metrics: number;
300
+ /**
301
+ * Scenario IDs to base the suggestions on.
302
+ */
303
+ scenarios?: Array<number>;
304
+ }
305
+ export interface MetricRetrieveGenerateMetricsProgressParams {
306
+ /**
307
+ * Progress ID returned by the generate-test-metrics endpoint.
308
+ */
309
+ progress_id: string;
310
+ }
311
+ export interface MetricUpdateParams {
312
+ add_to_new_agents?: boolean | null;
313
+ agents?: Array<number>;
314
+ audio_enabled?: boolean;
315
+ description?: string;
316
+ display_order?: number;
317
+ enum_values?: Array<string>;
318
+ /**
319
+ * What the metric scores: numeric, continuous_qualitative, or
320
+ * binary_workflow_adherence.
321
+ */
322
+ eval_type?: string;
323
+ name?: string;
324
+ observability_enabled?: boolean;
325
+ /**
326
+ * Judge prompt used by llm_judge metrics.
327
+ */
328
+ prompt?: string;
329
+ sampling_enabled?: boolean;
330
+ simulation_enabled?: boolean;
331
+ /**
332
+ * How the metric is evaluated: custom_code or llm_judge.
333
+ */
334
+ type?: string;
335
+ }
336
+ export declare namespace Metrics {
337
+ export { type AITestMetric as AITestMetric, type CreateAITestMetricRequest as CreateAITestMetricRequest, type ScenarioGenerationResponse as ScenarioGenerationResponse, type MetricListResponse as MetricListResponse, type MetricDeleteResponse as MetricDeleteResponse, type MetricBulkCreateResponse as MetricBulkCreateResponse, type MetricRetrieveGenerateMetricsProgressResponse as MetricRetrieveGenerateMetricsProgressResponse, type MetricListParams as MetricListParams, type MetricCreateParams as MetricCreateParams, type MetricBulkCreateParams as MetricBulkCreateParams, type MetricGenerateMetricsParams as MetricGenerateMetricsParams, type MetricRetrieveGenerateMetricsProgressParams as MetricRetrieveGenerateMetricsProgressParams, type MetricUpdateParams as MetricUpdateParams, };
338
+ }
339
+ //# sourceMappingURL=metrics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metrics.d.ts","sourceRoot":"","sources":["../../../../../src/resources/ai/tests/test-framework/v1/metrics.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,wCAAqC;AAC3D,OAAO,EAAE,UAAU,EAAE,2CAAwC;AAC7D,OAAO,EAAE,cAAc,EAAE,mDAAgD;AAGzE;;GAEG;AACH,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;OASG;IACH,IAAI,CACF,KAAK,GAAE,gBAAgB,GAAG,IAAI,GAAG,SAAc,EAC/C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,kBAAkB,CAAC;IAIjC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,MAAM,CAAC,IAAI,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,YAAY,CAAC;IAIpF;;;;;;;;;;;OAWG;IACH,UAAU,CAAC,MAAM,EAAE,sBAAsB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,wBAAwB,CAAC;IAK1G;;;;;;;;;;;;;;;OAeG;IACH,eAAe,CACb,IAAI,EAAE,2BAA2B,EACjC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,0BAA0B,CAAC;IAIzC;;;;;;;;;;;OAWG;IACH,+BAA+B,CAC7B,KAAK,EAAE,2CAA2C,EAClD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,6CAA6C,CAAC;IAO5D;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,OAAO,CAAC;IAIjE;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAA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,CAAC,MAAM,CAAC,CAAC;IAE5B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,6CAA6C,IAAI,6CAA6C,EACnG,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,2CAA2C,IAAI,2CAA2C,EAC/F,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"}
@@ -0,0 +1,145 @@
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.Metrics = void 0;
5
+ const resource_1 = require("../../../../../core/resource.js");
6
+ const path_1 = require("../../../../../internal/utils/path.js");
7
+ /**
8
+ * Test agents, evaluator scenarios, metrics, and run results for the AI test framework.
9
+ */
10
+ class Metrics extends resource_1.APIResource {
11
+ /**
12
+ * Returns the metrics available in your organization, optionally filtered by test
13
+ * agent. Each metric scores one aspect of a conversation or scenario run.
14
+ *
15
+ * @example
16
+ * ```ts
17
+ * const aiTestMetrics =
18
+ * await client.ai.tests.testFramework.v1.metrics.list();
19
+ * ```
20
+ */
21
+ list(query = {}, options) {
22
+ return this._client.get('/ai/tests/test_framework/v1/metrics', { query, ...options });
23
+ }
24
+ /**
25
+ * Creates a metric in your organization.
26
+ *
27
+ * @example
28
+ * ```ts
29
+ * const aiTestMetric =
30
+ * await client.ai.tests.testFramework.v1.metrics.create({
31
+ * name: 'Escalates on refund denial',
32
+ * agents: [1259],
33
+ * description:
34
+ * "Returns a score for whether the assistant escalates when the caller's refund is denied.",
35
+ * eval_type: 'continuous_qualitative',
36
+ * observability_enabled: true,
37
+ * prompt:
38
+ * "Score the assistant's escalation behaviour between 0.0 and 1.0.",
39
+ * simulation_enabled: true,
40
+ * type: 'llm_judge',
41
+ * });
42
+ * ```
43
+ */
44
+ create(body, options) {
45
+ return this._client.post('/ai/tests/test_framework/v1/metrics', { body, ...options });
46
+ }
47
+ /**
48
+ * Creates several metrics in one request. Accepts an array of metric objects and
49
+ * returns the created metrics.
50
+ *
51
+ * @example
52
+ * ```ts
53
+ * const aiTestMetrics =
54
+ * await client.ai.tests.testFramework.v1.metrics.bulkCreate(
55
+ * { body: [{ name: 'Greets within 5 seconds' }] },
56
+ * );
57
+ * ```
58
+ */
59
+ bulkCreate(params, options) {
60
+ const { body } = params;
61
+ return this._client.post('/ai/tests/test_framework/v1/metrics/bulk_create', { body: body, ...options });
62
+ }
63
+ /**
64
+ * Starts background generation of suggested metrics for a test agent. Returns a
65
+ * progress ID to poll with the get-test-metric-generation-progress endpoint.
66
+ *
67
+ * @example
68
+ * ```ts
69
+ * const scenarioGenerationResponse =
70
+ * await client.ai.tests.testFramework.v1.metrics.generateMetrics(
71
+ * {
72
+ * agent_id: 1259,
73
+ * num_metrics: 5,
74
+ * scenarios: [9512],
75
+ * },
76
+ * );
77
+ * ```
78
+ */
79
+ generateMetrics(body, options) {
80
+ return this._client.post('/ai/tests/test_framework/v1/metrics/generate_metrics', { body, ...options });
81
+ }
82
+ /**
83
+ * Returns the status of a background metric-generation job started with the
84
+ * generate-test-metrics endpoint.
85
+ *
86
+ * @example
87
+ * ```ts
88
+ * const response =
89
+ * await client.ai.tests.testFramework.v1.metrics.retrieveGenerateMetricsProgress(
90
+ * { progress_id: 'progress_id' },
91
+ * );
92
+ * ```
93
+ */
94
+ retrieveGenerateMetricsProgress(query, options) {
95
+ return this._client.get('/ai/tests/test_framework/v1/metrics/generate_metrics_progress', {
96
+ query,
97
+ ...options,
98
+ });
99
+ }
100
+ /**
101
+ * Deletes the specified metric.
102
+ *
103
+ * @example
104
+ * ```ts
105
+ * const metric =
106
+ * await client.ai.tests.testFramework.v1.metrics.delete(0);
107
+ * ```
108
+ */
109
+ delete(id, options) {
110
+ return this._client.delete((0, path_1.path) `/ai/tests/test_framework/v1/metrics/${id}`, options);
111
+ }
112
+ /**
113
+ * Returns the specified metric.
114
+ *
115
+ * @example
116
+ * ```ts
117
+ * const aiTestMetric =
118
+ * await client.ai.tests.testFramework.v1.metrics.retrieve(
119
+ * 0,
120
+ * );
121
+ * ```
122
+ */
123
+ retrieve(id, options) {
124
+ return this._client.get((0, path_1.path) `/ai/tests/test_framework/v1/metrics/${id}`, options);
125
+ }
126
+ /**
127
+ * Updates the specified metric.
128
+ *
129
+ * @example
130
+ * ```ts
131
+ * const aiTestMetric =
132
+ * await client.ai.tests.testFramework.v1.metrics.update(0, {
133
+ * audio_enabled: true,
134
+ * name: 'Escalates on refund denial',
135
+ * prompt:
136
+ * "Score the assistant's escalation behaviour between 0.0 and 1.0, considering tone.",
137
+ * });
138
+ * ```
139
+ */
140
+ update(id, body, options) {
141
+ return this._client.patch((0, path_1.path) `/ai/tests/test_framework/v1/metrics/${id}`, { body, ...options });
142
+ }
143
+ }
144
+ exports.Metrics = Metrics;
145
+ //# sourceMappingURL=metrics.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metrics.js","sourceRoot":"","sources":["../../../../../src/resources/ai/tests/test-fram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,EAAA,uCAAuC,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACvF,CAAC;IAED;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,uCAAuC,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACpF,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,EAAU,EAAE,IAAwB,EAAE,OAAwB;QACnE,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,uCAAuC,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnG,CAAC;CACF;AArJD,0BAqJC"}
@@ -0,0 +1,141 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../../../../../core/resource.mjs";
3
+ import { path } from "../../../../../internal/utils/path.mjs";
4
+ /**
5
+ * Test agents, evaluator scenarios, metrics, and run results for the AI test framework.
6
+ */
7
+ export class Metrics extends APIResource {
8
+ /**
9
+ * Returns the metrics available in your organization, optionally filtered by test
10
+ * agent. Each metric scores one aspect of a conversation or scenario run.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const aiTestMetrics =
15
+ * await client.ai.tests.testFramework.v1.metrics.list();
16
+ * ```
17
+ */
18
+ list(query = {}, options) {
19
+ return this._client.get('/ai/tests/test_framework/v1/metrics', { query, ...options });
20
+ }
21
+ /**
22
+ * Creates a metric in your organization.
23
+ *
24
+ * @example
25
+ * ```ts
26
+ * const aiTestMetric =
27
+ * await client.ai.tests.testFramework.v1.metrics.create({
28
+ * name: 'Escalates on refund denial',
29
+ * agents: [1259],
30
+ * description:
31
+ * "Returns a score for whether the assistant escalates when the caller's refund is denied.",
32
+ * eval_type: 'continuous_qualitative',
33
+ * observability_enabled: true,
34
+ * prompt:
35
+ * "Score the assistant's escalation behaviour between 0.0 and 1.0.",
36
+ * simulation_enabled: true,
37
+ * type: 'llm_judge',
38
+ * });
39
+ * ```
40
+ */
41
+ create(body, options) {
42
+ return this._client.post('/ai/tests/test_framework/v1/metrics', { body, ...options });
43
+ }
44
+ /**
45
+ * Creates several metrics in one request. Accepts an array of metric objects and
46
+ * returns the created metrics.
47
+ *
48
+ * @example
49
+ * ```ts
50
+ * const aiTestMetrics =
51
+ * await client.ai.tests.testFramework.v1.metrics.bulkCreate(
52
+ * { body: [{ name: 'Greets within 5 seconds' }] },
53
+ * );
54
+ * ```
55
+ */
56
+ bulkCreate(params, options) {
57
+ const { body } = params;
58
+ return this._client.post('/ai/tests/test_framework/v1/metrics/bulk_create', { body: body, ...options });
59
+ }
60
+ /**
61
+ * Starts background generation of suggested metrics for a test agent. Returns a
62
+ * progress ID to poll with the get-test-metric-generation-progress endpoint.
63
+ *
64
+ * @example
65
+ * ```ts
66
+ * const scenarioGenerationResponse =
67
+ * await client.ai.tests.testFramework.v1.metrics.generateMetrics(
68
+ * {
69
+ * agent_id: 1259,
70
+ * num_metrics: 5,
71
+ * scenarios: [9512],
72
+ * },
73
+ * );
74
+ * ```
75
+ */
76
+ generateMetrics(body, options) {
77
+ return this._client.post('/ai/tests/test_framework/v1/metrics/generate_metrics', { body, ...options });
78
+ }
79
+ /**
80
+ * Returns the status of a background metric-generation job started with the
81
+ * generate-test-metrics endpoint.
82
+ *
83
+ * @example
84
+ * ```ts
85
+ * const response =
86
+ * await client.ai.tests.testFramework.v1.metrics.retrieveGenerateMetricsProgress(
87
+ * { progress_id: 'progress_id' },
88
+ * );
89
+ * ```
90
+ */
91
+ retrieveGenerateMetricsProgress(query, options) {
92
+ return this._client.get('/ai/tests/test_framework/v1/metrics/generate_metrics_progress', {
93
+ query,
94
+ ...options,
95
+ });
96
+ }
97
+ /**
98
+ * Deletes the specified metric.
99
+ *
100
+ * @example
101
+ * ```ts
102
+ * const metric =
103
+ * await client.ai.tests.testFramework.v1.metrics.delete(0);
104
+ * ```
105
+ */
106
+ delete(id, options) {
107
+ return this._client.delete(path `/ai/tests/test_framework/v1/metrics/${id}`, options);
108
+ }
109
+ /**
110
+ * Returns the specified metric.
111
+ *
112
+ * @example
113
+ * ```ts
114
+ * const aiTestMetric =
115
+ * await client.ai.tests.testFramework.v1.metrics.retrieve(
116
+ * 0,
117
+ * );
118
+ * ```
119
+ */
120
+ retrieve(id, options) {
121
+ return this._client.get(path `/ai/tests/test_framework/v1/metrics/${id}`, options);
122
+ }
123
+ /**
124
+ * Updates the specified metric.
125
+ *
126
+ * @example
127
+ * ```ts
128
+ * const aiTestMetric =
129
+ * await client.ai.tests.testFramework.v1.metrics.update(0, {
130
+ * audio_enabled: true,
131
+ * name: 'Escalates on refund denial',
132
+ * prompt:
133
+ * "Score the assistant's escalation behaviour between 0.0 and 1.0, considering tone.",
134
+ * });
135
+ * ```
136
+ */
137
+ update(id, body, options) {
138
+ return this._client.patch(path `/ai/tests/test_framework/v1/metrics/${id}`, { body, ...options });
139
+ }
140
+ }
141
+ //# sourceMappingURL=metrics.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metrics.mjs","sourceRoot":"","sources":["../../../../../src/resources/ai/tests/test-framework/v1/metrics.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,yCAAqC;AAG3D,OAAO,EAAE,IAAI,EAAE,+CAA2C;AAE1D;;GAEG;AACH,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;OASG;IACH,IAAI,CACF,QAA6C,EAAE,EAC/C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,qCAAqC,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxF,CAAC;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH,MAAM,CAAC,IAAwB,EAAE,OAAwB;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC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