telnyx 7.25.0 → 7.27.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 +25 -10
- package/client.d.mts.map +1 -1
- package/client.d.ts +25 -10
- package/client.d.ts.map +1 -1
- package/client.js +15 -0
- package/client.js.map +1 -1
- package/client.mjs +15 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/addresses/addresses.d.mts +22 -2
- package/resources/addresses/addresses.d.mts.map +1 -1
- package/resources/addresses/addresses.d.ts +22 -2
- package/resources/addresses/addresses.d.ts.map +1 -1
- package/resources/addresses/addresses.js +12 -0
- package/resources/addresses/addresses.js.map +1 -1
- package/resources/addresses/addresses.mjs +12 -0
- package/resources/addresses/addresses.mjs.map +1 -1
- package/resources/ai/ai.d.mts +16 -7
- package/resources/ai/ai.d.mts.map +1 -1
- package/resources/ai/ai.d.ts +16 -7
- package/resources/ai/ai.d.ts.map +1 -1
- package/resources/ai/ai.js +4 -0
- package/resources/ai/ai.js.map +1 -1
- package/resources/ai/ai.mjs +4 -0
- package/resources/ai/ai.mjs.map +1 -1
- package/resources/ai/assistants/assistants.d.mts +383 -22
- package/resources/ai/assistants/assistants.d.mts.map +1 -1
- package/resources/ai/assistants/assistants.d.ts +383 -22
- package/resources/ai/assistants/assistants.d.ts.map +1 -1
- package/resources/ai/assistants/assistants.js +4 -1
- package/resources/ai/assistants/assistants.js.map +1 -1
- package/resources/ai/assistants/assistants.mjs +4 -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 +18 -1
- package/resources/ai/assistants/versions.d.mts.map +1 -1
- package/resources/ai/assistants/versions.d.ts +18 -1
- package/resources/ai/assistants/versions.d.ts.map +1 -1
- package/resources/ai/assistants/versions.js +4 -1
- package/resources/ai/assistants/versions.js.map +1 -1
- package/resources/ai/assistants/versions.mjs +4 -1
- package/resources/ai/assistants/versions.mjs.map +1 -1
- package/resources/ai/audio.d.mts +17 -5
- package/resources/ai/audio.d.mts.map +1 -1
- package/resources/ai/audio.d.ts +17 -5
- package/resources/ai/audio.d.ts.map +1 -1
- package/resources/ai/avatars.d.mts +200 -0
- package/resources/ai/avatars.d.mts.map +1 -0
- package/resources/ai/avatars.d.ts +200 -0
- package/resources/ai/avatars.d.ts.map +1 -0
- package/resources/ai/avatars.js +95 -0
- package/resources/ai/avatars.js.map +1 -0
- package/resources/ai/avatars.mjs +91 -0
- package/resources/ai/avatars.mjs.map +1 -0
- package/resources/ai/chat.d.mts +20 -6
- package/resources/ai/chat.d.mts.map +1 -1
- package/resources/ai/chat.d.ts +20 -6
- package/resources/ai/chat.d.ts.map +1 -1
- package/resources/ai/conversations/conversations.d.mts +8 -0
- package/resources/ai/conversations/conversations.d.mts.map +1 -1
- package/resources/ai/conversations/conversations.d.ts +8 -0
- package/resources/ai/conversations/conversations.d.ts.map +1 -1
- package/resources/ai/conversations/conversations.js.map +1 -1
- package/resources/ai/conversations/conversations.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 +1 -0
- package/resources/ai/index.mjs.map +1 -1
- package/resources/ai/memory/namespaces/index.d.mts +1 -1
- package/resources/ai/memory/namespaces/index.d.mts.map +1 -1
- package/resources/ai/memory/namespaces/index.d.ts +1 -1
- package/resources/ai/memory/namespaces/index.d.ts.map +1 -1
- package/resources/ai/memory/namespaces/index.js.map +1 -1
- package/resources/ai/memory/namespaces/index.mjs.map +1 -1
- package/resources/ai/memory/namespaces/namespaces.d.mts +2 -2
- package/resources/ai/memory/namespaces/namespaces.d.mts.map +1 -1
- package/resources/ai/memory/namespaces/namespaces.d.ts +2 -2
- package/resources/ai/memory/namespaces/namespaces.d.ts.map +1 -1
- package/resources/ai/memory/namespaces/namespaces.js.map +1 -1
- package/resources/ai/memory/namespaces/namespaces.mjs.map +1 -1
- package/resources/ai/memory/namespaces/profiles/index.d.mts +1 -1
- package/resources/ai/memory/namespaces/profiles/index.d.mts.map +1 -1
- package/resources/ai/memory/namespaces/profiles/index.d.ts +1 -1
- package/resources/ai/memory/namespaces/profiles/index.d.ts.map +1 -1
- package/resources/ai/memory/namespaces/profiles/index.js.map +1 -1
- package/resources/ai/memory/namespaces/profiles/index.mjs.map +1 -1
- package/resources/ai/memory/namespaces/profiles/profiles.d.mts +54 -1
- package/resources/ai/memory/namespaces/profiles/profiles.d.mts.map +1 -1
- package/resources/ai/memory/namespaces/profiles/profiles.d.ts +54 -1
- package/resources/ai/memory/namespaces/profiles/profiles.d.ts.map +1 -1
- package/resources/ai/memory/namespaces/profiles/profiles.js +31 -0
- package/resources/ai/memory/namespaces/profiles/profiles.js.map +1 -1
- package/resources/ai/memory/namespaces/profiles/profiles.mjs +31 -0
- package/resources/ai/memory/namespaces/profiles/profiles.mjs.map +1 -1
- package/resources/ai/openai/chat.d.mts +20 -6
- package/resources/ai/openai/chat.d.mts.map +1 -1
- package/resources/ai/openai/chat.d.ts +20 -6
- package/resources/ai/openai/chat.d.ts.map +1 -1
- package/resources/ai/tools.d.mts +30 -2
- package/resources/ai/tools.d.mts.map +1 -1
- package/resources/ai/tools.d.ts +30 -2
- package/resources/ai/tools.d.ts.map +1 -1
- package/resources/calls/actions.d.mts +260 -25
- package/resources/calls/actions.d.mts.map +1 -1
- package/resources/calls/actions.d.ts +260 -25
- package/resources/calls/actions.d.ts.map +1 -1
- package/resources/calls/calls.d.mts +24 -14
- package/resources/calls/calls.d.mts.map +1 -1
- package/resources/calls/calls.d.ts +24 -14
- package/resources/calls/calls.d.ts.map +1 -1
- package/resources/calls/calls.js +8 -0
- package/resources/calls/calls.js.map +1 -1
- package/resources/calls/calls.mjs +8 -0
- package/resources/calls/calls.mjs.map +1 -1
- package/resources/calls/index.d.mts +1 -1
- package/resources/calls/index.d.mts.map +1 -1
- package/resources/calls/index.d.ts +1 -1
- package/resources/calls/index.d.ts.map +1 -1
- package/resources/calls/index.js.map +1 -1
- package/resources/calls/index.mjs.map +1 -1
- package/resources/credential-connections/credential-connections.d.mts +38 -8
- package/resources/credential-connections/credential-connections.d.mts.map +1 -1
- package/resources/credential-connections/credential-connections.d.ts +38 -8
- 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/dial-metrics.d.mts +151 -0
- package/resources/dial-metrics.d.mts.map +1 -0
- package/resources/dial-metrics.d.ts +151 -0
- package/resources/dial-metrics.d.ts.map +1 -0
- package/resources/dial-metrics.js +44 -0
- package/resources/dial-metrics.js.map +1 -0
- package/resources/dial-metrics.mjs +40 -0
- package/resources/dial-metrics.mjs.map +1 -0
- package/resources/dir/dir.d.mts +11 -9
- package/resources/dir/dir.d.mts.map +1 -1
- package/resources/dir/dir.d.ts +11 -9
- package/resources/dir/dir.d.ts.map +1 -1
- package/resources/dir/dir.js +1 -2
- package/resources/dir/dir.js.map +1 -1
- package/resources/dir/dir.mjs +1 -2
- package/resources/dir/dir.mjs.map +1 -1
- package/resources/dir/phone-numbers.d.mts +0 -4
- package/resources/dir/phone-numbers.d.mts.map +1 -1
- package/resources/dir/phone-numbers.d.ts +0 -4
- package/resources/dir/phone-numbers.d.ts.map +1 -1
- package/resources/dir/references.d.mts +15 -9
- package/resources/dir/references.d.mts.map +1 -1
- package/resources/dir/references.d.ts +15 -9
- package/resources/dir/references.d.ts.map +1 -1
- package/resources/dir/references.js +15 -9
- package/resources/dir/references.js.map +1 -1
- package/resources/dir/references.mjs +15 -9
- package/resources/dir/references.mjs.map +1 -1
- package/resources/dir/verify-email.d.mts +17 -5
- package/resources/dir/verify-email.d.mts.map +1 -1
- package/resources/dir/verify-email.d.ts +17 -5
- package/resources/dir/verify-email.d.ts.map +1 -1
- package/resources/dir/verify-email.js +17 -5
- package/resources/dir/verify-email.js.map +1 -1
- package/resources/dir/verify-email.mjs +17 -5
- package/resources/dir/verify-email.mjs.map +1 -1
- package/resources/email-domains/email-domains.d.mts +1 -1
- package/resources/email-domains/email-domains.d.mts.map +1 -1
- package/resources/email-domains/email-domains.d.ts +1 -1
- package/resources/email-domains/email-domains.d.ts.map +1 -1
- package/resources/email-templates.d.mts +109 -18
- package/resources/email-templates.d.mts.map +1 -1
- package/resources/email-templates.d.ts +109 -18
- package/resources/email-templates.d.ts.map +1 -1
- package/resources/email-templates.js +5 -1
- package/resources/email-templates.js.map +1 -1
- package/resources/email-templates.mjs +5 -1
- package/resources/email-templates.mjs.map +1 -1
- package/resources/enterprises/dir.d.mts +8 -2
- package/resources/enterprises/dir.d.mts.map +1 -1
- package/resources/enterprises/dir.d.ts +8 -2
- package/resources/enterprises/dir.d.ts.map +1 -1
- package/resources/enterprises/dir.js +8 -2
- package/resources/enterprises/dir.js.map +1 -1
- package/resources/enterprises/dir.mjs +8 -2
- package/resources/enterprises/dir.mjs.map +1 -1
- package/resources/enterprises/enterprises.d.mts +7 -5
- package/resources/enterprises/enterprises.d.mts.map +1 -1
- package/resources/enterprises/enterprises.d.ts +7 -5
- package/resources/enterprises/enterprises.d.ts.map +1 -1
- package/resources/enterprises/enterprises.js +5 -3
- package/resources/enterprises/enterprises.js.map +1 -1
- package/resources/enterprises/enterprises.mjs +5 -3
- package/resources/enterprises/enterprises.mjs.map +1 -1
- package/resources/enterprises/index.d.mts +1 -1
- package/resources/enterprises/index.d.mts.map +1 -1
- package/resources/enterprises/index.d.ts +1 -1
- package/resources/enterprises/index.d.ts.map +1 -1
- package/resources/enterprises/index.js.map +1 -1
- package/resources/enterprises/index.mjs.map +1 -1
- package/resources/enterprises/reputation/external-verification.d.mts +94 -0
- package/resources/enterprises/reputation/external-verification.d.mts.map +1 -0
- package/resources/enterprises/reputation/external-verification.d.ts +94 -0
- package/resources/enterprises/reputation/external-verification.d.ts.map +1 -0
- package/resources/enterprises/reputation/external-verification.js +54 -0
- package/resources/enterprises/reputation/external-verification.js.map +1 -0
- package/resources/enterprises/reputation/external-verification.mjs +50 -0
- package/resources/enterprises/reputation/external-verification.mjs.map +1 -0
- package/resources/enterprises/reputation/index.d.mts +3 -2
- package/resources/enterprises/reputation/index.d.mts.map +1 -1
- package/resources/enterprises/reputation/index.d.ts +3 -2
- package/resources/enterprises/reputation/index.d.ts.map +1 -1
- package/resources/enterprises/reputation/index.js +3 -1
- package/resources/enterprises/reputation/index.js.map +1 -1
- package/resources/enterprises/reputation/index.mjs +1 -0
- package/resources/enterprises/reputation/index.mjs.map +1 -1
- package/resources/enterprises/reputation/loa.d.mts +3 -2
- package/resources/enterprises/reputation/loa.d.mts.map +1 -1
- package/resources/enterprises/reputation/loa.d.ts +3 -2
- package/resources/enterprises/reputation/loa.d.ts.map +1 -1
- package/resources/enterprises/reputation/numbers.d.mts +197 -4
- package/resources/enterprises/reputation/numbers.d.mts.map +1 -1
- package/resources/enterprises/reputation/numbers.d.ts +197 -4
- package/resources/enterprises/reputation/numbers.d.ts.map +1 -1
- package/resources/enterprises/reputation/numbers.js +58 -2
- package/resources/enterprises/reputation/numbers.js.map +1 -1
- package/resources/enterprises/reputation/numbers.mjs +58 -2
- package/resources/enterprises/reputation/numbers.mjs.map +1 -1
- package/resources/enterprises/reputation/remediation.d.mts +3 -2
- package/resources/enterprises/reputation/remediation.d.mts.map +1 -1
- package/resources/enterprises/reputation/remediation.d.ts +3 -2
- package/resources/enterprises/reputation/remediation.d.ts.map +1 -1
- package/resources/enterprises/reputation/reputation.d.mts +39 -3
- package/resources/enterprises/reputation/reputation.d.mts.map +1 -1
- package/resources/enterprises/reputation/reputation.d.ts +39 -3
- package/resources/enterprises/reputation/reputation.d.ts.map +1 -1
- package/resources/enterprises/reputation/reputation.js +22 -0
- package/resources/enterprises/reputation/reputation.js.map +1 -1
- package/resources/enterprises/reputation/reputation.mjs +22 -0
- package/resources/enterprises/reputation/reputation.mjs.map +1 -1
- package/resources/enterprises/verify-email.d.mts +1 -1
- package/resources/enterprises/verify-email.d.ts +1 -1
- package/resources/enterprises/verify-email.js +1 -1
- package/resources/enterprises/verify-email.mjs +1 -1
- package/resources/fqdn-connections/fqdn-connections.d.mts +38 -8
- package/resources/fqdn-connections/fqdn-connections.d.mts.map +1 -1
- package/resources/fqdn-connections/fqdn-connections.d.ts +38 -8
- 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/global-ip-assignment-health.d.mts +4 -4
- package/resources/global-ip-assignment-health.d.mts.map +1 -1
- package/resources/global-ip-assignment-health.d.ts +4 -4
- package/resources/global-ip-assignment-health.d.ts.map +1 -1
- package/resources/global-ip-assignments-usage.d.mts +4 -4
- package/resources/global-ip-assignments-usage.d.mts.map +1 -1
- package/resources/global-ip-assignments-usage.d.ts +4 -4
- package/resources/global-ip-assignments-usage.d.ts.map +1 -1
- package/resources/index.d.mts +8 -5
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +8 -5
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +10 -4
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +3 -0
- package/resources/index.mjs.map +1 -1
- package/resources/ip-connections.d.mts +36 -6
- package/resources/ip-connections.d.mts.map +1 -1
- package/resources/ip-connections.d.ts +36 -6
- package/resources/ip-connections.d.ts.map +1 -1
- package/resources/llm-token-gateway/index.d.mts +4 -1
- package/resources/llm-token-gateway/index.d.mts.map +1 -1
- package/resources/llm-token-gateway/index.d.ts +4 -1
- package/resources/llm-token-gateway/index.d.ts.map +1 -1
- package/resources/llm-token-gateway/index.js +7 -1
- package/resources/llm-token-gateway/index.js.map +1 -1
- package/resources/llm-token-gateway/index.mjs +4 -1
- package/resources/llm-token-gateway/index.mjs.map +1 -1
- package/resources/llm-token-gateway/llm-token-gateway.d.mts +14 -2
- package/resources/llm-token-gateway/llm-token-gateway.d.mts.map +1 -1
- package/resources/llm-token-gateway/llm-token-gateway.d.ts +14 -2
- package/resources/llm-token-gateway/llm-token-gateway.d.ts.map +1 -1
- package/resources/llm-token-gateway/llm-token-gateway.js +12 -0
- package/resources/llm-token-gateway/llm-token-gateway.js.map +1 -1
- package/resources/llm-token-gateway/llm-token-gateway.mjs +13 -1
- package/resources/llm-token-gateway/llm-token-gateway.mjs.map +1 -1
- package/resources/llm-token-gateway/spend.d.mts +223 -0
- package/resources/llm-token-gateway/spend.d.mts.map +1 -0
- package/resources/llm-token-gateway/spend.d.ts +223 -0
- package/resources/llm-token-gateway/spend.d.ts.map +1 -0
- package/resources/llm-token-gateway/spend.js +56 -0
- package/resources/llm-token-gateway/spend.js.map +1 -0
- package/resources/llm-token-gateway/spend.mjs +52 -0
- package/resources/llm-token-gateway/spend.mjs.map +1 -0
- package/resources/llm-token-gateway/token-groups.d.mts +577 -0
- package/resources/llm-token-gateway/token-groups.d.mts.map +1 -0
- package/resources/llm-token-gateway/token-groups.d.ts +577 -0
- package/resources/llm-token-gateway/token-groups.d.ts.map +1 -0
- package/resources/llm-token-gateway/token-groups.js +139 -0
- package/resources/llm-token-gateway/token-groups.js.map +1 -0
- package/resources/llm-token-gateway/token-groups.mjs +135 -0
- package/resources/llm-token-gateway/token-groups.mjs.map +1 -0
- package/resources/llm-token-gateway/token-keys.d.mts +318 -0
- package/resources/llm-token-gateway/token-keys.d.mts.map +1 -0
- package/resources/llm-token-gateway/token-keys.d.ts +318 -0
- package/resources/llm-token-gateway/token-keys.d.ts.map +1 -0
- package/resources/llm-token-gateway/token-keys.js +127 -0
- package/resources/llm-token-gateway/token-keys.js.map +1 -0
- package/resources/llm-token-gateway/token-keys.mjs +123 -0
- package/resources/llm-token-gateway/token-keys.mjs.map +1 -0
- package/resources/llm-token-gateway/usage.d.mts +205 -146
- package/resources/llm-token-gateway/usage.d.mts.map +1 -1
- package/resources/llm-token-gateway/usage.d.ts +205 -146
- package/resources/llm-token-gateway/usage.d.ts.map +1 -1
- package/resources/llm-token-gateway/usage.js +47 -15
- package/resources/llm-token-gateway/usage.js.map +1 -1
- package/resources/llm-token-gateway/usage.mjs +47 -15
- package/resources/llm-token-gateway/usage.mjs.map +1 -1
- package/resources/meeting-sessions/actions.d.mts +13 -7
- package/resources/meeting-sessions/actions.d.mts.map +1 -1
- package/resources/meeting-sessions/actions.d.ts +13 -7
- package/resources/meeting-sessions/actions.d.ts.map +1 -1
- package/resources/meeting-sessions/actions.js +13 -7
- package/resources/meeting-sessions/actions.js.map +1 -1
- package/resources/meeting-sessions/actions.mjs +13 -7
- package/resources/meeting-sessions/actions.mjs.map +1 -1
- package/resources/meeting-sessions/index.d.mts +1 -1
- package/resources/meeting-sessions/index.d.mts.map +1 -1
- package/resources/meeting-sessions/index.d.ts +1 -1
- package/resources/meeting-sessions/index.d.ts.map +1 -1
- package/resources/meeting-sessions/index.js.map +1 -1
- package/resources/meeting-sessions/index.mjs.map +1 -1
- package/resources/meeting-sessions/meeting-sessions.d.mts +46 -65
- package/resources/meeting-sessions/meeting-sessions.d.mts.map +1 -1
- package/resources/meeting-sessions/meeting-sessions.d.ts +46 -65
- package/resources/meeting-sessions/meeting-sessions.d.ts.map +1 -1
- package/resources/meeting-sessions/meeting-sessions.js +14 -23
- package/resources/meeting-sessions/meeting-sessions.js.map +1 -1
- package/resources/meeting-sessions/meeting-sessions.mjs +14 -23
- package/resources/meeting-sessions/meeting-sessions.mjs.map +1 -1
- package/resources/messages/messages.d.mts +581 -118
- package/resources/messages/messages.d.mts.map +1 -1
- package/resources/messages/messages.d.ts +581 -118
- package/resources/messages/messages.d.ts.map +1 -1
- package/resources/messages/messages.js +71 -14
- package/resources/messages/messages.js.map +1 -1
- package/resources/messages/messages.mjs +71 -14
- package/resources/messages/messages.mjs.map +1 -1
- package/resources/messages/rcs.d.mts +26 -6
- package/resources/messages/rcs.d.mts.map +1 -1
- package/resources/messages/rcs.d.ts +26 -6
- package/resources/messages/rcs.d.ts.map +1 -1
- package/resources/messages/rcs.js +11 -2
- package/resources/messages/rcs.js.map +1 -1
- package/resources/messages/rcs.mjs +11 -2
- package/resources/messages/rcs.mjs.map +1 -1
- package/resources/phone-numbers/csv-downloads.d.mts +9 -0
- package/resources/phone-numbers/csv-downloads.d.mts.map +1 -1
- package/resources/phone-numbers/csv-downloads.d.ts +9 -0
- package/resources/phone-numbers/csv-downloads.d.ts.map +1 -1
- package/resources/phone-numbers/csv-downloads.js +5 -2
- package/resources/phone-numbers/csv-downloads.js.map +1 -1
- package/resources/phone-numbers/csv-downloads.mjs +5 -2
- package/resources/phone-numbers/csv-downloads.mjs.map +1 -1
- package/resources/phone-numbers/index.d.mts +2 -2
- package/resources/phone-numbers/index.d.mts.map +1 -1
- package/resources/phone-numbers/index.d.ts +2 -2
- package/resources/phone-numbers/index.d.ts.map +1 -1
- package/resources/phone-numbers/index.js.map +1 -1
- package/resources/phone-numbers/index.mjs.map +1 -1
- package/resources/phone-numbers/jobs.d.mts +277 -14
- package/resources/phone-numbers/jobs.d.mts.map +1 -1
- package/resources/phone-numbers/jobs.d.ts +277 -14
- package/resources/phone-numbers/jobs.d.ts.map +1 -1
- package/resources/phone-numbers/jobs.js +5 -4
- package/resources/phone-numbers/jobs.js.map +1 -1
- package/resources/phone-numbers/jobs.mjs +5 -4
- package/resources/phone-numbers/jobs.mjs.map +1 -1
- package/resources/phone-numbers/phone-numbers.d.mts +28 -3
- package/resources/phone-numbers/phone-numbers.d.mts.map +1 -1
- package/resources/phone-numbers/phone-numbers.d.ts +28 -3
- package/resources/phone-numbers/phone-numbers.d.ts.map +1 -1
- package/resources/phone-numbers/phone-numbers.js.map +1 -1
- package/resources/phone-numbers/phone-numbers.mjs.map +1 -1
- package/resources/porting-orders/phone-number-blocks.d.mts +1 -1
- package/resources/porting-orders/phone-number-blocks.d.mts.map +1 -1
- package/resources/porting-orders/phone-number-blocks.d.ts +1 -1
- package/resources/porting-orders/phone-number-blocks.d.ts.map +1 -1
- package/resources/porting-orders/porting-orders.d.mts +1 -1
- package/resources/porting-orders/porting-orders.d.mts.map +1 -1
- package/resources/porting-orders/porting-orders.d.ts +1 -1
- package/resources/porting-orders/porting-orders.d.ts.map +1 -1
- package/resources/porting-orders/porting-orders.js.map +1 -1
- package/resources/porting-orders/porting-orders.mjs.map +1 -1
- package/resources/porting-phone-numbers.d.mts +1 -1
- package/resources/porting-phone-numbers.d.mts.map +1 -1
- package/resources/porting-phone-numbers.d.ts +1 -1
- package/resources/porting-phone-numbers.d.ts.map +1 -1
- package/resources/reputation/numbers.d.mts +10 -0
- package/resources/reputation/numbers.d.mts.map +1 -1
- package/resources/reputation/numbers.d.ts +10 -0
- package/resources/reputation/numbers.d.ts.map +1 -1
- package/resources/shared.d.mts +4 -0
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +4 -0
- package/resources/shared.d.ts.map +1 -1
- package/resources/sip-registration-status.d.mts +149 -0
- package/resources/sip-registration-status.d.mts.map +1 -0
- package/resources/sip-registration-status.d.ts +149 -0
- package/resources/sip-registration-status.d.ts.map +1 -0
- package/resources/sip-registration-status.js +32 -0
- package/resources/sip-registration-status.js.map +1 -0
- package/resources/sip-registration-status.mjs +28 -0
- package/resources/sip-registration-status.mjs.map +1 -0
- package/resources/speech-to-text/speech-to-text.d.mts +12 -5
- package/resources/speech-to-text/speech-to-text.d.mts.map +1 -1
- package/resources/speech-to-text/speech-to-text.d.ts +12 -5
- package/resources/speech-to-text/speech-to-text.d.ts.map +1 -1
- package/resources/telephony-credentials.d.mts +11 -2
- package/resources/telephony-credentials.d.mts.map +1 -1
- package/resources/telephony-credentials.d.ts +11 -2
- package/resources/telephony-credentials.d.ts.map +1 -1
- package/resources/telephony-credentials.js +9 -2
- package/resources/telephony-credentials.js.map +1 -1
- package/resources/telephony-credentials.mjs +9 -2
- package/resources/telephony-credentials.mjs.map +1 -1
- package/resources/texml/accounts/accounts.d.mts +2 -2
- package/resources/texml/accounts/accounts.d.ts +2 -2
- package/resources/texml/accounts/accounts.js +2 -2
- package/resources/texml/accounts/accounts.mjs +2 -2
- package/resources/texml/accounts/calls/calls.d.mts +49 -14
- package/resources/texml/accounts/calls/calls.d.mts.map +1 -1
- package/resources/texml/accounts/calls/calls.d.ts +49 -14
- package/resources/texml/accounts/calls/calls.d.ts.map +1 -1
- package/resources/texml/accounts/calls/calls.js +7 -7
- package/resources/texml/accounts/calls/calls.js.map +1 -1
- package/resources/texml/accounts/calls/calls.mjs +7 -7
- package/resources/texml/accounts/calls/calls.mjs.map +1 -1
- package/resources/texml/accounts/calls/recordings-json.d.mts +14 -4
- package/resources/texml/accounts/calls/recordings-json.d.mts.map +1 -1
- package/resources/texml/accounts/calls/recordings-json.d.ts +14 -4
- package/resources/texml/accounts/calls/recordings-json.d.ts.map +1 -1
- package/resources/texml/accounts/calls/recordings-json.js +2 -2
- package/resources/texml/accounts/calls/recordings-json.mjs +2 -2
- package/resources/texml/accounts/calls/recordings.d.mts +10 -2
- package/resources/texml/accounts/calls/recordings.d.mts.map +1 -1
- package/resources/texml/accounts/calls/recordings.d.ts +10 -2
- package/resources/texml/accounts/calls/recordings.d.ts.map +1 -1
- package/resources/texml/accounts/calls/recordings.js +4 -1
- package/resources/texml/accounts/calls/recordings.js.map +1 -1
- package/resources/texml/accounts/calls/recordings.mjs +4 -1
- package/resources/texml/accounts/calls/recordings.mjs.map +1 -1
- package/resources/texml/accounts/calls/siprec.d.mts +10 -2
- package/resources/texml/accounts/calls/siprec.d.mts.map +1 -1
- package/resources/texml/accounts/calls/siprec.d.ts +10 -2
- package/resources/texml/accounts/calls/siprec.d.ts.map +1 -1
- package/resources/texml/accounts/calls/siprec.js +4 -1
- package/resources/texml/accounts/calls/siprec.js.map +1 -1
- package/resources/texml/accounts/calls/siprec.mjs +4 -1
- package/resources/texml/accounts/calls/siprec.mjs.map +1 -1
- package/resources/texml/accounts/calls/streams.d.mts +10 -2
- package/resources/texml/accounts/calls/streams.d.mts.map +1 -1
- package/resources/texml/accounts/calls/streams.d.ts +10 -2
- package/resources/texml/accounts/calls/streams.d.ts.map +1 -1
- package/resources/texml/accounts/calls/streams.js +4 -1
- package/resources/texml/accounts/calls/streams.js.map +1 -1
- package/resources/texml/accounts/calls/streams.mjs +4 -1
- package/resources/texml/accounts/calls/streams.mjs.map +1 -1
- package/resources/texml/accounts/conferences/conferences.d.mts +29 -9
- package/resources/texml/accounts/conferences/conferences.d.mts.map +1 -1
- package/resources/texml/accounts/conferences/conferences.d.ts +29 -9
- package/resources/texml/accounts/conferences/conferences.d.ts.map +1 -1
- package/resources/texml/accounts/conferences/conferences.js +5 -5
- package/resources/texml/accounts/conferences/conferences.js.map +1 -1
- package/resources/texml/accounts/conferences/conferences.mjs +5 -5
- package/resources/texml/accounts/conferences/conferences.mjs.map +1 -1
- package/resources/texml/accounts/conferences/participants.d.mts +35 -10
- package/resources/texml/accounts/conferences/participants.d.mts.map +1 -1
- package/resources/texml/accounts/conferences/participants.d.ts +35 -10
- package/resources/texml/accounts/conferences/participants.d.ts.map +1 -1
- package/resources/texml/accounts/conferences/participants.js +5 -5
- package/resources/texml/accounts/conferences/participants.mjs +5 -5
- package/resources/texml/accounts/queues.d.mts +25 -8
- package/resources/texml/accounts/queues.d.mts.map +1 -1
- package/resources/texml/accounts/queues.d.ts +25 -8
- package/resources/texml/accounts/queues.d.ts.map +1 -1
- package/resources/texml/accounts/queues.js +7 -5
- package/resources/texml/accounts/queues.js.map +1 -1
- package/resources/texml/accounts/queues.mjs +7 -5
- package/resources/texml/accounts/queues.mjs.map +1 -1
- package/resources/texml/accounts/recordings/json.d.mts +14 -4
- package/resources/texml/accounts/recordings/json.d.mts.map +1 -1
- package/resources/texml/accounts/recordings/json.d.ts +14 -4
- package/resources/texml/accounts/recordings/json.d.ts.map +1 -1
- package/resources/texml/accounts/recordings/json.js +2 -2
- package/resources/texml/accounts/recordings/json.mjs +2 -2
- package/resources/texml/accounts/transcriptions/json.d.mts +14 -4
- package/resources/texml/accounts/transcriptions/json.d.mts.map +1 -1
- package/resources/texml/accounts/transcriptions/json.d.ts +14 -4
- package/resources/texml/accounts/transcriptions/json.d.ts.map +1 -1
- package/resources/texml/accounts/transcriptions/json.js +2 -2
- package/resources/texml/accounts/transcriptions/json.mjs +2 -2
- package/resources/texml/texml.d.mts +7 -3
- package/resources/texml/texml.d.mts.map +1 -1
- package/resources/texml/texml.d.ts +7 -3
- package/resources/texml/texml.d.ts.map +1 -1
- package/resources/texml/texml.js +4 -2
- package/resources/texml/texml.js.map +1 -1
- package/resources/texml/texml.mjs +4 -2
- package/resources/texml/texml.mjs.map +1 -1
- package/resources/text-to-speech/text-to-speech.d.mts +15 -6
- package/resources/text-to-speech/text-to-speech.d.mts.map +1 -1
- package/resources/text-to-speech/text-to-speech.d.ts +15 -6
- package/resources/text-to-speech/text-to-speech.d.ts.map +1 -1
- package/resources/tts-integrations/actions.d.mts +4 -0
- package/resources/tts-integrations/actions.d.mts.map +1 -0
- package/resources/tts-integrations/actions.d.ts +4 -0
- package/resources/tts-integrations/actions.d.ts.map +1 -0
- package/resources/tts-integrations/actions.js +9 -0
- package/resources/tts-integrations/actions.js.map +1 -0
- package/resources/tts-integrations/actions.mjs +5 -0
- package/resources/tts-integrations/actions.mjs.map +1 -0
- package/resources/tts-integrations/index.d.mts +3 -0
- package/resources/tts-integrations/index.d.mts.map +1 -0
- package/resources/tts-integrations/index.d.ts +3 -0
- package/resources/tts-integrations/index.d.ts.map +1 -0
- package/resources/tts-integrations/index.js +9 -0
- package/resources/tts-integrations/index.js.map +1 -0
- package/resources/tts-integrations/index.mjs +4 -0
- package/resources/tts-integrations/index.mjs.map +1 -0
- package/resources/tts-integrations/tts-integrations.d.mts +10 -0
- package/resources/tts-integrations/tts-integrations.d.mts.map +1 -0
- package/resources/tts-integrations/tts-integrations.d.ts +10 -0
- package/resources/tts-integrations/tts-integrations.d.ts.map +1 -0
- package/resources/tts-integrations/tts-integrations.js +17 -0
- package/resources/tts-integrations/tts-integrations.js.map +1 -0
- package/resources/tts-integrations/tts-integrations.mjs +12 -0
- package/resources/tts-integrations/tts-integrations.mjs.map +1 -0
- package/resources/tts-integrations.d.mts +2 -0
- package/resources/tts-integrations.d.mts.map +1 -0
- package/resources/tts-integrations.d.ts +2 -0
- package/resources/tts-integrations.d.ts.map +1 -0
- package/resources/tts-integrations.js +6 -0
- package/resources/tts-integrations.js.map +1 -0
- package/resources/tts-integrations.mjs +3 -0
- package/resources/tts-integrations.mjs.map +1 -0
- package/resources/uac-connections/uac-connections.d.mts +36 -6
- package/resources/uac-connections/uac-connections.d.mts.map +1 -1
- package/resources/uac-connections/uac-connections.d.ts +36 -6
- 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 +57 -10
- package/resources/voice-clones.d.mts.map +1 -1
- package/resources/voice-clones.d.ts +57 -10
- package/resources/voice-clones.d.ts.map +1 -1
- package/resources/voice-clones.js +6 -4
- package/resources/voice-clones.js.map +1 -1
- package/resources/voice-clones.mjs +6 -4
- package/resources/voice-clones.mjs.map +1 -1
- package/resources/webhooks.d.mts +986 -71
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +986 -71
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs.map +1 -1
- package/resources/whatsapp/hosted-signups.d.mts +165 -0
- package/resources/whatsapp/hosted-signups.d.mts.map +1 -0
- package/resources/whatsapp/hosted-signups.d.ts +165 -0
- package/resources/whatsapp/hosted-signups.d.ts.map +1 -0
- package/resources/whatsapp/hosted-signups.js +56 -0
- package/resources/whatsapp/hosted-signups.js.map +1 -0
- package/resources/whatsapp/hosted-signups.mjs +52 -0
- package/resources/whatsapp/hosted-signups.mjs.map +1 -0
- package/resources/whatsapp/index.d.mts +2 -0
- package/resources/whatsapp/index.d.mts.map +1 -1
- package/resources/whatsapp/index.d.ts +2 -0
- package/resources/whatsapp/index.d.ts.map +1 -1
- package/resources/whatsapp/index.js +5 -1
- package/resources/whatsapp/index.js.map +1 -1
- package/resources/whatsapp/index.mjs +2 -0
- package/resources/whatsapp/index.mjs.map +1 -1
- package/resources/whatsapp/phone-numbers/calling-routing.d.mts +6 -5
- package/resources/whatsapp/phone-numbers/calling-routing.d.mts.map +1 -1
- package/resources/whatsapp/phone-numbers/calling-routing.d.ts +6 -5
- package/resources/whatsapp/phone-numbers/calling-routing.d.ts.map +1 -1
- package/resources/whatsapp/phone-numbers/calling-routing.js +6 -5
- package/resources/whatsapp/phone-numbers/calling-routing.js.map +1 -1
- package/resources/whatsapp/phone-numbers/calling-routing.mjs +6 -5
- package/resources/whatsapp/phone-numbers/calling-routing.mjs.map +1 -1
- package/resources/whatsapp/signup.d.mts +128 -0
- package/resources/whatsapp/signup.d.mts.map +1 -0
- package/resources/whatsapp/signup.d.ts +128 -0
- package/resources/whatsapp/signup.d.ts.map +1 -0
- package/resources/whatsapp/signup.js +42 -0
- package/resources/whatsapp/signup.js.map +1 -0
- package/resources/whatsapp/signup.mjs +38 -0
- package/resources/whatsapp/signup.mjs.map +1 -0
- package/resources/whatsapp/whatsapp.d.mts +8 -0
- package/resources/whatsapp/whatsapp.d.mts.map +1 -1
- package/resources/whatsapp/whatsapp.d.ts +8 -0
- package/resources/whatsapp/whatsapp.d.ts.map +1 -1
- package/resources/whatsapp/whatsapp.js +8 -0
- package/resources/whatsapp/whatsapp.js.map +1 -1
- package/resources/whatsapp/whatsapp.mjs +8 -0
- package/resources/whatsapp/whatsapp.mjs.map +1 -1
- package/src/client.ts +57 -4
- package/src/resources/addresses/addresses.ts +22 -2
- package/src/resources/ai/ai.ts +40 -3
- package/src/resources/ai/assistants/assistants.ts +455 -20
- package/src/resources/ai/assistants/index.ts +2 -0
- package/src/resources/ai/assistants/versions.ts +20 -1
- package/src/resources/ai/audio.ts +18 -5
- package/src/resources/ai/avatars.ts +252 -0
- package/src/resources/ai/chat.ts +20 -6
- package/src/resources/ai/conversations/conversations.ts +9 -0
- package/src/resources/ai/index.ts +14 -0
- package/src/resources/ai/memory/namespaces/index.ts +2 -0
- package/src/resources/ai/memory/namespaces/namespaces.ts +4 -0
- package/src/resources/ai/memory/namespaces/profiles/index.ts +2 -0
- package/src/resources/ai/memory/namespaces/profiles/profiles.ts +71 -0
- package/src/resources/ai/openai/chat.ts +20 -6
- package/src/resources/ai/tools.ts +35 -1
- package/src/resources/calls/actions.ts +346 -20
- package/src/resources/calls/calls.ts +26 -8
- package/src/resources/calls/index.ts +2 -0
- package/src/resources/credential-connections/credential-connections.ts +41 -8
- package/src/resources/dial-metrics.ts +185 -0
- package/src/resources/dir/dir.ts +13 -8
- package/src/resources/dir/phone-numbers.ts +1 -6
- package/src/resources/dir/references.ts +15 -9
- package/src/resources/dir/verify-email.ts +17 -5
- package/src/resources/email-domains/email-domains.ts +1 -1
- package/src/resources/email-templates.ts +121 -19
- package/src/resources/enterprises/dir.ts +8 -2
- package/src/resources/enterprises/enterprises.ts +7 -3
- package/src/resources/enterprises/index.ts +1 -0
- package/src/resources/enterprises/reputation/external-verification.ts +125 -0
- package/src/resources/enterprises/reputation/index.ts +12 -0
- package/src/resources/enterprises/reputation/loa.ts +3 -2
- package/src/resources/enterprises/reputation/numbers.ts +256 -3
- package/src/resources/enterprises/reputation/remediation.ts +3 -2
- package/src/resources/enterprises/reputation/reputation.ts +70 -0
- package/src/resources/enterprises/verify-email.ts +1 -1
- package/src/resources/fqdn-connections/fqdn-connections.ts +41 -8
- package/src/resources/global-ip-assignment-health.ts +4 -4
- package/src/resources/global-ip-assignments-usage.ts +4 -4
- package/src/resources/index.ts +21 -2
- package/src/resources/ip-connections.ts +39 -6
- package/src/resources/llm-token-gateway/index.ts +38 -1
- package/src/resources/llm-token-gateway/llm-token-gateway.ts +83 -1
- package/src/resources/llm-token-gateway/spend.ts +309 -0
- package/src/resources/llm-token-gateway/token-groups.ts +724 -0
- package/src/resources/llm-token-gateway/token-keys.ts +422 -0
- package/src/resources/llm-token-gateway/usage.ts +273 -149
- package/src/resources/meeting-sessions/actions.ts +13 -7
- package/src/resources/meeting-sessions/index.ts +0 -1
- package/src/resources/meeting-sessions/meeting-sessions.ts +48 -79
- package/src/resources/messages/messages.ts +786 -125
- package/src/resources/messages/rcs.ts +37 -7
- package/src/resources/phone-numbers/csv-downloads.ts +15 -2
- package/src/resources/phone-numbers/index.ts +3 -1
- package/src/resources/phone-numbers/jobs.ts +332 -15
- package/src/resources/phone-numbers/phone-numbers.ts +38 -2
- package/src/resources/porting-orders/phone-number-blocks.ts +1 -0
- package/src/resources/porting-orders/porting-orders.ts +1 -0
- package/src/resources/porting-phone-numbers.ts +1 -0
- package/src/resources/reputation/numbers.ts +12 -0
- package/src/resources/shared.ts +5 -0
- package/src/resources/sip-registration-status.ts +188 -0
- package/src/resources/speech-to-text/speech-to-text.ts +12 -4
- package/src/resources/telephony-credentials.ts +24 -2
- package/src/resources/texml/accounts/accounts.ts +2 -2
- package/src/resources/texml/accounts/calls/calls.ts +49 -14
- package/src/resources/texml/accounts/calls/recordings-json.ts +14 -4
- package/src/resources/texml/accounts/calls/recordings.ts +10 -2
- package/src/resources/texml/accounts/calls/siprec.ts +10 -2
- package/src/resources/texml/accounts/calls/streams.ts +10 -2
- package/src/resources/texml/accounts/conferences/conferences.ts +29 -9
- package/src/resources/texml/accounts/conferences/participants.ts +35 -10
- package/src/resources/texml/accounts/queues.ts +25 -8
- package/src/resources/texml/accounts/recordings/json.ts +14 -4
- package/src/resources/texml/accounts/transcriptions/json.ts +14 -4
- package/src/resources/texml/texml.ts +7 -3
- package/src/resources/text-to-speech/text-to-speech.ts +15 -6
- package/src/resources/tts-integrations/actions.ts +5 -0
- package/src/resources/tts-integrations/index.ts +4 -0
- package/src/resources/tts-integrations/tts-integrations.ts +15 -0
- package/src/resources/tts-integrations.ts +3 -0
- package/src/resources/uac-connections/uac-connections.ts +39 -6
- package/src/resources/voice-clones.ts +65 -9
- package/src/resources/webhooks.ts +1257 -96
- package/src/resources/whatsapp/hosted-signups.ts +221 -0
- package/src/resources/whatsapp/index.ts +16 -0
- package/src/resources/whatsapp/phone-numbers/calling-routing.ts +6 -5
- package/src/resources/whatsapp/signup.ts +188 -0
- package/src/resources/whatsapp/whatsapp.ts +40 -0
- 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
package/resources/ai/audio.d.ts
CHANGED
|
@@ -105,9 +105,17 @@ export declare namespace AudioTranscribeResponse {
|
|
|
105
105
|
* Text content of the segment.
|
|
106
106
|
*/
|
|
107
107
|
text: string;
|
|
108
|
+
/**
|
|
109
|
+
* Zero-indexed audio channel of this segment. Returned by the `deepgram/*` models
|
|
110
|
+
* when `multichannel` is enabled via `model_config` and the file has more than one
|
|
111
|
+
* channel. Segments from all channels are merged in one list ordered by start
|
|
112
|
+
* time.
|
|
113
|
+
*/
|
|
114
|
+
channel?: number;
|
|
108
115
|
/**
|
|
109
116
|
* Speaker indices heard in this segment. Returned by the `deepgram/*` models when
|
|
110
|
-
* `diarize` is enabled via `model_config`.
|
|
117
|
+
* `diarize` is enabled via `model_config`. With `multichannel`, speakers are
|
|
118
|
+
* numbered per channel from 0, so identify a speaker by (`channel`, speaker).
|
|
111
119
|
*/
|
|
112
120
|
speakers?: Array<number>;
|
|
113
121
|
/**
|
|
@@ -158,10 +166,14 @@ export interface AudioTranscribeParams {
|
|
|
158
166
|
language?: string;
|
|
159
167
|
/**
|
|
160
168
|
* Additional model-specific configuration parameters. Only allowed with the
|
|
161
|
-
* `deepgram/*` models.
|
|
162
|
-
*
|
|
163
|
-
*
|
|
164
|
-
*
|
|
169
|
+
* `deepgram/*` models. Sent as a JSON string in multipart requests and passed
|
|
170
|
+
* through to Deepgram as query parameters. Any other model with `model_config`
|
|
171
|
+
* returns 422. Can include Deepgram-specific options such as `smart_format`,
|
|
172
|
+
* `punctuate`, `diarize` (speaker labels), `multichannel` (transcribe each channel
|
|
173
|
+
* independently; billed duration is file duration multiplied by the number of
|
|
174
|
+
* channels), `utterances`, `numerals`, and `language`. If `language` is provided
|
|
175
|
+
* both as a top-level parameter and in `model_config`, the top-level parameter
|
|
176
|
+
* takes precedence.
|
|
165
177
|
*/
|
|
166
178
|
model_config?: {
|
|
167
179
|
[key: string]: unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audio.d.ts","sourceRoot":"","sources":["../../src/resources/ai/audio.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,QAAQ,mBAAgB;AACpC,OAAO,EAAE,UAAU,EAAE,kCAA+B;AACpD,OAAO,EAAE,KAAK,UAAU,EAAE,8BAA2B;AACrD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAGhE,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;;;OAWG;IACH,UAAU,CAAC,IAAI,EAAE,qBAAqB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC;CAMvG;AAED;;;GAGG;AACH,MAAM,WAAW,8BAA8B;IAC7C;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAA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AAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IAE1C;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,GAAG,cAAc,CAAC;IAE1C;;;;OAIG;IACH,2BAA2B,CAAC,EAAE,SAAS,CAAC;CACzC;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,qBAAqB,IAAI,qBAAqB,GACpD,CAAC;CACH"}
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../../core/api-promise.mjs";
|
|
3
|
+
import { DefaultFlatPagination, type DefaultFlatPaginationParams, PagePromise } from "../../core/pagination.mjs";
|
|
4
|
+
import { type Uploadable } from "../../core/uploads.mjs";
|
|
5
|
+
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
6
|
+
/**
|
|
7
|
+
* Create and manage real-time AI avatars
|
|
8
|
+
*/
|
|
9
|
+
export declare class Avatars extends APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Returns a paginated list of the Telnyx stock avatars and custom avatars
|
|
12
|
+
* available to the authenticated organization. Custom avatars owned by other
|
|
13
|
+
* organizations are never returned. The `image_url` value is suitable for
|
|
14
|
+
* displaying a thumbnail and may be refreshed by listing or retrieving the avatar
|
|
15
|
+
* again. `suggested_voice_id` recommends a compatible Telnyx voice for stock
|
|
16
|
+
* avatars and is an empty string for custom avatars; it does not change an AI
|
|
17
|
+
* Assistant's voice automatically.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* // Automatically fetches more pages as needed.
|
|
22
|
+
* for await (const avatar of client.ai.avatars.list()) {
|
|
23
|
+
* // ...
|
|
24
|
+
* }
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
list(query?: AvatarListParams | null | undefined, options?: RequestOptions): PagePromise<AvatarsDefaultFlatPagination, Avatar>;
|
|
28
|
+
/**
|
|
29
|
+
* Uploads an image, validates its file type, size, safe decoding, and resolution,
|
|
30
|
+
* stores it in Telnyx-managed private storage, and creates an avatar owned by the
|
|
31
|
+
* authenticated organization. Creating an avatar does not update an AI Assistant;
|
|
32
|
+
* use the returned ID separately wherever the avatar is consumed. The avatar image
|
|
33
|
+
* is stored independently from the rendering model and background, which are
|
|
34
|
+
* selected where the avatar is consumed. Supported image types are JPEG, PNG, and
|
|
35
|
+
* WebP. Images may be up to 10 MiB, must be between 256 and 8192 pixels on each
|
|
36
|
+
* side, and may contain at most 40 megapixels. Each organization may have up to 20
|
|
37
|
+
* custom avatars. For best results, use a 16:9 landscape image, preferably 1920 by
|
|
38
|
+
* 1080 pixels and at least 1280 by 720 pixels. Show one centered, front-facing
|
|
39
|
+
* person from the shoulders up, keep the full head and hair visible with space
|
|
40
|
+
* around it, and use a sharp, evenly lit image with unobstructed eyes and mouth.
|
|
41
|
+
* Use a transparent PNG or WebP when the avatar will be combined with a selectable
|
|
42
|
+
* background. These composition recommendations are not enforced in the first
|
|
43
|
+
* release; the first release does not validate the number of faces, pose, or image
|
|
44
|
+
* content.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```ts
|
|
48
|
+
* const avatarResponse = await client.ai.avatars.create({
|
|
49
|
+
* image_file: fs.createReadStream('path/to/file'),
|
|
50
|
+
* name: 'Customer portrait',
|
|
51
|
+
* });
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
create(body: AvatarCreateParams, options?: RequestOptions): APIPromise<AvatarResponse>;
|
|
55
|
+
/**
|
|
56
|
+
* Returns a Telnyx stock avatar or a custom avatar owned by the authenticated
|
|
57
|
+
* organization. A custom avatar belonging to another organization is returned as
|
|
58
|
+
* not found.
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```ts
|
|
62
|
+
* const avatarResponse = await client.ai.avatars.retrieve(
|
|
63
|
+
* 'avatar_0123456789abcdef0123456789abcdef',
|
|
64
|
+
* );
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
retrieve(avatarID: AvatarID, options?: RequestOptions): APIPromise<AvatarResponse>;
|
|
68
|
+
/**
|
|
69
|
+
* Updates the customer-facing name of a custom avatar owned by the authenticated
|
|
70
|
+
* organization. Stock avatars cannot be modified. To replace the image, create a
|
|
71
|
+
* new custom avatar so existing references keep their original content.
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* ```ts
|
|
75
|
+
* const avatarResponse = await client.ai.avatars.update(
|
|
76
|
+
* 'avatar_0123456789abcdef0123456789abcdef',
|
|
77
|
+
* { name: 'Updated portrait' },
|
|
78
|
+
* );
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
update(avatarID: AvatarID, body: AvatarUpdateParams, options?: RequestOptions): APIPromise<AvatarResponse>;
|
|
82
|
+
}
|
|
83
|
+
export type AvatarsDefaultFlatPagination = DefaultFlatPagination<Avatar>;
|
|
84
|
+
export interface Avatar {
|
|
85
|
+
/**
|
|
86
|
+
* Stable identifier returned by the Avatars API. Discover available stock IDs with
|
|
87
|
+
* GET /v2/ai/avatars and filter[avatar_type]=stock rather than maintaining a fixed
|
|
88
|
+
* list. Custom avatar IDs use the `avatar_` prefix and must belong to the
|
|
89
|
+
* authenticated organization. The service validates that the selected avatar is
|
|
90
|
+
* available.
|
|
91
|
+
*/
|
|
92
|
+
id: AvatarID;
|
|
93
|
+
/**
|
|
94
|
+
* Whether the avatar is provided by Telnyx or was uploaded by the authenticated
|
|
95
|
+
* organization.
|
|
96
|
+
*/
|
|
97
|
+
avatar_type: AvatarType;
|
|
98
|
+
/**
|
|
99
|
+
* Indicates that avatar rendering runs on Telnyx-operated infrastructure.
|
|
100
|
+
*/
|
|
101
|
+
hosted: true;
|
|
102
|
+
/**
|
|
103
|
+
* HTTPS image URL suitable for an avatar selection thumbnail. If the URL expires,
|
|
104
|
+
* list or retrieve the avatar again to refresh it.
|
|
105
|
+
*/
|
|
106
|
+
image_url: string;
|
|
107
|
+
/**
|
|
108
|
+
* Customer-facing avatar name.
|
|
109
|
+
*/
|
|
110
|
+
name: string;
|
|
111
|
+
/**
|
|
112
|
+
* Avatar provider. The first release supports Telnyx avatars.
|
|
113
|
+
*/
|
|
114
|
+
provider: 'telnyx';
|
|
115
|
+
/**
|
|
116
|
+
* MIME type of a custom avatar image.
|
|
117
|
+
*/
|
|
118
|
+
content_type?: 'image/jpeg' | 'image/png' | 'image/webp';
|
|
119
|
+
/**
|
|
120
|
+
* Time when the custom avatar was created.
|
|
121
|
+
*/
|
|
122
|
+
created_at?: string;
|
|
123
|
+
/**
|
|
124
|
+
* Decoded height of a custom avatar image.
|
|
125
|
+
*/
|
|
126
|
+
height_px?: number;
|
|
127
|
+
/**
|
|
128
|
+
* Expiration time of `image_url`. Omitted when the URL does not expire.
|
|
129
|
+
*/
|
|
130
|
+
image_url_expires_at?: string;
|
|
131
|
+
/**
|
|
132
|
+
* Size of a custom avatar image in bytes.
|
|
133
|
+
*/
|
|
134
|
+
size_bytes?: number;
|
|
135
|
+
/**
|
|
136
|
+
* Optional recommended Telnyx text-to-speech voice for this avatar. An omitted
|
|
137
|
+
* field or empty string means no recommendation is available. Custom avatars have
|
|
138
|
+
* no suggested voice. It is informational and selecting the avatar does not
|
|
139
|
+
* automatically change the AI Assistant's configured voice.
|
|
140
|
+
*/
|
|
141
|
+
suggested_voice_id?: string;
|
|
142
|
+
/**
|
|
143
|
+
* Time when the custom avatar was last updated.
|
|
144
|
+
*/
|
|
145
|
+
updated_at?: string;
|
|
146
|
+
/**
|
|
147
|
+
* Decoded width of a custom avatar image.
|
|
148
|
+
*/
|
|
149
|
+
width_px?: number;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Stable identifier returned by the Avatars API. Discover available stock IDs with
|
|
153
|
+
* GET /v2/ai/avatars and filter[avatar_type]=stock rather than maintaining a fixed
|
|
154
|
+
* list. Custom avatar IDs use the `avatar_` prefix and must belong to the
|
|
155
|
+
* authenticated organization. The service validates that the selected avatar is
|
|
156
|
+
* available.
|
|
157
|
+
*/
|
|
158
|
+
export type AvatarID = string;
|
|
159
|
+
export interface AvatarResponse {
|
|
160
|
+
data: Avatar;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Whether the avatar is provided by Telnyx or was uploaded by the authenticated
|
|
164
|
+
* organization.
|
|
165
|
+
*/
|
|
166
|
+
export type AvatarType = 'stock' | 'custom';
|
|
167
|
+
export interface AvatarListParams extends DefaultFlatPaginationParams {
|
|
168
|
+
/**
|
|
169
|
+
* Return only stock or custom avatars.
|
|
170
|
+
*/
|
|
171
|
+
'filter[avatar_type]'?: AvatarType;
|
|
172
|
+
/**
|
|
173
|
+
* Return the avatar with this exact ID.
|
|
174
|
+
*/
|
|
175
|
+
'filter[id]'?: AvatarID;
|
|
176
|
+
/**
|
|
177
|
+
* Return avatars whose names contain this value, using case-insensitive matching.
|
|
178
|
+
*/
|
|
179
|
+
'filter[name]'?: string;
|
|
180
|
+
}
|
|
181
|
+
export interface AvatarCreateParams {
|
|
182
|
+
/**
|
|
183
|
+
* JPEG, PNG, or WebP image file. The maximum file size is 10 MiB.
|
|
184
|
+
*/
|
|
185
|
+
image_file: Uploadable;
|
|
186
|
+
/**
|
|
187
|
+
* Customer-facing name of the custom avatar.
|
|
188
|
+
*/
|
|
189
|
+
name: string;
|
|
190
|
+
}
|
|
191
|
+
export interface AvatarUpdateParams {
|
|
192
|
+
/**
|
|
193
|
+
* New customer-facing name of the custom avatar.
|
|
194
|
+
*/
|
|
195
|
+
name: string;
|
|
196
|
+
}
|
|
197
|
+
export declare namespace Avatars {
|
|
198
|
+
export { type Avatar as Avatar, type AvatarID as AvatarID, type AvatarResponse as AvatarResponse, type AvatarType as AvatarType, type AvatarsDefaultFlatPagination as AvatarsDefaultFlatPagination, type AvatarListParams as AvatarListParams, type AvatarCreateParams as AvatarCreateParams, type AvatarUpdateParams as AvatarUpdateParams, };
|
|
199
|
+
}
|
|
200
|
+
//# sourceMappingURL=avatars.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"avatars.d.mts","sourceRoot":"","sources":["../../src/resources/ai/avatars.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,mCAA+B;AACpD,OAAO,EAAE,qBAAqB,EAAE,KAAK,2BAA2B,EAAE,WAAW,EAAE,kCAA8B;AAC7G,OAAO,EAAE,KAAK,UAAU,EAAE,+BAA2B;AACrD,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAIhE;;GAEG;AACH,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;;;;;;OAgBG;IACH,IAAI,CACF,KAAK,GAAE,gBAAgB,GAAG,IAAI,GAAG,SAAc,EAC/C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,4BAA4B,EAAE,MAAM,CAAC;IAIpD;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,MAAM,CAAC,IAAI,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,cAAc,CAAC;IAItF;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,cAAc,CAAC;IAIlF;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,cAAc,CAAC;CAG3G;AAED,MAAM,MAAM,4BAA4B,GAAG,qBAAqB,CAAC,MAAM,CAAC,CAAC;AAEzE,MAAM,WAAW,MAAM;IACrB;;;;;;OAMG;IACH,EAAE,EAAE,QAAQ,CAAC;IAEb;;;OAGG;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WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,MAAM,IAAI,MAAM,EACrB,KAAK,QAAQ,IAAI,QAAQ,EACzB,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"}
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../../core/api-promise.js";
|
|
3
|
+
import { DefaultFlatPagination, type DefaultFlatPaginationParams, PagePromise } from "../../core/pagination.js";
|
|
4
|
+
import { type Uploadable } from "../../core/uploads.js";
|
|
5
|
+
import { RequestOptions } from "../../internal/request-options.js";
|
|
6
|
+
/**
|
|
7
|
+
* Create and manage real-time AI avatars
|
|
8
|
+
*/
|
|
9
|
+
export declare class Avatars extends APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Returns a paginated list of the Telnyx stock avatars and custom avatars
|
|
12
|
+
* available to the authenticated organization. Custom avatars owned by other
|
|
13
|
+
* organizations are never returned. The `image_url` value is suitable for
|
|
14
|
+
* displaying a thumbnail and may be refreshed by listing or retrieving the avatar
|
|
15
|
+
* again. `suggested_voice_id` recommends a compatible Telnyx voice for stock
|
|
16
|
+
* avatars and is an empty string for custom avatars; it does not change an AI
|
|
17
|
+
* Assistant's voice automatically.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* // Automatically fetches more pages as needed.
|
|
22
|
+
* for await (const avatar of client.ai.avatars.list()) {
|
|
23
|
+
* // ...
|
|
24
|
+
* }
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
list(query?: AvatarListParams | null | undefined, options?: RequestOptions): PagePromise<AvatarsDefaultFlatPagination, Avatar>;
|
|
28
|
+
/**
|
|
29
|
+
* Uploads an image, validates its file type, size, safe decoding, and resolution,
|
|
30
|
+
* stores it in Telnyx-managed private storage, and creates an avatar owned by the
|
|
31
|
+
* authenticated organization. Creating an avatar does not update an AI Assistant;
|
|
32
|
+
* use the returned ID separately wherever the avatar is consumed. The avatar image
|
|
33
|
+
* is stored independently from the rendering model and background, which are
|
|
34
|
+
* selected where the avatar is consumed. Supported image types are JPEG, PNG, and
|
|
35
|
+
* WebP. Images may be up to 10 MiB, must be between 256 and 8192 pixels on each
|
|
36
|
+
* side, and may contain at most 40 megapixels. Each organization may have up to 20
|
|
37
|
+
* custom avatars. For best results, use a 16:9 landscape image, preferably 1920 by
|
|
38
|
+
* 1080 pixels and at least 1280 by 720 pixels. Show one centered, front-facing
|
|
39
|
+
* person from the shoulders up, keep the full head and hair visible with space
|
|
40
|
+
* around it, and use a sharp, evenly lit image with unobstructed eyes and mouth.
|
|
41
|
+
* Use a transparent PNG or WebP when the avatar will be combined with a selectable
|
|
42
|
+
* background. These composition recommendations are not enforced in the first
|
|
43
|
+
* release; the first release does not validate the number of faces, pose, or image
|
|
44
|
+
* content.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```ts
|
|
48
|
+
* const avatarResponse = await client.ai.avatars.create({
|
|
49
|
+
* image_file: fs.createReadStream('path/to/file'),
|
|
50
|
+
* name: 'Customer portrait',
|
|
51
|
+
* });
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
create(body: AvatarCreateParams, options?: RequestOptions): APIPromise<AvatarResponse>;
|
|
55
|
+
/**
|
|
56
|
+
* Returns a Telnyx stock avatar or a custom avatar owned by the authenticated
|
|
57
|
+
* organization. A custom avatar belonging to another organization is returned as
|
|
58
|
+
* not found.
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```ts
|
|
62
|
+
* const avatarResponse = await client.ai.avatars.retrieve(
|
|
63
|
+
* 'avatar_0123456789abcdef0123456789abcdef',
|
|
64
|
+
* );
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
retrieve(avatarID: AvatarID, options?: RequestOptions): APIPromise<AvatarResponse>;
|
|
68
|
+
/**
|
|
69
|
+
* Updates the customer-facing name of a custom avatar owned by the authenticated
|
|
70
|
+
* organization. Stock avatars cannot be modified. To replace the image, create a
|
|
71
|
+
* new custom avatar so existing references keep their original content.
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* ```ts
|
|
75
|
+
* const avatarResponse = await client.ai.avatars.update(
|
|
76
|
+
* 'avatar_0123456789abcdef0123456789abcdef',
|
|
77
|
+
* { name: 'Updated portrait' },
|
|
78
|
+
* );
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
update(avatarID: AvatarID, body: AvatarUpdateParams, options?: RequestOptions): APIPromise<AvatarResponse>;
|
|
82
|
+
}
|
|
83
|
+
export type AvatarsDefaultFlatPagination = DefaultFlatPagination<Avatar>;
|
|
84
|
+
export interface Avatar {
|
|
85
|
+
/**
|
|
86
|
+
* Stable identifier returned by the Avatars API. Discover available stock IDs with
|
|
87
|
+
* GET /v2/ai/avatars and filter[avatar_type]=stock rather than maintaining a fixed
|
|
88
|
+
* list. Custom avatar IDs use the `avatar_` prefix and must belong to the
|
|
89
|
+
* authenticated organization. The service validates that the selected avatar is
|
|
90
|
+
* available.
|
|
91
|
+
*/
|
|
92
|
+
id: AvatarID;
|
|
93
|
+
/**
|
|
94
|
+
* Whether the avatar is provided by Telnyx or was uploaded by the authenticated
|
|
95
|
+
* organization.
|
|
96
|
+
*/
|
|
97
|
+
avatar_type: AvatarType;
|
|
98
|
+
/**
|
|
99
|
+
* Indicates that avatar rendering runs on Telnyx-operated infrastructure.
|
|
100
|
+
*/
|
|
101
|
+
hosted: true;
|
|
102
|
+
/**
|
|
103
|
+
* HTTPS image URL suitable for an avatar selection thumbnail. If the URL expires,
|
|
104
|
+
* list or retrieve the avatar again to refresh it.
|
|
105
|
+
*/
|
|
106
|
+
image_url: string;
|
|
107
|
+
/**
|
|
108
|
+
* Customer-facing avatar name.
|
|
109
|
+
*/
|
|
110
|
+
name: string;
|
|
111
|
+
/**
|
|
112
|
+
* Avatar provider. The first release supports Telnyx avatars.
|
|
113
|
+
*/
|
|
114
|
+
provider: 'telnyx';
|
|
115
|
+
/**
|
|
116
|
+
* MIME type of a custom avatar image.
|
|
117
|
+
*/
|
|
118
|
+
content_type?: 'image/jpeg' | 'image/png' | 'image/webp';
|
|
119
|
+
/**
|
|
120
|
+
* Time when the custom avatar was created.
|
|
121
|
+
*/
|
|
122
|
+
created_at?: string;
|
|
123
|
+
/**
|
|
124
|
+
* Decoded height of a custom avatar image.
|
|
125
|
+
*/
|
|
126
|
+
height_px?: number;
|
|
127
|
+
/**
|
|
128
|
+
* Expiration time of `image_url`. Omitted when the URL does not expire.
|
|
129
|
+
*/
|
|
130
|
+
image_url_expires_at?: string;
|
|
131
|
+
/**
|
|
132
|
+
* Size of a custom avatar image in bytes.
|
|
133
|
+
*/
|
|
134
|
+
size_bytes?: number;
|
|
135
|
+
/**
|
|
136
|
+
* Optional recommended Telnyx text-to-speech voice for this avatar. An omitted
|
|
137
|
+
* field or empty string means no recommendation is available. Custom avatars have
|
|
138
|
+
* no suggested voice. It is informational and selecting the avatar does not
|
|
139
|
+
* automatically change the AI Assistant's configured voice.
|
|
140
|
+
*/
|
|
141
|
+
suggested_voice_id?: string;
|
|
142
|
+
/**
|
|
143
|
+
* Time when the custom avatar was last updated.
|
|
144
|
+
*/
|
|
145
|
+
updated_at?: string;
|
|
146
|
+
/**
|
|
147
|
+
* Decoded width of a custom avatar image.
|
|
148
|
+
*/
|
|
149
|
+
width_px?: number;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Stable identifier returned by the Avatars API. Discover available stock IDs with
|
|
153
|
+
* GET /v2/ai/avatars and filter[avatar_type]=stock rather than maintaining a fixed
|
|
154
|
+
* list. Custom avatar IDs use the `avatar_` prefix and must belong to the
|
|
155
|
+
* authenticated organization. The service validates that the selected avatar is
|
|
156
|
+
* available.
|
|
157
|
+
*/
|
|
158
|
+
export type AvatarID = string;
|
|
159
|
+
export interface AvatarResponse {
|
|
160
|
+
data: Avatar;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Whether the avatar is provided by Telnyx or was uploaded by the authenticated
|
|
164
|
+
* organization.
|
|
165
|
+
*/
|
|
166
|
+
export type AvatarType = 'stock' | 'custom';
|
|
167
|
+
export interface AvatarListParams extends DefaultFlatPaginationParams {
|
|
168
|
+
/**
|
|
169
|
+
* Return only stock or custom avatars.
|
|
170
|
+
*/
|
|
171
|
+
'filter[avatar_type]'?: AvatarType;
|
|
172
|
+
/**
|
|
173
|
+
* Return the avatar with this exact ID.
|
|
174
|
+
*/
|
|
175
|
+
'filter[id]'?: AvatarID;
|
|
176
|
+
/**
|
|
177
|
+
* Return avatars whose names contain this value, using case-insensitive matching.
|
|
178
|
+
*/
|
|
179
|
+
'filter[name]'?: string;
|
|
180
|
+
}
|
|
181
|
+
export interface AvatarCreateParams {
|
|
182
|
+
/**
|
|
183
|
+
* JPEG, PNG, or WebP image file. The maximum file size is 10 MiB.
|
|
184
|
+
*/
|
|
185
|
+
image_file: Uploadable;
|
|
186
|
+
/**
|
|
187
|
+
* Customer-facing name of the custom avatar.
|
|
188
|
+
*/
|
|
189
|
+
name: string;
|
|
190
|
+
}
|
|
191
|
+
export interface AvatarUpdateParams {
|
|
192
|
+
/**
|
|
193
|
+
* New customer-facing name of the custom avatar.
|
|
194
|
+
*/
|
|
195
|
+
name: string;
|
|
196
|
+
}
|
|
197
|
+
export declare namespace Avatars {
|
|
198
|
+
export { type Avatar as Avatar, type AvatarID as AvatarID, type AvatarResponse as AvatarResponse, type AvatarType as AvatarType, type AvatarsDefaultFlatPagination as AvatarsDefaultFlatPagination, type AvatarListParams as AvatarListParams, type AvatarCreateParams as AvatarCreateParams, type AvatarUpdateParams as AvatarUpdateParams, };
|
|
199
|
+
}
|
|
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AAK,QAAQ,IAAI,QAAQ,EACzB,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Avatars = void 0;
|
|
5
|
+
const resource_1 = require("../../core/resource.js");
|
|
6
|
+
const pagination_1 = require("../../core/pagination.js");
|
|
7
|
+
const uploads_1 = require("../../internal/uploads.js");
|
|
8
|
+
const path_1 = require("../../internal/utils/path.js");
|
|
9
|
+
/**
|
|
10
|
+
* Create and manage real-time AI avatars
|
|
11
|
+
*/
|
|
12
|
+
class Avatars extends resource_1.APIResource {
|
|
13
|
+
/**
|
|
14
|
+
* Returns a paginated list of the Telnyx stock avatars and custom avatars
|
|
15
|
+
* available to the authenticated organization. Custom avatars owned by other
|
|
16
|
+
* organizations are never returned. The `image_url` value is suitable for
|
|
17
|
+
* displaying a thumbnail and may be refreshed by listing or retrieving the avatar
|
|
18
|
+
* again. `suggested_voice_id` recommends a compatible Telnyx voice for stock
|
|
19
|
+
* avatars and is an empty string for custom avatars; it does not change an AI
|
|
20
|
+
* Assistant's voice automatically.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* // Automatically fetches more pages as needed.
|
|
25
|
+
* for await (const avatar of client.ai.avatars.list()) {
|
|
26
|
+
* // ...
|
|
27
|
+
* }
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
list(query = {}, options) {
|
|
31
|
+
return this._client.getAPIList('/ai/avatars', (pagination_1.DefaultFlatPagination), { query, ...options });
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Uploads an image, validates its file type, size, safe decoding, and resolution,
|
|
35
|
+
* stores it in Telnyx-managed private storage, and creates an avatar owned by the
|
|
36
|
+
* authenticated organization. Creating an avatar does not update an AI Assistant;
|
|
37
|
+
* use the returned ID separately wherever the avatar is consumed. The avatar image
|
|
38
|
+
* is stored independently from the rendering model and background, which are
|
|
39
|
+
* selected where the avatar is consumed. Supported image types are JPEG, PNG, and
|
|
40
|
+
* WebP. Images may be up to 10 MiB, must be between 256 and 8192 pixels on each
|
|
41
|
+
* side, and may contain at most 40 megapixels. Each organization may have up to 20
|
|
42
|
+
* custom avatars. For best results, use a 16:9 landscape image, preferably 1920 by
|
|
43
|
+
* 1080 pixels and at least 1280 by 720 pixels. Show one centered, front-facing
|
|
44
|
+
* person from the shoulders up, keep the full head and hair visible with space
|
|
45
|
+
* around it, and use a sharp, evenly lit image with unobstructed eyes and mouth.
|
|
46
|
+
* Use a transparent PNG or WebP when the avatar will be combined with a selectable
|
|
47
|
+
* background. These composition recommendations are not enforced in the first
|
|
48
|
+
* release; the first release does not validate the number of faces, pose, or image
|
|
49
|
+
* content.
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* ```ts
|
|
53
|
+
* const avatarResponse = await client.ai.avatars.create({
|
|
54
|
+
* image_file: fs.createReadStream('path/to/file'),
|
|
55
|
+
* name: 'Customer portrait',
|
|
56
|
+
* });
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
create(body, options) {
|
|
60
|
+
return this._client.post('/ai/avatars', (0, uploads_1.multipartFormRequestOptions)({ body, ...options }, this._client));
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Returns a Telnyx stock avatar or a custom avatar owned by the authenticated
|
|
64
|
+
* organization. A custom avatar belonging to another organization is returned as
|
|
65
|
+
* not found.
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```ts
|
|
69
|
+
* const avatarResponse = await client.ai.avatars.retrieve(
|
|
70
|
+
* 'avatar_0123456789abcdef0123456789abcdef',
|
|
71
|
+
* );
|
|
72
|
+
* ```
|
|
73
|
+
*/
|
|
74
|
+
retrieve(avatarID, options) {
|
|
75
|
+
return this._client.get((0, path_1.path) `/ai/avatars/${avatarID}`, options);
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Updates the customer-facing name of a custom avatar owned by the authenticated
|
|
79
|
+
* organization. Stock avatars cannot be modified. To replace the image, create a
|
|
80
|
+
* new custom avatar so existing references keep their original content.
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* ```ts
|
|
84
|
+
* const avatarResponse = await client.ai.avatars.update(
|
|
85
|
+
* 'avatar_0123456789abcdef0123456789abcdef',
|
|
86
|
+
* { name: 'Updated portrait' },
|
|
87
|
+
* );
|
|
88
|
+
* ```
|
|
89
|
+
*/
|
|
90
|
+
update(avatarID, body, options) {
|
|
91
|
+
return this._client.patch((0, path_1.path) `/ai/avatars/${avatarID}`, { body, ...options });
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
exports.Avatars = Avatars;
|
|
95
|
+
//# sourceMappingURL=avatars.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"avatars.js","sourceRoot":"","sources":["../../src/resources/ai/avatars.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAElD,yDAA6G;AAG7G,uDAAqE;AACrE,uDAAiD;AAEjD;;GAEG;AACH,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;;;;;;;;;;;;;;;OAgBG;IACH,IAAI,CACF,QAA6C,EAAE,EAC/C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,aAAa,EAAE,CAAA,kCAA6B,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtG,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,MAAM,CAAC,IAAwB,EAAE,OAAwB;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,IAAA,qCAA2B,EAAC,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IAC3G,CAAC;IAED;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,QAAkB,EAAE,OAAwB;QACnD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,eAAe,QAAQ,EAAE,EAAE,OAAO,CAAC,CAAC;IAClE,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,QAAkB,EAAE,IAAwB,EAAE,OAAwB;QAC3E,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,eAAe,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjF,CAAC;CACF;AAvFD,0BAuFC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
import { DefaultFlatPagination } from "../../core/pagination.mjs";
|
|
4
|
+
import { multipartFormRequestOptions } from "../../internal/uploads.mjs";
|
|
5
|
+
import { path } from "../../internal/utils/path.mjs";
|
|
6
|
+
/**
|
|
7
|
+
* Create and manage real-time AI avatars
|
|
8
|
+
*/
|
|
9
|
+
export class Avatars extends APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Returns a paginated list of the Telnyx stock avatars and custom avatars
|
|
12
|
+
* available to the authenticated organization. Custom avatars owned by other
|
|
13
|
+
* organizations are never returned. The `image_url` value is suitable for
|
|
14
|
+
* displaying a thumbnail and may be refreshed by listing or retrieving the avatar
|
|
15
|
+
* again. `suggested_voice_id` recommends a compatible Telnyx voice for stock
|
|
16
|
+
* avatars and is an empty string for custom avatars; it does not change an AI
|
|
17
|
+
* Assistant's voice automatically.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* // Automatically fetches more pages as needed.
|
|
22
|
+
* for await (const avatar of client.ai.avatars.list()) {
|
|
23
|
+
* // ...
|
|
24
|
+
* }
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
list(query = {}, options) {
|
|
28
|
+
return this._client.getAPIList('/ai/avatars', (DefaultFlatPagination), { query, ...options });
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Uploads an image, validates its file type, size, safe decoding, and resolution,
|
|
32
|
+
* stores it in Telnyx-managed private storage, and creates an avatar owned by the
|
|
33
|
+
* authenticated organization. Creating an avatar does not update an AI Assistant;
|
|
34
|
+
* use the returned ID separately wherever the avatar is consumed. The avatar image
|
|
35
|
+
* is stored independently from the rendering model and background, which are
|
|
36
|
+
* selected where the avatar is consumed. Supported image types are JPEG, PNG, and
|
|
37
|
+
* WebP. Images may be up to 10 MiB, must be between 256 and 8192 pixels on each
|
|
38
|
+
* side, and may contain at most 40 megapixels. Each organization may have up to 20
|
|
39
|
+
* custom avatars. For best results, use a 16:9 landscape image, preferably 1920 by
|
|
40
|
+
* 1080 pixels and at least 1280 by 720 pixels. Show one centered, front-facing
|
|
41
|
+
* person from the shoulders up, keep the full head and hair visible with space
|
|
42
|
+
* around it, and use a sharp, evenly lit image with unobstructed eyes and mouth.
|
|
43
|
+
* Use a transparent PNG or WebP when the avatar will be combined with a selectable
|
|
44
|
+
* background. These composition recommendations are not enforced in the first
|
|
45
|
+
* release; the first release does not validate the number of faces, pose, or image
|
|
46
|
+
* content.
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```ts
|
|
50
|
+
* const avatarResponse = await client.ai.avatars.create({
|
|
51
|
+
* image_file: fs.createReadStream('path/to/file'),
|
|
52
|
+
* name: 'Customer portrait',
|
|
53
|
+
* });
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
create(body, options) {
|
|
57
|
+
return this._client.post('/ai/avatars', multipartFormRequestOptions({ body, ...options }, this._client));
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Returns a Telnyx stock avatar or a custom avatar owned by the authenticated
|
|
61
|
+
* organization. A custom avatar belonging to another organization is returned as
|
|
62
|
+
* not found.
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* ```ts
|
|
66
|
+
* const avatarResponse = await client.ai.avatars.retrieve(
|
|
67
|
+
* 'avatar_0123456789abcdef0123456789abcdef',
|
|
68
|
+
* );
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
retrieve(avatarID, options) {
|
|
72
|
+
return this._client.get(path `/ai/avatars/${avatarID}`, options);
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Updates the customer-facing name of a custom avatar owned by the authenticated
|
|
76
|
+
* organization. Stock avatars cannot be modified. To replace the image, create a
|
|
77
|
+
* new custom avatar so existing references keep their original content.
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* ```ts
|
|
81
|
+
* const avatarResponse = await client.ai.avatars.update(
|
|
82
|
+
* 'avatar_0123456789abcdef0123456789abcdef',
|
|
83
|
+
* { name: 'Updated portrait' },
|
|
84
|
+
* );
|
|
85
|
+
* ```
|
|
86
|
+
*/
|
|
87
|
+
update(avatarID, body, options) {
|
|
88
|
+
return this._client.patch(path `/ai/avatars/${avatarID}`, { body, ...options });
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=avatars.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"avatars.mjs","sourceRoot":"","sources":["../../src/resources/ai/avatars.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAElD,OAAO,EAAE,qBAAqB,EAAiD,kCAA8B;AAG7G,OAA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