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
|
@@ -0,0 +1,724 @@
|
|
|
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 { DefaultFlatPagination, type DefaultFlatPaginationParams, PagePromise } from '../../core/pagination';
|
|
6
|
+
import { buildHeaders } from '../../internal/headers';
|
|
7
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
8
|
+
import { path } from '../../internal/utils/path';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Manage and report AI Gateway usage.
|
|
12
|
+
*/
|
|
13
|
+
export class TokenGroups extends APIResource {
|
|
14
|
+
/**
|
|
15
|
+
* List gateway token groups within the authenticated Telnyx account. Foreign and
|
|
16
|
+
* unknown resource IDs return the same 404 response.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* // Automatically fetches more pages as needed.
|
|
21
|
+
* for await (const tokenGroup of client.llmTokenGateway.tokenGroups.list()) {
|
|
22
|
+
* // ...
|
|
23
|
+
* }
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
list(
|
|
27
|
+
query: TokenGroupListParams | null | undefined = {},
|
|
28
|
+
options?: RequestOptions,
|
|
29
|
+
): PagePromise<TokenGroupsDefaultFlatPagination, TokenGroup> {
|
|
30
|
+
return this._client.getAPIList('/llm_token_gateway/token_groups', DefaultFlatPagination<TokenGroup>, {
|
|
31
|
+
query,
|
|
32
|
+
...options,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Create gateway token group within the authenticated Telnyx account. Foreign and
|
|
38
|
+
* unknown resource IDs return the same 404 response.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```ts
|
|
42
|
+
* const tokenGroupResponse =
|
|
43
|
+
* await client.llmTokenGateway.tokenGroups.create({
|
|
44
|
+
* allowed_models: ['Kimi-K3', 'GLM-5.3-Flash'],
|
|
45
|
+
* name: 'support-backend',
|
|
46
|
+
* 'Idempotency-Key': 'Idempotency-Key',
|
|
47
|
+
* fallbacks: { 'Kimi-K3': ['GLM-5.3-Flash'] },
|
|
48
|
+
* max_parallel_requests: 20,
|
|
49
|
+
* retries: {
|
|
50
|
+
* max_attempts: 2,
|
|
51
|
+
* retry_delay_ms: 250,
|
|
52
|
+
* backoff: 'exponential',
|
|
53
|
+
* request_timeout_ms: 10000,
|
|
54
|
+
* },
|
|
55
|
+
* });
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
create(params: TokenGroupCreateParams, options?: RequestOptions): APIPromise<TokenGroupResponse> {
|
|
59
|
+
const { 'Idempotency-Key': idempotencyKey, ...body } = params;
|
|
60
|
+
return this._client.post('/llm_token_gateway/token_groups', {
|
|
61
|
+
body,
|
|
62
|
+
...options,
|
|
63
|
+
headers: buildHeaders([{ 'Idempotency-Key': idempotencyKey }, options?.headers]),
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Revoke resource and its keys atomically; retain historical attribution, never
|
|
69
|
+
* detach into an ungoverned service key.
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* ```ts
|
|
73
|
+
* await client.llmTokenGateway.tokenGroups.delete(
|
|
74
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
75
|
+
* {
|
|
76
|
+
* 'Idempotency-Key': 'Idempotency-Key',
|
|
77
|
+
* 'If-Match': 'If-Match',
|
|
78
|
+
* },
|
|
79
|
+
* );
|
|
80
|
+
* ```
|
|
81
|
+
*/
|
|
82
|
+
delete(id: string, params: TokenGroupDeleteParams, options?: RequestOptions): APIPromise<void> {
|
|
83
|
+
const { 'Idempotency-Key': idempotencyKey, 'If-Match': ifMatch } = params;
|
|
84
|
+
return this._client.delete(path`/llm_token_gateway/token_groups/${id}`, {
|
|
85
|
+
...options,
|
|
86
|
+
headers: buildHeaders([
|
|
87
|
+
{ Accept: '*/*', 'Idempotency-Key': idempotencyKey, 'If-Match': ifMatch },
|
|
88
|
+
options?.headers,
|
|
89
|
+
]),
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Get gateway token group within the authenticated Telnyx account. Foreign and
|
|
95
|
+
* unknown resource IDs return the same 404 response.
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* ```ts
|
|
99
|
+
* const tokenGroupResponse =
|
|
100
|
+
* await client.llmTokenGateway.tokenGroups.retrieve(
|
|
101
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
102
|
+
* );
|
|
103
|
+
* ```
|
|
104
|
+
*/
|
|
105
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<TokenGroupResponse> {
|
|
106
|
+
return this._client.get(path`/llm_token_gateway/token_groups/${id}`, options);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Update gateway token group within the authenticated Telnyx account. Foreign and
|
|
111
|
+
* unknown resource IDs return the same 404 response. Omitted fields are preserved.
|
|
112
|
+
* Null clears the optional concurrency, fallback and retry settings. A stale
|
|
113
|
+
* If-Match returns 412; read the resource again before updating.
|
|
114
|
+
*
|
|
115
|
+
* @example
|
|
116
|
+
* ```ts
|
|
117
|
+
* const tokenGroupResponse =
|
|
118
|
+
* await client.llmTokenGateway.tokenGroups.update(
|
|
119
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
120
|
+
* {
|
|
121
|
+
* 'Idempotency-Key': 'Idempotency-Key',
|
|
122
|
+
* 'If-Match': 'If-Match',
|
|
123
|
+
* allowed_models: ['Kimi-K3', 'GLM-5.3-Flash'],
|
|
124
|
+
* fallbacks: { 'Kimi-K3': ['GLM-5.3-Flash'] },
|
|
125
|
+
* max_parallel_requests: 20,
|
|
126
|
+
* name: 'support-backend',
|
|
127
|
+
* retries: {
|
|
128
|
+
* max_attempts: 2,
|
|
129
|
+
* retry_delay_ms: 250,
|
|
130
|
+
* backoff: 'exponential',
|
|
131
|
+
* request_timeout_ms: 10000,
|
|
132
|
+
* },
|
|
133
|
+
* },
|
|
134
|
+
* );
|
|
135
|
+
* ```
|
|
136
|
+
*/
|
|
137
|
+
update(
|
|
138
|
+
id: string,
|
|
139
|
+
params: TokenGroupUpdateParams,
|
|
140
|
+
options?: RequestOptions,
|
|
141
|
+
): APIPromise<TokenGroupResponse> {
|
|
142
|
+
const { 'Idempotency-Key': idempotencyKey, 'If-Match': ifMatch, ...body } = params;
|
|
143
|
+
return this._client.patch(path`/llm_token_gateway/token_groups/${id}`, {
|
|
144
|
+
body,
|
|
145
|
+
...options,
|
|
146
|
+
headers: buildHeaders([{ 'Idempotency-Key': idempotencyKey, 'If-Match': ifMatch }, options?.headers]),
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export type TokenGroupsDefaultFlatPagination = DefaultFlatPagination<TokenGroup>;
|
|
152
|
+
|
|
153
|
+
export interface AIGatewayResourcesPageMeta {
|
|
154
|
+
has_more: boolean;
|
|
155
|
+
|
|
156
|
+
page_number: number;
|
|
157
|
+
|
|
158
|
+
page_size: number;
|
|
159
|
+
|
|
160
|
+
snapshot: string;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export type BudgetDuration = '1d' | '7d' | '30d' | null;
|
|
164
|
+
|
|
165
|
+
export interface TokenGroup {
|
|
166
|
+
id: string;
|
|
167
|
+
|
|
168
|
+
allowed_models: Array<string>;
|
|
169
|
+
|
|
170
|
+
blocked: boolean;
|
|
171
|
+
|
|
172
|
+
budget_duration: BudgetDuration | null;
|
|
173
|
+
|
|
174
|
+
budget_started_at: string | null;
|
|
175
|
+
|
|
176
|
+
cache_ttl: number | null;
|
|
177
|
+
|
|
178
|
+
created_at: string;
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Per-group model fallbacks: primary alias -> ordered list of 1..3 other aliases.
|
|
182
|
+
* Every key and listed alias must be in allowed_models (a PATCH removing a
|
|
183
|
+
* referenced alias is 400); a chain never lists its own key; wildcards are
|
|
184
|
+
* rejected. Chains are one level deep (a step's own chain is not expanded).
|
|
185
|
+
* Fallback is attempted only for managed routes, only before the first provider
|
|
186
|
+
* event is forwarded, and only to steps the key may use; each attempt is reserved
|
|
187
|
+
* and recorded. {} and null both disable fallbacks.
|
|
188
|
+
*/
|
|
189
|
+
fallbacks: { [key: string]: Array<string> } | null;
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Per-group guardrail policy. Missing actions default to ignore. profiles may be
|
|
193
|
+
* listed with both dlp actions ignore (staged, inactive) but a non-ignore dlp
|
|
194
|
+
* action requires at least one profile. streaming defaults to buffered when any
|
|
195
|
+
* response action is block and passthrough otherwise; passthrough with a response
|
|
196
|
+
* block is 400. Findings are codes and counts only; content is never stored. The
|
|
197
|
+
* stored form is echoed back canonicalised (all actions explicit, profiles
|
|
198
|
+
* sorted); {} is stored as an all-ignore policy, null disables.
|
|
199
|
+
*/
|
|
200
|
+
guardrails: TokenGroup.Guardrails | null;
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* USD, decimal precision at most 6 places; parse exactly to integer micro-USD,
|
|
204
|
+
* never binary float accounting.
|
|
205
|
+
*/
|
|
206
|
+
max_budget: number | null;
|
|
207
|
+
|
|
208
|
+
name: string;
|
|
209
|
+
|
|
210
|
+
provider_key_ids: Array<string>;
|
|
211
|
+
|
|
212
|
+
record_type: 'token_group';
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* USD, decimal precision at most 6 places; parse exactly to integer micro-USD,
|
|
216
|
+
* never binary float accounting.
|
|
217
|
+
*/
|
|
218
|
+
reserved_spend: number;
|
|
219
|
+
|
|
220
|
+
resets_at: string | null;
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Per-group same-route retries. max_attempts counts the first try of each step
|
|
224
|
+
* (the primary and each fallback) and is the ceiling for the x-ltg-max-attempts
|
|
225
|
+
* request header. A step is retried only when its attempt definitely did no
|
|
226
|
+
* provider work (connection failure before dispatch, or 429/529) before the first
|
|
227
|
+
* provider event; an uncertain failure (timeout, 408/500/502/503/504) moves to the
|
|
228
|
+
* next fallback step instead. max_attempts x (1 + the longest fallback chain) must
|
|
229
|
+
* not exceed 8, else 400. The n-th retry waits retry_delay_ms (constant),
|
|
230
|
+
* retry_delay_ms*n (linear) or retry_delay_ms*2^(n-1) (exponential), at most 5 s
|
|
231
|
+
* and never past the request deadline, then jittered uniformly down to half that
|
|
232
|
+
* value so concurrent retries spread out; a provider Retry-After of at most 5 s is
|
|
233
|
+
* honoured and a longer one moves to the next step. request_timeout_ms applies to
|
|
234
|
+
* streaming requests only: it bounds each attempt's time to its first provider
|
|
235
|
+
* event and never applies after it. Non-stream requests keep the per-attempt hop
|
|
236
|
+
* and idle bounds (their headers arrive only with the finished completion).
|
|
237
|
+
* retry_delay_ms and backoff are floors for the request knobs. Each planned
|
|
238
|
+
* attempt is reserved (at most 8 per request); unused reservation is released at
|
|
239
|
+
* settlement. Managed routes only. The stored form is echoed back with defaults
|
|
240
|
+
* filled in; null disables retries.
|
|
241
|
+
*/
|
|
242
|
+
retries: TokenGroup.Retries | null;
|
|
243
|
+
|
|
244
|
+
rpm_limit: number | null;
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* USD, decimal precision at most 6 places; parse exactly to integer micro-USD,
|
|
248
|
+
* never binary float accounting.
|
|
249
|
+
*/
|
|
250
|
+
spend: number;
|
|
251
|
+
|
|
252
|
+
tpm_limit: number | null;
|
|
253
|
+
|
|
254
|
+
updated_at: string;
|
|
255
|
+
|
|
256
|
+
version: number;
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* Optional maximum concurrent reserved/dispatched cache misses across replicas.
|
|
260
|
+
* Null means no concurrency cap. Cache hits do not consume slots; unknown usage
|
|
261
|
+
* retains its budget hold without a slot.
|
|
262
|
+
*/
|
|
263
|
+
max_parallel_requests?: number | null;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
export namespace TokenGroup {
|
|
267
|
+
/**
|
|
268
|
+
* Per-group guardrail policy. Missing actions default to ignore. profiles may be
|
|
269
|
+
* listed with both dlp actions ignore (staged, inactive) but a non-ignore dlp
|
|
270
|
+
* action requires at least one profile. streaming defaults to buffered when any
|
|
271
|
+
* response action is block and passthrough otherwise; passthrough with a response
|
|
272
|
+
* block is 400. Findings are codes and counts only; content is never stored. The
|
|
273
|
+
* stored form is echoed back canonicalised (all actions explicit, profiles
|
|
274
|
+
* sorted); {} is stored as an all-ignore policy, null disables.
|
|
275
|
+
*/
|
|
276
|
+
export interface Guardrails {
|
|
277
|
+
dlp?: Guardrails.Dlp;
|
|
278
|
+
|
|
279
|
+
secrets?: Guardrails.Secrets;
|
|
280
|
+
|
|
281
|
+
streaming?: 'buffered' | 'passthrough';
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
export namespace Guardrails {
|
|
285
|
+
export interface Dlp {
|
|
286
|
+
profiles?: Array<'financial' | 'government_id' | 'contact'>;
|
|
287
|
+
|
|
288
|
+
prompt?: 'ignore' | 'flag' | 'block';
|
|
289
|
+
|
|
290
|
+
response?: 'ignore' | 'flag' | 'block';
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
export interface Secrets {
|
|
294
|
+
prompt?: 'ignore' | 'flag' | 'block';
|
|
295
|
+
|
|
296
|
+
response?: 'ignore' | 'flag' | 'block';
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* Per-group same-route retries. max_attempts counts the first try of each step
|
|
302
|
+
* (the primary and each fallback) and is the ceiling for the x-ltg-max-attempts
|
|
303
|
+
* request header. A step is retried only when its attempt definitely did no
|
|
304
|
+
* provider work (connection failure before dispatch, or 429/529) before the first
|
|
305
|
+
* provider event; an uncertain failure (timeout, 408/500/502/503/504) moves to the
|
|
306
|
+
* next fallback step instead. max_attempts x (1 + the longest fallback chain) must
|
|
307
|
+
* not exceed 8, else 400. The n-th retry waits retry_delay_ms (constant),
|
|
308
|
+
* retry_delay_ms*n (linear) or retry_delay_ms*2^(n-1) (exponential), at most 5 s
|
|
309
|
+
* and never past the request deadline, then jittered uniformly down to half that
|
|
310
|
+
* value so concurrent retries spread out; a provider Retry-After of at most 5 s is
|
|
311
|
+
* honoured and a longer one moves to the next step. request_timeout_ms applies to
|
|
312
|
+
* streaming requests only: it bounds each attempt's time to its first provider
|
|
313
|
+
* event and never applies after it. Non-stream requests keep the per-attempt hop
|
|
314
|
+
* and idle bounds (their headers arrive only with the finished completion).
|
|
315
|
+
* retry_delay_ms and backoff are floors for the request knobs. Each planned
|
|
316
|
+
* attempt is reserved (at most 8 per request); unused reservation is released at
|
|
317
|
+
* settlement. Managed routes only. The stored form is echoed back with defaults
|
|
318
|
+
* filled in; null disables retries.
|
|
319
|
+
*/
|
|
320
|
+
export interface Retries {
|
|
321
|
+
max_attempts: number;
|
|
322
|
+
|
|
323
|
+
backoff?: 'constant' | 'linear' | 'exponential';
|
|
324
|
+
|
|
325
|
+
request_timeout_ms?: number | null;
|
|
326
|
+
|
|
327
|
+
retry_delay_ms?: number;
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
export interface TokenGroupResponse {
|
|
332
|
+
data: TokenGroup;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
export interface TokenGroupListParams extends DefaultFlatPaginationParams {
|
|
336
|
+
/**
|
|
337
|
+
* Required after page 1; account/filter-bound 15-minute stable snapshot;
|
|
338
|
+
* expired/mismatch 409.
|
|
339
|
+
*/
|
|
340
|
+
'page[snapshot]'?: string;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
export interface TokenGroupCreateParams {
|
|
344
|
+
/**
|
|
345
|
+
* Body param
|
|
346
|
+
*/
|
|
347
|
+
allowed_models: Array<string>;
|
|
348
|
+
|
|
349
|
+
/**
|
|
350
|
+
* Body param
|
|
351
|
+
*/
|
|
352
|
+
name: string;
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* Header param: 24h, scoped by account+method+path. Same key/body returns same
|
|
356
|
+
* outcome; changed body 409; in-progress 409 with Retry-After. Token-create replay
|
|
357
|
+
* returns 200 metadata WITHOUT secret.
|
|
358
|
+
*/
|
|
359
|
+
'Idempotency-Key': string;
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* Body param
|
|
363
|
+
*/
|
|
364
|
+
blocked?: boolean;
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* Body param
|
|
368
|
+
*/
|
|
369
|
+
budget_duration?: BudgetDuration | null;
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* Body param
|
|
373
|
+
*/
|
|
374
|
+
cache_ttl?: number | null;
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* Body param: Per-group model fallbacks: primary alias -> ordered list of 1..3
|
|
378
|
+
* other aliases. Every key and listed alias must be in allowed_models (a PATCH
|
|
379
|
+
* removing a referenced alias is 400); a chain never lists its own key; wildcards
|
|
380
|
+
* are rejected. Chains are one level deep (a step's own chain is not expanded).
|
|
381
|
+
* Fallback is attempted only for managed routes, only before the first provider
|
|
382
|
+
* event is forwarded, and only to steps the key may use; each attempt is reserved
|
|
383
|
+
* and recorded. {} and null both disable fallbacks.
|
|
384
|
+
*/
|
|
385
|
+
fallbacks?: { [key: string]: Array<string> } | null;
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* Body param: Per-group guardrail policy. Missing actions default to ignore.
|
|
389
|
+
* profiles may be listed with both dlp actions ignore (staged, inactive) but a
|
|
390
|
+
* non-ignore dlp action requires at least one profile. streaming defaults to
|
|
391
|
+
* buffered when any response action is block and passthrough otherwise;
|
|
392
|
+
* passthrough with a response block is 400. Findings are codes and counts only;
|
|
393
|
+
* content is never stored. The stored form is echoed back canonicalised (all
|
|
394
|
+
* actions explicit, profiles sorted); {} is stored as an all-ignore policy, null
|
|
395
|
+
* disables.
|
|
396
|
+
*/
|
|
397
|
+
guardrails?: TokenGroupCreateParams.Guardrails | null;
|
|
398
|
+
|
|
399
|
+
/**
|
|
400
|
+
* Body param: USD, decimal precision at most 6 places; parse exactly to integer
|
|
401
|
+
* micro-USD, never binary float accounting.
|
|
402
|
+
*/
|
|
403
|
+
max_budget?: number | null;
|
|
404
|
+
|
|
405
|
+
/**
|
|
406
|
+
* Body param: Optional maximum concurrent reserved/dispatched cache misses across
|
|
407
|
+
* replicas. Null means no concurrency cap. Cache hits do not consume slots;
|
|
408
|
+
* unknown usage retains its budget hold without a slot.
|
|
409
|
+
*/
|
|
410
|
+
max_parallel_requests?: number | null;
|
|
411
|
+
|
|
412
|
+
/**
|
|
413
|
+
* Body param
|
|
414
|
+
*/
|
|
415
|
+
provider_key_ids?: Array<string>;
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* Body param: Per-group same-route retries. max_attempts counts the first try of
|
|
419
|
+
* each step (the primary and each fallback) and is the ceiling for the
|
|
420
|
+
* x-ltg-max-attempts request header. A step is retried only when its attempt
|
|
421
|
+
* definitely did no provider work (connection failure before dispatch, or 429/529)
|
|
422
|
+
* before the first provider event; an uncertain failure (timeout,
|
|
423
|
+
* 408/500/502/503/504) moves to the next fallback step instead. max_attempts x
|
|
424
|
+
* (1 + the longest fallback chain) must not exceed 8, else 400. The n-th retry
|
|
425
|
+
* waits retry_delay_ms (constant), retry_delay_ms*n (linear) or
|
|
426
|
+
* retry_delay_ms*2^(n-1) (exponential), at most 5 s and never past the request
|
|
427
|
+
* deadline, then jittered uniformly down to half that value so concurrent retries
|
|
428
|
+
* spread out; a provider Retry-After of at most 5 s is honoured and a longer one
|
|
429
|
+
* moves to the next step. request_timeout_ms applies to streaming requests only:
|
|
430
|
+
* it bounds each attempt's time to its first provider event and never applies
|
|
431
|
+
* after it. Non-stream requests keep the per-attempt hop and idle bounds (their
|
|
432
|
+
* headers arrive only with the finished completion). retry_delay_ms and backoff
|
|
433
|
+
* are floors for the request knobs. Each planned attempt is reserved (at most 8
|
|
434
|
+
* per request); unused reservation is released at settlement. Managed routes only.
|
|
435
|
+
* The stored form is echoed back with defaults filled in; null disables retries.
|
|
436
|
+
*/
|
|
437
|
+
retries?: TokenGroupCreateParams.Retries | null;
|
|
438
|
+
|
|
439
|
+
/**
|
|
440
|
+
* Body param
|
|
441
|
+
*/
|
|
442
|
+
rpm_limit?: number | null;
|
|
443
|
+
|
|
444
|
+
/**
|
|
445
|
+
* Body param
|
|
446
|
+
*/
|
|
447
|
+
tpm_limit?: number | null;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
export namespace TokenGroupCreateParams {
|
|
451
|
+
/**
|
|
452
|
+
* Per-group guardrail policy. Missing actions default to ignore. profiles may be
|
|
453
|
+
* listed with both dlp actions ignore (staged, inactive) but a non-ignore dlp
|
|
454
|
+
* action requires at least one profile. streaming defaults to buffered when any
|
|
455
|
+
* response action is block and passthrough otherwise; passthrough with a response
|
|
456
|
+
* block is 400. Findings are codes and counts only; content is never stored. The
|
|
457
|
+
* stored form is echoed back canonicalised (all actions explicit, profiles
|
|
458
|
+
* sorted); {} is stored as an all-ignore policy, null disables.
|
|
459
|
+
*/
|
|
460
|
+
export interface Guardrails {
|
|
461
|
+
dlp?: Guardrails.Dlp;
|
|
462
|
+
|
|
463
|
+
secrets?: Guardrails.Secrets;
|
|
464
|
+
|
|
465
|
+
streaming?: 'buffered' | 'passthrough';
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
export namespace Guardrails {
|
|
469
|
+
export interface Dlp {
|
|
470
|
+
profiles?: Array<'financial' | 'government_id' | 'contact'>;
|
|
471
|
+
|
|
472
|
+
prompt?: 'ignore' | 'flag' | 'block';
|
|
473
|
+
|
|
474
|
+
response?: 'ignore' | 'flag' | 'block';
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
export interface Secrets {
|
|
478
|
+
prompt?: 'ignore' | 'flag' | 'block';
|
|
479
|
+
|
|
480
|
+
response?: 'ignore' | 'flag' | 'block';
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
/**
|
|
485
|
+
* Per-group same-route retries. max_attempts counts the first try of each step
|
|
486
|
+
* (the primary and each fallback) and is the ceiling for the x-ltg-max-attempts
|
|
487
|
+
* request header. A step is retried only when its attempt definitely did no
|
|
488
|
+
* provider work (connection failure before dispatch, or 429/529) before the first
|
|
489
|
+
* provider event; an uncertain failure (timeout, 408/500/502/503/504) moves to the
|
|
490
|
+
* next fallback step instead. max_attempts x (1 + the longest fallback chain) must
|
|
491
|
+
* not exceed 8, else 400. The n-th retry waits retry_delay_ms (constant),
|
|
492
|
+
* retry_delay_ms*n (linear) or retry_delay_ms*2^(n-1) (exponential), at most 5 s
|
|
493
|
+
* and never past the request deadline, then jittered uniformly down to half that
|
|
494
|
+
* value so concurrent retries spread out; a provider Retry-After of at most 5 s is
|
|
495
|
+
* honoured and a longer one moves to the next step. request_timeout_ms applies to
|
|
496
|
+
* streaming requests only: it bounds each attempt's time to its first provider
|
|
497
|
+
* event and never applies after it. Non-stream requests keep the per-attempt hop
|
|
498
|
+
* and idle bounds (their headers arrive only with the finished completion).
|
|
499
|
+
* retry_delay_ms and backoff are floors for the request knobs. Each planned
|
|
500
|
+
* attempt is reserved (at most 8 per request); unused reservation is released at
|
|
501
|
+
* settlement. Managed routes only. The stored form is echoed back with defaults
|
|
502
|
+
* filled in; null disables retries.
|
|
503
|
+
*/
|
|
504
|
+
export interface Retries {
|
|
505
|
+
max_attempts: number;
|
|
506
|
+
|
|
507
|
+
backoff?: 'constant' | 'linear' | 'exponential';
|
|
508
|
+
|
|
509
|
+
request_timeout_ms?: number | null;
|
|
510
|
+
|
|
511
|
+
retry_delay_ms?: number;
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
export interface TokenGroupDeleteParams {
|
|
516
|
+
/**
|
|
517
|
+
* 24h, scoped by account+method+path. Same key/body returns same outcome; changed
|
|
518
|
+
* body 409; in-progress 409 with Retry-After. Token-create replay returns 200
|
|
519
|
+
* metadata WITHOUT secret.
|
|
520
|
+
*/
|
|
521
|
+
'Idempotency-Key': string;
|
|
522
|
+
|
|
523
|
+
/**
|
|
524
|
+
* Exact quoted resource-version ETag; an exact intermediary-weakened echo W/"n" is
|
|
525
|
+
* accepted. Wildcard, combined and malformed validators are rejected; stale 412;
|
|
526
|
+
* missing 428. HTTP field names are case-insensitive. Replayed idempotent result
|
|
527
|
+
* is checked first.
|
|
528
|
+
*/
|
|
529
|
+
'If-Match': string;
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
export interface TokenGroupUpdateParams {
|
|
533
|
+
/**
|
|
534
|
+
* Header param: 24h, scoped by account+method+path. Same key/body returns same
|
|
535
|
+
* outcome; changed body 409; in-progress 409 with Retry-After. Token-create replay
|
|
536
|
+
* returns 200 metadata WITHOUT secret.
|
|
537
|
+
*/
|
|
538
|
+
'Idempotency-Key': string;
|
|
539
|
+
|
|
540
|
+
/**
|
|
541
|
+
* Header param: Exact quoted resource-version ETag; an exact intermediary-weakened
|
|
542
|
+
* echo W/"n" is accepted. Wildcard, combined and malformed validators are
|
|
543
|
+
* rejected; stale 412; missing 428. HTTP field names are case-insensitive.
|
|
544
|
+
* Replayed idempotent result is checked first.
|
|
545
|
+
*/
|
|
546
|
+
'If-Match': string;
|
|
547
|
+
|
|
548
|
+
/**
|
|
549
|
+
* Body param
|
|
550
|
+
*/
|
|
551
|
+
allowed_models?: Array<string>;
|
|
552
|
+
|
|
553
|
+
/**
|
|
554
|
+
* Body param
|
|
555
|
+
*/
|
|
556
|
+
blocked?: boolean;
|
|
557
|
+
|
|
558
|
+
/**
|
|
559
|
+
* Body param
|
|
560
|
+
*/
|
|
561
|
+
budget_duration?: BudgetDuration | null;
|
|
562
|
+
|
|
563
|
+
/**
|
|
564
|
+
* Body param
|
|
565
|
+
*/
|
|
566
|
+
cache_ttl?: number | null;
|
|
567
|
+
|
|
568
|
+
/**
|
|
569
|
+
* Body param: Per-group model fallbacks: primary alias -> ordered list of 1..3
|
|
570
|
+
* other aliases. Every key and listed alias must be in allowed_models (a PATCH
|
|
571
|
+
* removing a referenced alias is 400); a chain never lists its own key; wildcards
|
|
572
|
+
* are rejected. Chains are one level deep (a step's own chain is not expanded).
|
|
573
|
+
* Fallback is attempted only for managed routes, only before the first provider
|
|
574
|
+
* event is forwarded, and only to steps the key may use; each attempt is reserved
|
|
575
|
+
* and recorded. {} and null both disable fallbacks.
|
|
576
|
+
*/
|
|
577
|
+
fallbacks?: { [key: string]: Array<string> } | null;
|
|
578
|
+
|
|
579
|
+
/**
|
|
580
|
+
* Body param: Per-group guardrail policy. Missing actions default to ignore.
|
|
581
|
+
* profiles may be listed with both dlp actions ignore (staged, inactive) but a
|
|
582
|
+
* non-ignore dlp action requires at least one profile. streaming defaults to
|
|
583
|
+
* buffered when any response action is block and passthrough otherwise;
|
|
584
|
+
* passthrough with a response block is 400. Findings are codes and counts only;
|
|
585
|
+
* content is never stored. The stored form is echoed back canonicalised (all
|
|
586
|
+
* actions explicit, profiles sorted); {} is stored as an all-ignore policy, null
|
|
587
|
+
* disables.
|
|
588
|
+
*/
|
|
589
|
+
guardrails?: TokenGroupUpdateParams.Guardrails | null;
|
|
590
|
+
|
|
591
|
+
/**
|
|
592
|
+
* Body param: USD, decimal precision at most 6 places; parse exactly to integer
|
|
593
|
+
* micro-USD, never binary float accounting.
|
|
594
|
+
*/
|
|
595
|
+
max_budget?: number | null;
|
|
596
|
+
|
|
597
|
+
/**
|
|
598
|
+
* Body param: Optional maximum concurrent reserved/dispatched cache misses across
|
|
599
|
+
* replicas. Null means no concurrency cap. Cache hits do not consume slots;
|
|
600
|
+
* unknown usage retains its budget hold without a slot.
|
|
601
|
+
*/
|
|
602
|
+
max_parallel_requests?: number | null;
|
|
603
|
+
|
|
604
|
+
/**
|
|
605
|
+
* Body param
|
|
606
|
+
*/
|
|
607
|
+
name?: string;
|
|
608
|
+
|
|
609
|
+
/**
|
|
610
|
+
* Body param
|
|
611
|
+
*/
|
|
612
|
+
provider_key_ids?: Array<string>;
|
|
613
|
+
|
|
614
|
+
/**
|
|
615
|
+
* Body param: Per-group same-route retries. max_attempts counts the first try of
|
|
616
|
+
* each step (the primary and each fallback) and is the ceiling for the
|
|
617
|
+
* x-ltg-max-attempts request header. A step is retried only when its attempt
|
|
618
|
+
* definitely did no provider work (connection failure before dispatch, or 429/529)
|
|
619
|
+
* before the first provider event; an uncertain failure (timeout,
|
|
620
|
+
* 408/500/502/503/504) moves to the next fallback step instead. max_attempts x
|
|
621
|
+
* (1 + the longest fallback chain) must not exceed 8, else 400. The n-th retry
|
|
622
|
+
* waits retry_delay_ms (constant), retry_delay_ms*n (linear) or
|
|
623
|
+
* retry_delay_ms*2^(n-1) (exponential), at most 5 s and never past the request
|
|
624
|
+
* deadline, then jittered uniformly down to half that value so concurrent retries
|
|
625
|
+
* spread out; a provider Retry-After of at most 5 s is honoured and a longer one
|
|
626
|
+
* moves to the next step. request_timeout_ms applies to streaming requests only:
|
|
627
|
+
* it bounds each attempt's time to its first provider event and never applies
|
|
628
|
+
* after it. Non-stream requests keep the per-attempt hop and idle bounds (their
|
|
629
|
+
* headers arrive only with the finished completion). retry_delay_ms and backoff
|
|
630
|
+
* are floors for the request knobs. Each planned attempt is reserved (at most 8
|
|
631
|
+
* per request); unused reservation is released at settlement. Managed routes only.
|
|
632
|
+
* The stored form is echoed back with defaults filled in; null disables retries.
|
|
633
|
+
*/
|
|
634
|
+
retries?: TokenGroupUpdateParams.Retries | null;
|
|
635
|
+
|
|
636
|
+
/**
|
|
637
|
+
* Body param
|
|
638
|
+
*/
|
|
639
|
+
rpm_limit?: number | null;
|
|
640
|
+
|
|
641
|
+
/**
|
|
642
|
+
* Body param
|
|
643
|
+
*/
|
|
644
|
+
tpm_limit?: number | null;
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
export namespace TokenGroupUpdateParams {
|
|
648
|
+
/**
|
|
649
|
+
* Per-group guardrail policy. Missing actions default to ignore. profiles may be
|
|
650
|
+
* listed with both dlp actions ignore (staged, inactive) but a non-ignore dlp
|
|
651
|
+
* action requires at least one profile. streaming defaults to buffered when any
|
|
652
|
+
* response action is block and passthrough otherwise; passthrough with a response
|
|
653
|
+
* block is 400. Findings are codes and counts only; content is never stored. The
|
|
654
|
+
* stored form is echoed back canonicalised (all actions explicit, profiles
|
|
655
|
+
* sorted); {} is stored as an all-ignore policy, null disables.
|
|
656
|
+
*/
|
|
657
|
+
export interface Guardrails {
|
|
658
|
+
dlp?: Guardrails.Dlp;
|
|
659
|
+
|
|
660
|
+
secrets?: Guardrails.Secrets;
|
|
661
|
+
|
|
662
|
+
streaming?: 'buffered' | 'passthrough';
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
export namespace Guardrails {
|
|
666
|
+
export interface Dlp {
|
|
667
|
+
profiles?: Array<'financial' | 'government_id' | 'contact'>;
|
|
668
|
+
|
|
669
|
+
prompt?: 'ignore' | 'flag' | 'block';
|
|
670
|
+
|
|
671
|
+
response?: 'ignore' | 'flag' | 'block';
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
export interface Secrets {
|
|
675
|
+
prompt?: 'ignore' | 'flag' | 'block';
|
|
676
|
+
|
|
677
|
+
response?: 'ignore' | 'flag' | 'block';
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
/**
|
|
682
|
+
* Per-group same-route retries. max_attempts counts the first try of each step
|
|
683
|
+
* (the primary and each fallback) and is the ceiling for the x-ltg-max-attempts
|
|
684
|
+
* request header. A step is retried only when its attempt definitely did no
|
|
685
|
+
* provider work (connection failure before dispatch, or 429/529) before the first
|
|
686
|
+
* provider event; an uncertain failure (timeout, 408/500/502/503/504) moves to the
|
|
687
|
+
* next fallback step instead. max_attempts x (1 + the longest fallback chain) must
|
|
688
|
+
* not exceed 8, else 400. The n-th retry waits retry_delay_ms (constant),
|
|
689
|
+
* retry_delay_ms*n (linear) or retry_delay_ms*2^(n-1) (exponential), at most 5 s
|
|
690
|
+
* and never past the request deadline, then jittered uniformly down to half that
|
|
691
|
+
* value so concurrent retries spread out; a provider Retry-After of at most 5 s is
|
|
692
|
+
* honoured and a longer one moves to the next step. request_timeout_ms applies to
|
|
693
|
+
* streaming requests only: it bounds each attempt's time to its first provider
|
|
694
|
+
* event and never applies after it. Non-stream requests keep the per-attempt hop
|
|
695
|
+
* and idle bounds (their headers arrive only with the finished completion).
|
|
696
|
+
* retry_delay_ms and backoff are floors for the request knobs. Each planned
|
|
697
|
+
* attempt is reserved (at most 8 per request); unused reservation is released at
|
|
698
|
+
* settlement. Managed routes only. The stored form is echoed back with defaults
|
|
699
|
+
* filled in; null disables retries.
|
|
700
|
+
*/
|
|
701
|
+
export interface Retries {
|
|
702
|
+
max_attempts: number;
|
|
703
|
+
|
|
704
|
+
backoff?: 'constant' | 'linear' | 'exponential';
|
|
705
|
+
|
|
706
|
+
request_timeout_ms?: number | null;
|
|
707
|
+
|
|
708
|
+
retry_delay_ms?: number;
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
export declare namespace TokenGroups {
|
|
713
|
+
export {
|
|
714
|
+
type AIGatewayResourcesPageMeta as AIGatewayResourcesPageMeta,
|
|
715
|
+
type BudgetDuration as BudgetDuration,
|
|
716
|
+
type TokenGroup as TokenGroup,
|
|
717
|
+
type TokenGroupResponse as TokenGroupResponse,
|
|
718
|
+
type TokenGroupsDefaultFlatPagination as TokenGroupsDefaultFlatPagination,
|
|
719
|
+
type TokenGroupListParams as TokenGroupListParams,
|
|
720
|
+
type TokenGroupCreateParams as TokenGroupCreateParams,
|
|
721
|
+
type TokenGroupDeleteParams as TokenGroupDeleteParams,
|
|
722
|
+
type TokenGroupUpdateParams as TokenGroupUpdateParams,
|
|
723
|
+
};
|
|
724
|
+
}
|