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
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export {
|
|
4
|
+
Chat,
|
|
5
|
+
type FunctionDefinition,
|
|
6
|
+
type ChatCreateCompletionResponse,
|
|
7
|
+
type ChatCreateCompletionParams,
|
|
8
|
+
} from './chat';
|
|
4
9
|
export {
|
|
5
10
|
Embeddings,
|
|
6
11
|
type EmbeddingCreateEmbeddingsResponse,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { APIResource } from '../../../core/resource';
|
|
4
4
|
import * as AIAPI from '../ai';
|
|
5
5
|
import * as ChatAPI from './chat';
|
|
6
|
-
import { Chat, ChatCreateCompletionParams, ChatCreateCompletionResponse } from './chat';
|
|
6
|
+
import { Chat, ChatCreateCompletionParams, ChatCreateCompletionResponse, FunctionDefinition } from './chat';
|
|
7
7
|
import * as EmbeddingsAPI from './embeddings';
|
|
8
8
|
import {
|
|
9
9
|
EmbeddingCreateEmbeddingsParams,
|
|
@@ -191,6 +191,7 @@ export declare namespace OpenAI {
|
|
|
191
191
|
|
|
192
192
|
export {
|
|
193
193
|
Chat as Chat,
|
|
194
|
+
type FunctionDefinition as FunctionDefinition,
|
|
194
195
|
type ChatCreateCompletionResponse as ChatCreateCompletionResponse,
|
|
195
196
|
type ChatCreateCompletionParams as ChatCreateCompletionParams,
|
|
196
197
|
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../../core/resource';
|
|
4
|
+
import * as V1API from './v1';
|
|
5
|
+
import { V1, V1SystemoneParams, V1SystemoneResponse } from './v1';
|
|
6
|
+
|
|
7
|
+
export class Typesafe extends APIResource {
|
|
8
|
+
v1: V1API.V1 = new V1API.V1(this._client);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
Typesafe.V1 = V1;
|
|
12
|
+
|
|
13
|
+
export declare namespace Typesafe {
|
|
14
|
+
export {
|
|
15
|
+
V1 as V1,
|
|
16
|
+
type V1SystemoneResponse as V1SystemoneResponse,
|
|
17
|
+
type V1SystemoneParams as V1SystemoneParams,
|
|
18
|
+
};
|
|
19
|
+
}
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../../../internal/request-options';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Beta API for evaluating shared context with typed questions and structured answers. Telnyx manages model selection.
|
|
9
|
+
*/
|
|
10
|
+
export class V1 extends APIResource {
|
|
11
|
+
/**
|
|
12
|
+
* **Beta API.** Telnyx controls model selection.
|
|
13
|
+
*
|
|
14
|
+
* Evaluate shared context using named choice, noul (yes/no), and score questions.
|
|
15
|
+
* Returns TypeSafe System One-compatible answer shapes, an opaque compatibility
|
|
16
|
+
* identifier, 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 SDK-supplied model value is
|
|
23
|
+
* ignored and cannot select a model. Other unknown fields are rejected. The
|
|
24
|
+
* 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. Compatibility covers this operation and the documented request
|
|
29
|
+
* subset; it does not include TypeSafe model listing. Scores describe relative
|
|
30
|
+
* preference, not calibrated correctness.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```ts
|
|
34
|
+
* const response = await client.ai.typesafe.v1.systemone({
|
|
35
|
+
* questions: {
|
|
36
|
+
* team: {
|
|
37
|
+
* type: 'choice',
|
|
38
|
+
* instructions:
|
|
39
|
+
* 'Choose the team that should handle this incident.',
|
|
40
|
+
* criteria: {
|
|
41
|
+
* billing: 'Payments and refunds',
|
|
42
|
+
* technical_support:
|
|
43
|
+
* 'Service faults and technical problems',
|
|
44
|
+
* sales: 'New purchases',
|
|
45
|
+
* },
|
|
46
|
+
* },
|
|
47
|
+
* production_incident: {
|
|
48
|
+
* type: 'noul',
|
|
49
|
+
* instructions:
|
|
50
|
+
* 'Does the message describe an active production incident?',
|
|
51
|
+
* },
|
|
52
|
+
* urgency: {
|
|
53
|
+
* type: 'score',
|
|
54
|
+
* instructions: 'Rate operational urgency.',
|
|
55
|
+
* criteria: ['Low', 'Normal', 'High', 'Critical'],
|
|
56
|
+
* },
|
|
57
|
+
* },
|
|
58
|
+
* state:
|
|
59
|
+
* 'Our production calls are failing. Every customer is affected.',
|
|
60
|
+
* });
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
systemone(body: V1SystemoneParams, options?: RequestOptions): APIPromise<V1SystemoneResponse> {
|
|
64
|
+
return this._client.post('/ai/typesafe/v1/systemone', { body, ...options });
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* A complete synchronous evaluation. Answers are returned directly without a data
|
|
70
|
+
* wrapper.
|
|
71
|
+
*/
|
|
72
|
+
export interface V1SystemoneResponse {
|
|
73
|
+
/**
|
|
74
|
+
* Answers keyed by exactly the question IDs in the request. Each answer type
|
|
75
|
+
* matches its question.
|
|
76
|
+
*/
|
|
77
|
+
answers: {
|
|
78
|
+
[key: string]:
|
|
79
|
+
| V1SystemoneResponse.DecisionModelChoiceAnswer
|
|
80
|
+
| V1SystemoneResponse.DecisionModelNoulAnswer
|
|
81
|
+
| V1SystemoneResponse.DecisionModelScoreAnswer;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Opaque Telnyx-controlled identifier retained for TypeSafe SDK response
|
|
86
|
+
* compatibility. It is not a selectable model name or a guarantee of a particular
|
|
87
|
+
* underlying model.
|
|
88
|
+
*/
|
|
89
|
+
model: string;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Token usage for the completed evaluation.
|
|
93
|
+
*/
|
|
94
|
+
usage: V1SystemoneResponse.Usage;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export namespace V1SystemoneResponse {
|
|
98
|
+
/**
|
|
99
|
+
* A selected option and the distribution across all supplied option keys.
|
|
100
|
+
*/
|
|
101
|
+
export interface DecisionModelChoiceAnswer {
|
|
102
|
+
/**
|
|
103
|
+
* The option key with the highest relative score. Ties favor the first option in
|
|
104
|
+
* request order.
|
|
105
|
+
*/
|
|
106
|
+
choice: string;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Normalized entropy confidence: 1 - H(p) / ln(N), where H(p) = -sum(p \* ln(p))
|
|
110
|
+
* and N is the number of options. Zero indicates a uniform distribution; one
|
|
111
|
+
* indicates concentration on one option. This is neither the winning probability
|
|
112
|
+
* nor calibrated correctness.
|
|
113
|
+
*/
|
|
114
|
+
confidence: number;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Relative scores normalized across the supplied options, summing approximately
|
|
118
|
+
* to 1. These are not calibrated probabilities of correctness.
|
|
119
|
+
*/
|
|
120
|
+
probabilities: { [key: string]: number };
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Answer type.
|
|
124
|
+
*/
|
|
125
|
+
type: 'choice';
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* A yes/no score with no separate confidence or probabilities fields.
|
|
130
|
+
*/
|
|
131
|
+
export interface DecisionModelNoulAnswer {
|
|
132
|
+
/**
|
|
133
|
+
* Score of the positive outcome. Values near 1 favor yes; values near 0 favor no.
|
|
134
|
+
* This is a number, not a Boolean, and is not calibrated correctness.
|
|
135
|
+
*/
|
|
136
|
+
noul: number;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Answer type.
|
|
140
|
+
*/
|
|
141
|
+
type: 'noul';
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* An expected rating over the ordered criteria.
|
|
146
|
+
*/
|
|
147
|
+
export interface DecisionModelScoreAnswer {
|
|
148
|
+
/**
|
|
149
|
+
* Normalized entropy confidence: 1 - H(p) / ln(N), where H(p) = -sum(p \* ln(p))
|
|
150
|
+
* and N is the number of options. Zero indicates a uniform distribution; one
|
|
151
|
+
* indicates concentration on one option. This is neither the winning probability
|
|
152
|
+
* nor calibrated correctness.
|
|
153
|
+
*/
|
|
154
|
+
confidence: number;
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Criterion descriptions keyed by stringified zero-based indices, such as "0",
|
|
158
|
+
* "1", and "2".
|
|
159
|
+
*/
|
|
160
|
+
legend: { [key: string]: string };
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Relative scores keyed by the same stringified indices as legend.
|
|
164
|
+
*/
|
|
165
|
+
probabilities: { [key: string]: number };
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Expected zero-based criterion index: sum(index \* probability). Ranges from 0 to
|
|
169
|
+
* N-1 for N criteria; fractional values are valid.
|
|
170
|
+
*/
|
|
171
|
+
score: number;
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Answer type.
|
|
175
|
+
*/
|
|
176
|
+
type: 'score';
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Token usage for the completed evaluation.
|
|
181
|
+
*/
|
|
182
|
+
export interface Usage {
|
|
183
|
+
/**
|
|
184
|
+
* Input tokens processed, including shared-context preparation and question
|
|
185
|
+
* evaluation. This can exceed the token count of the unique input text.
|
|
186
|
+
*/
|
|
187
|
+
input_tokens: number;
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Output tokens used for the evaluation, including shared-context preparation.
|
|
191
|
+
*/
|
|
192
|
+
output_tokens: number;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export interface V1SystemoneParams {
|
|
197
|
+
/**
|
|
198
|
+
* Between 1 and 64 named questions. Each key identifies the corresponding answer.
|
|
199
|
+
*/
|
|
200
|
+
questions: {
|
|
201
|
+
[key: string]:
|
|
202
|
+
| V1SystemoneParams.DecisionModelChoiceQuestion
|
|
203
|
+
| V1SystemoneParams.DecisionModelNoulQuestion
|
|
204
|
+
| V1SystemoneParams.DecisionModelScoreQuestion;
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Shared context evaluated by every question.
|
|
209
|
+
*/
|
|
210
|
+
state: string | { [key: string]: unknown } | Array<unknown>;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
export namespace V1SystemoneParams {
|
|
214
|
+
/**
|
|
215
|
+
* Select one of the supplied options.
|
|
216
|
+
*/
|
|
217
|
+
export interface DecisionModelChoiceQuestion {
|
|
218
|
+
/**
|
|
219
|
+
* Between 2 and 64 option keys mapped to description strings or null. A null
|
|
220
|
+
* description uses the option key as its text.
|
|
221
|
+
*/
|
|
222
|
+
criteria: { [key: string]: string | null };
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Required instructions describing what to decide about the shared state.
|
|
226
|
+
*/
|
|
227
|
+
instructions: string | { [key: string]: unknown } | Array<unknown>;
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Question type.
|
|
231
|
+
*/
|
|
232
|
+
type: 'choice';
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* Evaluate a yes/no question. Omit criteria to use Yes and No descriptions.
|
|
237
|
+
*/
|
|
238
|
+
export interface DecisionModelNoulQuestion {
|
|
239
|
+
/**
|
|
240
|
+
* Required instructions describing what to decide about the shared state.
|
|
241
|
+
*/
|
|
242
|
+
instructions: string | { [key: string]: unknown } | Array<unknown>;
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* Question type.
|
|
246
|
+
*/
|
|
247
|
+
type: 'noul';
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Optional descriptions for the positive and negative outcomes. Descriptions must
|
|
251
|
+
* be strings.
|
|
252
|
+
*/
|
|
253
|
+
criteria?: DecisionModelNoulQuestion.Criteria;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
export namespace DecisionModelNoulQuestion {
|
|
257
|
+
/**
|
|
258
|
+
* Optional descriptions for the positive and negative outcomes. Descriptions must
|
|
259
|
+
* be strings.
|
|
260
|
+
*/
|
|
261
|
+
export interface Criteria {
|
|
262
|
+
/**
|
|
263
|
+
* Description of the negative outcome.
|
|
264
|
+
*/
|
|
265
|
+
false?: string;
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* Description of the positive outcome.
|
|
269
|
+
*/
|
|
270
|
+
true?: string;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Rate the state against an ordered rubric.
|
|
276
|
+
*/
|
|
277
|
+
export interface DecisionModelScoreQuestion {
|
|
278
|
+
/**
|
|
279
|
+
* Between 2 and 64 description strings in ascending score order. Indices start at
|
|
280
|
+
* zero.
|
|
281
|
+
*/
|
|
282
|
+
criteria: Array<string>;
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* Required instructions describing what to decide about the shared state.
|
|
286
|
+
*/
|
|
287
|
+
instructions: string | { [key: string]: unknown } | Array<unknown>;
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* Question type.
|
|
291
|
+
*/
|
|
292
|
+
type: 'score';
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
export declare namespace V1 {
|
|
297
|
+
export { type V1SystemoneResponse as V1SystemoneResponse, type V1SystemoneParams as V1SystemoneParams };
|
|
298
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../internal/request-options';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Agentic (bot) signup for Telnyx accounts. An AI agent solves a reverse-CAPTCHA challenge designed to be easy for LLMs and hard for humans, registers an account, and signs in by consuming a magic link emailed to the account owner. All endpoints are public and unauthenticated; signup endpoints are additionally gated by the freemium feature flags and per-country availability.
|
|
9
|
+
*/
|
|
10
|
+
export class BotChallenge extends APIResource {
|
|
11
|
+
/**
|
|
12
|
+
* Generates a reverse-CAPTCHA challenge used to gate the bot signup flow. A random
|
|
13
|
+
* active problem is selected from the pool; math problems are returned obfuscated
|
|
14
|
+
* (case randomization, symbol injection, spacing noise) with an unobfuscated
|
|
15
|
+
* rounding instruction appended, while string and binary problems are returned
|
|
16
|
+
* as-is. The response contains a single-use nonce, the problem text, and the
|
|
17
|
+
* current terms-and-conditions and privacy-policy URLs, which must be echoed back
|
|
18
|
+
* on the signup request. Challenges expire after a short window (10 minutes by
|
|
19
|
+
* default) and can only be answered once. This endpoint is public and
|
|
20
|
+
* unauthenticated.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* const botChallenge = await client.botChallenge.create({
|
|
25
|
+
* llm_model_name: 'claude-opus-4',
|
|
26
|
+
* llm_parameter_count: '175B',
|
|
27
|
+
* llm_quantization: 'int8',
|
|
28
|
+
* });
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
create(
|
|
32
|
+
body: BotChallengeCreateParams | null | undefined = {},
|
|
33
|
+
options?: RequestOptions,
|
|
34
|
+
): APIPromise<BotChallengeCreateResponse> {
|
|
35
|
+
return this._client.post('/v2/bot_challenge', { body, ...options });
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface BotChallengeCreateResponse {
|
|
40
|
+
data: BotChallengeCreateResponse.Data;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export namespace BotChallengeCreateResponse {
|
|
44
|
+
export interface Data {
|
|
45
|
+
/**
|
|
46
|
+
* Type of challenge.
|
|
47
|
+
*/
|
|
48
|
+
challenge_type: 'math' | 'string' | 'binary';
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Single-use challenge identifier. Submit it as `bot_challenge_nonce` on the
|
|
52
|
+
* signup request.
|
|
53
|
+
*/
|
|
54
|
+
nonce: string;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Current privacy-policy URL. Echo this back on the signup request.
|
|
58
|
+
*/
|
|
59
|
+
privacy_policy_url: string;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Problem text to solve. Math problems are obfuscated and end with an unobfuscated
|
|
63
|
+
* rounding instruction; string and binary problems are returned as-is.
|
|
64
|
+
*/
|
|
65
|
+
problem: string;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Current terms-and-conditions URL. Echo this back on the signup request.
|
|
69
|
+
*/
|
|
70
|
+
terms_and_conditions_url: string;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Decimal places expected in the answer. Present only for math challenges.
|
|
74
|
+
*/
|
|
75
|
+
precision?: number;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export interface BotChallengeCreateParams {
|
|
80
|
+
/**
|
|
81
|
+
* Name of the LLM the client is using.
|
|
82
|
+
*/
|
|
83
|
+
llm_model_name?: string;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Parameter count of the client LLM.
|
|
87
|
+
*/
|
|
88
|
+
llm_parameter_count?: string;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Quantization of the client LLM.
|
|
92
|
+
*/
|
|
93
|
+
llm_quantization?: string;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export declare namespace BotChallenge {
|
|
97
|
+
export {
|
|
98
|
+
type BotChallengeCreateResponse as BotChallengeCreateResponse,
|
|
99
|
+
type BotChallengeCreateParams as BotChallengeCreateParams,
|
|
100
|
+
};
|
|
101
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../internal/request-options';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Agentic (bot) signup for Telnyx accounts. An AI agent solves a reverse-CAPTCHA challenge designed to be easy for LLMs and hard for humans, registers an account, and signs in by consuming a magic link emailed to the account owner. All endpoints are public and unauthenticated; signup endpoints are additionally gated by the freemium feature flags and per-country availability.
|
|
9
|
+
*/
|
|
10
|
+
export class BotSessions extends APIResource {
|
|
11
|
+
/**
|
|
12
|
+
* Consumes the one-time portal redirect (magic link) token emailed during bot
|
|
13
|
+
* signup and returns an API session. The token is a UUIDv7 that encodes its
|
|
14
|
+
* creation time; it expires after a configurable validity window (15 minutes by
|
|
15
|
+
* default) and is cleared on first use. Although the action creates a session, the
|
|
16
|
+
* route uses the GET verb because it is opened from an email link. On first use
|
|
17
|
+
* the account is also initialized. For bot signup (freemium) accounts the response
|
|
18
|
+
* is a minimal envelope containing only the `api_v2_token`; accounts that are
|
|
19
|
+
* permitted to use magic links but are not freemium accounts may instead receive
|
|
20
|
+
* an extended session payload when additional steps (such as two-factor
|
|
21
|
+
* authentication or identity verification) are required. This endpoint is public;
|
|
22
|
+
* the magic link token in the query string is the credential.
|
|
23
|
+
*/
|
|
24
|
+
list(query: BotSessionListParams, options?: RequestOptions): APIPromise<BotSessionListResponse> {
|
|
25
|
+
return this._client.get('/v2/bot_sessions', { query, ...options });
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface BotSessionListResponse {
|
|
30
|
+
data: BotSessionListResponse.Data;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export namespace BotSessionListResponse {
|
|
34
|
+
export interface Data {
|
|
35
|
+
/**
|
|
36
|
+
* API v2 session token for the signed-in user. Use it as a bearer token on
|
|
37
|
+
* authenticated endpoints.
|
|
38
|
+
*/
|
|
39
|
+
api_v2_token: string;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface BotSessionListParams {
|
|
44
|
+
/**
|
|
45
|
+
* Email address associated with the magic link token.
|
|
46
|
+
*/
|
|
47
|
+
email: string;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Single-use portal redirect (magic link) token, a UUIDv7 sent to the account
|
|
51
|
+
* owner's email.
|
|
52
|
+
*/
|
|
53
|
+
portal_redirect_token: string;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export declare namespace BotSessions {
|
|
57
|
+
export {
|
|
58
|
+
type BotSessionListResponse as BotSessionListResponse,
|
|
59
|
+
type BotSessionListParams as BotSessionListParams,
|
|
60
|
+
};
|
|
61
|
+
}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../internal/request-options';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Agentic (bot) signup for Telnyx accounts. An AI agent solves a reverse-CAPTCHA challenge designed to be easy for LLMs and hard for humans, registers an account, and signs in by consuming a magic link emailed to the account owner. All endpoints are public and unauthenticated; signup endpoints are additionally gated by the freemium feature flags and per-country availability.
|
|
9
|
+
*/
|
|
10
|
+
export class BotSignup extends APIResource {
|
|
11
|
+
/**
|
|
12
|
+
* Creates a freemium Telnyx account through the agentic signup flow. The request
|
|
13
|
+
* must carry a valid answer to a previously issued bot challenge
|
|
14
|
+
* (`bot_challenge_nonce` and `bot_challenge_answer`), accept the terms of service,
|
|
15
|
+
* and echo the exact terms-and-conditions and privacy-policy URLs returned by the
|
|
16
|
+
* challenge endpoint. When EU consent enforcement is enabled,
|
|
17
|
+
* `terms_of_service_eu` and `terms_and_conditions_eu_url` are also required. On
|
|
18
|
+
* success a one-time sign-in (magic) link is emailed to the address provided; if
|
|
19
|
+
* the email address belongs to an existing account, a sign-in link is sent instead
|
|
20
|
+
* of creating a duplicate account. `email` may only be omitted when
|
|
21
|
+
* placeholder-email registration is enabled server-side. This endpoint is public
|
|
22
|
+
* and unauthenticated, gated by the freemium feature flags and per-country
|
|
23
|
+
* availability, and subject to per-IP and per-domain registration limits.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```ts
|
|
27
|
+
* const successResponse = await client.botSignup.create({
|
|
28
|
+
* bot_challenge_answer: '35',
|
|
29
|
+
* bot_challenge_nonce:
|
|
30
|
+
* 'c6feda4e-6501-4db9-a21f-665e5b4ce2ba',
|
|
31
|
+
* privacy_policy_url: 'https://telnyx.com/privacy-policy',
|
|
32
|
+
* terms_and_conditions_url:
|
|
33
|
+
* 'https://telnyx.com/terms-and-conditions-of-service',
|
|
34
|
+
* terms_of_service: true,
|
|
35
|
+
* email: 'agent-owner@example.com',
|
|
36
|
+
* });
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
create(body: BotSignupCreateParams, options?: RequestOptions): APIPromise<SuccessResponse> {
|
|
40
|
+
return this._client.post('/v2/bot_signup', { body, ...options });
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Resends the one-time sign-in (magic) link for an eligible bot signup account.
|
|
45
|
+
* Eligibility (account exists, was registered through bot signup, is active, and
|
|
46
|
+
* has not exceeded the resend limit or rate window) is evaluated server-side; the
|
|
47
|
+
* response is intentionally uniform and does not reveal whether the account exists
|
|
48
|
+
* or whether a link was actually sent. This endpoint is public and
|
|
49
|
+
* unauthenticated, gated by the freemium feature flags and per-country
|
|
50
|
+
* availability.
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```ts
|
|
54
|
+
* const successResponse =
|
|
55
|
+
* await client.botSignup.resendMagicLink({
|
|
56
|
+
* email: 'agent-owner@example.com',
|
|
57
|
+
* });
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
resendMagicLink(
|
|
61
|
+
body: BotSignupResendMagicLinkParams,
|
|
62
|
+
options?: RequestOptions,
|
|
63
|
+
): APIPromise<SuccessResponse> {
|
|
64
|
+
return this._client.post('/v2/bot_signup/resend_magic_link', { body, ...options });
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Status envelope used by the signup and magic-link flows.
|
|
70
|
+
*/
|
|
71
|
+
export interface SuccessResponse {
|
|
72
|
+
/**
|
|
73
|
+
* Human-readable status message.
|
|
74
|
+
*/
|
|
75
|
+
message: string;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Whether the request was accepted.
|
|
79
|
+
*/
|
|
80
|
+
success: boolean;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export interface BotSignupCreateParams {
|
|
84
|
+
/**
|
|
85
|
+
* Answer to the issued bot challenge.
|
|
86
|
+
*/
|
|
87
|
+
bot_challenge_answer: string;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Nonce from a previously issued bot challenge.
|
|
91
|
+
*/
|
|
92
|
+
bot_challenge_nonce: string;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Must exactly match the privacy-policy URL returned by the challenge endpoint.
|
|
96
|
+
*/
|
|
97
|
+
privacy_policy_url: string;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Must exactly match the terms-and-conditions URL returned by the challenge
|
|
101
|
+
* endpoint.
|
|
102
|
+
*/
|
|
103
|
+
terms_and_conditions_url: string;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Must be true to accept the terms of service.
|
|
107
|
+
*/
|
|
108
|
+
terms_of_service: true;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Email address for the new account. The magic link is sent here. May only be
|
|
112
|
+
* omitted when placeholder-email registration is enabled server-side.
|
|
113
|
+
*/
|
|
114
|
+
email?: string;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* EU terms-and-conditions URL. Required when EU consent enforcement is enabled.
|
|
118
|
+
*/
|
|
119
|
+
terms_and_conditions_eu_url?: string;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* EU terms-of-service acceptance. Required when EU consent enforcement is enabled.
|
|
123
|
+
*/
|
|
124
|
+
terms_of_service_eu?: true;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export interface BotSignupResendMagicLinkParams {
|
|
128
|
+
/**
|
|
129
|
+
* Email address of the bot signup account to resend the magic link to.
|
|
130
|
+
*/
|
|
131
|
+
email: string;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export declare namespace BotSignup {
|
|
135
|
+
export {
|
|
136
|
+
type SuccessResponse as SuccessResponse,
|
|
137
|
+
type BotSignupCreateParams as BotSignupCreateParams,
|
|
138
|
+
type BotSignupResendMagicLinkParams as BotSignupResendMagicLinkParams,
|
|
139
|
+
};
|
|
140
|
+
}
|