telnyx 7.27.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.
- package/CHANGELOG.md +14 -0
- package/client.d.mts +46 -6
- package/client.d.mts.map +1 -1
- package/client.d.ts +46 -6
- package/client.d.ts.map +1 -1
- package/client.js +40 -0
- package/client.js.map +1 -1
- package/client.mjs +40 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/addresses/actions.d.mts +19 -4
- package/resources/addresses/actions.d.mts.map +1 -1
- package/resources/addresses/actions.d.ts +19 -4
- package/resources/addresses/actions.d.ts.map +1 -1
- package/resources/ai/ai.d.mts +4 -0
- package/resources/ai/ai.d.mts.map +1 -1
- package/resources/ai/ai.d.ts +4 -0
- package/resources/ai/ai.d.ts.map +1 -1
- package/resources/ai/ai.js +4 -0
- package/resources/ai/ai.js.map +1 -1
- package/resources/ai/ai.mjs +4 -0
- package/resources/ai/ai.mjs.map +1 -1
- package/resources/ai/assistants/assistants.d.mts +42 -27
- package/resources/ai/assistants/assistants.d.mts.map +1 -1
- package/resources/ai/assistants/assistants.d.ts +42 -27
- package/resources/ai/assistants/assistants.d.ts.map +1 -1
- package/resources/ai/assistants/assistants.js.map +1 -1
- package/resources/ai/assistants/assistants.mjs.map +1 -1
- package/resources/ai/audio.d.mts +22 -11
- package/resources/ai/audio.d.mts.map +1 -1
- package/resources/ai/audio.d.ts +22 -11
- package/resources/ai/audio.d.ts.map +1 -1
- package/resources/ai/avatars.d.mts +9 -9
- package/resources/ai/avatars.d.ts +9 -9
- package/resources/ai/avatars.js +9 -9
- package/resources/ai/avatars.mjs +9 -9
- package/resources/ai/index.d.mts +1 -0
- package/resources/ai/index.d.mts.map +1 -1
- package/resources/ai/index.d.ts +1 -0
- package/resources/ai/index.d.ts.map +1 -1
- package/resources/ai/index.js +5 -3
- package/resources/ai/index.js.map +1 -1
- package/resources/ai/index.mjs +1 -0
- package/resources/ai/index.mjs.map +1 -1
- package/resources/ai/tests/index.d.mts +4 -0
- package/resources/ai/tests/index.d.mts.map +1 -0
- package/resources/ai/tests/index.d.ts +4 -0
- package/resources/ai/tests/index.d.ts.map +1 -0
- package/resources/ai/tests/index.js +11 -0
- package/resources/ai/tests/index.js.map +1 -0
- package/resources/ai/tests/index.mjs +5 -0
- package/resources/ai/tests/index.mjs.map +1 -0
- package/resources/ai/tests/schedules/index.d.mts +3 -0
- package/resources/ai/tests/schedules/index.d.mts.map +1 -0
- package/resources/ai/tests/schedules/index.d.ts +3 -0
- package/resources/ai/tests/schedules/index.d.ts.map +1 -0
- package/resources/ai/tests/schedules/index.js +9 -0
- package/resources/ai/tests/schedules/index.js.map +1 -0
- package/resources/ai/tests/schedules/index.mjs +4 -0
- package/resources/ai/tests/schedules/index.mjs.map +1 -0
- package/resources/ai/tests/schedules/schedules.d.mts +10 -0
- package/resources/ai/tests/schedules/schedules.d.mts.map +1 -0
- package/resources/ai/tests/schedules/schedules.d.ts +10 -0
- package/resources/ai/tests/schedules/schedules.d.ts.map +1 -0
- package/resources/ai/tests/schedules/schedules.js +17 -0
- package/resources/ai/tests/schedules/schedules.js.map +1 -0
- package/resources/ai/tests/schedules/schedules.mjs +12 -0
- package/resources/ai/tests/schedules/schedules.mjs.map +1 -0
- package/resources/ai/tests/schedules/v1/cron-jobs.d.mts +171 -0
- package/resources/ai/tests/schedules/v1/cron-jobs.d.mts.map +1 -0
- package/resources/ai/tests/schedules/v1/cron-jobs.d.ts +171 -0
- package/resources/ai/tests/schedules/v1/cron-jobs.d.ts.map +1 -0
- package/resources/ai/tests/schedules/v1/cron-jobs.js +88 -0
- package/resources/ai/tests/schedules/v1/cron-jobs.js.map +1 -0
- package/resources/ai/tests/schedules/v1/cron-jobs.mjs +84 -0
- package/resources/ai/tests/schedules/v1/cron-jobs.mjs.map +1 -0
- package/resources/ai/tests/schedules/v1/index.d.mts +3 -0
- package/resources/ai/tests/schedules/v1/index.d.mts.map +1 -0
- package/resources/ai/tests/schedules/v1/index.d.ts +3 -0
- package/resources/ai/tests/schedules/v1/index.d.ts.map +1 -0
- package/resources/ai/tests/schedules/v1/index.js +9 -0
- package/resources/ai/tests/schedules/v1/index.js.map +1 -0
- package/resources/ai/tests/schedules/v1/index.mjs +4 -0
- package/resources/ai/tests/schedules/v1/index.mjs.map +1 -0
- package/resources/ai/tests/schedules/v1/v1.d.mts +10 -0
- package/resources/ai/tests/schedules/v1/v1.d.mts.map +1 -0
- package/resources/ai/tests/schedules/v1/v1.d.ts +10 -0
- package/resources/ai/tests/schedules/v1/v1.d.ts.map +1 -0
- package/resources/ai/tests/schedules/v1/v1.js +17 -0
- package/resources/ai/tests/schedules/v1/v1.js.map +1 -0
- package/resources/ai/tests/schedules/v1/v1.mjs +12 -0
- package/resources/ai/tests/schedules/v1/v1.mjs.map +1 -0
- package/resources/ai/tests/schedules/v1.d.mts +2 -0
- package/resources/ai/tests/schedules/v1.d.mts.map +1 -0
- package/resources/ai/tests/schedules/v1.d.ts +2 -0
- package/resources/ai/tests/schedules/v1.d.ts.map +1 -0
- package/resources/ai/tests/schedules/v1.js +6 -0
- package/resources/ai/tests/schedules/v1.js.map +1 -0
- package/resources/ai/tests/schedules/v1.mjs +3 -0
- package/resources/ai/tests/schedules/v1.mjs.map +1 -0
- package/resources/ai/tests/schedules.d.mts +2 -0
- package/resources/ai/tests/schedules.d.mts.map +1 -0
- package/resources/ai/tests/schedules.d.ts +2 -0
- package/resources/ai/tests/schedules.d.ts.map +1 -0
- package/resources/ai/tests/schedules.js +6 -0
- package/resources/ai/tests/schedules.js.map +1 -0
- package/resources/ai/tests/schedules.mjs +3 -0
- package/resources/ai/tests/schedules.mjs.map +1 -0
- package/resources/ai/tests/test-framework/index.d.mts +3 -0
- package/resources/ai/tests/test-framework/index.d.mts.map +1 -0
- package/resources/ai/tests/test-framework/index.d.ts +3 -0
- package/resources/ai/tests/test-framework/index.d.ts.map +1 -0
- package/resources/ai/tests/test-framework/index.js +9 -0
- package/resources/ai/tests/test-framework/index.js.map +1 -0
- package/resources/ai/tests/test-framework/index.mjs +4 -0
- package/resources/ai/tests/test-framework/index.mjs.map +1 -0
- package/resources/ai/tests/test-framework/test-framework.d.mts +10 -0
- package/resources/ai/tests/test-framework/test-framework.d.mts.map +1 -0
- package/resources/ai/tests/test-framework/test-framework.d.ts +10 -0
- package/resources/ai/tests/test-framework/test-framework.d.ts.map +1 -0
- package/resources/ai/tests/test-framework/test-framework.js +17 -0
- package/resources/ai/tests/test-framework/test-framework.js.map +1 -0
- package/resources/ai/tests/test-framework/test-framework.mjs +12 -0
- package/resources/ai/tests/test-framework/test-framework.mjs.map +1 -0
- package/resources/ai/tests/test-framework/v1/aiagents.d.mts +216 -0
- package/resources/ai/tests/test-framework/v1/aiagents.d.mts.map +1 -0
- package/resources/ai/tests/test-framework/v1/aiagents.d.ts +216 -0
- package/resources/ai/tests/test-framework/v1/aiagents.d.ts.map +1 -0
- package/resources/ai/tests/test-framework/v1/aiagents.js +93 -0
- package/resources/ai/tests/test-framework/v1/aiagents.js.map +1 -0
- package/resources/ai/tests/test-framework/v1/aiagents.mjs +89 -0
- package/resources/ai/tests/test-framework/v1/aiagents.mjs.map +1 -0
- package/resources/ai/tests/test-framework/v1/index.d.mts +6 -0
- package/resources/ai/tests/test-framework/v1/index.d.mts.map +1 -0
- package/resources/ai/tests/test-framework/v1/index.d.ts +6 -0
- package/resources/ai/tests/test-framework/v1/index.d.ts.map +1 -0
- package/resources/ai/tests/test-framework/v1/index.js +15 -0
- package/resources/ai/tests/test-framework/v1/index.js.map +1 -0
- package/resources/ai/tests/test-framework/v1/index.mjs +7 -0
- package/resources/ai/tests/test-framework/v1/index.mjs.map +1 -0
- package/resources/ai/tests/test-framework/v1/metrics.d.mts +339 -0
- package/resources/ai/tests/test-framework/v1/metrics.d.mts.map +1 -0
- package/resources/ai/tests/test-framework/v1/metrics.d.ts +339 -0
- package/resources/ai/tests/test-framework/v1/metrics.d.ts.map +1 -0
- package/resources/ai/tests/test-framework/v1/metrics.js +145 -0
- package/resources/ai/tests/test-framework/v1/metrics.js.map +1 -0
- package/resources/ai/tests/test-framework/v1/metrics.mjs +141 -0
- package/resources/ai/tests/test-framework/v1/metrics.mjs.map +1 -0
- package/resources/ai/tests/test-framework/v1/results.d.mts +207 -0
- package/resources/ai/tests/test-framework/v1/results.d.mts.map +1 -0
- package/resources/ai/tests/test-framework/v1/results.d.ts +207 -0
- package/resources/ai/tests/test-framework/v1/results.d.ts.map +1 -0
- package/resources/ai/tests/test-framework/v1/results.js +65 -0
- package/resources/ai/tests/test-framework/v1/results.js.map +1 -0
- package/resources/ai/tests/test-framework/v1/results.mjs +61 -0
- package/resources/ai/tests/test-framework/v1/results.mjs.map +1 -0
- package/resources/ai/tests/test-framework/v1/scenarios.d.mts +528 -0
- package/resources/ai/tests/test-framework/v1/scenarios.d.mts.map +1 -0
- package/resources/ai/tests/test-framework/v1/scenarios.d.ts +528 -0
- package/resources/ai/tests/test-framework/v1/scenarios.d.ts.map +1 -0
- package/resources/ai/tests/test-framework/v1/scenarios.js +222 -0
- package/resources/ai/tests/test-framework/v1/scenarios.js.map +1 -0
- package/resources/ai/tests/test-framework/v1/scenarios.mjs +218 -0
- package/resources/ai/tests/test-framework/v1/scenarios.mjs.map +1 -0
- package/resources/ai/tests/test-framework/v1/v1.d.mts +83 -0
- package/resources/ai/tests/test-framework/v1/v1.d.mts.map +1 -0
- package/resources/ai/tests/test-framework/v1/v1.d.ts +83 -0
- package/resources/ai/tests/test-framework/v1/v1.d.ts.map +1 -0
- package/resources/ai/tests/test-framework/v1/v1.js +46 -0
- package/resources/ai/tests/test-framework/v1/v1.js.map +1 -0
- package/resources/ai/tests/test-framework/v1/v1.mjs +41 -0
- package/resources/ai/tests/test-framework/v1/v1.mjs.map +1 -0
- package/resources/ai/tests/test-framework/v1.d.mts +2 -0
- package/resources/ai/tests/test-framework/v1.d.mts.map +1 -0
- package/resources/ai/tests/test-framework/v1.d.ts +2 -0
- package/resources/ai/tests/test-framework/v1.d.ts.map +1 -0
- package/resources/ai/tests/test-framework/v1.js +6 -0
- package/resources/ai/tests/test-framework/v1.js.map +1 -0
- package/resources/ai/tests/test-framework/v1.mjs +3 -0
- package/resources/ai/tests/test-framework/v1.mjs.map +1 -0
- package/resources/ai/tests/test-framework.d.mts +2 -0
- package/resources/ai/tests/test-framework.d.mts.map +1 -0
- package/resources/ai/tests/test-framework.d.ts +2 -0
- package/resources/ai/tests/test-framework.d.ts.map +1 -0
- package/resources/ai/tests/test-framework.js +6 -0
- package/resources/ai/tests/test-framework.js.map +1 -0
- package/resources/ai/tests/test-framework.mjs +3 -0
- package/resources/ai/tests/test-framework.mjs.map +1 -0
- package/resources/ai/tests/tests.d.mts +14 -0
- package/resources/ai/tests/tests.d.mts.map +1 -0
- package/resources/ai/tests/tests.d.ts +14 -0
- package/resources/ai/tests/tests.d.ts.map +1 -0
- package/resources/ai/tests/tests.js +21 -0
- package/resources/ai/tests/tests.js.map +1 -0
- package/resources/ai/tests/tests.mjs +16 -0
- package/resources/ai/tests/tests.mjs.map +1 -0
- package/resources/ai/tests.d.mts +2 -0
- package/resources/ai/tests.d.mts.map +1 -0
- package/resources/ai/tests.d.ts +2 -0
- package/resources/ai/tests.d.ts.map +1 -0
- package/resources/ai/tests.js +6 -0
- package/resources/ai/tests.js.map +1 -0
- package/resources/ai/tests.mjs +3 -0
- package/resources/ai/tests.mjs.map +1 -0
- package/resources/artifact-downloads.d.mts +21 -0
- package/resources/artifact-downloads.d.mts.map +1 -0
- package/resources/artifact-downloads.d.ts +21 -0
- package/resources/artifact-downloads.d.ts.map +1 -0
- package/resources/artifact-downloads.js +26 -0
- package/resources/artifact-downloads.js.map +1 -0
- package/resources/artifact-downloads.mjs +22 -0
- package/resources/artifact-downloads.mjs.map +1 -0
- package/resources/bot-challenge.js +1 -1
- package/resources/bot-challenge.js.map +1 -1
- package/resources/bot-challenge.mjs +1 -1
- package/resources/bot-challenge.mjs.map +1 -1
- package/resources/bot-sessions.js +1 -1
- package/resources/bot-sessions.js.map +1 -1
- package/resources/bot-sessions.mjs +1 -1
- package/resources/bot-sessions.mjs.map +1 -1
- package/resources/bot-signup.js +2 -2
- package/resources/bot-signup.js.map +1 -1
- package/resources/bot-signup.mjs +2 -2
- package/resources/bot-signup.mjs.map +1 -1
- package/resources/browser-sessions/actions.d.mts +542 -0
- package/resources/browser-sessions/actions.d.mts.map +1 -0
- package/resources/browser-sessions/actions.d.ts +542 -0
- package/resources/browser-sessions/actions.d.ts.map +1 -0
- package/resources/browser-sessions/actions.js +55 -0
- package/resources/browser-sessions/actions.js.map +1 -0
- package/resources/browser-sessions/actions.mjs +51 -0
- package/resources/browser-sessions/actions.mjs.map +1 -0
- package/resources/browser-sessions/browser-sessions.d.mts +165 -0
- package/resources/browser-sessions/browser-sessions.d.mts.map +1 -0
- package/resources/browser-sessions/browser-sessions.d.ts +165 -0
- package/resources/browser-sessions/browser-sessions.d.ts.map +1 -0
- package/resources/browser-sessions/browser-sessions.js +87 -0
- package/resources/browser-sessions/browser-sessions.js.map +1 -0
- package/resources/browser-sessions/browser-sessions.mjs +82 -0
- package/resources/browser-sessions/browser-sessions.mjs.map +1 -0
- package/resources/browser-sessions/index.d.mts +3 -0
- package/resources/browser-sessions/index.d.mts.map +1 -0
- package/resources/browser-sessions/index.d.ts +3 -0
- package/resources/browser-sessions/index.d.ts.map +1 -0
- package/resources/browser-sessions/index.js +9 -0
- package/resources/browser-sessions/index.js.map +1 -0
- package/resources/browser-sessions/index.mjs +4 -0
- package/resources/browser-sessions/index.mjs.map +1 -0
- package/resources/browser-sessions.d.mts +2 -0
- package/resources/browser-sessions.d.mts.map +1 -0
- package/resources/browser-sessions.d.ts +2 -0
- package/resources/browser-sessions.d.ts.map +1 -0
- package/resources/browser-sessions.js +6 -0
- package/resources/browser-sessions.js.map +1 -0
- package/resources/browser-sessions.mjs +3 -0
- package/resources/browser-sessions.mjs.map +1 -0
- package/resources/call-control-applications.d.mts +2 -2
- package/resources/call-control-applications.d.ts +2 -2
- package/resources/calls/actions.d.mts +35 -28
- package/resources/calls/actions.d.mts.map +1 -1
- package/resources/calls/actions.d.ts +35 -28
- package/resources/calls/actions.d.ts.map +1 -1
- package/resources/compute/compute.d.mts +75 -2
- package/resources/compute/compute.d.mts.map +1 -1
- package/resources/compute/compute.d.ts +75 -2
- package/resources/compute/compute.d.ts.map +1 -1
- package/resources/compute/compute.js +17 -0
- package/resources/compute/compute.js.map +1 -1
- package/resources/compute/compute.mjs +17 -0
- package/resources/compute/compute.mjs.map +1 -1
- package/resources/compute/funcs/export.d.mts +3 -0
- package/resources/compute/funcs/export.d.mts.map +1 -1
- package/resources/compute/funcs/export.d.ts +3 -0
- package/resources/compute/funcs/export.d.ts.map +1 -1
- package/resources/compute/funcs/export.js +3 -0
- package/resources/compute/funcs/export.js.map +1 -1
- package/resources/compute/funcs/export.mjs +3 -0
- package/resources/compute/funcs/export.mjs.map +1 -1
- package/resources/compute/funcs/funcs.d.mts +60 -1
- package/resources/compute/funcs/funcs.d.mts.map +1 -1
- package/resources/compute/funcs/funcs.d.ts +60 -1
- package/resources/compute/funcs/funcs.d.ts.map +1 -1
- package/resources/compute/funcs/funcs.js +24 -0
- package/resources/compute/funcs/funcs.js.map +1 -1
- package/resources/compute/funcs/funcs.mjs +24 -0
- package/resources/compute/funcs/funcs.mjs.map +1 -1
- package/resources/compute/funcs/index.d.mts +1 -1
- package/resources/compute/funcs/index.d.mts.map +1 -1
- package/resources/compute/funcs/index.d.ts +1 -1
- package/resources/compute/funcs/index.d.ts.map +1 -1
- package/resources/compute/funcs/index.js.map +1 -1
- package/resources/compute/funcs/index.mjs.map +1 -1
- package/resources/compute/index.d.mts +2 -2
- package/resources/compute/index.d.mts.map +1 -1
- package/resources/compute/index.d.ts +2 -2
- package/resources/compute/index.d.ts.map +1 -1
- package/resources/compute/index.js.map +1 -1
- package/resources/compute/index.mjs.map +1 -1
- package/resources/conferences/actions.d.mts +3 -2
- package/resources/conferences/actions.d.mts.map +1 -1
- package/resources/conferences/actions.d.ts +3 -2
- package/resources/conferences/actions.d.ts.map +1 -1
- package/resources/email/dedicated-ips/actions.d.mts +73 -0
- package/resources/email/dedicated-ips/actions.d.mts.map +1 -0
- package/resources/email/dedicated-ips/actions.d.ts +73 -0
- package/resources/email/dedicated-ips/actions.d.ts.map +1 -0
- package/resources/email/dedicated-ips/actions.js +84 -0
- package/resources/email/dedicated-ips/actions.js.map +1 -0
- package/resources/email/dedicated-ips/actions.mjs +80 -0
- package/resources/email/dedicated-ips/actions.mjs.map +1 -0
- package/resources/email/dedicated-ips/dedicated-ips.d.mts +444 -0
- package/resources/email/dedicated-ips/dedicated-ips.d.mts.map +1 -0
- package/resources/email/dedicated-ips/dedicated-ips.d.ts +444 -0
- package/resources/email/dedicated-ips/dedicated-ips.d.ts.map +1 -0
- package/resources/email/dedicated-ips/dedicated-ips.js +142 -0
- package/resources/email/dedicated-ips/dedicated-ips.js.map +1 -0
- package/resources/email/dedicated-ips/dedicated-ips.mjs +137 -0
- package/resources/email/dedicated-ips/dedicated-ips.mjs.map +1 -0
- package/resources/email/dedicated-ips/index.d.mts +3 -0
- package/resources/email/dedicated-ips/index.d.mts.map +1 -0
- package/resources/email/dedicated-ips/index.d.ts +3 -0
- package/resources/email/dedicated-ips/index.d.ts.map +1 -0
- package/resources/email/dedicated-ips/index.js +9 -0
- package/resources/email/dedicated-ips/index.js.map +1 -0
- package/resources/email/dedicated-ips/index.mjs +4 -0
- package/resources/email/dedicated-ips/index.mjs.map +1 -0
- package/resources/email/dedicated-ips.d.mts +2 -0
- package/resources/email/dedicated-ips.d.mts.map +1 -0
- package/resources/email/dedicated-ips.d.ts +2 -0
- package/resources/email/dedicated-ips.d.ts.map +1 -0
- package/resources/email/dedicated-ips.js +6 -0
- package/resources/email/dedicated-ips.js.map +1 -0
- package/resources/email/dedicated-ips.mjs +3 -0
- package/resources/email/dedicated-ips.mjs.map +1 -0
- package/resources/email/email.d.mts +14 -0
- package/resources/email/email.d.mts.map +1 -0
- package/resources/email/email.d.ts +14 -0
- package/resources/email/email.d.ts.map +1 -0
- package/resources/email/email.js +21 -0
- package/resources/email/email.js.map +1 -0
- package/resources/email/email.mjs +16 -0
- package/resources/email/email.mjs.map +1 -0
- package/resources/email/index.d.mts +4 -0
- package/resources/email/index.d.mts.map +1 -0
- package/resources/email/index.d.ts +4 -0
- package/resources/email/index.d.ts.map +1 -0
- package/resources/email/index.js +11 -0
- package/resources/email/index.js.map +1 -0
- package/resources/email/index.mjs +5 -0
- package/resources/email/index.mjs.map +1 -0
- package/resources/email/ip-pools/index.d.mts +3 -0
- package/resources/email/ip-pools/index.d.mts.map +1 -0
- package/resources/email/ip-pools/index.d.ts +3 -0
- package/resources/email/ip-pools/index.d.ts.map +1 -0
- package/resources/email/ip-pools/index.js +9 -0
- package/resources/email/ip-pools/index.js.map +1 -0
- package/resources/email/ip-pools/index.mjs +4 -0
- package/resources/email/ip-pools/index.mjs.map +1 -0
- package/resources/email/ip-pools/ip-pools.d.mts +184 -0
- package/resources/email/ip-pools/ip-pools.d.mts.map +1 -0
- package/resources/email/ip-pools/ip-pools.d.ts +184 -0
- package/resources/email/ip-pools/ip-pools.d.ts.map +1 -0
- package/resources/email/ip-pools/ip-pools.js +102 -0
- package/resources/email/ip-pools/ip-pools.js.map +1 -0
- package/resources/email/ip-pools/ip-pools.mjs +97 -0
- package/resources/email/ip-pools/ip-pools.mjs.map +1 -0
- package/resources/email/ip-pools/ips.d.mts +83 -0
- package/resources/email/ip-pools/ips.d.mts.map +1 -0
- package/resources/email/ip-pools/ips.d.ts +83 -0
- package/resources/email/ip-pools/ips.d.ts.map +1 -0
- package/resources/email/ip-pools/ips.js +54 -0
- package/resources/email/ip-pools/ips.js.map +1 -0
- package/resources/email/ip-pools/ips.mjs +50 -0
- package/resources/email/ip-pools/ips.mjs.map +1 -0
- package/resources/email/ip-pools.d.mts +2 -0
- package/resources/email/ip-pools.d.mts.map +1 -0
- package/resources/email/ip-pools.d.ts +2 -0
- package/resources/email/ip-pools.d.ts.map +1 -0
- package/resources/email/ip-pools.js +6 -0
- package/resources/email/ip-pools.js.map +1 -0
- package/resources/email/ip-pools.mjs +3 -0
- package/resources/email/ip-pools.mjs.map +1 -0
- package/resources/email.d.mts +2 -0
- package/resources/email.d.mts.map +1 -0
- package/resources/email.d.ts +2 -0
- package/resources/email.d.ts.map +1 -0
- package/resources/email.js +6 -0
- package/resources/email.js.map +1 -0
- package/resources/email.mjs +3 -0
- package/resources/email.mjs.map +1 -0
- package/resources/fax-applications.d.mts +6 -6
- package/resources/fax-applications.d.ts +6 -6
- package/resources/fqdn-connections/fqdn-connections.d.mts +2 -2
- package/resources/fqdn-connections/fqdn-connections.d.ts +2 -2
- package/resources/index.d.mts +10 -3
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +10 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +18 -4
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +7 -0
- package/resources/index.mjs.map +1 -1
- package/resources/ip-connections.d.mts +4 -4
- package/resources/ip-connections.d.ts +4 -4
- package/resources/messaging-profiles/index.d.mts +1 -1
- package/resources/messaging-profiles/index.d.mts.map +1 -1
- package/resources/messaging-profiles/index.d.ts +1 -1
- package/resources/messaging-profiles/index.d.ts.map +1 -1
- package/resources/messaging-profiles/index.js.map +1 -1
- package/resources/messaging-profiles/index.mjs.map +1 -1
- package/resources/messaging-profiles/messaging-profiles.d.mts +26 -1
- package/resources/messaging-profiles/messaging-profiles.d.mts.map +1 -1
- package/resources/messaging-profiles/messaging-profiles.d.ts +26 -1
- package/resources/messaging-profiles/messaging-profiles.d.ts.map +1 -1
- package/resources/messaging-profiles/messaging-profiles.js.map +1 -1
- package/resources/messaging-profiles/messaging-profiles.mjs.map +1 -1
- package/resources/network-coverage.d.mts +1 -1
- package/resources/network-coverage.d.mts.map +1 -1
- package/resources/network-coverage.d.ts +1 -1
- package/resources/network-coverage.d.ts.map +1 -1
- package/resources/network-routes.d.mts +257 -0
- package/resources/network-routes.d.mts.map +1 -0
- package/resources/network-routes.d.ts +257 -0
- package/resources/network-routes.d.ts.map +1 -0
- package/resources/network-routes.js +83 -0
- package/resources/network-routes.js.map +1 -0
- package/resources/network-routes.mjs +79 -0
- package/resources/network-routes.mjs.map +1 -0
- package/resources/number-lookup.d.mts +122 -4
- package/resources/number-lookup.d.mts.map +1 -1
- package/resources/number-lookup.d.ts +122 -4
- package/resources/number-lookup.d.ts.map +1 -1
- package/resources/pay-connectors.d.mts +378 -0
- package/resources/pay-connectors.d.mts.map +1 -0
- package/resources/pay-connectors.d.ts +378 -0
- package/resources/pay-connectors.d.ts.map +1 -0
- package/resources/pay-connectors.js +116 -0
- package/resources/pay-connectors.js.map +1 -0
- package/resources/pay-connectors.mjs +112 -0
- package/resources/pay-connectors.mjs.map +1 -0
- package/resources/public-internet-gateways.d.mts +0 -8
- package/resources/public-internet-gateways.d.mts.map +1 -1
- package/resources/public-internet-gateways.d.ts +0 -8
- package/resources/public-internet-gateways.d.ts.map +1 -1
- package/resources/spend-limits.d.mts +150 -32
- package/resources/spend-limits.d.mts.map +1 -1
- package/resources/spend-limits.d.ts +150 -32
- package/resources/spend-limits.d.ts.map +1 -1
- package/resources/spend-limits.js +26 -7
- package/resources/spend-limits.js.map +1 -1
- package/resources/spend-limits.mjs +26 -7
- package/resources/spend-limits.mjs.map +1 -1
- package/resources/tailscale-subnet-routers.d.mts +233 -0
- package/resources/tailscale-subnet-routers.d.mts.map +1 -0
- package/resources/tailscale-subnet-routers.d.ts +233 -0
- package/resources/tailscale-subnet-routers.d.ts.map +1 -0
- package/resources/tailscale-subnet-routers.js +105 -0
- package/resources/tailscale-subnet-routers.js.map +1 -0
- package/resources/tailscale-subnet-routers.mjs +101 -0
- package/resources/tailscale-subnet-routers.mjs.map +1 -0
- package/resources/texml-applications.d.mts +6 -6
- package/resources/texml-applications.d.ts +6 -6
- package/resources/text-to-speech/text-to-speech.d.mts +1 -6
- package/resources/text-to-speech/text-to-speech.d.mts.map +1 -1
- package/resources/text-to-speech/text-to-speech.d.ts +1 -6
- package/resources/text-to-speech/text-to-speech.d.ts.map +1 -1
- package/resources/text-to-speech/text-to-speech.js +1 -2
- package/resources/text-to-speech/text-to-speech.js.map +1 -1
- package/resources/text-to-speech/text-to-speech.mjs +1 -2
- package/resources/text-to-speech/text-to-speech.mjs.map +1 -1
- package/resources/tunnels/actions.d.mts +29 -0
- package/resources/tunnels/actions.d.mts.map +1 -0
- package/resources/tunnels/actions.d.ts +29 -0
- package/resources/tunnels/actions.d.ts.map +1 -0
- package/resources/tunnels/actions.js +28 -0
- package/resources/tunnels/actions.js.map +1 -0
- package/resources/tunnels/actions.mjs +24 -0
- package/resources/tunnels/actions.mjs.map +1 -0
- package/resources/tunnels/index.d.mts +3 -0
- package/resources/tunnels/index.d.mts.map +1 -0
- package/resources/tunnels/index.d.ts +3 -0
- package/resources/tunnels/index.d.ts.map +1 -0
- package/resources/tunnels/index.js +9 -0
- package/resources/tunnels/index.js.map +1 -0
- package/resources/tunnels/index.mjs +4 -0
- package/resources/tunnels/index.mjs.map +1 -0
- package/resources/tunnels/tunnels.d.mts +194 -0
- package/resources/tunnels/tunnels.d.mts.map +1 -0
- package/resources/tunnels/tunnels.d.ts +194 -0
- package/resources/tunnels/tunnels.d.ts.map +1 -0
- package/resources/tunnels/tunnels.js +82 -0
- package/resources/tunnels/tunnels.js.map +1 -0
- package/resources/tunnels/tunnels.mjs +77 -0
- package/resources/tunnels/tunnels.mjs.map +1 -0
- package/resources/tunnels.d.mts +2 -0
- package/resources/tunnels.d.mts.map +1 -0
- package/resources/tunnels.d.ts +2 -0
- package/resources/tunnels.d.ts.map +1 -0
- package/resources/tunnels.js +6 -0
- package/resources/tunnels.js.map +1 -0
- package/resources/tunnels.mjs +3 -0
- package/resources/tunnels.mjs.map +1 -0
- package/resources/voice-clones.d.mts +54 -8
- package/resources/voice-clones.d.mts.map +1 -1
- package/resources/voice-clones.d.ts +54 -8
- package/resources/voice-clones.d.ts.map +1 -1
- package/resources/voice-clones.js +6 -5
- package/resources/voice-clones.js.map +1 -1
- package/resources/voice-clones.mjs +6 -5
- package/resources/voice-clones.mjs.map +1 -1
- package/resources/whatsapp/hosted-signups.d.mts +2 -1
- package/resources/whatsapp/hosted-signups.d.mts.map +1 -1
- package/resources/whatsapp/hosted-signups.d.ts +2 -1
- package/resources/whatsapp/hosted-signups.d.ts.map +1 -1
- package/resources/wireguard-interfaces.d.mts +0 -8
- package/resources/wireguard-interfaces.d.mts.map +1 -1
- package/resources/wireguard-interfaces.d.ts +0 -8
- package/resources/wireguard-interfaces.d.ts.map +1 -1
- package/src/client.ts +161 -2
- package/src/resources/addresses/actions.ts +23 -4
- package/src/resources/ai/ai.ts +6 -0
- package/src/resources/ai/assistants/assistants.ts +43 -24
- package/src/resources/ai/audio.ts +23 -11
- package/src/resources/ai/avatars.ts +9 -9
- package/src/resources/ai/index.ts +1 -0
- package/src/resources/ai/tests/index.ts +5 -0
- package/src/resources/ai/tests/schedules/index.ts +4 -0
- package/src/resources/ai/tests/schedules/schedules.ts +15 -0
- package/src/resources/ai/tests/schedules/v1/cron-jobs.ts +248 -0
- package/src/resources/ai/tests/schedules/v1/index.ts +12 -0
- package/src/resources/ai/tests/schedules/v1/v1.ts +31 -0
- package/src/resources/ai/tests/schedules/v1.ts +3 -0
- package/src/resources/ai/tests/schedules.ts +3 -0
- package/src/resources/ai/tests/test-framework/index.ts +4 -0
- package/src/resources/ai/tests/test-framework/test-framework.ts +15 -0
- package/src/resources/ai/tests/test-framework/v1/aiagents.ts +304 -0
- package/src/resources/ai/tests/test-framework/v1/index.ts +54 -0
- package/src/resources/ai/tests/test-framework/v1/metrics.ts +491 -0
- package/src/resources/ai/tests/test-framework/v1/results.ts +304 -0
- package/src/resources/ai/tests/test-framework/v1/scenarios.ts +774 -0
- package/src/resources/ai/tests/test-framework/v1/v1.ts +214 -0
- package/src/resources/ai/tests/test-framework/v1.ts +3 -0
- package/src/resources/ai/tests/test-framework.ts +3 -0
- package/src/resources/ai/tests/tests.ts +21 -0
- package/src/resources/ai/tests.ts +3 -0
- package/src/resources/artifact-downloads.ts +39 -0
- package/src/resources/bot-challenge.ts +1 -1
- package/src/resources/bot-sessions.ts +1 -1
- package/src/resources/bot-signup.ts +2 -2
- package/src/resources/browser-sessions/actions.ts +778 -0
- package/src/resources/browser-sessions/browser-sessions.ts +278 -0
- package/src/resources/browser-sessions/index.ts +31 -0
- package/src/resources/browser-sessions.ts +3 -0
- package/src/resources/call-control-applications.ts +2 -2
- package/src/resources/calls/actions.ts +38 -27
- package/src/resources/compute/compute.ts +105 -0
- package/src/resources/compute/funcs/export.ts +3 -0
- package/src/resources/compute/funcs/funcs.ts +99 -0
- package/src/resources/compute/funcs/index.ts +3 -0
- package/src/resources/compute/index.ts +4 -1
- package/src/resources/conferences/actions.ts +3 -2
- package/src/resources/email/dedicated-ips/actions.ts +87 -0
- package/src/resources/email/dedicated-ips/dedicated-ips.ts +563 -0
- package/src/resources/email/dedicated-ips/index.ts +13 -0
- package/src/resources/email/dedicated-ips.ts +3 -0
- package/src/resources/email/email.ts +55 -0
- package/src/resources/email/index.ts +22 -0
- package/src/resources/email/ip-pools/index.ts +12 -0
- package/src/resources/email/ip-pools/ip-pools.ts +247 -0
- package/src/resources/email/ip-pools/ips.ts +112 -0
- package/src/resources/email/ip-pools.ts +3 -0
- package/src/resources/email.ts +3 -0
- package/src/resources/fax-applications.ts +6 -6
- package/src/resources/fqdn-connections/fqdn-connections.ts +2 -2
- package/src/resources/index.ts +59 -1
- package/src/resources/ip-connections.ts +4 -4
- package/src/resources/messaging-profiles/index.ts +1 -0
- package/src/resources/messaging-profiles/messaging-profiles.ts +31 -0
- package/src/resources/network-coverage.ts +5 -1
- package/src/resources/network-routes.ts +332 -0
- package/src/resources/number-lookup.ts +154 -4
- package/src/resources/pay-connectors.ts +482 -0
- package/src/resources/public-internet-gateways.ts +0 -10
- package/src/resources/spend-limits.ts +179 -36
- package/src/resources/tailscale-subnet-routers.ts +303 -0
- package/src/resources/texml-applications.ts +6 -6
- package/src/resources/text-to-speech/text-to-speech.ts +1 -7
- package/src/resources/tunnels/actions.ts +36 -0
- package/src/resources/tunnels/index.ts +13 -0
- package/src/resources/tunnels/tunnels.ts +260 -0
- package/src/resources/tunnels.ts +3 -0
- package/src/resources/voice-clones.ts +88 -8
- package/src/resources/whatsapp/hosted-signups.ts +2 -1
- package/src/resources/wireguard-interfaces.ts +0 -10
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,774 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../../../../core/resource';
|
|
4
|
+
import * as MetricsAPI from './metrics';
|
|
5
|
+
import { APIPromise } from '../../../../../core/api-promise';
|
|
6
|
+
import { buildHeaders } from '../../../../../internal/headers';
|
|
7
|
+
import { RequestOptions } from '../../../../../internal/request-options';
|
|
8
|
+
import { path } from '../../../../../internal/utils/path';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Test agents, evaluator scenarios, metrics, and run results for the AI test framework.
|
|
12
|
+
*/
|
|
13
|
+
export class Scenarios extends APIResource {
|
|
14
|
+
/**
|
|
15
|
+
* Returns a paginated list of evaluator scenarios in your organization, optionally
|
|
16
|
+
* filtered by test agent or tags.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* const scenarios =
|
|
21
|
+
* await client.ai.tests.testFramework.v1.scenarios.list();
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
list(
|
|
25
|
+
query: ScenarioListParams | null | undefined = {},
|
|
26
|
+
options?: RequestOptions,
|
|
27
|
+
): APIPromise<ScenarioListResponse> {
|
|
28
|
+
return this._client.get('/ai/tests/test_framework/v1/scenarios', { query, ...options });
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Creates an evaluator scenario in your organization.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```ts
|
|
36
|
+
* const evaluatorScenarioDetail =
|
|
37
|
+
* await client.ai.tests.testFramework.v1.scenarios.create({
|
|
38
|
+
* name: 'Refund escalation flow',
|
|
39
|
+
* personality: 4643,
|
|
40
|
+
* agent: 1259,
|
|
41
|
+
* expected_outcome_prompt:
|
|
42
|
+
* 'The assistant explains the refund policy and offers escalation.',
|
|
43
|
+
* first_message: 'Hi, I want a refund.',
|
|
44
|
+
* instructions:
|
|
45
|
+
* 'Call the support line and demand a refund for a damaged product.',
|
|
46
|
+
* metrics: [266881],
|
|
47
|
+
* tags: ['support'],
|
|
48
|
+
* });
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
create(body: ScenarioCreateParams, options?: RequestOptions): APIPromise<EvaluatorScenarioDetail> {
|
|
52
|
+
return this._client.post('/ai/tests/test_framework/v1/scenarios', { body, ...options });
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Exports the selected evaluator scenarios as a CSV or XLSX file download.
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```ts
|
|
60
|
+
* const response =
|
|
61
|
+
* await client.ai.tests.testFramework.v1.scenarios.retrieveExportScenarios(
|
|
62
|
+
* { export_type: 'csv', scenario_ids: 'scenario_ids' },
|
|
63
|
+
* );
|
|
64
|
+
*
|
|
65
|
+
* const content = await response.blob();
|
|
66
|
+
* console.log(content);
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
retrieveExportScenarios(
|
|
70
|
+
query: ScenarioRetrieveExportScenariosParams,
|
|
71
|
+
options?: RequestOptions,
|
|
72
|
+
): APIPromise<Response> {
|
|
73
|
+
return this._client.get('/ai/tests/test_framework/v1/scenarios/export_scenarios', {
|
|
74
|
+
query,
|
|
75
|
+
...options,
|
|
76
|
+
headers: buildHeaders([
|
|
77
|
+
{ Accept: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' },
|
|
78
|
+
options?.headers,
|
|
79
|
+
]),
|
|
80
|
+
__binaryResponse: true,
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Starts background generation of evaluator scenarios for a test agent. Returns a
|
|
86
|
+
* progress ID to poll with the generate-scenarios-progress endpoint.
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* ```ts
|
|
90
|
+
* const scenarioGenerationResponse =
|
|
91
|
+
* await client.ai.tests.testFramework.v1.scenarios.generateBg(
|
|
92
|
+
* {
|
|
93
|
+
* num_scenarios: 5,
|
|
94
|
+
* agent_id: 1259,
|
|
95
|
+
* extra_instructions:
|
|
96
|
+
* 'Focus on angry customers asking about refunds.',
|
|
97
|
+
* generate_expected_outcomes: true,
|
|
98
|
+
* scenario_type: 'workflow',
|
|
99
|
+
* },
|
|
100
|
+
* );
|
|
101
|
+
* ```
|
|
102
|
+
*/
|
|
103
|
+
generateBg(
|
|
104
|
+
body: ScenarioGenerateBgParams,
|
|
105
|
+
options?: RequestOptions,
|
|
106
|
+
): APIPromise<MetricsAPI.ScenarioGenerationResponse> {
|
|
107
|
+
return this._client.post('/ai/tests/test_framework/v1/scenarios/generate-bg', { body, ...options });
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Returns the status of a background scenario-generation job started with the
|
|
112
|
+
* generate-evaluator-scenarios endpoint.
|
|
113
|
+
*
|
|
114
|
+
* @example
|
|
115
|
+
* ```ts
|
|
116
|
+
* const response =
|
|
117
|
+
* await client.ai.tests.testFramework.v1.scenarios.retrieveGenerateProgress(
|
|
118
|
+
* { progress_id: 'progress_id' },
|
|
119
|
+
* );
|
|
120
|
+
* ```
|
|
121
|
+
*/
|
|
122
|
+
retrieveGenerateProgress(
|
|
123
|
+
query: ScenarioRetrieveGenerateProgressParams,
|
|
124
|
+
options?: RequestOptions,
|
|
125
|
+
): APIPromise<ScenarioRetrieveGenerateProgressResponse> {
|
|
126
|
+
return this._client.get('/ai/tests/test_framework/v1/scenarios/generate-progress', { query, ...options });
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Runs the selected evaluator scenarios against their test agents and creates a
|
|
131
|
+
* run batch. Returns the ID of the created batch, whose results can be listed with
|
|
132
|
+
* the test-run-results endpoints.
|
|
133
|
+
*
|
|
134
|
+
* @example
|
|
135
|
+
* ```ts
|
|
136
|
+
* const response =
|
|
137
|
+
* await client.ai.tests.testFramework.v1.scenarios.runScenarios(
|
|
138
|
+
* {
|
|
139
|
+
* agent_id: 1259,
|
|
140
|
+
* concurrency_limit: 3,
|
|
141
|
+
* mode: 'same_number',
|
|
142
|
+
* scenarios: [9512],
|
|
143
|
+
* tags: ['regression'],
|
|
144
|
+
* },
|
|
145
|
+
* );
|
|
146
|
+
* ```
|
|
147
|
+
*/
|
|
148
|
+
runScenarios(
|
|
149
|
+
body: ScenarioRunScenariosParams,
|
|
150
|
+
options?: RequestOptions,
|
|
151
|
+
): APIPromise<ScenarioRunScenariosResponse> {
|
|
152
|
+
return this._client.post('/ai/tests/test_framework/v1/scenarios/run_scenarios', { body, ...options });
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Starts an interactive session that improves selected evaluator scenarios from a
|
|
157
|
+
* natural-language instruction. Returns a progress ID to poll with the
|
|
158
|
+
* improve-scenarios-progress endpoint.
|
|
159
|
+
*
|
|
160
|
+
* @example
|
|
161
|
+
* ```ts
|
|
162
|
+
* const response =
|
|
163
|
+
* await client.ai.tests.testFramework.v1.scenarios.scenarioAgent(
|
|
164
|
+
* {
|
|
165
|
+
* scenarios: 'all',
|
|
166
|
+
* user_message:
|
|
167
|
+
* 'Make the callers ask about damaged packaging too.',
|
|
168
|
+
* agent_id: 1259,
|
|
169
|
+
* apply_changes: true,
|
|
170
|
+
* },
|
|
171
|
+
* );
|
|
172
|
+
* ```
|
|
173
|
+
*/
|
|
174
|
+
scenarioAgent(
|
|
175
|
+
body: ScenarioScenarioAgentParams,
|
|
176
|
+
options?: RequestOptions,
|
|
177
|
+
): APIPromise<ScenarioScenarioAgentResponse> {
|
|
178
|
+
return this._client.post('/ai/tests/test_framework/v1/scenarios/scenario-agent', { body, ...options });
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Returns the status of an improve-scenarios session started with the
|
|
183
|
+
* improve-evaluator-scenarios endpoint.
|
|
184
|
+
*
|
|
185
|
+
* @example
|
|
186
|
+
* ```ts
|
|
187
|
+
* const response =
|
|
188
|
+
* await client.ai.tests.testFramework.v1.scenarios.retrieveScenarioAgentProgress(
|
|
189
|
+
* { progress_id: 'progress_id' },
|
|
190
|
+
* );
|
|
191
|
+
* ```
|
|
192
|
+
*/
|
|
193
|
+
retrieveScenarioAgentProgress(
|
|
194
|
+
query: ScenarioRetrieveScenarioAgentProgressParams,
|
|
195
|
+
options?: RequestOptions,
|
|
196
|
+
): APIPromise<ScenarioRetrieveScenarioAgentProgressResponse> {
|
|
197
|
+
return this._client.get('/ai/tests/test_framework/v1/scenarios/scenario-agent-progress', {
|
|
198
|
+
query,
|
|
199
|
+
...options,
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Deletes the specified evaluator scenario.
|
|
205
|
+
*
|
|
206
|
+
* @example
|
|
207
|
+
* ```ts
|
|
208
|
+
* const scenario =
|
|
209
|
+
* await client.ai.tests.testFramework.v1.scenarios.delete(
|
|
210
|
+
* 0,
|
|
211
|
+
* );
|
|
212
|
+
* ```
|
|
213
|
+
*/
|
|
214
|
+
delete(id: number, options?: RequestOptions): APIPromise<unknown> {
|
|
215
|
+
return this._client.delete(path`/ai/tests/test_framework/v1/scenarios/${id}`, options);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* Returns the specified evaluator scenario with full detail.
|
|
220
|
+
*
|
|
221
|
+
* @example
|
|
222
|
+
* ```ts
|
|
223
|
+
* const evaluatorScenarioDetail =
|
|
224
|
+
* await client.ai.tests.testFramework.v1.scenarios.retrieve(
|
|
225
|
+
* 0,
|
|
226
|
+
* );
|
|
227
|
+
* ```
|
|
228
|
+
*/
|
|
229
|
+
retrieve(id: number, options?: RequestOptions): APIPromise<EvaluatorScenarioDetail> {
|
|
230
|
+
return this._client.get(path`/ai/tests/test_framework/v1/scenarios/${id}`, options);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* Updates the specified evaluator scenario.
|
|
235
|
+
*
|
|
236
|
+
* @example
|
|
237
|
+
* ```ts
|
|
238
|
+
* const evaluatorScenarioDetail =
|
|
239
|
+
* await client.ai.tests.testFramework.v1.scenarios.update(
|
|
240
|
+
* 0,
|
|
241
|
+
* {
|
|
242
|
+
* instructions:
|
|
243
|
+
* 'Call the support line, demand a refund, and mention the damaged packaging.',
|
|
244
|
+
* metrics: [266881, 266882],
|
|
245
|
+
* name: 'Refund escalation flow - updated',
|
|
246
|
+
* },
|
|
247
|
+
* );
|
|
248
|
+
* ```
|
|
249
|
+
*/
|
|
250
|
+
update(
|
|
251
|
+
id: number,
|
|
252
|
+
body: ScenarioUpdateParams,
|
|
253
|
+
options?: RequestOptions,
|
|
254
|
+
): APIPromise<EvaluatorScenarioDetail> {
|
|
255
|
+
return this._client.patch(path`/ai/tests/test_framework/v1/scenarios/${id}`, { body, ...options });
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
export interface EvaluatorScenarioDetail {
|
|
260
|
+
id: number;
|
|
261
|
+
|
|
262
|
+
agent: number | null;
|
|
263
|
+
|
|
264
|
+
name: string;
|
|
265
|
+
|
|
266
|
+
dynamic_variable_values?: { [key: string]: string } | null;
|
|
267
|
+
|
|
268
|
+
expected_outcome_prompt?: string;
|
|
269
|
+
|
|
270
|
+
first_message?: string;
|
|
271
|
+
|
|
272
|
+
folder_path?: string | null;
|
|
273
|
+
|
|
274
|
+
inbound_phone_number?: number | null;
|
|
275
|
+
|
|
276
|
+
inbound_phone_number_data?: EvaluatorScenarioDetail.InboundPhoneNumberData | null;
|
|
277
|
+
|
|
278
|
+
information_fields?: { [key: string]: string } | null;
|
|
279
|
+
|
|
280
|
+
instructions?: string;
|
|
281
|
+
|
|
282
|
+
is_predefined?: boolean;
|
|
283
|
+
|
|
284
|
+
max_duration?: number | null;
|
|
285
|
+
|
|
286
|
+
metric_names?: Array<string>;
|
|
287
|
+
|
|
288
|
+
metrics?: Array<number>;
|
|
289
|
+
|
|
290
|
+
outbound_phone_number_data?: EvaluatorScenarioDetail.OutboundPhoneNumberData | null;
|
|
291
|
+
|
|
292
|
+
personality?: number | null;
|
|
293
|
+
|
|
294
|
+
personality_name?: string;
|
|
295
|
+
|
|
296
|
+
phone_number?: string;
|
|
297
|
+
|
|
298
|
+
project?: number | null;
|
|
299
|
+
|
|
300
|
+
runs?: Array<number>;
|
|
301
|
+
|
|
302
|
+
scenario_language?: string | null;
|
|
303
|
+
|
|
304
|
+
scenario_type?: string;
|
|
305
|
+
|
|
306
|
+
simulation_description?: string;
|
|
307
|
+
|
|
308
|
+
suite_type?: string;
|
|
309
|
+
|
|
310
|
+
tags?: Array<string>;
|
|
311
|
+
|
|
312
|
+
test_profile?: number | null;
|
|
313
|
+
|
|
314
|
+
test_profile_data?: EvaluatorScenarioDetail.TestProfileData | null;
|
|
315
|
+
|
|
316
|
+
tool_ids?: Array<string>;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
export namespace EvaluatorScenarioDetail {
|
|
320
|
+
export interface InboundPhoneNumberData {
|
|
321
|
+
id?: number;
|
|
322
|
+
|
|
323
|
+
number?: string;
|
|
324
|
+
|
|
325
|
+
phone_number_id?: string;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
export interface OutboundPhoneNumberData {
|
|
329
|
+
id?: number;
|
|
330
|
+
|
|
331
|
+
number?: string;
|
|
332
|
+
|
|
333
|
+
phone_number_id?: string;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
export interface TestProfileData {
|
|
337
|
+
id?: number;
|
|
338
|
+
|
|
339
|
+
agent?: number | null;
|
|
340
|
+
|
|
341
|
+
information?: { [key: string]: string } | null;
|
|
342
|
+
|
|
343
|
+
name?: string;
|
|
344
|
+
|
|
345
|
+
project?: number | null;
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
export interface ScenarioListResponse {
|
|
350
|
+
count: number;
|
|
351
|
+
|
|
352
|
+
next: string | null;
|
|
353
|
+
|
|
354
|
+
previous: string | null;
|
|
355
|
+
|
|
356
|
+
results: Array<ScenarioListResponse.Result>;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
export namespace ScenarioListResponse {
|
|
360
|
+
export interface Result {
|
|
361
|
+
id: number;
|
|
362
|
+
|
|
363
|
+
/**
|
|
364
|
+
* ID of the test agent the scenario runs against.
|
|
365
|
+
*/
|
|
366
|
+
agent: number | null;
|
|
367
|
+
|
|
368
|
+
created_at: string;
|
|
369
|
+
|
|
370
|
+
name: string;
|
|
371
|
+
|
|
372
|
+
updated_at: string;
|
|
373
|
+
|
|
374
|
+
dynamic_variable_values?: { [key: string]: string } | null;
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* What a successful conversation looks like; scored by the expected-outcome
|
|
378
|
+
* metric.
|
|
379
|
+
*/
|
|
380
|
+
expected_outcome_prompt?: string;
|
|
381
|
+
|
|
382
|
+
/**
|
|
383
|
+
* First message the simulated caller speaks or sends.
|
|
384
|
+
*/
|
|
385
|
+
first_message?: string;
|
|
386
|
+
|
|
387
|
+
folder_path?: string | null;
|
|
388
|
+
|
|
389
|
+
inbound_phone_number?: number | null;
|
|
390
|
+
|
|
391
|
+
inbound_phone_number_data?: string | null;
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* What the simulated caller should do during the conversation.
|
|
395
|
+
*/
|
|
396
|
+
instructions?: string;
|
|
397
|
+
|
|
398
|
+
last_updated_by?: number | null;
|
|
399
|
+
|
|
400
|
+
metric_names?: Array<string>;
|
|
401
|
+
|
|
402
|
+
/**
|
|
403
|
+
* Metric IDs applied to the scenario.
|
|
404
|
+
*/
|
|
405
|
+
metrics?: Array<number>;
|
|
406
|
+
|
|
407
|
+
/**
|
|
408
|
+
* ID of the test personality the caller simulates.
|
|
409
|
+
*/
|
|
410
|
+
personality?: number | null;
|
|
411
|
+
|
|
412
|
+
personality_name?: string;
|
|
413
|
+
|
|
414
|
+
/**
|
|
415
|
+
* Outbound phone number used to place the simulated call.
|
|
416
|
+
*/
|
|
417
|
+
phone_number?: string;
|
|
418
|
+
|
|
419
|
+
scenario_language?: string | null;
|
|
420
|
+
|
|
421
|
+
/**
|
|
422
|
+
* Type of scenario: workflow, red_teaming_voice, or red_teaming_text.
|
|
423
|
+
*/
|
|
424
|
+
scenario_type?: string;
|
|
425
|
+
|
|
426
|
+
tags?: Array<string>;
|
|
427
|
+
|
|
428
|
+
test_profile?: number | null;
|
|
429
|
+
|
|
430
|
+
test_profile_data?: Result.TestProfileData | null;
|
|
431
|
+
|
|
432
|
+
tool_ids?: Array<string>;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
export namespace Result {
|
|
436
|
+
export interface TestProfileData {
|
|
437
|
+
id?: number;
|
|
438
|
+
|
|
439
|
+
agent?: number | null;
|
|
440
|
+
|
|
441
|
+
information?: { [key: string]: string } | null;
|
|
442
|
+
|
|
443
|
+
name?: string;
|
|
444
|
+
|
|
445
|
+
project?: number | null;
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
export type ScenarioDeleteResponse = unknown;
|
|
451
|
+
|
|
452
|
+
export interface ScenarioRetrieveGenerateProgressResponse {
|
|
453
|
+
completed_scenarios?: number;
|
|
454
|
+
|
|
455
|
+
failed_scenarios?: number;
|
|
456
|
+
|
|
457
|
+
scenarios_list?: Array<{ [key: string]: unknown }>;
|
|
458
|
+
|
|
459
|
+
total_scenarios?: number;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
export interface ScenarioRetrieveScenarioAgentProgressResponse {
|
|
463
|
+
error?: string | null;
|
|
464
|
+
|
|
465
|
+
mode?: string;
|
|
466
|
+
|
|
467
|
+
progress_id?: string;
|
|
468
|
+
|
|
469
|
+
result?: ScenarioRetrieveScenarioAgentProgressResponse.Result | null;
|
|
470
|
+
|
|
471
|
+
session_id?: number | null;
|
|
472
|
+
|
|
473
|
+
status?: string;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
export namespace ScenarioRetrieveScenarioAgentProgressResponse {
|
|
477
|
+
export interface Result {
|
|
478
|
+
cancelled?: boolean;
|
|
479
|
+
|
|
480
|
+
clarification_questions?: Array<Result.ClarificationQuestion>;
|
|
481
|
+
|
|
482
|
+
conversation_history?: Array<Result.ConversationHistory>;
|
|
483
|
+
|
|
484
|
+
message?: string;
|
|
485
|
+
|
|
486
|
+
needs_clarification?: boolean;
|
|
487
|
+
|
|
488
|
+
session_id?: number;
|
|
489
|
+
|
|
490
|
+
success?: boolean;
|
|
491
|
+
|
|
492
|
+
updated_scenarios?: Array<{ [key: string]: unknown }>;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
export namespace Result {
|
|
496
|
+
export interface ClarificationQuestion {
|
|
497
|
+
question?: string;
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
export interface ConversationHistory {
|
|
501
|
+
content?: string;
|
|
502
|
+
|
|
503
|
+
role?: string;
|
|
504
|
+
|
|
505
|
+
timestamp?: string;
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
export interface ScenarioRunScenariosResponse {
|
|
511
|
+
/**
|
|
512
|
+
* ID of the created test-run batch whose results can be polled.
|
|
513
|
+
*/
|
|
514
|
+
id: number;
|
|
515
|
+
|
|
516
|
+
/**
|
|
517
|
+
* Initial status of the run batch.
|
|
518
|
+
*/
|
|
519
|
+
status: string;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
export interface ScenarioScenarioAgentResponse {
|
|
523
|
+
progress_id: string;
|
|
524
|
+
|
|
525
|
+
session_id?: number | null;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
export interface ScenarioListParams {
|
|
529
|
+
/**
|
|
530
|
+
* Filter scenarios belonging to the specified test agent.
|
|
531
|
+
*/
|
|
532
|
+
agent_id?: number;
|
|
533
|
+
|
|
534
|
+
/**
|
|
535
|
+
* Filter scenarios belonging to the specified Telnyx assistant.
|
|
536
|
+
*/
|
|
537
|
+
assistant_id?: string;
|
|
538
|
+
|
|
539
|
+
/**
|
|
540
|
+
* Page number (1-based).
|
|
541
|
+
*/
|
|
542
|
+
page?: number;
|
|
543
|
+
|
|
544
|
+
/**
|
|
545
|
+
* Number of results per page.
|
|
546
|
+
*/
|
|
547
|
+
page_size?: number;
|
|
548
|
+
|
|
549
|
+
/**
|
|
550
|
+
* Filter scenarios by a comma-separated list of tags.
|
|
551
|
+
*/
|
|
552
|
+
tags?: string;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
export interface ScenarioCreateParams {
|
|
556
|
+
name: string;
|
|
557
|
+
|
|
558
|
+
/**
|
|
559
|
+
* ID of the personality the caller simulates.
|
|
560
|
+
*/
|
|
561
|
+
personality: number;
|
|
562
|
+
|
|
563
|
+
agent?: number | null;
|
|
564
|
+
|
|
565
|
+
expected_outcome_prompt?: string;
|
|
566
|
+
|
|
567
|
+
first_message?: string;
|
|
568
|
+
|
|
569
|
+
folder_path?: string | null;
|
|
570
|
+
|
|
571
|
+
instructions?: string;
|
|
572
|
+
|
|
573
|
+
metrics?: Array<number>;
|
|
574
|
+
|
|
575
|
+
tags?: Array<string>;
|
|
576
|
+
|
|
577
|
+
test_profile?: number;
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
export interface ScenarioRetrieveExportScenariosParams {
|
|
581
|
+
/**
|
|
582
|
+
* File format of the export.
|
|
583
|
+
*/
|
|
584
|
+
export_type: 'csv' | 'xlsx';
|
|
585
|
+
|
|
586
|
+
/**
|
|
587
|
+
* Comma-separated scenario IDs to export.
|
|
588
|
+
*/
|
|
589
|
+
scenario_ids: string;
|
|
590
|
+
|
|
591
|
+
/**
|
|
592
|
+
* Export scenarios belonging to the specified test agent.
|
|
593
|
+
*/
|
|
594
|
+
agent_id?: number;
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
export interface ScenarioGenerateBgParams {
|
|
598
|
+
/**
|
|
599
|
+
* How many scenarios to generate.
|
|
600
|
+
*/
|
|
601
|
+
num_scenarios: number;
|
|
602
|
+
|
|
603
|
+
agent_id?: number;
|
|
604
|
+
|
|
605
|
+
/**
|
|
606
|
+
* Optional guidance steering scenario generation.
|
|
607
|
+
*/
|
|
608
|
+
extra_instructions?: string;
|
|
609
|
+
|
|
610
|
+
first_message?: string;
|
|
611
|
+
|
|
612
|
+
folder_path?: string | null;
|
|
613
|
+
|
|
614
|
+
/**
|
|
615
|
+
* Whether to generate expected-outcome prompts for the scenarios.
|
|
616
|
+
*/
|
|
617
|
+
generate_expected_outcomes?: boolean;
|
|
618
|
+
|
|
619
|
+
inbound_phone_number?: number | null;
|
|
620
|
+
|
|
621
|
+
personalities?: Array<number>;
|
|
622
|
+
|
|
623
|
+
/**
|
|
624
|
+
* Type of scenario to generate.
|
|
625
|
+
*/
|
|
626
|
+
scenario_type?: 'workflow' | 'red_teaming_voice' | 'red_teaming_text';
|
|
627
|
+
|
|
628
|
+
tags?: Array<string>;
|
|
629
|
+
|
|
630
|
+
test_profile?: number;
|
|
631
|
+
|
|
632
|
+
tool_ids?: Array<string>;
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
export interface ScenarioRetrieveGenerateProgressParams {
|
|
636
|
+
/**
|
|
637
|
+
* Progress ID returned by the generate-evaluator-scenarios endpoint.
|
|
638
|
+
*/
|
|
639
|
+
progress_id: string;
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
export interface ScenarioRunScenariosParams {
|
|
643
|
+
agent_id?: number;
|
|
644
|
+
|
|
645
|
+
agent_number?: string;
|
|
646
|
+
|
|
647
|
+
assistant_id?: string;
|
|
648
|
+
|
|
649
|
+
/**
|
|
650
|
+
* Maximum number of concurrent simulated calls.
|
|
651
|
+
*/
|
|
652
|
+
concurrency_limit?: number;
|
|
653
|
+
|
|
654
|
+
frequency?: number;
|
|
655
|
+
|
|
656
|
+
mode?: 'same_number' | 'different_numbers';
|
|
657
|
+
|
|
658
|
+
name?: string;
|
|
659
|
+
|
|
660
|
+
outbound_phone_number?: string;
|
|
661
|
+
|
|
662
|
+
personality_ids?: Array<number>;
|
|
663
|
+
|
|
664
|
+
/**
|
|
665
|
+
* Scenario IDs to run, or the literal string 'all'.
|
|
666
|
+
*/
|
|
667
|
+
scenarios?: Array<unknown> | string;
|
|
668
|
+
|
|
669
|
+
tags?: Array<string>;
|
|
670
|
+
|
|
671
|
+
test_profile_ids?: Array<number>;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
export interface ScenarioScenarioAgentParams {
|
|
675
|
+
/**
|
|
676
|
+
* Scenario IDs to improve, or the literal string 'all'.
|
|
677
|
+
*/
|
|
678
|
+
scenarios: Array<unknown> | string;
|
|
679
|
+
|
|
680
|
+
/**
|
|
681
|
+
* What the assistant should improve about the selected scenarios.
|
|
682
|
+
*/
|
|
683
|
+
user_message: string;
|
|
684
|
+
|
|
685
|
+
agent_id?: number | null;
|
|
686
|
+
|
|
687
|
+
agent_resolution_response?: string;
|
|
688
|
+
|
|
689
|
+
apply_changes?: boolean;
|
|
690
|
+
|
|
691
|
+
context?: Array<ScenarioScenarioAgentParams.Context> | null;
|
|
692
|
+
|
|
693
|
+
knowledge_base?: Array<number>;
|
|
694
|
+
|
|
695
|
+
num_scenarios?: number;
|
|
696
|
+
|
|
697
|
+
pending_tool_calls?: Array<{ [key: string]: unknown }> | null;
|
|
698
|
+
|
|
699
|
+
scenarios_needing_agent?: Array<number>;
|
|
700
|
+
|
|
701
|
+
session_id?: number | null;
|
|
702
|
+
|
|
703
|
+
updated_scenarios?: Array<{ [key: string]: unknown }>;
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
export namespace ScenarioScenarioAgentParams {
|
|
707
|
+
export interface Context {
|
|
708
|
+
content?: string;
|
|
709
|
+
|
|
710
|
+
role?: string;
|
|
711
|
+
|
|
712
|
+
timestamp?: string;
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
export interface ScenarioRetrieveScenarioAgentProgressParams {
|
|
717
|
+
/**
|
|
718
|
+
* Progress ID returned by the improve-evaluator-scenarios endpoint.
|
|
719
|
+
*/
|
|
720
|
+
progress_id: string;
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
export interface ScenarioUpdateParams {
|
|
724
|
+
agent?: number | null;
|
|
725
|
+
|
|
726
|
+
expected_outcome_prompt?: string;
|
|
727
|
+
|
|
728
|
+
first_message?: string;
|
|
729
|
+
|
|
730
|
+
folder_path?: string | null;
|
|
731
|
+
|
|
732
|
+
inbound_phone_number?: number;
|
|
733
|
+
|
|
734
|
+
instructions?: string;
|
|
735
|
+
|
|
736
|
+
max_duration?: number | null;
|
|
737
|
+
|
|
738
|
+
metrics?: Array<number>;
|
|
739
|
+
|
|
740
|
+
name?: string;
|
|
741
|
+
|
|
742
|
+
personality?: number;
|
|
743
|
+
|
|
744
|
+
phone_number?: number;
|
|
745
|
+
|
|
746
|
+
scenario_language?: string;
|
|
747
|
+
|
|
748
|
+
tags?: Array<string>;
|
|
749
|
+
|
|
750
|
+
test_profile?: number;
|
|
751
|
+
|
|
752
|
+
tool_ids?: Array<string>;
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
export declare namespace Scenarios {
|
|
756
|
+
export {
|
|
757
|
+
type EvaluatorScenarioDetail as EvaluatorScenarioDetail,
|
|
758
|
+
type ScenarioListResponse as ScenarioListResponse,
|
|
759
|
+
type ScenarioDeleteResponse as ScenarioDeleteResponse,
|
|
760
|
+
type ScenarioRetrieveGenerateProgressResponse as ScenarioRetrieveGenerateProgressResponse,
|
|
761
|
+
type ScenarioRetrieveScenarioAgentProgressResponse as ScenarioRetrieveScenarioAgentProgressResponse,
|
|
762
|
+
type ScenarioRunScenariosResponse as ScenarioRunScenariosResponse,
|
|
763
|
+
type ScenarioScenarioAgentResponse as ScenarioScenarioAgentResponse,
|
|
764
|
+
type ScenarioListParams as ScenarioListParams,
|
|
765
|
+
type ScenarioCreateParams as ScenarioCreateParams,
|
|
766
|
+
type ScenarioRetrieveExportScenariosParams as ScenarioRetrieveExportScenariosParams,
|
|
767
|
+
type ScenarioGenerateBgParams as ScenarioGenerateBgParams,
|
|
768
|
+
type ScenarioRetrieveGenerateProgressParams as ScenarioRetrieveGenerateProgressParams,
|
|
769
|
+
type ScenarioRunScenariosParams as ScenarioRunScenariosParams,
|
|
770
|
+
type ScenarioScenarioAgentParams as ScenarioScenarioAgentParams,
|
|
771
|
+
type ScenarioRetrieveScenarioAgentProgressParams as ScenarioRetrieveScenarioAgentProgressParams,
|
|
772
|
+
type ScenarioUpdateParams as ScenarioUpdateParams,
|
|
773
|
+
};
|
|
774
|
+
}
|