telnyx 7.22.0 → 7.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/client.d.mts +42 -12
- package/client.d.mts.map +1 -1
- package/client.d.ts +42 -12
- package/client.d.ts.map +1 -1
- package/client.js +30 -0
- package/client.js.map +1 -1
- package/client.mjs +30 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/ai/ai.d.mts +12 -4
- package/resources/ai/ai.d.mts.map +1 -1
- package/resources/ai/ai.d.ts +12 -4
- package/resources/ai/ai.d.ts.map +1 -1
- package/resources/ai/ai.js +8 -0
- package/resources/ai/ai.js.map +1 -1
- package/resources/ai/ai.mjs +9 -1
- package/resources/ai/ai.mjs.map +1 -1
- package/resources/ai/assistants/assistants.d.mts +409 -57
- package/resources/ai/assistants/assistants.d.mts.map +1 -1
- package/resources/ai/assistants/assistants.d.ts +409 -57
- 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/assistants/index.d.mts +1 -1
- package/resources/ai/assistants/index.d.mts.map +1 -1
- package/resources/ai/assistants/index.d.ts +1 -1
- package/resources/ai/assistants/index.d.ts.map +1 -1
- package/resources/ai/assistants/index.js.map +1 -1
- package/resources/ai/assistants/index.mjs.map +1 -1
- package/resources/ai/assistants/versions.d.mts +36 -14
- package/resources/ai/assistants/versions.d.mts.map +1 -1
- package/resources/ai/assistants/versions.d.ts +36 -14
- package/resources/ai/assistants/versions.d.ts.map +1 -1
- package/resources/ai/audio.d.mts +78 -43
- package/resources/ai/audio.d.mts.map +1 -1
- package/resources/ai/audio.d.ts +78 -43
- package/resources/ai/audio.d.ts.map +1 -1
- package/resources/ai/audio.js.map +1 -1
- package/resources/ai/audio.mjs.map +1 -1
- package/resources/ai/chat.d.mts +2 -10
- package/resources/ai/chat.d.mts.map +1 -1
- package/resources/ai/chat.d.ts +2 -10
- package/resources/ai/chat.d.ts.map +1 -1
- package/resources/ai/chat.js.map +1 -1
- package/resources/ai/chat.mjs.map +1 -1
- package/resources/ai/collections/collections.d.mts +3 -3
- package/resources/ai/collections/collections.d.mts.map +1 -1
- package/resources/ai/collections/collections.d.ts +3 -3
- package/resources/ai/collections/collections.d.ts.map +1 -1
- package/resources/ai/collections/collections.js.map +1 -1
- package/resources/ai/collections/collections.mjs.map +1 -1
- package/resources/ai/collections/index.d.mts +1 -1
- package/resources/ai/collections/index.d.mts.map +1 -1
- package/resources/ai/collections/index.d.ts +1 -1
- package/resources/ai/collections/index.d.ts.map +1 -1
- package/resources/ai/collections/index.js.map +1 -1
- package/resources/ai/collections/index.mjs.map +1 -1
- package/resources/ai/collections/sources.d.mts +32 -5
- package/resources/ai/collections/sources.d.mts.map +1 -1
- package/resources/ai/collections/sources.d.ts +32 -5
- package/resources/ai/collections/sources.d.ts.map +1 -1
- package/resources/ai/collections/sources.js.map +1 -1
- package/resources/ai/collections/sources.mjs.map +1 -1
- package/resources/ai/index.d.mts +4 -2
- package/resources/ai/index.d.mts.map +1 -1
- package/resources/ai/index.d.ts +4 -2
- package/resources/ai/index.d.ts.map +1 -1
- package/resources/ai/index.js +9 -5
- package/resources/ai/index.js.map +1 -1
- package/resources/ai/index.mjs +3 -1
- package/resources/ai/index.mjs.map +1 -1
- package/resources/ai/memory/index.d.mts +3 -0
- package/resources/ai/memory/index.d.mts.map +1 -0
- package/resources/ai/memory/index.d.ts +3 -0
- package/resources/ai/memory/index.d.ts.map +1 -0
- package/resources/ai/memory/index.js +9 -0
- package/resources/ai/memory/index.js.map +1 -0
- package/resources/ai/memory/index.mjs +4 -0
- package/resources/ai/memory/index.mjs.map +1 -0
- package/resources/ai/memory/memory.d.mts +10 -0
- package/resources/ai/memory/memory.d.mts.map +1 -0
- package/resources/ai/memory/memory.d.ts +10 -0
- package/resources/ai/memory/memory.d.ts.map +1 -0
- package/resources/ai/memory/memory.js +17 -0
- package/resources/ai/memory/memory.js.map +1 -0
- package/resources/ai/memory/memory.mjs +12 -0
- package/resources/ai/memory/memory.mjs.map +1 -0
- package/resources/ai/memory/namespaces/index.d.mts +4 -0
- package/resources/ai/memory/namespaces/index.d.mts.map +1 -0
- package/resources/ai/memory/namespaces/index.d.ts +4 -0
- package/resources/ai/memory/namespaces/index.d.ts.map +1 -0
- package/resources/ai/memory/namespaces/index.js +11 -0
- package/resources/ai/memory/namespaces/index.js.map +1 -0
- package/resources/ai/memory/namespaces/index.mjs +5 -0
- package/resources/ai/memory/namespaces/index.mjs.map +1 -0
- package/resources/ai/memory/namespaces/namespaces.d.mts +54 -0
- package/resources/ai/memory/namespaces/namespaces.d.mts.map +1 -0
- package/resources/ai/memory/namespaces/namespaces.d.ts +54 -0
- package/resources/ai/memory/namespaces/namespaces.d.ts.map +1 -0
- package/resources/ai/memory/namespaces/namespaces.js +43 -0
- package/resources/ai/memory/namespaces/namespaces.js.map +1 -0
- package/resources/ai/memory/namespaces/namespaces.mjs +38 -0
- package/resources/ai/memory/namespaces/namespaces.mjs.map +1 -0
- package/resources/ai/memory/namespaces/profiles/index.d.mts +4 -0
- package/resources/ai/memory/namespaces/profiles/index.d.mts.map +1 -0
- package/resources/ai/memory/namespaces/profiles/index.d.ts +4 -0
- package/resources/ai/memory/namespaces/profiles/index.d.ts.map +1 -0
- package/resources/ai/memory/namespaces/profiles/index.js +11 -0
- package/resources/ai/memory/namespaces/profiles/index.js.map +1 -0
- package/resources/ai/memory/namespaces/profiles/index.mjs +5 -0
- package/resources/ai/memory/namespaces/profiles/index.mjs.map +1 -0
- package/resources/ai/memory/namespaces/profiles/memories.d.mts +118 -0
- package/resources/ai/memory/namespaces/profiles/memories.d.mts.map +1 -0
- package/resources/ai/memory/namespaces/profiles/memories.d.ts +118 -0
- package/resources/ai/memory/namespaces/profiles/memories.d.ts.map +1 -0
- package/resources/ai/memory/namespaces/profiles/memories.js +63 -0
- package/resources/ai/memory/namespaces/profiles/memories.js.map +1 -0
- package/resources/ai/memory/namespaces/profiles/memories.mjs +59 -0
- package/resources/ai/memory/namespaces/profiles/memories.mjs.map +1 -0
- package/resources/ai/memory/namespaces/profiles/profiles.d.mts +324 -0
- package/resources/ai/memory/namespaces/profiles/profiles.d.mts.map +1 -0
- package/resources/ai/memory/namespaces/profiles/profiles.d.ts +324 -0
- package/resources/ai/memory/namespaces/profiles/profiles.d.ts.map +1 -0
- package/resources/ai/memory/namespaces/profiles/profiles.js +161 -0
- package/resources/ai/memory/namespaces/profiles/profiles.js.map +1 -0
- package/resources/ai/memory/namespaces/profiles/profiles.mjs +156 -0
- package/resources/ai/memory/namespaces/profiles/profiles.mjs.map +1 -0
- package/resources/ai/memory/namespaces/profiles/sources.d.mts +163 -0
- package/resources/ai/memory/namespaces/profiles/sources.d.mts.map +1 -0
- package/resources/ai/memory/namespaces/profiles/sources.d.ts +163 -0
- package/resources/ai/memory/namespaces/profiles/sources.d.ts.map +1 -0
- package/resources/ai/memory/namespaces/profiles/sources.js +80 -0
- package/resources/ai/memory/namespaces/profiles/sources.js.map +1 -0
- package/resources/ai/memory/namespaces/profiles/sources.mjs +76 -0
- package/resources/ai/memory/namespaces/profiles/sources.mjs.map +1 -0
- package/resources/ai/memory/namespaces/profiles.d.mts +2 -0
- package/resources/ai/memory/namespaces/profiles.d.mts.map +1 -0
- package/resources/ai/memory/namespaces/profiles.d.ts +2 -0
- package/resources/ai/memory/namespaces/profiles.d.ts.map +1 -0
- package/resources/ai/memory/namespaces/profiles.js +6 -0
- package/resources/ai/memory/namespaces/profiles.js.map +1 -0
- package/resources/ai/memory/namespaces/profiles.mjs +3 -0
- package/resources/ai/memory/namespaces/profiles.mjs.map +1 -0
- package/resources/ai/memory/namespaces/settings.d.mts +108 -0
- package/resources/ai/memory/namespaces/settings.d.mts.map +1 -0
- package/resources/ai/memory/namespaces/settings.d.ts +108 -0
- package/resources/ai/memory/namespaces/settings.d.ts.map +1 -0
- package/resources/ai/memory/namespaces/settings.js +54 -0
- package/resources/ai/memory/namespaces/settings.js.map +1 -0
- package/resources/ai/memory/namespaces/settings.mjs +50 -0
- package/resources/ai/memory/namespaces/settings.mjs.map +1 -0
- package/resources/ai/memory/namespaces.d.mts +2 -0
- package/resources/ai/memory/namespaces.d.mts.map +1 -0
- package/resources/ai/memory/namespaces.d.ts +2 -0
- package/resources/ai/memory/namespaces.d.ts.map +1 -0
- package/resources/ai/memory/namespaces.js +6 -0
- package/resources/ai/memory/namespaces.js.map +1 -0
- package/resources/ai/memory/namespaces.mjs +3 -0
- package/resources/ai/memory/namespaces.mjs.map +1 -0
- package/resources/ai/memory.d.mts +2 -0
- package/resources/ai/memory.d.mts.map +1 -0
- package/resources/ai/memory.d.ts +2 -0
- package/resources/ai/memory.d.ts.map +1 -0
- package/resources/ai/memory.js +6 -0
- package/resources/ai/memory.js.map +1 -0
- package/resources/ai/memory.mjs +3 -0
- package/resources/ai/memory.mjs.map +1 -0
- package/resources/ai/openai/chat.d.mts +10 -11
- package/resources/ai/openai/chat.d.mts.map +1 -1
- package/resources/ai/openai/chat.d.ts +10 -11
- package/resources/ai/openai/chat.d.ts.map +1 -1
- package/resources/ai/openai/chat.js.map +1 -1
- package/resources/ai/openai/chat.mjs.map +1 -1
- package/resources/ai/openai/index.d.mts +1 -1
- package/resources/ai/openai/index.d.mts.map +1 -1
- package/resources/ai/openai/index.d.ts +1 -1
- package/resources/ai/openai/index.d.ts.map +1 -1
- package/resources/ai/openai/index.js.map +1 -1
- package/resources/ai/openai/index.mjs +1 -1
- package/resources/ai/openai/index.mjs.map +1 -1
- package/resources/ai/openai/openai.d.mts +2 -2
- package/resources/ai/openai/openai.d.mts.map +1 -1
- package/resources/ai/openai/openai.d.ts +2 -2
- package/resources/ai/openai/openai.d.ts.map +1 -1
- package/resources/ai/openai/openai.js.map +1 -1
- package/resources/ai/openai/openai.mjs.map +1 -1
- package/resources/ai/typesafe/index.d.mts +3 -0
- package/resources/ai/typesafe/index.d.mts.map +1 -0
- package/resources/ai/typesafe/index.d.ts +3 -0
- package/resources/ai/typesafe/index.d.ts.map +1 -0
- package/resources/ai/typesafe/index.js +9 -0
- package/resources/ai/typesafe/index.js.map +1 -0
- package/resources/ai/typesafe/index.mjs +4 -0
- package/resources/ai/typesafe/index.mjs.map +1 -0
- package/resources/ai/typesafe/typesafe.d.mts +10 -0
- package/resources/ai/typesafe/typesafe.d.mts.map +1 -0
- package/resources/ai/typesafe/typesafe.d.ts +10 -0
- package/resources/ai/typesafe/typesafe.d.ts.map +1 -0
- package/resources/ai/typesafe/typesafe.js +17 -0
- package/resources/ai/typesafe/typesafe.js.map +1 -0
- package/resources/ai/typesafe/typesafe.mjs +12 -0
- package/resources/ai/typesafe/typesafe.mjs.map +1 -0
- package/resources/ai/typesafe/v1.d.mts +285 -0
- package/resources/ai/typesafe/v1.d.mts.map +1 -0
- package/resources/ai/typesafe/v1.d.ts +285 -0
- package/resources/ai/typesafe/v1.d.ts.map +1 -0
- package/resources/ai/typesafe/v1.js +72 -0
- package/resources/ai/typesafe/v1.js.map +1 -0
- package/resources/ai/typesafe/v1.mjs +68 -0
- package/resources/ai/typesafe/v1.mjs.map +1 -0
- package/resources/ai/typesafe.d.mts +2 -0
- package/resources/ai/typesafe.d.mts.map +1 -0
- package/resources/ai/typesafe.d.ts +2 -0
- package/resources/ai/typesafe.d.ts.map +1 -0
- package/resources/ai/typesafe.js +6 -0
- package/resources/ai/typesafe.js.map +1 -0
- package/resources/ai/typesafe.mjs +3 -0
- package/resources/ai/typesafe.mjs.map +1 -0
- package/resources/bot-challenge.d.mts +80 -0
- package/resources/bot-challenge.d.mts.map +1 -0
- package/resources/bot-challenge.d.ts +80 -0
- package/resources/bot-challenge.d.ts.map +1 -0
- package/resources/bot-challenge.js +35 -0
- package/resources/bot-challenge.js.map +1 -0
- package/resources/bot-challenge.mjs +31 -0
- package/resources/bot-challenge.mjs.map +1 -0
- package/resources/bot-sessions.d.mts +49 -0
- package/resources/bot-sessions.d.mts.map +1 -0
- package/resources/bot-sessions.d.ts +49 -0
- package/resources/bot-sessions.d.ts.map +1 -0
- package/resources/bot-sessions.js +28 -0
- package/resources/bot-sessions.js.map +1 -0
- package/resources/bot-sessions.mjs +24 -0
- package/resources/bot-sessions.mjs.map +1 -0
- package/resources/bot-signup.d.mts +114 -0
- package/resources/bot-signup.d.mts.map +1 -0
- package/resources/bot-signup.d.ts +114 -0
- package/resources/bot-signup.d.ts.map +1 -0
- package/resources/bot-signup.js +63 -0
- package/resources/bot-signup.js.map +1 -0
- package/resources/bot-signup.mjs +59 -0
- package/resources/bot-signup.mjs.map +1 -0
- package/resources/calls/actions.d.mts +100 -16
- package/resources/calls/actions.d.mts.map +1 -1
- package/resources/calls/actions.d.ts +100 -16
- package/resources/calls/actions.d.ts.map +1 -1
- package/resources/calls/calls.d.mts +55 -9
- package/resources/calls/calls.d.mts.map +1 -1
- package/resources/calls/calls.d.ts +55 -9
- package/resources/calls/calls.d.ts.map +1 -1
- package/resources/calls/calls.js.map +1 -1
- package/resources/calls/calls.mjs.map +1 -1
- package/resources/calls/index.d.mts +1 -1
- package/resources/calls/index.d.mts.map +1 -1
- package/resources/calls/index.d.ts +1 -1
- package/resources/calls/index.d.ts.map +1 -1
- package/resources/calls/index.js.map +1 -1
- package/resources/calls/index.mjs.map +1 -1
- package/resources/compute/compute.d.mts +2 -2
- package/resources/compute/compute.d.mts.map +1 -1
- package/resources/compute/compute.d.ts +2 -2
- package/resources/compute/compute.d.ts.map +1 -1
- package/resources/compute/compute.js +2 -2
- package/resources/compute/compute.js.map +1 -1
- package/resources/compute/compute.mjs +2 -2
- package/resources/compute/compute.mjs.map +1 -1
- package/resources/compute/funcs/export.d.mts +121 -0
- package/resources/compute/funcs/export.d.mts.map +1 -0
- package/resources/compute/funcs/export.d.ts +121 -0
- package/resources/compute/funcs/export.d.ts.map +1 -0
- package/resources/compute/funcs/export.js +68 -0
- package/resources/compute/funcs/export.js.map +1 -0
- package/resources/compute/funcs/export.mjs +64 -0
- package/resources/compute/funcs/export.mjs.map +1 -0
- package/resources/compute/funcs/funcs.d.mts +214 -0
- package/resources/compute/funcs/funcs.d.mts.map +1 -0
- package/resources/compute/funcs/funcs.d.ts +214 -0
- package/resources/compute/funcs/funcs.d.ts.map +1 -0
- package/resources/compute/funcs/funcs.js +80 -0
- package/resources/compute/funcs/funcs.js.map +1 -0
- package/resources/compute/funcs/funcs.mjs +75 -0
- package/resources/compute/funcs/funcs.mjs.map +1 -0
- package/resources/compute/funcs/index.d.mts +3 -0
- package/resources/compute/funcs/index.d.mts.map +1 -0
- package/resources/compute/funcs/index.d.ts +3 -0
- package/resources/compute/funcs/index.d.ts.map +1 -0
- package/resources/compute/funcs/index.js +9 -0
- package/resources/compute/funcs/index.js.map +1 -0
- package/resources/compute/funcs/index.mjs +4 -0
- package/resources/compute/funcs/index.mjs.map +1 -0
- package/resources/compute/funcs.d.mts +1 -178
- package/resources/compute/funcs.d.mts.map +1 -1
- package/resources/compute/funcs.d.ts +1 -178
- package/resources/compute/funcs.d.ts.map +1 -1
- package/resources/compute/funcs.js +2 -37
- package/resources/compute/funcs.js.map +1 -1
- package/resources/compute/funcs.mjs +1 -35
- package/resources/compute/funcs.mjs.map +1 -1
- package/resources/compute/index.d.mts +1 -1
- package/resources/compute/index.d.mts.map +1 -1
- package/resources/compute/index.d.ts +1 -1
- package/resources/compute/index.d.ts.map +1 -1
- package/resources/compute/index.js +2 -2
- package/resources/compute/index.js.map +1 -1
- package/resources/compute/index.mjs +1 -1
- package/resources/compute/index.mjs.map +1 -1
- package/resources/conferences/actions.d.mts +7 -1
- package/resources/conferences/actions.d.mts.map +1 -1
- package/resources/conferences/actions.d.ts +7 -1
- package/resources/conferences/actions.d.ts.map +1 -1
- package/resources/connections.d.mts +109 -1
- package/resources/connections.d.mts.map +1 -1
- package/resources/connections.d.ts +109 -1
- package/resources/connections.d.ts.map +1 -1
- package/resources/connections.js +8 -0
- package/resources/connections.js.map +1 -1
- package/resources/connections.mjs +8 -0
- package/resources/connections.mjs.map +1 -1
- package/resources/detail-records.d.mts +18 -1
- package/resources/detail-records.d.mts.map +1 -1
- package/resources/detail-records.d.ts +18 -1
- package/resources/detail-records.d.ts.map +1 -1
- package/resources/email-blocks/email-blocks.d.mts +12 -4
- package/resources/email-blocks/email-blocks.d.mts.map +1 -1
- package/resources/email-blocks/email-blocks.d.ts +12 -4
- package/resources/email-blocks/email-blocks.d.ts.map +1 -1
- package/resources/email-blocks/email-blocks.js +5 -3
- package/resources/email-blocks/email-blocks.js.map +1 -1
- package/resources/email-blocks/email-blocks.mjs +5 -3
- package/resources/email-blocks/email-blocks.mjs.map +1 -1
- package/resources/email-blocks/imports.d.mts +20 -4
- package/resources/email-blocks/imports.d.mts.map +1 -1
- package/resources/email-blocks/imports.d.ts +20 -4
- package/resources/email-blocks/imports.d.ts.map +1 -1
- package/resources/email-blocks/imports.js +17 -3
- package/resources/email-blocks/imports.js.map +1 -1
- package/resources/email-blocks/imports.mjs +17 -3
- package/resources/email-blocks/imports.mjs.map +1 -1
- package/resources/email-domains/email-domains.d.mts +98 -1
- package/resources/email-domains/email-domains.d.mts.map +1 -1
- package/resources/email-domains/email-domains.d.ts +98 -1
- package/resources/email-domains/email-domains.d.ts.map +1 -1
- package/resources/email-domains/email-domains.js +21 -0
- package/resources/email-domains/email-domains.js.map +1 -1
- package/resources/email-domains/email-domains.mjs +21 -0
- package/resources/email-domains/email-domains.mjs.map +1 -1
- package/resources/email-domains/index.d.mts +1 -1
- package/resources/email-domains/index.d.mts.map +1 -1
- package/resources/email-domains/index.d.ts +1 -1
- package/resources/email-domains/index.d.ts.map +1 -1
- package/resources/email-domains/index.js.map +1 -1
- package/resources/email-domains/index.mjs.map +1 -1
- package/resources/email-domains/webhooks.d.mts +6 -4
- package/resources/email-domains/webhooks.d.mts.map +1 -1
- package/resources/email-domains/webhooks.d.ts +6 -4
- package/resources/email-domains/webhooks.d.ts.map +1 -1
- package/resources/email-events.d.mts +162 -28
- package/resources/email-events.d.mts.map +1 -1
- package/resources/email-events.d.ts +162 -28
- package/resources/email-events.d.ts.map +1 -1
- package/resources/email-events.js +15 -6
- package/resources/email-events.js.map +1 -1
- package/resources/email-events.mjs +15 -6
- package/resources/email-events.mjs.map +1 -1
- package/resources/email-inboxes/drafts.d.mts +31 -1
- package/resources/email-inboxes/drafts.d.mts.map +1 -1
- package/resources/email-inboxes/drafts.d.ts +31 -1
- package/resources/email-inboxes/drafts.d.ts.map +1 -1
- package/resources/email-inboxes/drafts.js.map +1 -1
- package/resources/email-inboxes/drafts.mjs.map +1 -1
- package/resources/email-messages/email-messages.d.mts +178 -45
- package/resources/email-messages/email-messages.d.mts.map +1 -1
- package/resources/email-messages/email-messages.d.ts +178 -45
- package/resources/email-messages/email-messages.d.ts.map +1 -1
- package/resources/email-messages/email-messages.js +43 -9
- package/resources/email-messages/email-messages.js.map +1 -1
- package/resources/email-messages/email-messages.mjs +43 -9
- package/resources/email-messages/email-messages.mjs.map +1 -1
- package/resources/email-messages/index.d.mts +1 -1
- package/resources/email-messages/index.d.mts.map +1 -1
- package/resources/email-messages/index.d.ts +1 -1
- package/resources/email-messages/index.d.ts.map +1 -1
- package/resources/email-messages/index.js.map +1 -1
- package/resources/email-messages/index.mjs.map +1 -1
- package/resources/email-messages/recipients.d.mts +2 -2
- package/resources/email-messages/recipients.d.mts.map +1 -1
- package/resources/email-messages/recipients.d.ts +2 -2
- package/resources/email-messages/recipients.d.ts.map +1 -1
- package/resources/email-templates.d.mts +170 -0
- package/resources/email-templates.d.mts.map +1 -1
- package/resources/email-templates.d.ts +170 -0
- package/resources/email-templates.d.ts.map +1 -1
- package/resources/email-templates.js +6 -0
- package/resources/email-templates.js.map +1 -1
- package/resources/email-templates.mjs +6 -0
- package/resources/email-templates.mjs.map +1 -1
- package/resources/index.d.mts +11 -6
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +11 -6
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +14 -4
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +5 -0
- package/resources/index.mjs.map +1 -1
- package/resources/machine-payments.d.mts +142 -0
- package/resources/machine-payments.d.mts.map +1 -0
- package/resources/machine-payments.d.ts +142 -0
- package/resources/machine-payments.d.ts.map +1 -0
- package/resources/machine-payments.js +56 -0
- package/resources/machine-payments.js.map +1 -0
- package/resources/machine-payments.mjs +52 -0
- package/resources/machine-payments.mjs.map +1 -0
- package/resources/meeting-sessions/actions.d.mts +7 -1
- package/resources/meeting-sessions/actions.d.mts.map +1 -1
- package/resources/meeting-sessions/actions.d.ts +7 -1
- package/resources/meeting-sessions/actions.d.ts.map +1 -1
- package/resources/meeting-sessions/actions.js +7 -1
- package/resources/meeting-sessions/actions.js.map +1 -1
- package/resources/meeting-sessions/actions.mjs +7 -1
- package/resources/meeting-sessions/actions.mjs.map +1 -1
- package/resources/meeting-sessions/artifacts.d.mts +38 -11
- package/resources/meeting-sessions/artifacts.d.mts.map +1 -1
- package/resources/meeting-sessions/artifacts.d.ts +38 -11
- package/resources/meeting-sessions/artifacts.d.ts.map +1 -1
- package/resources/meeting-sessions/artifacts.js +11 -5
- package/resources/meeting-sessions/artifacts.js.map +1 -1
- package/resources/meeting-sessions/artifacts.mjs +11 -5
- package/resources/meeting-sessions/artifacts.mjs.map +1 -1
- package/resources/meeting-sessions/meeting-sessions.d.mts +63 -23
- package/resources/meeting-sessions/meeting-sessions.d.mts.map +1 -1
- package/resources/meeting-sessions/meeting-sessions.d.ts +63 -23
- package/resources/meeting-sessions/meeting-sessions.d.ts.map +1 -1
- package/resources/meeting-sessions/meeting-sessions.js +0 -2
- package/resources/meeting-sessions/meeting-sessions.js.map +1 -1
- package/resources/meeting-sessions/meeting-sessions.mjs +0 -2
- package/resources/meeting-sessions/meeting-sessions.mjs.map +1 -1
- package/resources/messages/messages.d.mts +135 -23
- package/resources/messages/messages.d.mts.map +1 -1
- package/resources/messages/messages.d.ts +135 -23
- package/resources/messages/messages.d.ts.map +1 -1
- package/resources/messages/messages.js.map +1 -1
- package/resources/messages/messages.mjs.map +1 -1
- package/resources/noise-suppression-engines.d.mts +42 -0
- package/resources/noise-suppression-engines.d.mts.map +1 -0
- package/resources/noise-suppression-engines.d.ts +42 -0
- package/resources/noise-suppression-engines.d.ts.map +1 -0
- package/resources/noise-suppression-engines.js +21 -0
- package/resources/noise-suppression-engines.js.map +1 -0
- package/resources/noise-suppression-engines.mjs +17 -0
- package/resources/noise-suppression-engines.mjs.map +1 -0
- package/resources/phone-numbers/phone-numbers.d.mts +12 -2
- package/resources/phone-numbers/phone-numbers.d.mts.map +1 -1
- package/resources/phone-numbers/phone-numbers.d.ts +12 -2
- package/resources/phone-numbers/phone-numbers.d.ts.map +1 -1
- package/resources/phone-numbers/phone-numbers.js.map +1 -1
- package/resources/phone-numbers/phone-numbers.mjs.map +1 -1
- package/resources/private-wireless-gateways.d.mts +61 -7
- package/resources/private-wireless-gateways.d.mts.map +1 -1
- package/resources/private-wireless-gateways.d.ts +61 -7
- package/resources/private-wireless-gateways.d.ts.map +1 -1
- package/resources/private-wireless-gateways.js +1 -1
- package/resources/private-wireless-gateways.js.map +1 -1
- package/resources/private-wireless-gateways.mjs +1 -1
- package/resources/private-wireless-gateways.mjs.map +1 -1
- package/resources/speech-to-text/speech-to-text.d.mts +1 -1
- package/resources/speech-to-text/speech-to-text.d.mts.map +1 -1
- package/resources/speech-to-text/speech-to-text.d.ts +1 -1
- package/resources/speech-to-text/speech-to-text.d.ts.map +1 -1
- package/resources/texml/accounts/calls/calls.d.mts +126 -9
- package/resources/texml/accounts/calls/calls.d.mts.map +1 -1
- package/resources/texml/accounts/calls/calls.d.ts +126 -9
- package/resources/texml/accounts/calls/calls.d.ts.map +1 -1
- package/resources/texml/accounts/calls/calls.js +12 -2
- package/resources/texml/accounts/calls/calls.js.map +1 -1
- package/resources/texml/accounts/calls/calls.mjs +12 -2
- package/resources/texml/accounts/calls/calls.mjs.map +1 -1
- package/resources/texml/accounts/conferences/participants.d.mts +39 -0
- package/resources/texml/accounts/conferences/participants.d.mts.map +1 -1
- package/resources/texml/accounts/conferences/participants.d.ts +39 -0
- package/resources/texml/accounts/conferences/participants.d.ts.map +1 -1
- package/resources/texml/calls.d.mts +71 -0
- package/resources/texml/calls.d.mts.map +1 -0
- package/resources/texml/calls.d.ts +71 -0
- package/resources/texml/calls.d.ts.map +1 -0
- package/resources/texml/calls.js +33 -0
- package/resources/texml/calls.js.map +1 -0
- package/resources/texml/calls.mjs +29 -0
- package/resources/texml/calls.mjs.map +1 -0
- package/resources/texml/index.d.mts +1 -0
- package/resources/texml/index.d.mts.map +1 -1
- package/resources/texml/index.d.ts +1 -0
- package/resources/texml/index.d.ts.map +1 -1
- package/resources/texml/index.js +3 -1
- package/resources/texml/index.js.map +1 -1
- package/resources/texml/index.mjs +1 -0
- package/resources/texml/index.mjs.map +1 -1
- package/resources/texml/texml.d.mts +43 -0
- package/resources/texml/texml.d.mts.map +1 -1
- package/resources/texml/texml.d.ts +43 -0
- package/resources/texml/texml.d.ts.map +1 -1
- package/resources/texml/texml.js +4 -0
- package/resources/texml/texml.js.map +1 -1
- package/resources/texml/texml.mjs +4 -0
- package/resources/texml/texml.mjs.map +1 -1
- package/resources/text-to-speech/text-to-speech.d.mts +61 -9
- package/resources/text-to-speech/text-to-speech.d.mts.map +1 -1
- package/resources/text-to-speech/text-to-speech.d.ts +61 -9
- package/resources/text-to-speech/text-to-speech.d.ts.map +1 -1
- package/resources/text-to-speech/text-to-speech.js +10 -3
- package/resources/text-to-speech/text-to-speech.js.map +1 -1
- package/resources/text-to-speech/text-to-speech.mjs +10 -3
- package/resources/text-to-speech/text-to-speech.mjs.map +1 -1
- package/resources/voice-clones.d.mts +6 -4
- package/resources/voice-clones.d.mts.map +1 -1
- package/resources/voice-clones.d.ts +6 -4
- package/resources/voice-clones.d.ts.map +1 -1
- package/resources/voice-clones.js +4 -2
- package/resources/voice-clones.js.map +1 -1
- package/resources/voice-clones.mjs +4 -2
- package/resources/voice-clones.mjs.map +1 -1
- package/resources/webhooks.d.mts +40 -53
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +40 -53
- package/resources/webhooks.d.ts.map +1 -1
- package/src/client.ts +92 -6
- package/src/resources/ai/ai.ts +21 -1
- package/src/resources/ai/assistants/assistants.ts +502 -56
- package/src/resources/ai/assistants/index.ts +1 -0
- package/src/resources/ai/assistants/versions.ts +36 -14
- package/src/resources/ai/audio.ts +93 -45
- package/src/resources/ai/chat.ts +2 -11
- package/src/resources/ai/collections/collections.ts +3 -1
- package/src/resources/ai/collections/index.ts +2 -0
- package/src/resources/ai/collections/sources.ts +38 -4
- package/src/resources/ai/index.ts +9 -1
- package/src/resources/ai/memory/index.ts +4 -0
- package/src/resources/ai/memory/memory.ts +19 -0
- package/src/resources/ai/memory/namespaces/index.ts +21 -0
- package/src/resources/ai/memory/namespaces/namespaces.ts +116 -0
- package/src/resources/ai/memory/namespaces/profiles/index.ts +35 -0
- package/src/resources/ai/memory/namespaces/profiles/memories.ts +170 -0
- package/src/resources/ai/memory/namespaces/profiles/profiles.ts +482 -0
- package/src/resources/ai/memory/namespaces/profiles/sources.ts +226 -0
- package/src/resources/ai/memory/namespaces/profiles.ts +3 -0
- package/src/resources/ai/memory/namespaces/settings.ts +129 -0
- package/src/resources/ai/memory/namespaces.ts +3 -0
- package/src/resources/ai/memory.ts +3 -0
- package/src/resources/ai/openai/chat.ts +11 -11
- package/src/resources/ai/openai/index.ts +6 -1
- package/src/resources/ai/openai/openai.ts +2 -1
- package/src/resources/ai/typesafe/index.ts +4 -0
- package/src/resources/ai/typesafe/typesafe.ts +19 -0
- package/src/resources/ai/typesafe/v1.ts +310 -0
- package/src/resources/ai/typesafe.ts +3 -0
- package/src/resources/bot-challenge.ts +101 -0
- package/src/resources/bot-sessions.ts +61 -0
- package/src/resources/bot-signup.ts +140 -0
- package/src/resources/calls/actions.ts +115 -14
- package/src/resources/calls/calls.ts +64 -7
- package/src/resources/calls/index.ts +1 -0
- package/src/resources/compute/compute.ts +2 -2
- package/src/resources/compute/funcs/export.ts +156 -0
- package/src/resources/compute/funcs/funcs.ts +341 -0
- package/src/resources/compute/funcs/index.ts +15 -0
- package/src/resources/compute/funcs.ts +1 -296
- package/src/resources/compute/index.ts +1 -1
- package/src/resources/conferences/actions.ts +8 -1
- package/src/resources/connections.ts +133 -0
- package/src/resources/detail-records.ts +18 -1
- package/src/resources/email-blocks/email-blocks.ts +12 -4
- package/src/resources/email-blocks/imports.ts +20 -4
- package/src/resources/email-domains/email-domains.ts +120 -0
- package/src/resources/email-domains/index.ts +1 -0
- package/src/resources/email-domains/webhooks.ts +9 -4
- package/src/resources/email-events.ts +220 -35
- package/src/resources/email-inboxes/drafts.ts +32 -1
- package/src/resources/email-messages/email-messages.ts +195 -49
- package/src/resources/email-messages/index.ts +2 -1
- package/src/resources/email-messages/recipients.ts +6 -2
- package/src/resources/email-templates.ts +185 -0
- package/src/resources/index.ts +29 -3
- package/src/resources/machine-payments.ts +169 -0
- package/src/resources/meeting-sessions/actions.ts +7 -1
- package/src/resources/meeting-sessions/artifacts.ts +42 -11
- package/src/resources/meeting-sessions/meeting-sessions.ts +63 -24
- package/src/resources/messages/messages.ts +168 -23
- package/src/resources/noise-suppression-engines.ts +51 -0
- package/src/resources/phone-numbers/phone-numbers.ts +13 -2
- package/src/resources/private-wireless-gateways.ts +76 -8
- package/src/resources/speech-to-text/speech-to-text.ts +1 -0
- package/src/resources/texml/accounts/calls/calls.ts +158 -10
- package/src/resources/texml/accounts/conferences/participants.ts +46 -0
- package/src/resources/texml/calls.ts +90 -0
- package/src/resources/texml/index.ts +1 -0
- package/src/resources/texml/texml.ts +56 -0
- package/src/resources/text-to-speech/text-to-speech.ts +69 -9
- package/src/resources/voice-clones.ts +6 -4
- package/src/resources/webhooks.ts +47 -62
- 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,285 @@
|
|
|
1
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../../../core/api-promise.mjs";
|
|
3
|
+
import { RequestOptions } from "../../../internal/request-options.mjs";
|
|
4
|
+
/**
|
|
5
|
+
* Beta API for evaluating shared context with typed questions and structured answers using Flash or Pro.
|
|
6
|
+
*/
|
|
7
|
+
export declare class V1 extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* **Beta API.** Choose telnyx/decision-flash for the lowest cost and latency, or
|
|
10
|
+
* telnyx/decision-pro for decisions that require long context, including inputs
|
|
11
|
+
* beyond Jev’s 32k per-decision limit. Omitted model defaults to
|
|
12
|
+
* telnyx/decision-flash.
|
|
13
|
+
*
|
|
14
|
+
* Evaluate shared context using named choice, noul (yes/no), and score questions.
|
|
15
|
+
* Returns TypeSafe System One-compatible answer shapes, the selected public model
|
|
16
|
+
* alias, and token usage. See the
|
|
17
|
+
* [decision model guide](https://developers.telnyx.com/docs/inference/decision-models)
|
|
18
|
+
* for examples and compatibility limits.
|
|
19
|
+
*
|
|
20
|
+
* The supported request subset requires instructions for every question, string
|
|
21
|
+
* descriptions for criteria (or null for choice descriptions), 1–64 questions, and
|
|
22
|
+
* 2–64 options for choice and score questions. The model field accepts only
|
|
23
|
+
* telnyx/decision-flash or telnyx/decision-pro. Unsupported model values and
|
|
24
|
+
* unknown fields are rejected. The endpoint is synchronous and does not stream.
|
|
25
|
+
*
|
|
26
|
+
* Use the TypeSafe Python SDK with base_url set to
|
|
27
|
+
* https://api.telnyx.com/v2/ai/typesafe and a Telnyx API key. The SDK appends
|
|
28
|
+
* /v1/systemone; explicitly set model to a supported Telnyx alias because its own
|
|
29
|
+
* default model is not supported. Compatibility covers this operation and the
|
|
30
|
+
* documented request subset; it does not include TypeSafe model listing. Scores
|
|
31
|
+
* describe relative preference, not calibrated correctness.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* const response = await client.ai.typesafe.v1.systemone({
|
|
36
|
+
* questions: {
|
|
37
|
+
* team: {
|
|
38
|
+
* type: 'choice',
|
|
39
|
+
* instructions:
|
|
40
|
+
* 'Choose the team that should handle this incident.',
|
|
41
|
+
* criteria: {
|
|
42
|
+
* billing: 'Payments and refunds',
|
|
43
|
+
* technical_support:
|
|
44
|
+
* 'Service faults and technical problems',
|
|
45
|
+
* sales: 'New purchases',
|
|
46
|
+
* },
|
|
47
|
+
* },
|
|
48
|
+
* production_incident: {
|
|
49
|
+
* type: 'noul',
|
|
50
|
+
* instructions:
|
|
51
|
+
* 'Does the message describe an active production incident?',
|
|
52
|
+
* },
|
|
53
|
+
* urgency: {
|
|
54
|
+
* type: 'score',
|
|
55
|
+
* instructions: 'Rate operational urgency.',
|
|
56
|
+
* criteria: ['Low', 'Normal', 'High', 'Critical'],
|
|
57
|
+
* },
|
|
58
|
+
* },
|
|
59
|
+
* state:
|
|
60
|
+
* 'Our production calls are failing. Every customer is affected.',
|
|
61
|
+
* model: 'telnyx/decision-flash',
|
|
62
|
+
* });
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
systemone(body: V1SystemoneParams, options?: RequestOptions): APIPromise<V1SystemoneResponse>;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* A complete synchronous evaluation. Answers are returned directly without a data
|
|
69
|
+
* wrapper.
|
|
70
|
+
*/
|
|
71
|
+
export interface V1SystemoneResponse {
|
|
72
|
+
/**
|
|
73
|
+
* Answers keyed by exactly the question IDs in the request. Each answer type
|
|
74
|
+
* matches its question.
|
|
75
|
+
*/
|
|
76
|
+
answers: {
|
|
77
|
+
[key: string]: V1SystemoneResponse.DecisionModelChoiceAnswer | V1SystemoneResponse.DecisionModelNoulAnswer | V1SystemoneResponse.DecisionModelScoreAnswer;
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* Public model alias used to evaluate the request. Returns telnyx/decision-flash
|
|
81
|
+
* when model was omitted. The underlying model is managed by Telnyx.
|
|
82
|
+
*/
|
|
83
|
+
model: 'telnyx/decision-flash' | 'telnyx/decision-pro';
|
|
84
|
+
/**
|
|
85
|
+
* Token usage for the completed evaluation.
|
|
86
|
+
*/
|
|
87
|
+
usage: V1SystemoneResponse.Usage;
|
|
88
|
+
}
|
|
89
|
+
export declare namespace V1SystemoneResponse {
|
|
90
|
+
/**
|
|
91
|
+
* A selected option and the distribution across all supplied option keys.
|
|
92
|
+
*/
|
|
93
|
+
interface DecisionModelChoiceAnswer {
|
|
94
|
+
/**
|
|
95
|
+
* The option key with the highest relative score. Ties favor the first option in
|
|
96
|
+
* request order.
|
|
97
|
+
*/
|
|
98
|
+
choice: string;
|
|
99
|
+
/**
|
|
100
|
+
* Normalized entropy confidence: 1 - H(p) / ln(N), where H(p) = -sum(p \* ln(p))
|
|
101
|
+
* and N is the number of options. Zero indicates a uniform distribution; one
|
|
102
|
+
* indicates concentration on one option. This is neither the winning probability
|
|
103
|
+
* nor calibrated correctness.
|
|
104
|
+
*/
|
|
105
|
+
confidence: number;
|
|
106
|
+
/**
|
|
107
|
+
* Relative scores normalized across the supplied options, summing approximately
|
|
108
|
+
* to 1. These are not calibrated probabilities of correctness.
|
|
109
|
+
*/
|
|
110
|
+
probabilities: {
|
|
111
|
+
[key: string]: number;
|
|
112
|
+
};
|
|
113
|
+
/**
|
|
114
|
+
* Answer type.
|
|
115
|
+
*/
|
|
116
|
+
type: 'choice';
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* A yes/no score with no separate confidence or probabilities fields.
|
|
120
|
+
*/
|
|
121
|
+
interface DecisionModelNoulAnswer {
|
|
122
|
+
/**
|
|
123
|
+
* Score of the positive outcome. Values near 1 favor yes; values near 0 favor no.
|
|
124
|
+
* This is a number, not a Boolean, and is not calibrated correctness.
|
|
125
|
+
*/
|
|
126
|
+
noul: number;
|
|
127
|
+
/**
|
|
128
|
+
* Answer type.
|
|
129
|
+
*/
|
|
130
|
+
type: 'noul';
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* An expected rating over the ordered criteria.
|
|
134
|
+
*/
|
|
135
|
+
interface DecisionModelScoreAnswer {
|
|
136
|
+
/**
|
|
137
|
+
* Normalized entropy confidence: 1 - H(p) / ln(N), where H(p) = -sum(p \* ln(p))
|
|
138
|
+
* and N is the number of options. Zero indicates a uniform distribution; one
|
|
139
|
+
* indicates concentration on one option. This is neither the winning probability
|
|
140
|
+
* nor calibrated correctness.
|
|
141
|
+
*/
|
|
142
|
+
confidence: number;
|
|
143
|
+
/**
|
|
144
|
+
* Criterion descriptions keyed by stringified zero-based indices, such as "0",
|
|
145
|
+
* "1", and "2".
|
|
146
|
+
*/
|
|
147
|
+
legend: {
|
|
148
|
+
[key: string]: string;
|
|
149
|
+
};
|
|
150
|
+
/**
|
|
151
|
+
* Relative scores keyed by the same stringified indices as legend.
|
|
152
|
+
*/
|
|
153
|
+
probabilities: {
|
|
154
|
+
[key: string]: number;
|
|
155
|
+
};
|
|
156
|
+
/**
|
|
157
|
+
* Expected zero-based criterion index: sum(index \* probability). Ranges from 0 to
|
|
158
|
+
* N-1 for N criteria; fractional values are valid.
|
|
159
|
+
*/
|
|
160
|
+
score: number;
|
|
161
|
+
/**
|
|
162
|
+
* Answer type.
|
|
163
|
+
*/
|
|
164
|
+
type: 'score';
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Token usage for the completed evaluation.
|
|
168
|
+
*/
|
|
169
|
+
interface Usage {
|
|
170
|
+
/**
|
|
171
|
+
* Input tokens processed, including shared-context preparation and question
|
|
172
|
+
* evaluation. This can exceed the token count of the unique input text.
|
|
173
|
+
*/
|
|
174
|
+
input_tokens: number;
|
|
175
|
+
/**
|
|
176
|
+
* Output tokens used for the evaluation, including shared-context preparation.
|
|
177
|
+
*/
|
|
178
|
+
output_tokens: number;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
export interface V1SystemoneParams {
|
|
182
|
+
/**
|
|
183
|
+
* Between 1 and 64 named questions. Each key identifies the corresponding answer.
|
|
184
|
+
*/
|
|
185
|
+
questions: {
|
|
186
|
+
[key: string]: V1SystemoneParams.DecisionModelChoiceQuestion | V1SystemoneParams.DecisionModelNoulQuestion | V1SystemoneParams.DecisionModelScoreQuestion;
|
|
187
|
+
};
|
|
188
|
+
/**
|
|
189
|
+
* Shared context evaluated by every question.
|
|
190
|
+
*/
|
|
191
|
+
state: string | {
|
|
192
|
+
[key: string]: unknown;
|
|
193
|
+
} | Array<unknown>;
|
|
194
|
+
/**
|
|
195
|
+
* Public model alias. telnyx/decision-flash offers the lowest cost and latency;
|
|
196
|
+
* telnyx/decision-pro supports decisions that require long context, including
|
|
197
|
+
* inputs beyond Jev’s 32k per-decision limit. Applies to every question in the
|
|
198
|
+
* request. Other values are rejected.
|
|
199
|
+
*/
|
|
200
|
+
model?: 'telnyx/decision-flash' | 'telnyx/decision-pro';
|
|
201
|
+
}
|
|
202
|
+
export declare namespace V1SystemoneParams {
|
|
203
|
+
/**
|
|
204
|
+
* Select one of the supplied options.
|
|
205
|
+
*/
|
|
206
|
+
interface DecisionModelChoiceQuestion {
|
|
207
|
+
/**
|
|
208
|
+
* Between 2 and 64 option keys mapped to description strings or null. A null
|
|
209
|
+
* description uses the option key as its text.
|
|
210
|
+
*/
|
|
211
|
+
criteria: {
|
|
212
|
+
[key: string]: string | null;
|
|
213
|
+
};
|
|
214
|
+
/**
|
|
215
|
+
* Required instructions describing what to decide about the shared state.
|
|
216
|
+
*/
|
|
217
|
+
instructions: string | {
|
|
218
|
+
[key: string]: unknown;
|
|
219
|
+
} | Array<unknown>;
|
|
220
|
+
/**
|
|
221
|
+
* Question type.
|
|
222
|
+
*/
|
|
223
|
+
type: 'choice';
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Evaluate a yes/no question. Omit criteria to use Yes and No descriptions.
|
|
227
|
+
*/
|
|
228
|
+
interface DecisionModelNoulQuestion {
|
|
229
|
+
/**
|
|
230
|
+
* Required instructions describing what to decide about the shared state.
|
|
231
|
+
*/
|
|
232
|
+
instructions: string | {
|
|
233
|
+
[key: string]: unknown;
|
|
234
|
+
} | Array<unknown>;
|
|
235
|
+
/**
|
|
236
|
+
* Question type.
|
|
237
|
+
*/
|
|
238
|
+
type: 'noul';
|
|
239
|
+
/**
|
|
240
|
+
* Optional descriptions for the positive and negative outcomes. Descriptions must
|
|
241
|
+
* be strings.
|
|
242
|
+
*/
|
|
243
|
+
criteria?: DecisionModelNoulQuestion.Criteria;
|
|
244
|
+
}
|
|
245
|
+
namespace DecisionModelNoulQuestion {
|
|
246
|
+
/**
|
|
247
|
+
* Optional descriptions for the positive and negative outcomes. Descriptions must
|
|
248
|
+
* be strings.
|
|
249
|
+
*/
|
|
250
|
+
interface Criteria {
|
|
251
|
+
/**
|
|
252
|
+
* Description of the negative outcome.
|
|
253
|
+
*/
|
|
254
|
+
false?: string;
|
|
255
|
+
/**
|
|
256
|
+
* Description of the positive outcome.
|
|
257
|
+
*/
|
|
258
|
+
true?: string;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Rate the state against an ordered rubric.
|
|
263
|
+
*/
|
|
264
|
+
interface DecisionModelScoreQuestion {
|
|
265
|
+
/**
|
|
266
|
+
* Between 2 and 64 description strings in ascending score order. Indices start at
|
|
267
|
+
* zero.
|
|
268
|
+
*/
|
|
269
|
+
criteria: Array<string>;
|
|
270
|
+
/**
|
|
271
|
+
* Required instructions describing what to decide about the shared state.
|
|
272
|
+
*/
|
|
273
|
+
instructions: string | {
|
|
274
|
+
[key: string]: unknown;
|
|
275
|
+
} | Array<unknown>;
|
|
276
|
+
/**
|
|
277
|
+
* Question type.
|
|
278
|
+
*/
|
|
279
|
+
type: 'score';
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
export declare namespace V1 {
|
|
283
|
+
export { type V1SystemoneResponse as V1SystemoneResponse, type V1SystemoneParams as V1SystemoneParams };
|
|
284
|
+
}
|
|
285
|
+
//# sourceMappingURL=v1.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
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E,MAAM,GAAG;YAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;SAAE,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;QAEnE;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;QAEb;;;WAGG;QACH,QAAQ,CAAC,EAAE,yBAAyB,CAAC,QAAQ,CAAC;KAC/C;IAED,UAAiB,yBAAyB,CAAC;QACzC;;;WAGG;QACH,UAAiB,QAAQ;YACvB;;eAEG;YACH,KAAK,CAAC,EAAE,MAAM,CAAC;YAEf;;eAEG;YACH,IAAI,CAAC,EAAE,MAAM,CAAC;SACf;KACF;IAED;;OAEG;IACH,UAAiB,0BAA0B;QACzC;;;WAGG;QACH,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;QAExB;;WAEG;QACH,YAAY,EAAE,MAAM,GAAG;YAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;SAAE,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;QAEnE;;WAEG;QACH,IAAI,EAAE,OAAO,CAAC;KACf;CACF;AAED,MAAM,CAAC,OAAO,WAAW,EAAE,CAAC;IAC1B,OAAO,EAAE,KAAK,mBAAmB,IAAI,mBAAmB,EAAE,KAAK,iBAAiB,IAAI,iBAAiB,EAAE,CAAC;CACzG"}
|
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
import { APIResource } from "../../../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../../../core/api-promise.js";
|
|
3
|
+
import { RequestOptions } from "../../../internal/request-options.js";
|
|
4
|
+
/**
|
|
5
|
+
* Beta API for evaluating shared context with typed questions and structured answers using Flash or Pro.
|
|
6
|
+
*/
|
|
7
|
+
export declare class V1 extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* **Beta API.** Choose telnyx/decision-flash for the lowest cost and latency, or
|
|
10
|
+
* telnyx/decision-pro for decisions that require long context, including inputs
|
|
11
|
+
* beyond Jev’s 32k per-decision limit. Omitted model defaults to
|
|
12
|
+
* telnyx/decision-flash.
|
|
13
|
+
*
|
|
14
|
+
* Evaluate shared context using named choice, noul (yes/no), and score questions.
|
|
15
|
+
* Returns TypeSafe System One-compatible answer shapes, the selected public model
|
|
16
|
+
* alias, and token usage. See the
|
|
17
|
+
* [decision model guide](https://developers.telnyx.com/docs/inference/decision-models)
|
|
18
|
+
* for examples and compatibility limits.
|
|
19
|
+
*
|
|
20
|
+
* The supported request subset requires instructions for every question, string
|
|
21
|
+
* descriptions for criteria (or null for choice descriptions), 1–64 questions, and
|
|
22
|
+
* 2–64 options for choice and score questions. The model field accepts only
|
|
23
|
+
* telnyx/decision-flash or telnyx/decision-pro. Unsupported model values and
|
|
24
|
+
* unknown fields are rejected. The endpoint is synchronous and does not stream.
|
|
25
|
+
*
|
|
26
|
+
* Use the TypeSafe Python SDK with base_url set to
|
|
27
|
+
* https://api.telnyx.com/v2/ai/typesafe and a Telnyx API key. The SDK appends
|
|
28
|
+
* /v1/systemone; explicitly set model to a supported Telnyx alias because its own
|
|
29
|
+
* default model is not supported. Compatibility covers this operation and the
|
|
30
|
+
* documented request subset; it does not include TypeSafe model listing. Scores
|
|
31
|
+
* describe relative preference, not calibrated correctness.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* const response = await client.ai.typesafe.v1.systemone({
|
|
36
|
+
* questions: {
|
|
37
|
+
* team: {
|
|
38
|
+
* type: 'choice',
|
|
39
|
+
* instructions:
|
|
40
|
+
* 'Choose the team that should handle this incident.',
|
|
41
|
+
* criteria: {
|
|
42
|
+
* billing: 'Payments and refunds',
|
|
43
|
+
* technical_support:
|
|
44
|
+
* 'Service faults and technical problems',
|
|
45
|
+
* sales: 'New purchases',
|
|
46
|
+
* },
|
|
47
|
+
* },
|
|
48
|
+
* production_incident: {
|
|
49
|
+
* type: 'noul',
|
|
50
|
+
* instructions:
|
|
51
|
+
* 'Does the message describe an active production incident?',
|
|
52
|
+
* },
|
|
53
|
+
* urgency: {
|
|
54
|
+
* type: 'score',
|
|
55
|
+
* instructions: 'Rate operational urgency.',
|
|
56
|
+
* criteria: ['Low', 'Normal', 'High', 'Critical'],
|
|
57
|
+
* },
|
|
58
|
+
* },
|
|
59
|
+
* state:
|
|
60
|
+
* 'Our production calls are failing. Every customer is affected.',
|
|
61
|
+
* model: 'telnyx/decision-flash',
|
|
62
|
+
* });
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
systemone(body: V1SystemoneParams, options?: RequestOptions): APIPromise<V1SystemoneResponse>;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* A complete synchronous evaluation. Answers are returned directly without a data
|
|
69
|
+
* wrapper.
|
|
70
|
+
*/
|
|
71
|
+
export interface V1SystemoneResponse {
|
|
72
|
+
/**
|
|
73
|
+
* Answers keyed by exactly the question IDs in the request. Each answer type
|
|
74
|
+
* matches its question.
|
|
75
|
+
*/
|
|
76
|
+
answers: {
|
|
77
|
+
[key: string]: V1SystemoneResponse.DecisionModelChoiceAnswer | V1SystemoneResponse.DecisionModelNoulAnswer | V1SystemoneResponse.DecisionModelScoreAnswer;
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* Public model alias used to evaluate the request. Returns telnyx/decision-flash
|
|
81
|
+
* when model was omitted. The underlying model is managed by Telnyx.
|
|
82
|
+
*/
|
|
83
|
+
model: 'telnyx/decision-flash' | 'telnyx/decision-pro';
|
|
84
|
+
/**
|
|
85
|
+
* Token usage for the completed evaluation.
|
|
86
|
+
*/
|
|
87
|
+
usage: V1SystemoneResponse.Usage;
|
|
88
|
+
}
|
|
89
|
+
export declare namespace V1SystemoneResponse {
|
|
90
|
+
/**
|
|
91
|
+
* A selected option and the distribution across all supplied option keys.
|
|
92
|
+
*/
|
|
93
|
+
interface DecisionModelChoiceAnswer {
|
|
94
|
+
/**
|
|
95
|
+
* The option key with the highest relative score. Ties favor the first option in
|
|
96
|
+
* request order.
|
|
97
|
+
*/
|
|
98
|
+
choice: string;
|
|
99
|
+
/**
|
|
100
|
+
* Normalized entropy confidence: 1 - H(p) / ln(N), where H(p) = -sum(p \* ln(p))
|
|
101
|
+
* and N is the number of options. Zero indicates a uniform distribution; one
|
|
102
|
+
* indicates concentration on one option. This is neither the winning probability
|
|
103
|
+
* nor calibrated correctness.
|
|
104
|
+
*/
|
|
105
|
+
confidence: number;
|
|
106
|
+
/**
|
|
107
|
+
* Relative scores normalized across the supplied options, summing approximately
|
|
108
|
+
* to 1. These are not calibrated probabilities of correctness.
|
|
109
|
+
*/
|
|
110
|
+
probabilities: {
|
|
111
|
+
[key: string]: number;
|
|
112
|
+
};
|
|
113
|
+
/**
|
|
114
|
+
* Answer type.
|
|
115
|
+
*/
|
|
116
|
+
type: 'choice';
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* A yes/no score with no separate confidence or probabilities fields.
|
|
120
|
+
*/
|
|
121
|
+
interface DecisionModelNoulAnswer {
|
|
122
|
+
/**
|
|
123
|
+
* Score of the positive outcome. Values near 1 favor yes; values near 0 favor no.
|
|
124
|
+
* This is a number, not a Boolean, and is not calibrated correctness.
|
|
125
|
+
*/
|
|
126
|
+
noul: number;
|
|
127
|
+
/**
|
|
128
|
+
* Answer type.
|
|
129
|
+
*/
|
|
130
|
+
type: 'noul';
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* An expected rating over the ordered criteria.
|
|
134
|
+
*/
|
|
135
|
+
interface DecisionModelScoreAnswer {
|
|
136
|
+
/**
|
|
137
|
+
* Normalized entropy confidence: 1 - H(p) / ln(N), where H(p) = -sum(p \* ln(p))
|
|
138
|
+
* and N is the number of options. Zero indicates a uniform distribution; one
|
|
139
|
+
* indicates concentration on one option. This is neither the winning probability
|
|
140
|
+
* nor calibrated correctness.
|
|
141
|
+
*/
|
|
142
|
+
confidence: number;
|
|
143
|
+
/**
|
|
144
|
+
* Criterion descriptions keyed by stringified zero-based indices, such as "0",
|
|
145
|
+
* "1", and "2".
|
|
146
|
+
*/
|
|
147
|
+
legend: {
|
|
148
|
+
[key: string]: string;
|
|
149
|
+
};
|
|
150
|
+
/**
|
|
151
|
+
* Relative scores keyed by the same stringified indices as legend.
|
|
152
|
+
*/
|
|
153
|
+
probabilities: {
|
|
154
|
+
[key: string]: number;
|
|
155
|
+
};
|
|
156
|
+
/**
|
|
157
|
+
* Expected zero-based criterion index: sum(index \* probability). Ranges from 0 to
|
|
158
|
+
* N-1 for N criteria; fractional values are valid.
|
|
159
|
+
*/
|
|
160
|
+
score: number;
|
|
161
|
+
/**
|
|
162
|
+
* Answer type.
|
|
163
|
+
*/
|
|
164
|
+
type: 'score';
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Token usage for the completed evaluation.
|
|
168
|
+
*/
|
|
169
|
+
interface Usage {
|
|
170
|
+
/**
|
|
171
|
+
* Input tokens processed, including shared-context preparation and question
|
|
172
|
+
* evaluation. This can exceed the token count of the unique input text.
|
|
173
|
+
*/
|
|
174
|
+
input_tokens: number;
|
|
175
|
+
/**
|
|
176
|
+
* Output tokens used for the evaluation, including shared-context preparation.
|
|
177
|
+
*/
|
|
178
|
+
output_tokens: number;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
export interface V1SystemoneParams {
|
|
182
|
+
/**
|
|
183
|
+
* Between 1 and 64 named questions. Each key identifies the corresponding answer.
|
|
184
|
+
*/
|
|
185
|
+
questions: {
|
|
186
|
+
[key: string]: V1SystemoneParams.DecisionModelChoiceQuestion | V1SystemoneParams.DecisionModelNoulQuestion | V1SystemoneParams.DecisionModelScoreQuestion;
|
|
187
|
+
};
|
|
188
|
+
/**
|
|
189
|
+
* Shared context evaluated by every question.
|
|
190
|
+
*/
|
|
191
|
+
state: string | {
|
|
192
|
+
[key: string]: unknown;
|
|
193
|
+
} | Array<unknown>;
|
|
194
|
+
/**
|
|
195
|
+
* Public model alias. telnyx/decision-flash offers the lowest cost and latency;
|
|
196
|
+
* telnyx/decision-pro supports decisions that require long context, including
|
|
197
|
+
* inputs beyond Jev’s 32k per-decision limit. Applies to every question in the
|
|
198
|
+
* request. Other values are rejected.
|
|
199
|
+
*/
|
|
200
|
+
model?: 'telnyx/decision-flash' | 'telnyx/decision-pro';
|
|
201
|
+
}
|
|
202
|
+
export declare namespace V1SystemoneParams {
|
|
203
|
+
/**
|
|
204
|
+
* Select one of the supplied options.
|
|
205
|
+
*/
|
|
206
|
+
interface DecisionModelChoiceQuestion {
|
|
207
|
+
/**
|
|
208
|
+
* Between 2 and 64 option keys mapped to description strings or null. A null
|
|
209
|
+
* description uses the option key as its text.
|
|
210
|
+
*/
|
|
211
|
+
criteria: {
|
|
212
|
+
[key: string]: string | null;
|
|
213
|
+
};
|
|
214
|
+
/**
|
|
215
|
+
* Required instructions describing what to decide about the shared state.
|
|
216
|
+
*/
|
|
217
|
+
instructions: string | {
|
|
218
|
+
[key: string]: unknown;
|
|
219
|
+
} | Array<unknown>;
|
|
220
|
+
/**
|
|
221
|
+
* Question type.
|
|
222
|
+
*/
|
|
223
|
+
type: 'choice';
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Evaluate a yes/no question. Omit criteria to use Yes and No descriptions.
|
|
227
|
+
*/
|
|
228
|
+
interface DecisionModelNoulQuestion {
|
|
229
|
+
/**
|
|
230
|
+
* Required instructions describing what to decide about the shared state.
|
|
231
|
+
*/
|
|
232
|
+
instructions: string | {
|
|
233
|
+
[key: string]: unknown;
|
|
234
|
+
} | Array<unknown>;
|
|
235
|
+
/**
|
|
236
|
+
* Question type.
|
|
237
|
+
*/
|
|
238
|
+
type: 'noul';
|
|
239
|
+
/**
|
|
240
|
+
* Optional descriptions for the positive and negative outcomes. Descriptions must
|
|
241
|
+
* be strings.
|
|
242
|
+
*/
|
|
243
|
+
criteria?: DecisionModelNoulQuestion.Criteria;
|
|
244
|
+
}
|
|
245
|
+
namespace DecisionModelNoulQuestion {
|
|
246
|
+
/**
|
|
247
|
+
* Optional descriptions for the positive and negative outcomes. Descriptions must
|
|
248
|
+
* be strings.
|
|
249
|
+
*/
|
|
250
|
+
interface Criteria {
|
|
251
|
+
/**
|
|
252
|
+
* Description of the negative outcome.
|
|
253
|
+
*/
|
|
254
|
+
false?: string;
|
|
255
|
+
/**
|
|
256
|
+
* Description of the positive outcome.
|
|
257
|
+
*/
|
|
258
|
+
true?: string;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Rate the state against an ordered rubric.
|
|
263
|
+
*/
|
|
264
|
+
interface DecisionModelScoreQuestion {
|
|
265
|
+
/**
|
|
266
|
+
* Between 2 and 64 description strings in ascending score order. Indices start at
|
|
267
|
+
* zero.
|
|
268
|
+
*/
|
|
269
|
+
criteria: Array<string>;
|
|
270
|
+
/**
|
|
271
|
+
* Required instructions describing what to decide about the shared state.
|
|
272
|
+
*/
|
|
273
|
+
instructions: string | {
|
|
274
|
+
[key: string]: unknown;
|
|
275
|
+
} | Array<unknown>;
|
|
276
|
+
/**
|
|
277
|
+
* Question type.
|
|
278
|
+
*/
|
|
279
|
+
type: 'score';
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
export declare namespace V1 {
|
|
283
|
+
export { type V1SystemoneResponse as V1SystemoneResponse, type V1SystemoneParams as V1SystemoneParams };
|
|
284
|
+
}
|
|
285
|
+
//# sourceMappingURL=v1.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v1.d.ts","sourceRoot":"","sources":["../../../src/resources/ai/typesafe/v1.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,kCAA+B;AACrD,OAAO,EAAE,UAAU,EAAE,qCAAkC;AACvD,OAAO,EAAE,cAAc,EAAE,6CAA0C;AAEnE;;GAEG;AACH,qBAAa,EAAG,SAAQ,WAAW;IACjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAwDG;IACH,SAAS,CAAC,IAAI,EAAE,iBAAiB,EAAE,OAAO,C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AC;SACf;KACF;IAED;;OAEG;IACH,UAAiB,0BAA0B;QACzC;;;WAGG;QACH,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;QAExB;;WAEG;QACH,YAAY,EAAE,MAAM,GAAG;YAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;SAAE,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;QAEnE;;WAEG;QACH,IAAI,EAAE,OAAO,CAAC;KACf;CACF;AAED,MAAM,CAAC,OAAO,WAAW,EAAE,CAAC;IAC1B,OAAO,EAAE,KAAK,mBAAmB,IAAI,mBAAmB,EAAE,KAAK,iBAAiB,IAAI,iBAAiB,EAAE,CAAC;CACzG"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.V1 = void 0;
|
|
5
|
+
const resource_1 = require("../../../core/resource.js");
|
|
6
|
+
/**
|
|
7
|
+
* Beta API for evaluating shared context with typed questions and structured answers using Flash or Pro.
|
|
8
|
+
*/
|
|
9
|
+
class V1 extends resource_1.APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* **Beta API.** Choose telnyx/decision-flash for the lowest cost and latency, or
|
|
12
|
+
* telnyx/decision-pro for decisions that require long context, including inputs
|
|
13
|
+
* beyond Jev’s 32k per-decision limit. Omitted model defaults to
|
|
14
|
+
* telnyx/decision-flash.
|
|
15
|
+
*
|
|
16
|
+
* Evaluate shared context using named choice, noul (yes/no), and score questions.
|
|
17
|
+
* Returns TypeSafe System One-compatible answer shapes, the selected public model
|
|
18
|
+
* alias, and token usage. See the
|
|
19
|
+
* [decision model guide](https://developers.telnyx.com/docs/inference/decision-models)
|
|
20
|
+
* for examples and compatibility limits.
|
|
21
|
+
*
|
|
22
|
+
* The supported request subset requires instructions for every question, string
|
|
23
|
+
* descriptions for criteria (or null for choice descriptions), 1–64 questions, and
|
|
24
|
+
* 2–64 options for choice and score questions. The model field accepts only
|
|
25
|
+
* telnyx/decision-flash or telnyx/decision-pro. Unsupported model values and
|
|
26
|
+
* unknown fields are rejected. The endpoint is synchronous and does not stream.
|
|
27
|
+
*
|
|
28
|
+
* Use the TypeSafe Python SDK with base_url set to
|
|
29
|
+
* https://api.telnyx.com/v2/ai/typesafe and a Telnyx API key. The SDK appends
|
|
30
|
+
* /v1/systemone; explicitly set model to a supported Telnyx alias because its own
|
|
31
|
+
* default model is not supported. Compatibility covers this operation and the
|
|
32
|
+
* documented request subset; it does not include TypeSafe model listing. Scores
|
|
33
|
+
* describe relative preference, not calibrated correctness.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```ts
|
|
37
|
+
* const response = await client.ai.typesafe.v1.systemone({
|
|
38
|
+
* questions: {
|
|
39
|
+
* team: {
|
|
40
|
+
* type: 'choice',
|
|
41
|
+
* instructions:
|
|
42
|
+
* 'Choose the team that should handle this incident.',
|
|
43
|
+
* criteria: {
|
|
44
|
+
* billing: 'Payments and refunds',
|
|
45
|
+
* technical_support:
|
|
46
|
+
* 'Service faults and technical problems',
|
|
47
|
+
* sales: 'New purchases',
|
|
48
|
+
* },
|
|
49
|
+
* },
|
|
50
|
+
* production_incident: {
|
|
51
|
+
* type: 'noul',
|
|
52
|
+
* instructions:
|
|
53
|
+
* 'Does the message describe an active production incident?',
|
|
54
|
+
* },
|
|
55
|
+
* urgency: {
|
|
56
|
+
* type: 'score',
|
|
57
|
+
* instructions: 'Rate operational urgency.',
|
|
58
|
+
* criteria: ['Low', 'Normal', 'High', 'Critical'],
|
|
59
|
+
* },
|
|
60
|
+
* },
|
|
61
|
+
* state:
|
|
62
|
+
* 'Our production calls are failing. Every customer is affected.',
|
|
63
|
+
* model: 'telnyx/decision-flash',
|
|
64
|
+
* });
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
systemone(body, options) {
|
|
68
|
+
return this._client.post('/ai/typesafe/v1/systemone', { body, ...options });
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
exports.V1 = V1;
|
|
72
|
+
//# sourceMappingURL=v1.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v1.js","sourceRoot":"","sources":["../../../src/resources/ai/typesafe/v1.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAIrD;;GAEG;AACH,MAAa,EAAG,SAAQ,sBAAW;IACjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAwDG;IACH,SAAS,CAAC,IAAuB,EAAE,OAAwB;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,2BAA2B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9E,CAAC;CACF;AA7DD,gBA6DC"}
|