telnyx 7.21.0 → 7.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/client.d.mts +39 -6
- package/client.d.mts.map +1 -1
- package/client.d.ts +39 -6
- package/client.d.ts.map +1 -1
- package/client.js +33 -0
- package/client.js.map +1 -1
- package/client.mjs +33 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/ai/ai.d.mts +8 -4
- package/resources/ai/ai.d.mts.map +1 -1
- package/resources/ai/ai.d.ts +8 -4
- 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 +5 -1
- package/resources/ai/ai.mjs.map +1 -1
- package/resources/ai/assistants/assistants.d.mts +408 -47
- package/resources/ai/assistants/assistants.d.mts.map +1 -1
- package/resources/ai/assistants/assistants.d.ts +408 -47
- 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 +59 -12
- package/resources/ai/assistants/versions.d.mts.map +1 -1
- package/resources/ai/assistants/versions.d.ts +59 -12
- 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 +59 -28
- package/resources/ai/chat.d.mts.map +1 -1
- package/resources/ai/chat.d.ts +59 -28
- 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/index.d.mts +3 -2
- package/resources/ai/index.d.mts.map +1 -1
- package/resources/ai/index.d.ts +3 -2
- package/resources/ai/index.d.ts.map +1 -1
- package/resources/ai/index.js +3 -1
- package/resources/ai/index.js.map +1 -1
- package/resources/ai/index.mjs +2 -1
- package/resources/ai/index.mjs.map +1 -1
- package/resources/ai/openai/chat.d.mts +67 -29
- package/resources/ai/openai/chat.d.mts.map +1 -1
- package/resources/ai/openai/chat.d.ts +67 -29
- 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 +274 -0
- package/resources/ai/typesafe/v1.d.mts.map +1 -0
- package/resources/ai/typesafe/v1.d.ts +274 -0
- package/resources/ai/typesafe/v1.d.ts.map +1 -0
- package/resources/ai/typesafe/v1.js +67 -0
- package/resources/ai/typesafe/v1.js.map +1 -0
- package/resources/ai/typesafe/v1.mjs +63 -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 +57 -11
- package/resources/calls/actions.d.mts.map +1 -1
- package/resources/calls/actions.d.ts +57 -11
- package/resources/calls/actions.d.ts.map +1 -1
- package/resources/calls/calls.d.mts +45 -5
- package/resources/calls/calls.d.mts.map +1 -1
- package/resources/calls/calls.d.ts +45 -5
- 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/compute/compute.d.mts +10 -0
- package/resources/compute/compute.d.mts.map +1 -0
- package/resources/compute/compute.d.ts +10 -0
- package/resources/compute/compute.d.ts.map +1 -0
- package/resources/compute/compute.js +17 -0
- package/resources/compute/compute.js.map +1 -0
- package/resources/compute/compute.mjs +12 -0
- package/resources/compute/compute.mjs.map +1 -0
- 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 +2 -0
- package/resources/compute/funcs.d.mts.map +1 -0
- package/resources/compute/funcs.d.ts +2 -0
- package/resources/compute/funcs.d.ts.map +1 -0
- package/resources/compute/funcs.js +6 -0
- package/resources/compute/funcs.js.map +1 -0
- package/resources/compute/funcs.mjs +3 -0
- package/resources/compute/funcs.mjs.map +1 -0
- package/resources/compute/index.d.mts +3 -0
- package/resources/compute/index.d.mts.map +1 -0
- package/resources/compute/index.d.ts +3 -0
- package/resources/compute/index.d.ts.map +1 -0
- package/resources/compute/index.js +9 -0
- package/resources/compute/index.js.map +1 -0
- package/resources/compute/index.mjs +4 -0
- package/resources/compute/index.mjs.map +1 -0
- package/resources/compute.d.mts +2 -0
- package/resources/compute.d.mts.map +1 -0
- package/resources/compute.d.ts +2 -0
- package/resources/compute.d.ts.map +1 -0
- package/resources/compute.js +6 -0
- package/resources/compute.js.map +1 -0
- package/resources/compute.mjs +3 -0
- package/resources/compute.mjs.map +1 -0
- 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/credential-connections/credential-connections.d.mts +4 -1
- package/resources/credential-connections/credential-connections.d.mts.map +1 -1
- package/resources/credential-connections/credential-connections.d.ts +4 -1
- package/resources/credential-connections/credential-connections.d.ts.map +1 -1
- package/resources/credential-connections/credential-connections.js.map +1 -1
- package/resources/credential-connections/credential-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-inboxes/drafts.d.mts +7 -0
- package/resources/email-inboxes/drafts.d.mts.map +1 -1
- package/resources/email-inboxes/drafts.d.ts +7 -0
- package/resources/email-inboxes/drafts.d.ts.map +1 -1
- package/resources/email-messages/email-messages.d.mts +9 -3
- package/resources/email-messages/email-messages.d.mts.map +1 -1
- package/resources/email-messages/email-messages.d.ts +9 -3
- package/resources/email-messages/email-messages.d.ts.map +1 -1
- package/resources/email-messages/email-messages.js +5 -1
- package/resources/email-messages/email-messages.js.map +1 -1
- package/resources/email-messages/email-messages.mjs +5 -1
- package/resources/email-messages/email-messages.mjs.map +1 -1
- package/resources/fqdn-connections/fqdn-authentication.d.mts +4 -1
- package/resources/fqdn-connections/fqdn-authentication.d.mts.map +1 -1
- package/resources/fqdn-connections/fqdn-authentication.d.ts +4 -1
- package/resources/fqdn-connections/fqdn-authentication.d.ts.map +1 -1
- package/resources/fqdn-connections/fqdn-connections.d.mts +4 -1
- package/resources/fqdn-connections/fqdn-connections.d.mts.map +1 -1
- package/resources/fqdn-connections/fqdn-connections.d.ts +4 -1
- package/resources/fqdn-connections/fqdn-connections.d.ts.map +1 -1
- package/resources/fqdn-connections/fqdn-connections.js.map +1 -1
- package/resources/fqdn-connections/fqdn-connections.mjs.map +1 -1
- package/resources/index.d.mts +9 -3
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +9 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +16 -4
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +6 -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/messages/messages.d.mts +207 -22
- package/resources/messages/messages.d.mts.map +1 -1
- package/resources/messages/messages.d.ts +207 -22
- 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/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 +34 -1
- package/resources/messaging-profiles/messaging-profiles.d.mts.map +1 -1
- package/resources/messaging-profiles/messaging-profiles.d.ts +34 -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/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/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 +117 -0
- package/resources/texml/accounts/calls/calls.d.mts.map +1 -1
- package/resources/texml/accounts/calls/calls.d.ts +117 -0
- package/resources/texml/accounts/calls/calls.d.ts.map +1 -1
- package/resources/texml/accounts/calls/calls.js.map +1 -1
- 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/uac-connections/uac-connections.d.mts +9 -2
- package/resources/uac-connections/uac-connections.d.mts.map +1 -1
- package/resources/uac-connections/uac-connections.d.ts +9 -2
- package/resources/uac-connections/uac-connections.d.ts.map +1 -1
- package/resources/uac-connections/uac-connections.js.map +1 -1
- package/resources/uac-connections/uac-connections.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 +154 -51
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +154 -51
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/whatsapp/business-accounts/phone-numbers.d.mts +33 -0
- package/resources/whatsapp/business-accounts/phone-numbers.d.mts.map +1 -1
- package/resources/whatsapp/business-accounts/phone-numbers.d.ts +33 -0
- package/resources/whatsapp/business-accounts/phone-numbers.d.ts.map +1 -1
- package/resources/whatsapp/index.d.mts +1 -1
- package/resources/whatsapp/index.d.mts.map +1 -1
- package/resources/whatsapp/index.d.ts +1 -1
- package/resources/whatsapp/index.d.ts.map +1 -1
- package/resources/whatsapp/index.js.map +1 -1
- package/resources/whatsapp/index.mjs.map +1 -1
- package/resources/whatsapp/phone-numbers/index.d.mts +1 -1
- package/resources/whatsapp/phone-numbers/index.d.mts.map +1 -1
- package/resources/whatsapp/phone-numbers/index.d.ts +1 -1
- package/resources/whatsapp/phone-numbers/index.d.ts.map +1 -1
- package/resources/whatsapp/phone-numbers/index.js.map +1 -1
- package/resources/whatsapp/phone-numbers/index.mjs.map +1 -1
- package/resources/whatsapp/phone-numbers/phone-numbers.d.mts +147 -1
- package/resources/whatsapp/phone-numbers/phone-numbers.d.mts.map +1 -1
- package/resources/whatsapp/phone-numbers/phone-numbers.d.ts +147 -1
- package/resources/whatsapp/phone-numbers/phone-numbers.d.ts.map +1 -1
- package/resources/whatsapp/phone-numbers/phone-numbers.js +16 -0
- package/resources/whatsapp/phone-numbers/phone-numbers.js.map +1 -1
- package/resources/whatsapp/phone-numbers/phone-numbers.mjs +16 -0
- package/resources/whatsapp/phone-numbers/phone-numbers.mjs.map +1 -1
- package/resources/whatsapp/whatsapp.d.mts +2 -2
- package/resources/whatsapp/whatsapp.d.mts.map +1 -1
- package/resources/whatsapp/whatsapp.d.ts +2 -2
- package/resources/whatsapp/whatsapp.d.ts.map +1 -1
- package/resources/whatsapp/whatsapp.js.map +1 -1
- package/resources/whatsapp/whatsapp.mjs.map +1 -1
- package/resources/x402/credit-account/credit-account.d.mts +226 -0
- package/resources/x402/credit-account/credit-account.d.mts.map +1 -0
- package/resources/x402/credit-account/credit-account.d.ts +226 -0
- package/resources/x402/credit-account/credit-account.d.ts.map +1 -0
- package/resources/x402/credit-account/credit-account.js +66 -0
- package/resources/x402/credit-account/credit-account.js.map +1 -0
- package/resources/x402/credit-account/credit-account.mjs +61 -0
- package/resources/x402/credit-account/credit-account.mjs.map +1 -0
- package/resources/x402/credit-account/index.d.mts +3 -0
- package/resources/x402/credit-account/index.d.mts.map +1 -0
- package/resources/x402/credit-account/index.d.ts +3 -0
- package/resources/x402/credit-account/index.d.ts.map +1 -0
- package/resources/x402/credit-account/index.js +9 -0
- package/resources/x402/credit-account/index.js.map +1 -0
- package/resources/x402/credit-account/index.mjs +4 -0
- package/resources/x402/credit-account/index.mjs.map +1 -0
- package/resources/x402/credit-account/payments.d.mts +90 -0
- package/resources/x402/credit-account/payments.d.mts.map +1 -0
- package/resources/x402/credit-account/payments.d.ts +90 -0
- package/resources/x402/credit-account/payments.d.ts.map +1 -0
- package/resources/x402/credit-account/payments.js +47 -0
- package/resources/x402/credit-account/payments.js.map +1 -0
- package/resources/x402/credit-account/payments.mjs +43 -0
- package/resources/x402/credit-account/payments.mjs.map +1 -0
- package/resources/x402/credit-account.d.mts +1 -221
- package/resources/x402/credit-account.d.mts.map +1 -1
- package/resources/x402/credit-account.d.ts +1 -221
- package/resources/x402/credit-account.d.ts.map +1 -1
- package/resources/x402/credit-account.js +2 -54
- package/resources/x402/credit-account.js.map +1 -1
- package/resources/x402/credit-account.mjs +1 -52
- package/resources/x402/credit-account.mjs.map +1 -1
- package/resources/x402/index.d.mts +1 -1
- package/resources/x402/index.d.mts.map +1 -1
- package/resources/x402/index.d.ts +1 -1
- package/resources/x402/index.d.ts.map +1 -1
- package/resources/x402/index.js +2 -2
- package/resources/x402/index.js.map +1 -1
- package/resources/x402/index.mjs +1 -1
- package/resources/x402/index.mjs.map +1 -1
- package/resources/x402/x402.d.mts +2 -2
- package/resources/x402/x402.d.mts.map +1 -1
- package/resources/x402/x402.d.ts +2 -2
- package/resources/x402/x402.d.ts.map +1 -1
- package/resources/x402/x402.js +2 -2
- package/resources/x402/x402.js.map +1 -1
- package/resources/x402/x402.mjs +2 -2
- package/resources/x402/x402.mjs.map +1 -1
- package/src/client.ts +91 -0
- package/src/resources/ai/ai.ts +15 -1
- package/src/resources/ai/assistants/assistants.ts +454 -45
- package/src/resources/ai/assistants/index.ts +1 -0
- package/src/resources/ai/assistants/versions.ts +61 -12
- package/src/resources/ai/audio.ts +93 -45
- package/src/resources/ai/chat.ts +66 -29
- package/src/resources/ai/index.ts +8 -1
- package/src/resources/ai/openai/chat.ts +75 -29
- 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 +298 -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 +65 -10
- package/src/resources/calls/calls.ts +52 -5
- package/src/resources/compute/compute.ts +37 -0
- 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 +3 -0
- package/src/resources/compute/index.ts +15 -0
- package/src/resources/compute.ts +3 -0
- package/src/resources/connections.ts +133 -0
- package/src/resources/credential-connections/credential-connections.ts +4 -1
- package/src/resources/detail-records.ts +18 -1
- package/src/resources/email-inboxes/drafts.ts +8 -0
- package/src/resources/email-messages/email-messages.ts +9 -2
- package/src/resources/fqdn-connections/fqdn-authentication.ts +4 -1
- package/src/resources/fqdn-connections/fqdn-connections.ts +4 -1
- package/src/resources/index.ts +27 -0
- package/src/resources/machine-payments.ts +169 -0
- package/src/resources/messages/messages.ts +250 -22
- package/src/resources/messaging-profiles/index.ts +1 -0
- package/src/resources/messaging-profiles/messaging-profiles.ts +39 -0
- package/src/resources/noise-suppression-engines.ts +51 -0
- package/src/resources/speech-to-text/speech-to-text.ts +1 -0
- package/src/resources/texml/accounts/calls/calls.ts +138 -0
- 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/uac-connections/uac-connections.ts +9 -2
- package/src/resources/voice-clones.ts +6 -4
- package/src/resources/webhooks.ts +208 -60
- package/src/resources/whatsapp/business-accounts/phone-numbers.ts +52 -0
- package/src/resources/whatsapp/index.ts +1 -0
- package/src/resources/whatsapp/phone-numbers/index.ts +1 -0
- package/src/resources/whatsapp/phone-numbers/phone-numbers.ts +222 -0
- package/src/resources/whatsapp/whatsapp.ts +2 -0
- package/src/resources/x402/credit-account/credit-account.ts +312 -0
- package/src/resources/x402/credit-account/index.ts +16 -0
- package/src/resources/x402/credit-account/payments.ts +126 -0
- package/src/resources/x402/credit-account.ts +1 -290
- package/src/resources/x402/index.ts +1 -1
- package/src/resources/x402/x402.ts +2 -2
- 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
|
@@ -117,6 +117,19 @@ export class Versions extends APIResource {
|
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
export interface UpdateAssistant {
|
|
120
|
+
/**
|
|
121
|
+
* A2A agents this assistant can delegate to. Tools are not stored here: at the
|
|
122
|
+
* start of every conversation each agent's card is fetched and one tool is derived
|
|
123
|
+
* per skill the card advertises, named `a2a_<name>_<skill_id>`. The following
|
|
124
|
+
* limits are not enforced when the assistant is saved, and anything past them is
|
|
125
|
+
* dropped when the conversation starts: 64 agents per assistant, 64 skills per
|
|
126
|
+
* card, 128 derived tools per assistant, and a 6 second budget for all card
|
|
127
|
+
* fetches combined. An agent whose card cannot be fetched costs the assistant that
|
|
128
|
+
* capability for the conversation; it does not fail the call. Omit this field to
|
|
129
|
+
* leave the assistant's agents unchanged; send an empty array to remove them all.
|
|
130
|
+
*/
|
|
131
|
+
a2a_agents?: Array<AssistantsAPI.AssistantA2AAgent>;
|
|
132
|
+
|
|
120
133
|
/**
|
|
121
134
|
* Conversation flow as supplied by API clients (create / update).
|
|
122
135
|
*
|
|
@@ -229,10 +242,10 @@ export interface UpdateAssistant {
|
|
|
229
242
|
/**
|
|
230
243
|
* Configuration for post-conversation processing. When enabled, the assistant
|
|
231
244
|
* receives one additional LLM turn after the conversation ends, allowing it to
|
|
232
|
-
* execute tool calls such as
|
|
233
|
-
*
|
|
234
|
-
*
|
|
235
|
-
*
|
|
245
|
+
* execute final tool calls such as sending a summary or updating a record via
|
|
246
|
+
* webhook or function tools. Integration and MCP server tools are not available
|
|
247
|
+
* post-conversation; call-control tools (e.g. hangup, transfer) are also
|
|
248
|
+
* unavailable. Beta feature.
|
|
236
249
|
*/
|
|
237
250
|
post_conversation_settings?: AssistantsAPI.PostConversationSettingsReq;
|
|
238
251
|
|
|
@@ -248,14 +261,25 @@ export interface UpdateAssistant {
|
|
|
248
261
|
|
|
249
262
|
/**
|
|
250
263
|
* IDs of shared tools to attach to the assistant. New integrations should prefer
|
|
251
|
-
* `tool_ids` over inline `tools`.
|
|
264
|
+
* `tool_ids` over inline `tools`. On update, a sent `tool_ids` array fully
|
|
265
|
+
* replaces the assistant's attached shared tools; omit the field to leave them
|
|
266
|
+
* unchanged. Single-instance tool types are counted across inline `tools` and
|
|
267
|
+
* `tool_ids` combined, so attaching a shared tool of such a type when an instance
|
|
268
|
+
* already exists returns HTTP 400 with error code 10015.
|
|
252
269
|
*/
|
|
253
270
|
tool_ids?: Array<string>;
|
|
254
271
|
|
|
255
272
|
/**
|
|
256
273
|
* Deprecated for new integrations. Inline tool definitions available to the
|
|
257
274
|
* assistant. Prefer `tool_ids` to attach shared tools created with the AI Tools
|
|
258
|
-
* endpoints.
|
|
275
|
+
* endpoints. On update, a sent `tools` array fully replaces the assistant's inline
|
|
276
|
+
* tools; omit the field to leave the inline tools unchanged. Each tool type except
|
|
277
|
+
* `function`, `webhook`, and `client_side_tool` allows at most one instance per
|
|
278
|
+
* assistant, counted across inline `tools` and shared `tool_ids` combined —
|
|
279
|
+
* sending a duplicate of such a type returns HTTP 400 with error code 10015.
|
|
280
|
+
* Responses merge shared tools into `tools` with `shared: true`; when updating,
|
|
281
|
+
* omit those tools from the `tools` array and manage them through `tool_ids`
|
|
282
|
+
* instead.
|
|
259
283
|
*/
|
|
260
284
|
tools?: Array<AssistantsAPI.AssistantTool>;
|
|
261
285
|
|
|
@@ -299,6 +323,20 @@ export interface VersionUpdateParams {
|
|
|
299
323
|
*/
|
|
300
324
|
assistant_id: string;
|
|
301
325
|
|
|
326
|
+
/**
|
|
327
|
+
* Body param: A2A agents this assistant can delegate to. Tools are not stored
|
|
328
|
+
* here: at the start of every conversation each agent's card is fetched and one
|
|
329
|
+
* tool is derived per skill the card advertises, named `a2a_<name>_<skill_id>`.
|
|
330
|
+
* The following limits are not enforced when the assistant is saved, and anything
|
|
331
|
+
* past them is dropped when the conversation starts: 64 agents per assistant, 64
|
|
332
|
+
* skills per card, 128 derived tools per assistant, and a 6 second budget for all
|
|
333
|
+
* card fetches combined. An agent whose card cannot be fetched costs the assistant
|
|
334
|
+
* that capability for the conversation; it does not fail the call. Omit this field
|
|
335
|
+
* to leave the assistant's agents unchanged; send an empty array to remove them
|
|
336
|
+
* all.
|
|
337
|
+
*/
|
|
338
|
+
a2a_agents?: Array<AssistantsAPI.AssistantA2AAgent>;
|
|
339
|
+
|
|
302
340
|
/**
|
|
303
341
|
* Body param: Conversation flow as supplied by API clients (create / update).
|
|
304
342
|
*
|
|
@@ -436,10 +474,10 @@ export interface VersionUpdateParams {
|
|
|
436
474
|
/**
|
|
437
475
|
* Body param: Configuration for post-conversation processing. When enabled, the
|
|
438
476
|
* assistant receives one additional LLM turn after the conversation ends, allowing
|
|
439
|
-
* it to execute tool calls such as
|
|
440
|
-
*
|
|
441
|
-
*
|
|
442
|
-
*
|
|
477
|
+
* it to execute final tool calls such as sending a summary or updating a record
|
|
478
|
+
* via webhook or function tools. Integration and MCP server tools are not
|
|
479
|
+
* available post-conversation; call-control tools (e.g. hangup, transfer) are also
|
|
480
|
+
* unavailable. Beta feature.
|
|
443
481
|
*/
|
|
444
482
|
post_conversation_settings?: AssistantsAPI.PostConversationSettingsReq;
|
|
445
483
|
|
|
@@ -461,14 +499,25 @@ export interface VersionUpdateParams {
|
|
|
461
499
|
|
|
462
500
|
/**
|
|
463
501
|
* Body param: IDs of shared tools to attach to the assistant. New integrations
|
|
464
|
-
* should prefer `tool_ids` over inline `tools`.
|
|
502
|
+
* should prefer `tool_ids` over inline `tools`. On update, a sent `tool_ids` array
|
|
503
|
+
* fully replaces the assistant's attached shared tools; omit the field to leave
|
|
504
|
+
* them unchanged. Single-instance tool types are counted across inline `tools` and
|
|
505
|
+
* `tool_ids` combined, so attaching a shared tool of such a type when an instance
|
|
506
|
+
* already exists returns HTTP 400 with error code 10015.
|
|
465
507
|
*/
|
|
466
508
|
tool_ids?: Array<string>;
|
|
467
509
|
|
|
468
510
|
/**
|
|
469
511
|
* Body param: Deprecated for new integrations. Inline tool definitions available
|
|
470
512
|
* to the assistant. Prefer `tool_ids` to attach shared tools created with the AI
|
|
471
|
-
* Tools endpoints.
|
|
513
|
+
* Tools endpoints. On update, a sent `tools` array fully replaces the assistant's
|
|
514
|
+
* inline tools; omit the field to leave the inline tools unchanged. Each tool type
|
|
515
|
+
* except `function`, `webhook`, and `client_side_tool` allows at most one instance
|
|
516
|
+
* per assistant, counted across inline `tools` and shared `tool_ids` combined —
|
|
517
|
+
* sending a duplicate of such a type returns HTTP 400 with error code 10015.
|
|
518
|
+
* Responses merge shared tools into `tools` with `shared: true`; when updating,
|
|
519
|
+
* omit those tools from the `tools` array and manage them through `tool_ids`
|
|
520
|
+
* instead.
|
|
472
521
|
*/
|
|
473
522
|
tools?: Array<AssistantsAPI.AssistantTool>;
|
|
474
523
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../core/resource';
|
|
4
|
+
import * as AudioAPI from './audio';
|
|
4
5
|
import { APIPromise } from '../../core/api-promise';
|
|
5
6
|
import { type Uploadable } from '../../core/uploads';
|
|
6
7
|
import { RequestOptions } from '../../internal/request-options';
|
|
@@ -27,12 +28,56 @@ export class Audio extends APIResource {
|
|
|
27
28
|
}
|
|
28
29
|
}
|
|
29
30
|
|
|
31
|
+
/**
|
|
32
|
+
* Word-level timing detail. Only present when using a `deepgram/*` model with
|
|
33
|
+
* `model_config` options that enable word timestamps.
|
|
34
|
+
*/
|
|
35
|
+
export interface AudioTranscriptionResponseWord {
|
|
36
|
+
/**
|
|
37
|
+
* End time of the word in seconds.
|
|
38
|
+
*/
|
|
39
|
+
end: number;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Start time of the word in seconds.
|
|
43
|
+
*/
|
|
44
|
+
start: number;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* The transcribed word.
|
|
48
|
+
*/
|
|
49
|
+
word: string;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Confidence score for the word (0.0 to 1.0).
|
|
53
|
+
*/
|
|
54
|
+
confidence?: number;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* The transcribed word with punctuation and capitalisation applied. Only present
|
|
58
|
+
* when `punctuate` or `smart_format` is enabled via `model_config`.
|
|
59
|
+
*/
|
|
60
|
+
punctuated_word?: string;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Speaker index. Only present when diarization is enabled via `model_config`.
|
|
64
|
+
*/
|
|
65
|
+
speaker?: number;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Confidence score for the speaker assignment (0.0 to 1.0). Only present when
|
|
69
|
+
* diarization is enabled via `model_config`.
|
|
70
|
+
*/
|
|
71
|
+
speaker_confidence?: number;
|
|
72
|
+
}
|
|
73
|
+
|
|
30
74
|
/**
|
|
31
75
|
* Response fields vary by model. `distil-whisper/distil-large-v2` returns `text`,
|
|
32
76
|
* `duration`, and `segments` in `verbose_json` mode.
|
|
33
|
-
* `openai/whisper-large-v3-turbo` returns `text` only. `deepgram
|
|
34
|
-
* `text` and, depending on `model_config`, may include `words` with
|
|
35
|
-
* timestamps and speaker labels.
|
|
77
|
+
* `openai/whisper-large-v3-turbo` returns `text` only. The `deepgram/*` models
|
|
78
|
+
* return `text` and, depending on `model_config`, may include `words` with
|
|
79
|
+
* per-word timestamps and speaker labels. The Parakeet models
|
|
80
|
+
* (`nvidia/parakeet-v3`, `omi-health/omi-med-stt-v1`) return `text` only.
|
|
36
81
|
*/
|
|
37
82
|
export interface AudioTranscribeResponse {
|
|
38
83
|
/**
|
|
@@ -42,23 +87,25 @@ export interface AudioTranscribeResponse {
|
|
|
42
87
|
|
|
43
88
|
/**
|
|
44
89
|
* The duration of the audio file in seconds. Returned by
|
|
45
|
-
* `distil-whisper/distil-large-v2` and `deepgram
|
|
46
|
-
* `verbose_json`. Not returned by
|
|
90
|
+
* `distil-whisper/distil-large-v2` and the `deepgram/*` models when
|
|
91
|
+
* `response_format` is `verbose_json`. Not returned by
|
|
92
|
+
* `openai/whisper-large-v3-turbo`.
|
|
47
93
|
*/
|
|
48
94
|
duration?: number;
|
|
49
95
|
|
|
50
96
|
/**
|
|
51
97
|
* Segments of the transcribed text and their corresponding details. Returned by
|
|
52
|
-
* `distil-whisper/distil-large-v2`
|
|
53
|
-
*
|
|
98
|
+
* `distil-whisper/distil-large-v2` and the `deepgram/*` models when
|
|
99
|
+
* `response_format` is `verbose_json`; Deepgram segments also carry nested `words`
|
|
100
|
+
* and `speakers`. Not returned by `openai/whisper-large-v3-turbo`.
|
|
54
101
|
*/
|
|
55
102
|
segments?: Array<AudioTranscribeResponse.Segment>;
|
|
56
103
|
|
|
57
104
|
/**
|
|
58
|
-
* Word-level timestamps and optional speaker labels. Only returned by
|
|
59
|
-
* `deepgram
|
|
105
|
+
* Word-level timestamps and optional speaker labels. Only returned by the
|
|
106
|
+
* `deepgram/*` models when word-level output is enabled via `model_config`.
|
|
60
107
|
*/
|
|
61
|
-
words?: Array<
|
|
108
|
+
words?: Array<AudioTranscriptionResponseWord>;
|
|
62
109
|
}
|
|
63
110
|
|
|
64
111
|
export namespace AudioTranscribeResponse {
|
|
@@ -82,37 +129,18 @@ export namespace AudioTranscribeResponse {
|
|
|
82
129
|
* Text content of the segment.
|
|
83
130
|
*/
|
|
84
131
|
text: string;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* Word-level timing detail. Only present when using `deepgram/nova-3` with
|
|
89
|
-
* `model_config` options that enable word timestamps.
|
|
90
|
-
*/
|
|
91
|
-
export interface Word {
|
|
92
|
-
/**
|
|
93
|
-
* End time of the word in seconds.
|
|
94
|
-
*/
|
|
95
|
-
end: number;
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* Start time of the word in seconds.
|
|
99
|
-
*/
|
|
100
|
-
start: number;
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* The transcribed word.
|
|
104
|
-
*/
|
|
105
|
-
word: string;
|
|
106
132
|
|
|
107
133
|
/**
|
|
108
|
-
*
|
|
134
|
+
* Speaker indices heard in this segment. Returned by the `deepgram/*` models when
|
|
135
|
+
* `diarize` is enabled via `model_config`.
|
|
109
136
|
*/
|
|
110
|
-
|
|
137
|
+
speakers?: Array<number>;
|
|
111
138
|
|
|
112
139
|
/**
|
|
113
|
-
*
|
|
140
|
+
* Word-level timing detail for this segment. Returned by the `deepgram/*` models
|
|
141
|
+
* when word-level output is enabled via `model_config`.
|
|
114
142
|
*/
|
|
115
|
-
|
|
143
|
+
words?: Array<AudioAPI.AudioTranscriptionResponseWord>;
|
|
116
144
|
}
|
|
117
145
|
}
|
|
118
146
|
|
|
@@ -120,37 +148,56 @@ export interface AudioTranscribeParams {
|
|
|
120
148
|
/**
|
|
121
149
|
* ID of the model to use. `distil-whisper/distil-large-v2` is lower latency but
|
|
122
150
|
* English-only. `openai/whisper-large-v3-turbo` is multi-lingual but slightly
|
|
123
|
-
* higher latency. `deepgram
|
|
124
|
-
*
|
|
151
|
+
* higher latency. The `deepgram/*` models only accept mp3/wav files:
|
|
152
|
+
* `deepgram/nova-3` covers ~49 languages plus `multi` and `deepgram/nova-2` covers
|
|
153
|
+
* ~33, while the `-medical` variants are tuned for clinical vocabulary and accept
|
|
154
|
+
* English only (`en` and its regional variants, e.g. `en-US`, `en-GB`).
|
|
155
|
+
* `nvidia/parakeet-v3` is multilingual with automatic language detection;
|
|
156
|
+
* `omi-health/omi-med-stt-v1` is a medical model, English only.
|
|
125
157
|
*/
|
|
126
|
-
model:
|
|
158
|
+
model:
|
|
159
|
+
| 'distil-whisper/distil-large-v2'
|
|
160
|
+
| 'openai/whisper-large-v3-turbo'
|
|
161
|
+
| 'deepgram/nova-2'
|
|
162
|
+
| 'deepgram/nova-2-medical'
|
|
163
|
+
| 'deepgram/nova-3'
|
|
164
|
+
| 'deepgram/nova-3-medical'
|
|
165
|
+
| 'nvidia/parakeet-v3'
|
|
166
|
+
| 'omi-health/omi-med-stt-v1';
|
|
127
167
|
|
|
128
168
|
/**
|
|
129
169
|
* The audio file object to transcribe, in one of these formats: flac, mp3, mp4,
|
|
130
170
|
* mpeg, mpga, m4a, ogg, wav, or webm. File uploads are limited to 100 MB. Cannot
|
|
131
|
-
* be used together with `file_url`. Note: `deepgram
|
|
132
|
-
* wav formats.
|
|
171
|
+
* be used together with `file_url`. Note: the `deepgram/*` models only support mp3
|
|
172
|
+
* and wav formats.
|
|
133
173
|
*/
|
|
134
174
|
file?: Uploadable;
|
|
135
175
|
|
|
136
176
|
/**
|
|
137
177
|
* Link to audio file in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a,
|
|
138
178
|
* ogg, wav, or webm. Support for hosted files is limited to 100MB. Cannot be used
|
|
139
|
-
* together with `file`. Note: `deepgram
|
|
179
|
+
* together with `file`. Note: the `deepgram/*` models only support mp3 and wav
|
|
180
|
+
* formats.
|
|
140
181
|
*/
|
|
141
182
|
file_url?: string;
|
|
142
183
|
|
|
143
184
|
/**
|
|
144
|
-
* The language of the audio to be transcribed.
|
|
145
|
-
*
|
|
185
|
+
* The language of the audio to be transcribed. `deepgram/nova-3` supports ~49
|
|
186
|
+
* languages plus `multi`, and `deepgram/nova-2` supports ~33 plus `multi`; the
|
|
187
|
+
* `-medical` variants are English only (`en` and its regional variants, e.g.
|
|
188
|
+
* `en-US`, `en-GB`). Deepgram models validate on the base language and forward the
|
|
189
|
+
* full tag, so regional variants such as `de-CH` and `pt-BR` are accepted where
|
|
190
|
+
* the base language is supported; an unsupported language returns a 400. For
|
|
146
191
|
* `openai/whisper-large-v3-turbo`, supports multiple languages.
|
|
147
192
|
* `distil-whisper/distil-large-v2` does not support language parameter.
|
|
193
|
+
* `nvidia/parakeet-v3` detects the language automatically;
|
|
194
|
+
* `omi-health/omi-med-stt-v1` is English only.
|
|
148
195
|
*/
|
|
149
196
|
language?: string;
|
|
150
197
|
|
|
151
198
|
/**
|
|
152
|
-
* Additional model-specific configuration parameters. Only allowed with
|
|
153
|
-
* `deepgram
|
|
199
|
+
* Additional model-specific configuration parameters. Only allowed with the
|
|
200
|
+
* `deepgram/*` models. Can include Deepgram-specific options such as
|
|
154
201
|
* `smart_format`, `punctuate`, `diarize`, `utterance`, `numerals`, and `language`.
|
|
155
202
|
* If `language` is provided both as a top-level parameter and in `model_config`,
|
|
156
203
|
* the top-level parameter takes precedence.
|
|
@@ -173,6 +220,7 @@ export interface AudioTranscribeParams {
|
|
|
173
220
|
|
|
174
221
|
export declare namespace Audio {
|
|
175
222
|
export {
|
|
223
|
+
type AudioTranscriptionResponseWord as AudioTranscriptionResponseWord,
|
|
176
224
|
type AudioTranscribeResponse as AudioTranscribeResponse,
|
|
177
225
|
type AudioTranscribeParams as AudioTranscribeParams,
|
|
178
226
|
};
|
package/src/resources/ai/chat.ts
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../core/resource';
|
|
4
4
|
import * as ChatAPI from './chat';
|
|
5
|
+
import * as OpenAIChatAPI from './openai/chat';
|
|
5
6
|
|
|
6
7
|
export class Chat extends APIResource {}
|
|
7
8
|
|
|
@@ -58,22 +59,6 @@ export interface ChatCompletionRequest {
|
|
|
58
59
|
*/
|
|
59
60
|
frequency_penalty?: number;
|
|
60
61
|
|
|
61
|
-
/**
|
|
62
|
-
* If specified, the output will be exactly one of the choices.
|
|
63
|
-
*/
|
|
64
|
-
guided_choice?: Array<string>;
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Must be a valid JSON schema. If specified, the output will follow the JSON
|
|
68
|
-
* schema.
|
|
69
|
-
*/
|
|
70
|
-
guided_json?: { [key: string]: unknown };
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* If specified, the output will follow the regex pattern.
|
|
74
|
-
*/
|
|
75
|
-
guided_regex?: string;
|
|
76
|
-
|
|
77
62
|
/**
|
|
78
63
|
* This is used with `use_beam_search` to prefer shorter or longer completions.
|
|
79
64
|
*/
|
|
@@ -141,10 +126,15 @@ export interface ChatCompletionRequest {
|
|
|
141
126
|
region?: 'USA' | 'EU' | 'AUS' | 'UAE';
|
|
142
127
|
|
|
143
128
|
/**
|
|
144
|
-
*
|
|
145
|
-
*
|
|
129
|
+
* Controls the format of the model output. `json_object` guarantees valid JSON
|
|
130
|
+
* output without defining a schema; `json_schema` constrains the output to the
|
|
131
|
+
* JSON schema you supply via the `json_schema` property and is the supported way
|
|
132
|
+
* to get guaranteed structured output on Telnyx-hosted models.
|
|
146
133
|
*/
|
|
147
|
-
response_format?:
|
|
134
|
+
response_format?:
|
|
135
|
+
| ChatCompletionRequest.ResponseFormatText
|
|
136
|
+
| ChatCompletionRequest.ResponseFormatJsonObject
|
|
137
|
+
| ChatCompletionRequest.ResponseFormatJsonSchemaParam;
|
|
148
138
|
|
|
149
139
|
/**
|
|
150
140
|
* If specified, the system will make a best effort to sample deterministically,
|
|
@@ -228,29 +218,76 @@ export namespace ChatCompletionRequest {
|
|
|
228
218
|
}
|
|
229
219
|
|
|
230
220
|
/**
|
|
231
|
-
*
|
|
232
|
-
* control over the schema, use `guided_json`.
|
|
221
|
+
* Plain text output.
|
|
233
222
|
*/
|
|
234
|
-
export interface
|
|
235
|
-
type: 'text'
|
|
223
|
+
export interface ResponseFormatText {
|
|
224
|
+
type: 'text';
|
|
236
225
|
}
|
|
237
226
|
|
|
238
|
-
|
|
239
|
-
|
|
227
|
+
/**
|
|
228
|
+
* JSON mode: the model output is valid JSON, without a schema.
|
|
229
|
+
*/
|
|
230
|
+
export interface ResponseFormatJsonObject {
|
|
231
|
+
type: 'json_object';
|
|
232
|
+
}
|
|
240
233
|
|
|
241
|
-
|
|
234
|
+
/**
|
|
235
|
+
* Structured output: the model output is constrained to the JSON schema supplied
|
|
236
|
+
* in `json_schema`.
|
|
237
|
+
*/
|
|
238
|
+
export interface ResponseFormatJsonSchemaParam {
|
|
239
|
+
/**
|
|
240
|
+
* The JSON schema configuration, required when `type` is `json_schema`. Matches
|
|
241
|
+
* the
|
|
242
|
+
* [OpenAI structured outputs](https://platform.openai.com/docs/guides/structured-outputs)
|
|
243
|
+
* `json_schema` response format.
|
|
244
|
+
*/
|
|
245
|
+
json_schema: ResponseFormatJsonSchemaParam.JsonSchema;
|
|
246
|
+
|
|
247
|
+
type: 'json_schema';
|
|
242
248
|
}
|
|
243
249
|
|
|
244
|
-
export namespace
|
|
245
|
-
|
|
250
|
+
export namespace ResponseFormatJsonSchemaParam {
|
|
251
|
+
/**
|
|
252
|
+
* The JSON schema configuration, required when `type` is `json_schema`. Matches
|
|
253
|
+
* the
|
|
254
|
+
* [OpenAI structured outputs](https://platform.openai.com/docs/guides/structured-outputs)
|
|
255
|
+
* `json_schema` response format.
|
|
256
|
+
*/
|
|
257
|
+
export interface JsonSchema {
|
|
258
|
+
/**
|
|
259
|
+
* The name of the response format. Used for clarity only.
|
|
260
|
+
*/
|
|
246
261
|
name: string;
|
|
247
262
|
|
|
263
|
+
/**
|
|
264
|
+
* A description of what the response format is for, typically used to guide the
|
|
265
|
+
* model.
|
|
266
|
+
*/
|
|
248
267
|
description?: string;
|
|
249
268
|
|
|
250
|
-
|
|
269
|
+
/**
|
|
270
|
+
* The JSON schema the model output must conform to. A valid
|
|
271
|
+
* [JSON Schema](https://json-schema.org) object, e.g. a Pydantic
|
|
272
|
+
* `model_json_schema()` export.
|
|
273
|
+
*/
|
|
274
|
+
schema?: { [key: string]: unknown };
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* Enables strict schema adherence when supported by the model. If the generated
|
|
278
|
+
* output does not match the provided schema, the request fails instead of
|
|
279
|
+
* returning non-conformant output.
|
|
280
|
+
*/
|
|
281
|
+
strict?: boolean;
|
|
251
282
|
}
|
|
252
283
|
}
|
|
253
284
|
|
|
285
|
+
export interface Function {
|
|
286
|
+
function: OpenAIChatAPI.FunctionDefinition;
|
|
287
|
+
|
|
288
|
+
type: 'function';
|
|
289
|
+
}
|
|
290
|
+
|
|
254
291
|
export interface Retrieval {
|
|
255
292
|
retrieval: ChatAPI.BucketIDs;
|
|
256
293
|
|
|
@@ -15,6 +15,7 @@ export {
|
|
|
15
15
|
Assistants,
|
|
16
16
|
type ArithmeticExpression,
|
|
17
17
|
type Assistant,
|
|
18
|
+
type AssistantA2AAgent,
|
|
18
19
|
type AssistantIntegration,
|
|
19
20
|
type AssistantMcpServer,
|
|
20
21
|
type AssistantTool,
|
|
@@ -76,7 +77,12 @@ export {
|
|
|
76
77
|
type AssistantCloneParams,
|
|
77
78
|
type AssistantSendSMSParams,
|
|
78
79
|
} from './assistants/index';
|
|
79
|
-
export {
|
|
80
|
+
export {
|
|
81
|
+
Audio,
|
|
82
|
+
type AudioTranscriptionResponseWord,
|
|
83
|
+
type AudioTranscribeResponse,
|
|
84
|
+
type AudioTranscribeParams,
|
|
85
|
+
} from './audio';
|
|
80
86
|
export { Chat, type BucketIDs, type ChatCompletionRequest } from './chat';
|
|
81
87
|
export {
|
|
82
88
|
Clusters,
|
|
@@ -159,3 +165,4 @@ export {
|
|
|
159
165
|
type ToolUpdateParams,
|
|
160
166
|
type SharedToolResponsesDefaultFlatPagination,
|
|
161
167
|
} from './tools';
|
|
168
|
+
export { Typesafe } from './typesafe/index';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../../core/resource';
|
|
4
|
+
import * as OpenAIChatAPI from './chat';
|
|
4
5
|
import * as ChatAPI from '../chat';
|
|
5
6
|
import { APIPromise } from '../../../core/api-promise';
|
|
6
7
|
import { RequestOptions } from '../../../internal/request-options';
|
|
@@ -34,6 +35,14 @@ export class Chat extends APIResource {
|
|
|
34
35
|
}
|
|
35
36
|
}
|
|
36
37
|
|
|
38
|
+
export interface FunctionDefinition {
|
|
39
|
+
name: string;
|
|
40
|
+
|
|
41
|
+
description?: string;
|
|
42
|
+
|
|
43
|
+
parameters?: { [key: string]: unknown };
|
|
44
|
+
}
|
|
45
|
+
|
|
37
46
|
export type ChatCreateCompletionResponse = { [key: string]: unknown };
|
|
38
47
|
|
|
39
48
|
export interface ChatCreateCompletionParams {
|
|
@@ -75,22 +84,6 @@ export interface ChatCreateCompletionParams {
|
|
|
75
84
|
*/
|
|
76
85
|
frequency_penalty?: number;
|
|
77
86
|
|
|
78
|
-
/**
|
|
79
|
-
* If specified, the output will be exactly one of the choices.
|
|
80
|
-
*/
|
|
81
|
-
guided_choice?: Array<string>;
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* Must be a valid JSON schema. If specified, the output will follow the JSON
|
|
85
|
-
* schema.
|
|
86
|
-
*/
|
|
87
|
-
guided_json?: { [key: string]: unknown };
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* If specified, the output will follow the regex pattern.
|
|
91
|
-
*/
|
|
92
|
-
guided_regex?: string;
|
|
93
|
-
|
|
94
87
|
/**
|
|
95
88
|
* This is used with `use_beam_search` to prefer shorter or longer completions.
|
|
96
89
|
*/
|
|
@@ -158,10 +151,15 @@ export interface ChatCreateCompletionParams {
|
|
|
158
151
|
region?: 'USA' | 'EU' | 'AUS' | 'UAE';
|
|
159
152
|
|
|
160
153
|
/**
|
|
161
|
-
*
|
|
162
|
-
*
|
|
154
|
+
* Controls the format of the model output. `json_object` guarantees valid JSON
|
|
155
|
+
* output without defining a schema; `json_schema` constrains the output to the
|
|
156
|
+
* JSON schema you supply via the `json_schema` property and is the supported way
|
|
157
|
+
* to get guaranteed structured output on Telnyx-hosted models.
|
|
163
158
|
*/
|
|
164
|
-
response_format?:
|
|
159
|
+
response_format?:
|
|
160
|
+
| ChatCreateCompletionParams.ResponseFormatText
|
|
161
|
+
| ChatCreateCompletionParams.ResponseFormatJsonObject
|
|
162
|
+
| ChatCreateCompletionParams.ResponseFormatJsonSchemaParam;
|
|
165
163
|
|
|
166
164
|
/**
|
|
167
165
|
* If specified, the system will make a best effort to sample deterministically,
|
|
@@ -245,29 +243,76 @@ export namespace ChatCreateCompletionParams {
|
|
|
245
243
|
}
|
|
246
244
|
|
|
247
245
|
/**
|
|
248
|
-
*
|
|
249
|
-
* control over the schema, use `guided_json`.
|
|
246
|
+
* Plain text output.
|
|
250
247
|
*/
|
|
251
|
-
export interface
|
|
252
|
-
type: 'text'
|
|
248
|
+
export interface ResponseFormatText {
|
|
249
|
+
type: 'text';
|
|
253
250
|
}
|
|
254
251
|
|
|
255
|
-
|
|
256
|
-
|
|
252
|
+
/**
|
|
253
|
+
* JSON mode: the model output is valid JSON, without a schema.
|
|
254
|
+
*/
|
|
255
|
+
export interface ResponseFormatJsonObject {
|
|
256
|
+
type: 'json_object';
|
|
257
|
+
}
|
|
257
258
|
|
|
258
|
-
|
|
259
|
+
/**
|
|
260
|
+
* Structured output: the model output is constrained to the JSON schema supplied
|
|
261
|
+
* in `json_schema`.
|
|
262
|
+
*/
|
|
263
|
+
export interface ResponseFormatJsonSchemaParam {
|
|
264
|
+
/**
|
|
265
|
+
* The JSON schema configuration, required when `type` is `json_schema`. Matches
|
|
266
|
+
* the
|
|
267
|
+
* [OpenAI structured outputs](https://platform.openai.com/docs/guides/structured-outputs)
|
|
268
|
+
* `json_schema` response format.
|
|
269
|
+
*/
|
|
270
|
+
json_schema: ResponseFormatJsonSchemaParam.JsonSchema;
|
|
271
|
+
|
|
272
|
+
type: 'json_schema';
|
|
259
273
|
}
|
|
260
274
|
|
|
261
|
-
export namespace
|
|
262
|
-
|
|
275
|
+
export namespace ResponseFormatJsonSchemaParam {
|
|
276
|
+
/**
|
|
277
|
+
* The JSON schema configuration, required when `type` is `json_schema`. Matches
|
|
278
|
+
* the
|
|
279
|
+
* [OpenAI structured outputs](https://platform.openai.com/docs/guides/structured-outputs)
|
|
280
|
+
* `json_schema` response format.
|
|
281
|
+
*/
|
|
282
|
+
export interface JsonSchema {
|
|
283
|
+
/**
|
|
284
|
+
* The name of the response format. Used for clarity only.
|
|
285
|
+
*/
|
|
263
286
|
name: string;
|
|
264
287
|
|
|
288
|
+
/**
|
|
289
|
+
* A description of what the response format is for, typically used to guide the
|
|
290
|
+
* model.
|
|
291
|
+
*/
|
|
265
292
|
description?: string;
|
|
266
293
|
|
|
267
|
-
|
|
294
|
+
/**
|
|
295
|
+
* The JSON schema the model output must conform to. A valid
|
|
296
|
+
* [JSON Schema](https://json-schema.org) object, e.g. a Pydantic
|
|
297
|
+
* `model_json_schema()` export.
|
|
298
|
+
*/
|
|
299
|
+
schema?: { [key: string]: unknown };
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* Enables strict schema adherence when supported by the model. If the generated
|
|
303
|
+
* output does not match the provided schema, the request fails instead of
|
|
304
|
+
* returning non-conformant output.
|
|
305
|
+
*/
|
|
306
|
+
strict?: boolean;
|
|
268
307
|
}
|
|
269
308
|
}
|
|
270
309
|
|
|
310
|
+
export interface Function {
|
|
311
|
+
function: OpenAIChatAPI.FunctionDefinition;
|
|
312
|
+
|
|
313
|
+
type: 'function';
|
|
314
|
+
}
|
|
315
|
+
|
|
271
316
|
export interface Retrieval {
|
|
272
317
|
retrieval: ChatAPI.BucketIDs;
|
|
273
318
|
|
|
@@ -277,6 +322,7 @@ export namespace ChatCreateCompletionParams {
|
|
|
277
322
|
|
|
278
323
|
export declare namespace Chat {
|
|
279
324
|
export {
|
|
325
|
+
type FunctionDefinition as FunctionDefinition,
|
|
280
326
|
type ChatCreateCompletionResponse as ChatCreateCompletionResponse,
|
|
281
327
|
type ChatCreateCompletionParams as ChatCreateCompletionParams,
|
|
282
328
|
};
|