telnyx 7.29.0 → 7.30.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 +7 -0
- package/README.md +27 -0
- package/client.d.mts +9 -10
- package/client.d.mts.map +1 -1
- package/client.d.ts +9 -10
- package/client.d.ts.map +1 -1
- package/client.js +0 -3
- package/client.js.map +1 -1
- package/client.mjs +0 -3
- package/client.mjs.map +1 -1
- package/core/pagination.d.mts +20 -0
- package/core/pagination.d.mts.map +1 -1
- package/core/pagination.d.ts +20 -0
- package/core/pagination.d.ts.map +1 -1
- package/core/pagination.js +25 -1
- package/core/pagination.js.map +1 -1
- package/core/pagination.mjs +23 -0
- package/core/pagination.mjs.map +1 -1
- package/lib/login-token.d.mts +91 -0
- package/lib/login-token.d.mts.map +1 -0
- package/lib/login-token.d.ts +91 -0
- package/lib/login-token.d.ts.map +1 -0
- package/lib/login-token.js +190 -0
- package/lib/login-token.js.map +1 -0
- package/lib/login-token.mjs +151 -0
- package/lib/login-token.mjs.map +1 -0
- package/package.json +1 -1
- package/resources/ai/ai.d.mts +9 -4
- package/resources/ai/ai.d.mts.map +1 -1
- package/resources/ai/ai.d.ts +9 -4
- package/resources/ai/ai.d.ts.map +1 -1
- package/resources/ai/ai.js.map +1 -1
- package/resources/ai/ai.mjs.map +1 -1
- package/resources/ai/assistants/assistants.d.mts +191 -109
- package/resources/ai/assistants/assistants.d.mts.map +1 -1
- package/resources/ai/assistants/assistants.d.ts +191 -109
- package/resources/ai/assistants/assistants.d.ts.map +1 -1
- package/resources/ai/assistants/assistants.js.map +1 -1
- package/resources/ai/assistants/assistants.mjs.map +1 -1
- package/resources/ai/assistants/index.d.mts +1 -1
- package/resources/ai/assistants/index.d.mts.map +1 -1
- package/resources/ai/assistants/index.d.ts +1 -1
- package/resources/ai/assistants/index.d.ts.map +1 -1
- package/resources/ai/assistants/index.js.map +1 -1
- package/resources/ai/assistants/index.mjs.map +1 -1
- package/resources/ai/chat.d.mts +3 -5
- package/resources/ai/chat.d.mts.map +1 -1
- package/resources/ai/chat.d.ts +3 -5
- package/resources/ai/chat.d.ts.map +1 -1
- package/resources/ai/conversations/conversations.d.mts +27 -2
- package/resources/ai/conversations/conversations.d.mts.map +1 -1
- package/resources/ai/conversations/conversations.d.ts +27 -2
- package/resources/ai/conversations/conversations.d.ts.map +1 -1
- package/resources/ai/conversations/conversations.js +23 -1
- package/resources/ai/conversations/conversations.js.map +1 -1
- package/resources/ai/conversations/conversations.mjs +23 -1
- package/resources/ai/conversations/conversations.mjs.map +1 -1
- package/resources/ai/conversations/index.d.mts +1 -1
- package/resources/ai/conversations/index.d.mts.map +1 -1
- package/resources/ai/conversations/index.d.ts +1 -1
- package/resources/ai/conversations/index.d.ts.map +1 -1
- package/resources/ai/conversations/index.js.map +1 -1
- package/resources/ai/conversations/index.mjs.map +1 -1
- package/resources/ai/index.d.mts +2 -2
- package/resources/ai/index.d.mts.map +1 -1
- package/resources/ai/index.d.ts +2 -2
- package/resources/ai/index.d.ts.map +1 -1
- package/resources/ai/index.js.map +1 -1
- 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 +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 +1 -1
- package/resources/ai/memory/namespaces/namespaces.mjs.map +1 -1
- package/resources/ai/memory/namespaces/profiles/profiles.d.mts +3 -3
- package/resources/ai/memory/namespaces/profiles/profiles.d.mts.map +1 -1
- package/resources/ai/memory/namespaces/profiles/profiles.d.ts +3 -3
- package/resources/ai/memory/namespaces/profiles/profiles.d.ts.map +1 -1
- package/resources/ai/memory/namespaces/profiles/profiles.js.map +1 -1
- package/resources/ai/memory/namespaces/profiles/profiles.mjs.map +1 -1
- package/resources/ai/memory/namespaces/settings.d.mts +23 -27
- package/resources/ai/memory/namespaces/settings.d.mts.map +1 -1
- package/resources/ai/memory/namespaces/settings.d.ts +23 -27
- package/resources/ai/memory/namespaces/settings.d.ts.map +1 -1
- package/resources/ai/openai/chat.d.mts +3 -5
- package/resources/ai/openai/chat.d.mts.map +1 -1
- package/resources/ai/openai/chat.d.ts +3 -5
- package/resources/ai/openai/chat.d.ts.map +1 -1
- package/resources/ai/tests/test-framework/v1/v1.d.mts +15 -5
- package/resources/ai/tests/test-framework/v1/v1.d.mts.map +1 -1
- package/resources/ai/tests/test-framework/v1/v1.d.ts +15 -5
- package/resources/ai/tests/test-framework/v1/v1.d.ts.map +1 -1
- package/resources/ai/tools.d.mts +222 -0
- package/resources/ai/tools.d.mts.map +1 -1
- package/resources/ai/tools.d.ts +222 -0
- package/resources/ai/tools.d.ts.map +1 -1
- package/resources/browser-sessions/actions.d.mts +13 -7
- package/resources/browser-sessions/actions.d.mts.map +1 -1
- package/resources/browser-sessions/actions.d.ts +13 -7
- package/resources/browser-sessions/actions.d.ts.map +1 -1
- package/resources/browser-sessions/browser-sessions.d.mts +6 -2
- package/resources/browser-sessions/browser-sessions.d.mts.map +1 -1
- package/resources/browser-sessions/browser-sessions.d.ts +6 -2
- package/resources/browser-sessions/browser-sessions.d.ts.map +1 -1
- package/resources/compute/funcs/export.d.mts +33 -35
- package/resources/compute/funcs/export.d.mts.map +1 -1
- package/resources/compute/funcs/export.d.ts +33 -35
- package/resources/compute/funcs/export.d.ts.map +1 -1
- package/resources/compute/funcs/funcs.d.mts +2 -2
- package/resources/compute/funcs/funcs.d.mts.map +1 -1
- package/resources/compute/funcs/funcs.d.ts +2 -2
- package/resources/compute/funcs/funcs.d.ts.map +1 -1
- package/resources/compute/funcs/funcs.js.map +1 -1
- package/resources/compute/funcs/funcs.mjs.map +1 -1
- package/resources/compute/funcs/index.d.mts +1 -1
- package/resources/compute/funcs/index.d.mts.map +1 -1
- package/resources/compute/funcs/index.d.ts +1 -1
- package/resources/compute/funcs/index.d.ts.map +1 -1
- package/resources/compute/funcs/index.js.map +1 -1
- package/resources/compute/funcs/index.mjs +1 -1
- package/resources/compute/funcs/index.mjs.map +1 -1
- package/resources/email/dedicated-ips/dedicated-ips.d.mts.map +1 -1
- package/resources/email/dedicated-ips/dedicated-ips.d.ts.map +1 -1
- package/resources/email/dedicated-ips/dedicated-ips.js +2 -2
- package/resources/email/dedicated-ips/dedicated-ips.js.map +1 -1
- package/resources/email/dedicated-ips/dedicated-ips.mjs +2 -2
- package/resources/email/dedicated-ips/dedicated-ips.mjs.map +1 -1
- package/resources/email-events.d.mts +84 -106
- package/resources/email-events.d.mts.map +1 -1
- package/resources/email-events.d.ts +84 -106
- package/resources/email-events.d.ts.map +1 -1
- package/resources/email-events.js +5 -1
- package/resources/email-events.js.map +1 -1
- package/resources/email-events.mjs +5 -1
- package/resources/email-events.mjs.map +1 -1
- package/resources/email-messages/email-messages.d.mts +1 -7
- package/resources/email-messages/email-messages.d.mts.map +1 -1
- package/resources/email-messages/email-messages.d.ts +1 -7
- package/resources/email-messages/email-messages.d.ts.map +1 -1
- package/resources/email-messages/email-messages.js.map +1 -1
- package/resources/email-messages/email-messages.mjs.map +1 -1
- package/resources/email-templates.d.mts +16 -70
- package/resources/email-templates.d.mts.map +1 -1
- package/resources/email-templates.d.ts +16 -70
- package/resources/email-templates.d.ts.map +1 -1
- package/resources/enterprises/enterprises.d.mts +2 -2
- package/resources/enterprises/enterprises.d.mts.map +1 -1
- package/resources/enterprises/enterprises.d.ts +2 -2
- package/resources/enterprises/enterprises.d.ts.map +1 -1
- package/resources/enterprises/enterprises.js.map +1 -1
- 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 +26 -29
- package/resources/enterprises/reputation/external-verification.d.mts.map +1 -1
- package/resources/enterprises/reputation/external-verification.d.ts +26 -29
- package/resources/enterprises/reputation/external-verification.d.ts.map +1 -1
- package/resources/enterprises/reputation/external-verification.js +3 -3
- package/resources/enterprises/reputation/external-verification.js.map +1 -1
- package/resources/enterprises/reputation/external-verification.mjs +1 -1
- package/resources/enterprises/reputation/external-verification.mjs.map +1 -1
- package/resources/enterprises/reputation/index.d.mts +1 -1
- package/resources/enterprises/reputation/index.d.mts.map +1 -1
- package/resources/enterprises/reputation/index.d.ts +1 -1
- package/resources/enterprises/reputation/index.d.ts.map +1 -1
- package/resources/enterprises/reputation/index.js +2 -2
- package/resources/enterprises/reputation/index.js.map +1 -1
- package/resources/enterprises/reputation/index.mjs +1 -1
- package/resources/enterprises/reputation/index.mjs.map +1 -1
- package/resources/enterprises/reputation/reputation.d.mts +3 -3
- package/resources/enterprises/reputation/reputation.d.mts.map +1 -1
- package/resources/enterprises/reputation/reputation.d.ts +3 -3
- package/resources/enterprises/reputation/reputation.d.ts.map +1 -1
- package/resources/enterprises/reputation/reputation.js +2 -2
- package/resources/enterprises/reputation/reputation.js.map +1 -1
- package/resources/enterprises/reputation/reputation.mjs +3 -3
- package/resources/enterprises/reputation/reputation.mjs.map +1 -1
- package/resources/enterprises/verify-email.d.mts +27 -29
- package/resources/enterprises/verify-email.d.mts.map +1 -1
- package/resources/enterprises/verify-email.d.ts +27 -29
- package/resources/enterprises/verify-email.d.ts.map +1 -1
- package/resources/index.d.mts +3 -4
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -4
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +1 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +0 -1
- package/resources/index.mjs.map +1 -1
- package/resources/messages/messages.d.mts +32 -2
- package/resources/messages/messages.d.mts.map +1 -1
- package/resources/messages/messages.d.ts +32 -2
- package/resources/messages/messages.d.ts.map +1 -1
- package/resources/messages/messages.js.map +1 -1
- package/resources/messages/messages.mjs.map +1 -1
- package/resources/messaging-profiles/messaging-profiles.d.mts +11 -0
- package/resources/messaging-profiles/messaging-profiles.d.mts.map +1 -1
- package/resources/messaging-profiles/messaging-profiles.d.ts +11 -0
- package/resources/messaging-profiles/messaging-profiles.d.ts.map +1 -1
- package/resources/messaging-profiles/messaging-profiles.js.map +1 -1
- package/resources/messaging-profiles/messaging-profiles.mjs.map +1 -1
- package/resources/number-lookup.d.mts +5 -0
- package/resources/number-lookup.d.mts.map +1 -1
- package/resources/number-lookup.d.ts +5 -0
- package/resources/number-lookup.d.ts.map +1 -1
- package/resources/pay-connectors.d.mts +7 -7
- package/resources/pay-connectors.d.mts.map +1 -1
- package/resources/pay-connectors.d.ts +7 -7
- package/resources/pay-connectors.d.ts.map +1 -1
- package/resources/phone-numbers/index.d.mts +1 -1
- package/resources/phone-numbers/index.d.mts.map +1 -1
- package/resources/phone-numbers/index.d.ts +1 -1
- 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 +21 -57
- package/resources/phone-numbers/jobs.d.mts.map +1 -1
- package/resources/phone-numbers/jobs.d.ts +21 -57
- package/resources/phone-numbers/jobs.d.ts.map +1 -1
- package/resources/phone-numbers/phone-numbers.d.mts +2 -2
- package/resources/phone-numbers/phone-numbers.d.mts.map +1 -1
- package/resources/phone-numbers/phone-numbers.d.ts +2 -2
- package/resources/phone-numbers/phone-numbers.d.ts.map +1 -1
- package/resources/phone-numbers/phone-numbers.js.map +1 -1
- package/resources/phone-numbers/phone-numbers.mjs.map +1 -1
- package/resources/portouts/portouts.d.mts +2 -1
- package/resources/portouts/portouts.d.mts.map +1 -1
- package/resources/portouts/portouts.d.ts +2 -1
- package/resources/portouts/portouts.d.ts.map +1 -1
- package/resources/portouts/portouts.js +2 -1
- package/resources/portouts/portouts.js.map +1 -1
- package/resources/portouts/portouts.mjs +2 -1
- package/resources/portouts/portouts.mjs.map +1 -1
- package/resources/telephony-credentials.d.mts +78 -2
- package/resources/telephony-credentials.d.mts.map +1 -1
- package/resources/telephony-credentials.d.ts +78 -2
- package/resources/telephony-credentials.d.ts.map +1 -1
- package/resources/telephony-credentials.js +50 -2
- package/resources/telephony-credentials.js.map +1 -1
- package/resources/telephony-credentials.mjs +50 -2
- package/resources/telephony-credentials.mjs.map +1 -1
- package/resources/voice-clones.d.mts +4 -4
- package/resources/voice-clones.d.mts.map +1 -1
- package/resources/voice-clones.d.ts +4 -4
- package/resources/voice-clones.d.ts.map +1 -1
- package/resources/webhooks.d.mts +10 -20
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +10 -20
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/whatsapp/business-accounts/business-accounts.d.mts +2 -2
- package/resources/whatsapp/business-accounts/business-accounts.d.mts.map +1 -1
- package/resources/whatsapp/business-accounts/business-accounts.d.ts +2 -2
- package/resources/whatsapp/business-accounts/business-accounts.d.ts.map +1 -1
- package/resources/whatsapp/business-accounts/business-accounts.js.map +1 -1
- package/resources/whatsapp/business-accounts/business-accounts.mjs.map +1 -1
- package/resources/whatsapp/business-accounts/index.d.mts +1 -1
- package/resources/whatsapp/business-accounts/index.d.mts.map +1 -1
- package/resources/whatsapp/business-accounts/index.d.ts +1 -1
- package/resources/whatsapp/business-accounts/index.d.ts.map +1 -1
- package/resources/whatsapp/business-accounts/index.js.map +1 -1
- package/resources/whatsapp/business-accounts/index.mjs.map +1 -1
- package/resources/whatsapp/business-accounts/phone-numbers.d.mts +7 -66
- package/resources/whatsapp/business-accounts/phone-numbers.d.mts.map +1 -1
- package/resources/whatsapp/business-accounts/phone-numbers.d.ts +7 -66
- package/resources/whatsapp/business-accounts/phone-numbers.d.ts.map +1 -1
- package/resources/whatsapp/business-accounts/phone-numbers.js +1 -1
- package/resources/whatsapp/business-accounts/phone-numbers.js.map +1 -1
- package/resources/whatsapp/business-accounts/phone-numbers.mjs +1 -1
- package/resources/whatsapp/business-accounts/phone-numbers.mjs.map +1 -1
- package/resources/whatsapp/hosted-signups.d.mts +11 -73
- package/resources/whatsapp/hosted-signups.d.mts.map +1 -1
- package/resources/whatsapp/hosted-signups.d.ts +11 -73
- package/resources/whatsapp/hosted-signups.d.ts.map +1 -1
- package/resources/whatsapp/hosted-signups.js +5 -2
- package/resources/whatsapp/hosted-signups.js.map +1 -1
- package/resources/whatsapp/hosted-signups.mjs +5 -2
- package/resources/whatsapp/hosted-signups.mjs.map +1 -1
- package/resources/whatsapp/index.d.mts +2 -2
- package/resources/whatsapp/index.d.mts.map +1 -1
- package/resources/whatsapp/index.d.ts +2 -2
- package/resources/whatsapp/index.d.ts.map +1 -1
- package/resources/whatsapp/phone-numbers/index.d.mts +1 -1
- package/resources/whatsapp/phone-numbers/index.d.mts.map +1 -1
- package/resources/whatsapp/phone-numbers/index.d.ts +1 -1
- package/resources/whatsapp/phone-numbers/index.d.ts.map +1 -1
- package/resources/whatsapp/phone-numbers/phone-numbers.d.mts +9 -135
- package/resources/whatsapp/phone-numbers/phone-numbers.d.mts.map +1 -1
- package/resources/whatsapp/phone-numbers/phone-numbers.d.ts +9 -135
- package/resources/whatsapp/phone-numbers/phone-numbers.d.ts.map +1 -1
- package/resources/whatsapp/phone-numbers/phone-numbers.js +1 -1
- package/resources/whatsapp/phone-numbers/phone-numbers.js.map +1 -1
- package/resources/whatsapp/phone-numbers/phone-numbers.mjs +1 -1
- package/resources/whatsapp/phone-numbers/phone-numbers.mjs.map +1 -1
- package/resources/whatsapp/whatsapp.d.mts +4 -4
- package/resources/whatsapp/whatsapp.d.mts.map +1 -1
- package/resources/whatsapp/whatsapp.d.ts +4 -4
- package/resources/whatsapp/whatsapp.d.ts.map +1 -1
- package/resources/whatsapp/whatsapp.mjs.map +1 -1
- package/src/client.ts +16 -5
- package/src/core/pagination.ts +58 -0
- package/src/lib/login-token.ts +223 -0
- package/src/resources/ai/ai.ts +12 -0
- package/src/resources/ai/assistants/assistants.ts +227 -144
- package/src/resources/ai/assistants/index.ts +2 -0
- package/src/resources/ai/chat.ts +3 -5
- package/src/resources/ai/conversations/conversations.ts +39 -1
- package/src/resources/ai/conversations/index.ts +1 -0
- package/src/resources/ai/index.ts +3 -0
- package/src/resources/ai/memory/namespaces/index.ts +7 -1
- package/src/resources/ai/memory/namespaces/namespaces.ts +9 -1
- package/src/resources/ai/memory/namespaces/profiles/profiles.ts +5 -3
- package/src/resources/ai/memory/namespaces/settings.ts +25 -27
- package/src/resources/ai/openai/chat.ts +3 -5
- package/src/resources/ai/tests/test-framework/v1/v1.ts +5 -5
- package/src/resources/ai/tools.ts +366 -0
- package/src/resources/browser-sessions/actions.ts +7 -7
- package/src/resources/browser-sessions/browser-sessions.ts +2 -2
- package/src/resources/compute/funcs/export.ts +41 -42
- package/src/resources/compute/funcs/funcs.ts +2 -1
- package/src/resources/compute/funcs/index.ts +6 -1
- package/src/resources/email/dedicated-ips/dedicated-ips.ts +3 -2
- package/src/resources/email-events.ts +128 -147
- package/src/resources/email-messages/email-messages.ts +1 -7
- package/src/resources/email-templates.ts +17 -78
- package/src/resources/enterprises/enterprises.ts +2 -0
- package/src/resources/enterprises/index.ts +1 -0
- package/src/resources/enterprises/reputation/external-verification.ts +32 -34
- package/src/resources/enterprises/reputation/index.ts +2 -1
- package/src/resources/enterprises/reputation/reputation.ts +6 -4
- package/src/resources/enterprises/verify-email.ts +29 -30
- package/src/resources/index.ts +4 -1
- package/src/resources/messages/messages.ts +32 -2
- package/src/resources/messaging-profiles/messaging-profiles.ts +12 -0
- package/src/resources/number-lookup.ts +6 -0
- package/src/resources/pay-connectors.ts +7 -7
- package/src/resources/phone-numbers/index.ts +2 -0
- package/src/resources/phone-numbers/jobs.ts +22 -60
- package/src/resources/phone-numbers/phone-numbers.ts +4 -0
- package/src/resources/portouts/portouts.ts +2 -1
- package/src/resources/telephony-credentials.ts +108 -2
- package/src/resources/voice-clones.ts +4 -4
- package/src/resources/webhooks.ts +10 -20
- package/src/resources/whatsapp/business-accounts/business-accounts.ts +0 -4
- package/src/resources/whatsapp/business-accounts/index.ts +0 -2
- package/src/resources/whatsapp/business-accounts/phone-numbers.ts +7 -98
- package/src/resources/whatsapp/hosted-signups.ts +18 -97
- package/src/resources/whatsapp/index.ts +4 -4
- package/src/resources/whatsapp/phone-numbers/index.ts +2 -2
- package/src/resources/whatsapp/phone-numbers/phone-numbers.ts +11 -197
- package/src/resources/whatsapp/whatsapp.ts +8 -8
- 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/tts-integrations/actions.d.mts +0 -4
- package/resources/tts-integrations/actions.d.mts.map +0 -1
- package/resources/tts-integrations/actions.d.ts +0 -4
- package/resources/tts-integrations/actions.d.ts.map +0 -1
- package/resources/tts-integrations/actions.js +0 -9
- package/resources/tts-integrations/actions.js.map +0 -1
- package/resources/tts-integrations/actions.mjs +0 -5
- package/resources/tts-integrations/actions.mjs.map +0 -1
- package/resources/tts-integrations/index.d.mts +0 -3
- package/resources/tts-integrations/index.d.mts.map +0 -1
- package/resources/tts-integrations/index.d.ts +0 -3
- package/resources/tts-integrations/index.d.ts.map +0 -1
- package/resources/tts-integrations/index.js +0 -9
- package/resources/tts-integrations/index.js.map +0 -1
- package/resources/tts-integrations/index.mjs +0 -4
- package/resources/tts-integrations/index.mjs.map +0 -1
- package/resources/tts-integrations/tts-integrations.d.mts +0 -10
- package/resources/tts-integrations/tts-integrations.d.mts.map +0 -1
- package/resources/tts-integrations/tts-integrations.d.ts +0 -10
- package/resources/tts-integrations/tts-integrations.d.ts.map +0 -1
- package/resources/tts-integrations/tts-integrations.js +0 -17
- package/resources/tts-integrations/tts-integrations.js.map +0 -1
- package/resources/tts-integrations/tts-integrations.mjs +0 -12
- package/resources/tts-integrations/tts-integrations.mjs.map +0 -1
- package/resources/tts-integrations.d.mts +0 -2
- package/resources/tts-integrations.d.mts.map +0 -1
- package/resources/tts-integrations.d.ts +0 -2
- package/resources/tts-integrations.d.ts.map +0 -1
- package/resources/tts-integrations.js +0 -6
- package/resources/tts-integrations.js.map +0 -1
- package/resources/tts-integrations.mjs +0 -3
- package/resources/tts-integrations.mjs.map +0 -1
- package/src/resources/tts-integrations/actions.ts +0 -5
- package/src/resources/tts-integrations/index.ts +0 -4
- package/src/resources/tts-integrations/tts-integrations.ts +0 -15
- package/src/resources/tts-integrations.ts +0 -3
|
@@ -6,6 +6,7 @@ import { DefaultFlatPagination, type DefaultFlatPaginationParams, PagePromise }
|
|
|
6
6
|
import { buildHeaders } from '../internal/headers';
|
|
7
7
|
import { RequestOptions } from '../internal/request-options';
|
|
8
8
|
import { path } from '../internal/utils/path';
|
|
9
|
+
import { createLoginToken, type LoginTokenOptions } from '../lib/login-token';
|
|
9
10
|
|
|
10
11
|
export class TelephonyCredentials extends APIResource {
|
|
11
12
|
/**
|
|
@@ -43,10 +44,16 @@ export class TelephonyCredentials extends APIResource {
|
|
|
43
44
|
* ```
|
|
44
45
|
*/
|
|
45
46
|
create(
|
|
46
|
-
|
|
47
|
+
params: TelephonyCredentialCreateParams,
|
|
47
48
|
options?: RequestOptions,
|
|
48
49
|
): APIPromise<TelephonyCredentialCreateResponse> {
|
|
49
|
-
|
|
50
|
+
// `include` is a query parameter; everything else is the body.
|
|
51
|
+
const { include, ...body } = params;
|
|
52
|
+
return this._client.post('/telephony_credentials', {
|
|
53
|
+
...(include === undefined ? {} : { query: { include } }),
|
|
54
|
+
body,
|
|
55
|
+
...options,
|
|
56
|
+
});
|
|
50
57
|
}
|
|
51
58
|
|
|
52
59
|
/**
|
|
@@ -119,6 +126,56 @@ export class TelephonyCredentials extends APIResource {
|
|
|
119
126
|
]),
|
|
120
127
|
});
|
|
121
128
|
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Returns the material a server needs to mint login tokens for the credential
|
|
132
|
+
* locally, with no request per token: `kid`, `tel_token` and `signing_secret`. The
|
|
133
|
+
* same material is in the response of `POST /telephony_credentials`. Treat it like
|
|
134
|
+
* the SIP password.
|
|
135
|
+
*
|
|
136
|
+
* @example
|
|
137
|
+
* ```ts
|
|
138
|
+
* const response =
|
|
139
|
+
* await client.telephonyCredentials.retrieveTokenMaterial(
|
|
140
|
+
* 'id',
|
|
141
|
+
* );
|
|
142
|
+
* ```
|
|
143
|
+
*/
|
|
144
|
+
retrieveTokenMaterial(
|
|
145
|
+
id: string,
|
|
146
|
+
options?: RequestOptions,
|
|
147
|
+
): APIPromise<TelephonyCredentialRetrieveTokenMaterialResponse> {
|
|
148
|
+
return this._client.get(path`/telephony_credentials/${id}/token_material`, options);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Mints a WebRTC login token for the credential locally: the same use as
|
|
153
|
+
* `createToken`, with no request to Telnyx per token. Uses the
|
|
154
|
+
* `token_material` of a credential from `create`, or `tokenMaterial` from the
|
|
155
|
+
* options, or fetches it once with `retrieveTokenMaterial`.
|
|
156
|
+
*
|
|
157
|
+
* `ttl` is the token lifetime in seconds, 1..86400, default one hour.
|
|
158
|
+
*
|
|
159
|
+
* @example
|
|
160
|
+
* ```ts
|
|
161
|
+
* const { data: credential } = await client.telephonyCredentials.create({
|
|
162
|
+
* connection_id: '1234567890',
|
|
163
|
+
* include: 'token_material',
|
|
164
|
+
* });
|
|
165
|
+
* const loginToken = await client.telephonyCredentials.toJwt(credential);
|
|
166
|
+
* ```
|
|
167
|
+
*/
|
|
168
|
+
async toJwt(
|
|
169
|
+
credential: TelephonyCredential,
|
|
170
|
+
options?: LoginTokenOptions & { requestOptions?: RequestOptions | undefined },
|
|
171
|
+
): Promise<string> {
|
|
172
|
+
const { requestOptions, ...tokenOptions } = options ?? {};
|
|
173
|
+
const tokenMaterial =
|
|
174
|
+
tokenOptions.tokenMaterial ??
|
|
175
|
+
credential.token_material ??
|
|
176
|
+
(await this.retrieveTokenMaterial(credential.id ?? '', requestOptions)).data;
|
|
177
|
+
return createLoginToken(credential, { ...tokenOptions, tokenMaterial });
|
|
178
|
+
}
|
|
122
179
|
}
|
|
123
180
|
|
|
124
181
|
export type TelephonyCredentialsDefaultFlatPagination = DefaultFlatPagination<TelephonyCredential>;
|
|
@@ -166,6 +223,12 @@ export interface TelephonyCredential {
|
|
|
166
223
|
*/
|
|
167
224
|
sip_username?: string;
|
|
168
225
|
|
|
226
|
+
/**
|
|
227
|
+
* Returned when the credential is created. See
|
|
228
|
+
* `GET /telephony_credentials/{id}/token_material` to fetch it again.
|
|
229
|
+
*/
|
|
230
|
+
token_material?: TokenMaterial;
|
|
231
|
+
|
|
169
232
|
/**
|
|
170
233
|
* ISO-8601 formatted date indicating when the resource was updated.
|
|
171
234
|
*/
|
|
@@ -177,6 +240,30 @@ export interface TelephonyCredential {
|
|
|
177
240
|
user_id?: string;
|
|
178
241
|
}
|
|
179
242
|
|
|
243
|
+
/**
|
|
244
|
+
* What a server needs to mint login tokens for the credential itself, with no
|
|
245
|
+
* request per token (`TelephonyCredential#to_jwt` in telnyx-ruby 3.1.0 or later).
|
|
246
|
+
* As sensitive as `sip_password`: keep it on the server.
|
|
247
|
+
*/
|
|
248
|
+
export interface TokenMaterial {
|
|
249
|
+
/**
|
|
250
|
+
* Identifies the Telnyx signing key the `signing_secret` was derived with. Goes in
|
|
251
|
+
* the token header.
|
|
252
|
+
*/
|
|
253
|
+
kid?: string;
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* The HMAC-SHA256 key the token is signed with, base64url without padding.
|
|
257
|
+
*/
|
|
258
|
+
signing_secret?: string;
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* Opaque value Telnyx uses to resolve the credential. Carried in the token's
|
|
262
|
+
* `tel_token` claim as is.
|
|
263
|
+
*/
|
|
264
|
+
tel_token?: string;
|
|
265
|
+
}
|
|
266
|
+
|
|
180
267
|
export interface TelephonyCredentialCreateResponse {
|
|
181
268
|
data?: TelephonyCredential;
|
|
182
269
|
}
|
|
@@ -195,6 +282,15 @@ export interface TelephonyCredentialDeleteResponse {
|
|
|
195
282
|
|
|
196
283
|
export type TelephonyCredentialCreateTokenResponse = string;
|
|
197
284
|
|
|
285
|
+
export interface TelephonyCredentialRetrieveTokenMaterialResponse {
|
|
286
|
+
/**
|
|
287
|
+
* What a server needs to mint login tokens for the credential itself, with no
|
|
288
|
+
* request per token (`TelephonyCredential#to_jwt` in telnyx-ruby 3.1.0 or later).
|
|
289
|
+
* As sensitive as `sip_password`: keep it on the server.
|
|
290
|
+
*/
|
|
291
|
+
data?: TokenMaterial;
|
|
292
|
+
}
|
|
293
|
+
|
|
198
294
|
export interface TelephonyCredentialListParams extends DefaultFlatPaginationParams {
|
|
199
295
|
/**
|
|
200
296
|
* Consolidated filter parameter (deepObject style). Originally: filter[tag],
|
|
@@ -237,6 +333,12 @@ export namespace TelephonyCredentialListParams {
|
|
|
237
333
|
}
|
|
238
334
|
|
|
239
335
|
export interface TelephonyCredentialCreateParams {
|
|
336
|
+
/**
|
|
337
|
+
* Query param: extra fields to return. `token_material` adds what `toJwt` signs
|
|
338
|
+
* with (as sensitive as `sip_password`; keep it on the server).
|
|
339
|
+
*/
|
|
340
|
+
include?: 'token_material' | undefined;
|
|
341
|
+
|
|
240
342
|
/**
|
|
241
343
|
* Identifies the Credential Connection this credential is associated with.
|
|
242
344
|
*/
|
|
@@ -284,14 +386,18 @@ export interface TelephonyCredentialCreateTokenParams {
|
|
|
284
386
|
'Idempotency-Key'?: string;
|
|
285
387
|
}
|
|
286
388
|
|
|
389
|
+
export type { LoginTokenOptions } from '../lib/login-token';
|
|
390
|
+
|
|
287
391
|
export declare namespace TelephonyCredentials {
|
|
288
392
|
export {
|
|
289
393
|
type TelephonyCredential as TelephonyCredential,
|
|
394
|
+
type TokenMaterial as TokenMaterial,
|
|
290
395
|
type TelephonyCredentialCreateResponse as TelephonyCredentialCreateResponse,
|
|
291
396
|
type TelephonyCredentialRetrieveResponse as TelephonyCredentialRetrieveResponse,
|
|
292
397
|
type TelephonyCredentialUpdateResponse as TelephonyCredentialUpdateResponse,
|
|
293
398
|
type TelephonyCredentialDeleteResponse as TelephonyCredentialDeleteResponse,
|
|
294
399
|
type TelephonyCredentialCreateTokenResponse as TelephonyCredentialCreateTokenResponse,
|
|
400
|
+
type TelephonyCredentialRetrieveTokenMaterialResponse as TelephonyCredentialRetrieveTokenMaterialResponse,
|
|
295
401
|
type TelephonyCredentialsDefaultFlatPagination as TelephonyCredentialsDefaultFlatPagination,
|
|
296
402
|
type TelephonyCredentialListParams as TelephonyCredentialListParams,
|
|
297
403
|
type TelephonyCredentialCreateParams as TelephonyCredentialCreateParams,
|
|
@@ -191,7 +191,7 @@ export interface VoiceCloneData {
|
|
|
191
191
|
/**
|
|
192
192
|
* Voice synthesis provider used for this clone.
|
|
193
193
|
*/
|
|
194
|
-
provider?: 'telnyx' | 'minimax';
|
|
194
|
+
provider?: 'telnyx' | 'minimax' | 'resemble';
|
|
195
195
|
|
|
196
196
|
/**
|
|
197
197
|
* List of TTS model identifiers supported by this clone's provider.
|
|
@@ -280,7 +280,7 @@ export interface VoiceCloneListParams extends DefaultFlatPaginationParams {
|
|
|
280
280
|
/**
|
|
281
281
|
* Filter by voice synthesis provider. Case-insensitive.
|
|
282
282
|
*/
|
|
283
|
-
'filter[provider]'?: 'telnyx' | 'minimax';
|
|
283
|
+
'filter[provider]'?: 'telnyx' | 'minimax' | 'resemble';
|
|
284
284
|
|
|
285
285
|
/**
|
|
286
286
|
* Sort order. Prefix with `-` for descending. Defaults to `-created_at`.
|
|
@@ -516,7 +516,7 @@ export namespace VoiceCloneCreateFromUploadParams {
|
|
|
516
516
|
/**
|
|
517
517
|
* Voice synthesis provider. Defaults to `telnyx`.
|
|
518
518
|
*/
|
|
519
|
-
provider?: 'telnyx'
|
|
519
|
+
provider?: 'telnyx';
|
|
520
520
|
}
|
|
521
521
|
|
|
522
522
|
/**
|
|
@@ -597,7 +597,7 @@ export namespace VoiceCloneCreateFromUploadParams {
|
|
|
597
597
|
/**
|
|
598
598
|
* Voice synthesis provider. Must be `resemble`.
|
|
599
599
|
*/
|
|
600
|
-
provider: 'resemble'
|
|
600
|
+
provider: 'resemble';
|
|
601
601
|
|
|
602
602
|
/**
|
|
603
603
|
* Optional custom label describing the voice style.
|
|
@@ -5002,7 +5002,7 @@ export namespace CallAnalyzedWebhookEvent {
|
|
|
5002
5002
|
* retries, this field carries the placeholder string `No cost data available.`
|
|
5003
5003
|
* instead of an object.
|
|
5004
5004
|
*/
|
|
5005
|
-
cost?: Payload.
|
|
5005
|
+
cost?: Payload.CallCostBreakdown | string;
|
|
5006
5006
|
|
|
5007
5007
|
/**
|
|
5008
5008
|
* Duration of the conversation in seconds.
|
|
@@ -5084,18 +5084,13 @@ export namespace CallAnalyzedWebhookEvent {
|
|
|
5084
5084
|
}
|
|
5085
5085
|
|
|
5086
5086
|
/**
|
|
5087
|
-
* The
|
|
5088
|
-
* billed on the call: the AI Voice Assistant engine minutes
|
|
5089
|
-
* (`ai-voice-assistant`), LLM inference tokens (`inference`), and call-control,
|
|
5090
|
-
* SIP trunking, and recording lines. If cost data could not be retrieved after
|
|
5091
|
-
* retries, this field carries the placeholder string `No cost data available.`
|
|
5092
|
-
* instead of an object.
|
|
5087
|
+
* The itemized cost of the call.
|
|
5093
5088
|
*/
|
|
5094
|
-
export interface
|
|
5089
|
+
export interface CallCostBreakdown {
|
|
5095
5090
|
/**
|
|
5096
5091
|
* Cost lines grouped by product.
|
|
5097
5092
|
*/
|
|
5098
|
-
breakdown?: Array<
|
|
5093
|
+
breakdown?: Array<CallCostBreakdown.Breakdown>;
|
|
5099
5094
|
|
|
5100
5095
|
/**
|
|
5101
5096
|
* The currency of the cost amounts.
|
|
@@ -5108,7 +5103,7 @@ export namespace CallAnalyzedWebhookEvent {
|
|
|
5108
5103
|
total?: string;
|
|
5109
5104
|
}
|
|
5110
5105
|
|
|
5111
|
-
export namespace
|
|
5106
|
+
export namespace CallCostBreakdown {
|
|
5112
5107
|
export interface Breakdown {
|
|
5113
5108
|
/**
|
|
5114
5109
|
* Total cost for this product across the call, in the currency given by
|
|
@@ -7346,7 +7341,7 @@ export namespace CallAnalyzedWebhookEvent {
|
|
|
7346
7341
|
* retries, this field carries the placeholder string `No cost data available.`
|
|
7347
7342
|
* instead of an object.
|
|
7348
7343
|
*/
|
|
7349
|
-
cost?: Payload.
|
|
7344
|
+
cost?: Payload.CallCostBreakdown | string;
|
|
7350
7345
|
|
|
7351
7346
|
/**
|
|
7352
7347
|
* Duration of the conversation in seconds.
|
|
@@ -7428,18 +7423,13 @@ export namespace CallAnalyzedWebhookEvent {
|
|
|
7428
7423
|
}
|
|
7429
7424
|
|
|
7430
7425
|
/**
|
|
7431
|
-
* The
|
|
7432
|
-
* billed on the call: the AI Voice Assistant engine minutes
|
|
7433
|
-
* (`ai-voice-assistant`), LLM inference tokens (`inference`), and call-control,
|
|
7434
|
-
* SIP trunking, and recording lines. If cost data could not be retrieved after
|
|
7435
|
-
* retries, this field carries the placeholder string `No cost data available.`
|
|
7436
|
-
* instead of an object.
|
|
7426
|
+
* The itemized cost of the call.
|
|
7437
7427
|
*/
|
|
7438
|
-
export interface
|
|
7428
|
+
export interface CallCostBreakdown {
|
|
7439
7429
|
/**
|
|
7440
7430
|
* Cost lines grouped by product.
|
|
7441
7431
|
*/
|
|
7442
|
-
breakdown?: Array<
|
|
7432
|
+
breakdown?: Array<CallCostBreakdown.Breakdown>;
|
|
7443
7433
|
|
|
7444
7434
|
/**
|
|
7445
7435
|
* The currency of the cost amounts.
|
|
@@ -7452,7 +7442,7 @@ export namespace CallAnalyzedWebhookEvent {
|
|
|
7452
7442
|
total?: string;
|
|
7453
7443
|
}
|
|
7454
7444
|
|
|
7455
|
-
export namespace
|
|
7445
|
+
export namespace CallCostBreakdown {
|
|
7456
7446
|
export interface Breakdown {
|
|
7457
7447
|
/**
|
|
7458
7448
|
* Total cost for this product across the call, in the currency given by
|
|
@@ -5,8 +5,6 @@ import * as PhoneNumbersAPI from './phone-numbers';
|
|
|
5
5
|
import {
|
|
6
6
|
PhoneNumberInitializeVerificationParams,
|
|
7
7
|
PhoneNumberListParams,
|
|
8
|
-
PhoneNumberListResponse,
|
|
9
|
-
PhoneNumberListResponsesDefaultFlatPagination,
|
|
10
8
|
PhoneNumbers,
|
|
11
9
|
} from './phone-numbers';
|
|
12
10
|
import * as SettingsAPI from './settings';
|
|
@@ -202,8 +200,6 @@ export declare namespace BusinessAccounts {
|
|
|
202
200
|
|
|
203
201
|
export {
|
|
204
202
|
PhoneNumbers as PhoneNumbers,
|
|
205
|
-
type PhoneNumberListResponse as PhoneNumberListResponse,
|
|
206
|
-
type PhoneNumberListResponsesDefaultFlatPagination as PhoneNumberListResponsesDefaultFlatPagination,
|
|
207
203
|
type PhoneNumberListParams as PhoneNumberListParams,
|
|
208
204
|
type PhoneNumberInitializeVerificationParams as PhoneNumberInitializeVerificationParams,
|
|
209
205
|
};
|
|
@@ -9,10 +9,8 @@ export {
|
|
|
9
9
|
} from './business-accounts';
|
|
10
10
|
export {
|
|
11
11
|
PhoneNumbers,
|
|
12
|
-
type PhoneNumberListResponse,
|
|
13
12
|
type PhoneNumberListParams,
|
|
14
13
|
type PhoneNumberInitializeVerificationParams,
|
|
15
|
-
type PhoneNumberListResponsesDefaultFlatPagination,
|
|
16
14
|
} from './phone-numbers';
|
|
17
15
|
export {
|
|
18
16
|
Settings,
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../../core/resource';
|
|
4
|
+
import * as WhatsappPhoneNumbersAPI from '../phone-numbers/phone-numbers';
|
|
5
|
+
import { WhatsappPhoneResponsesDefaultFlatPagination } from '../phone-numbers/phone-numbers';
|
|
4
6
|
import { APIPromise } from '../../../core/api-promise';
|
|
5
7
|
import {
|
|
6
8
|
DefaultFlatPagination,
|
|
@@ -18,7 +20,7 @@ export class PhoneNumbers extends APIResource {
|
|
|
18
20
|
* @example
|
|
19
21
|
* ```ts
|
|
20
22
|
* // Automatically fetches more pages as needed.
|
|
21
|
-
* for await (const
|
|
23
|
+
* for await (const whatsappPhoneResponse of client.whatsapp.businessAccounts.phoneNumbers.list(
|
|
22
24
|
* 'id',
|
|
23
25
|
* )) {
|
|
24
26
|
* // ...
|
|
@@ -29,10 +31,10 @@ export class PhoneNumbers extends APIResource {
|
|
|
29
31
|
id: string,
|
|
30
32
|
query: PhoneNumberListParams | null | undefined = {},
|
|
31
33
|
options?: RequestOptions,
|
|
32
|
-
): PagePromise<
|
|
34
|
+
): PagePromise<WhatsappPhoneResponsesDefaultFlatPagination, WhatsappPhoneNumbersAPI.WhatsappPhoneResponse> {
|
|
33
35
|
return this._client.getAPIList(
|
|
34
36
|
path`/v2/whatsapp/business_accounts/${id}/phone_numbers`,
|
|
35
|
-
DefaultFlatPagination<
|
|
37
|
+
DefaultFlatPagination<WhatsappPhoneNumbersAPI.WhatsappPhoneResponse>,
|
|
36
38
|
{ query, ...options },
|
|
37
39
|
);
|
|
38
40
|
}
|
|
@@ -67,99 +69,6 @@ export class PhoneNumbers extends APIResource {
|
|
|
67
69
|
}
|
|
68
70
|
}
|
|
69
71
|
|
|
70
|
-
export type PhoneNumberListResponsesDefaultFlatPagination = DefaultFlatPagination<PhoneNumberListResponse>;
|
|
71
|
-
|
|
72
|
-
export interface PhoneNumberListResponse {
|
|
73
|
-
calling_enabled?: boolean;
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* Current lifecycle state for a coexistence number. This is null for a standard
|
|
77
|
-
* Cloud API number.
|
|
78
|
-
*/
|
|
79
|
-
coexistence_state?:
|
|
80
|
-
| 'pending_onboarding'
|
|
81
|
-
| 'sync_pending'
|
|
82
|
-
| 'syncing'
|
|
83
|
-
| 'sync_complete'
|
|
84
|
-
| 'active'
|
|
85
|
-
| 'history_declined'
|
|
86
|
-
| 'sync_deadline_expired'
|
|
87
|
-
| 'offboarded'
|
|
88
|
-
| 'disconnected'
|
|
89
|
-
| null;
|
|
90
|
-
|
|
91
|
-
created_at?: string;
|
|
92
|
-
|
|
93
|
-
display_name?: string;
|
|
94
|
-
|
|
95
|
-
enabled?: boolean;
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* Indicates whether the number is connected to both the WhatsApp Business app and
|
|
99
|
-
* Cloud API through WhatsApp Coexistence.
|
|
100
|
-
*/
|
|
101
|
-
is_on_biz_app?: boolean;
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* Phone number in E164 format
|
|
105
|
-
*/
|
|
106
|
-
phone_number?: string;
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* Whatsapp phone number ID
|
|
110
|
-
*/
|
|
111
|
-
phone_number_id?: string;
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* Whatsapp quality rating
|
|
115
|
-
*/
|
|
116
|
-
quality_rating?: string;
|
|
117
|
-
|
|
118
|
-
record_type?: string;
|
|
119
|
-
|
|
120
|
-
status?: string;
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* Deadline for initiating the current coexistence synchronization cycle. This is
|
|
124
|
-
* null when no deadline applies.
|
|
125
|
-
*/
|
|
126
|
-
sync_deadline?: string | null;
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* Synchronization progress. This object is returned only while a coexistence
|
|
130
|
-
* number is synchronizing.
|
|
131
|
-
*/
|
|
132
|
-
sync_progress?: PhoneNumberListResponse.SyncProgress | null;
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* User ID
|
|
136
|
-
*/
|
|
137
|
-
user_id?: string;
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* WABA ID of Whatsapp business account
|
|
141
|
-
*/
|
|
142
|
-
waba_id?: string;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
export namespace PhoneNumberListResponse {
|
|
146
|
-
/**
|
|
147
|
-
* Synchronization progress. This object is returned only while a coexistence
|
|
148
|
-
* number is synchronizing.
|
|
149
|
-
*/
|
|
150
|
-
export interface SyncProgress {
|
|
151
|
-
contacts_status?: string;
|
|
152
|
-
|
|
153
|
-
history_chunk_order?: number | null;
|
|
154
|
-
|
|
155
|
-
history_phase?: number | null;
|
|
156
|
-
|
|
157
|
-
history_progress?: number | null;
|
|
158
|
-
|
|
159
|
-
history_status?: string;
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
|
|
163
72
|
export interface PhoneNumberListParams extends DefaultFlatPaginationParams {}
|
|
164
73
|
|
|
165
74
|
export interface PhoneNumberInitializeVerificationParams {
|
|
@@ -174,9 +83,9 @@ export interface PhoneNumberInitializeVerificationParams {
|
|
|
174
83
|
|
|
175
84
|
export declare namespace PhoneNumbers {
|
|
176
85
|
export {
|
|
177
|
-
type PhoneNumberListResponse as PhoneNumberListResponse,
|
|
178
|
-
type PhoneNumberListResponsesDefaultFlatPagination as PhoneNumberListResponsesDefaultFlatPagination,
|
|
179
86
|
type PhoneNumberListParams as PhoneNumberListParams,
|
|
180
87
|
type PhoneNumberInitializeVerificationParams as PhoneNumberInitializeVerificationParams,
|
|
181
88
|
};
|
|
182
89
|
}
|
|
90
|
+
|
|
91
|
+
export { type WhatsappPhoneResponsesDefaultFlatPagination };
|
|
@@ -14,7 +14,7 @@ export class HostedSignups extends APIResource {
|
|
|
14
14
|
* @example
|
|
15
15
|
* ```ts
|
|
16
16
|
* // Automatically fetches more pages as needed.
|
|
17
|
-
* for await (const
|
|
17
|
+
* for await (const whatsappHostedSignup of client.whatsapp.hostedSignups.list()) {
|
|
18
18
|
* // ...
|
|
19
19
|
* }
|
|
20
20
|
* ```
|
|
@@ -22,12 +22,11 @@ export class HostedSignups extends APIResource {
|
|
|
22
22
|
list(
|
|
23
23
|
query: HostedSignupListParams | null | undefined = {},
|
|
24
24
|
options?: RequestOptions,
|
|
25
|
-
): PagePromise<
|
|
26
|
-
return this._client.getAPIList(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
);
|
|
25
|
+
): PagePromise<WhatsappHostedSignupsDefaultFlatPagination, WhatsappHostedSignup> {
|
|
26
|
+
return this._client.getAPIList('/whatsapp/hosted_signups', DefaultFlatPagination<WhatsappHostedSignup>, {
|
|
27
|
+
query,
|
|
28
|
+
...options,
|
|
29
|
+
});
|
|
31
30
|
}
|
|
32
31
|
|
|
33
32
|
/**
|
|
@@ -63,95 +62,9 @@ export class HostedSignups extends APIResource {
|
|
|
63
62
|
}
|
|
64
63
|
}
|
|
65
64
|
|
|
66
|
-
export type
|
|
65
|
+
export type WhatsappHostedSignupsDefaultFlatPagination = DefaultFlatPagination<WhatsappHostedSignup>;
|
|
67
66
|
|
|
68
|
-
export interface
|
|
69
|
-
data?: HostedSignupCreateResponse.Data;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export namespace HostedSignupCreateResponse {
|
|
73
|
-
export interface Data {
|
|
74
|
-
/**
|
|
75
|
-
* Hosted signup ID
|
|
76
|
-
*/
|
|
77
|
-
id?: string;
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* Meta App ID the hosted signup onboards customers into
|
|
81
|
-
*/
|
|
82
|
-
app_id?: string;
|
|
83
|
-
|
|
84
|
-
created_at?: string;
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* When the onboarding URL stops working
|
|
88
|
-
*/
|
|
89
|
-
expires_at?: string;
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Signed token embedded in `url`
|
|
93
|
-
*/
|
|
94
|
-
jwt?: string;
|
|
95
|
-
|
|
96
|
-
record_type?: 'whatsapp_jwt';
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* Meta Partner Solution ID linked to the app. Returned only when creating a hosted
|
|
100
|
-
* signup.
|
|
101
|
-
*/
|
|
102
|
-
solution_id?: string;
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* Hosted onboarding URL to share with the end customer
|
|
106
|
-
*/
|
|
107
|
-
url?: string;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
export interface HostedSignupRetrieveResponse {
|
|
112
|
-
data?: HostedSignupRetrieveResponse.Data;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
export namespace HostedSignupRetrieveResponse {
|
|
116
|
-
export interface Data {
|
|
117
|
-
/**
|
|
118
|
-
* Hosted signup ID
|
|
119
|
-
*/
|
|
120
|
-
id?: string;
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* Meta App ID the hosted signup onboards customers into
|
|
124
|
-
*/
|
|
125
|
-
app_id?: string;
|
|
126
|
-
|
|
127
|
-
created_at?: string;
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* When the onboarding URL stops working
|
|
131
|
-
*/
|
|
132
|
-
expires_at?: string;
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* Signed token embedded in `url`
|
|
136
|
-
*/
|
|
137
|
-
jwt?: string;
|
|
138
|
-
|
|
139
|
-
record_type?: 'whatsapp_jwt';
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* Meta Partner Solution ID linked to the app. Returned only when creating a hosted
|
|
143
|
-
* signup.
|
|
144
|
-
*/
|
|
145
|
-
solution_id?: string;
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
* Hosted onboarding URL to share with the end customer
|
|
149
|
-
*/
|
|
150
|
-
url?: string;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
export interface HostedSignupListResponse {
|
|
67
|
+
export interface WhatsappHostedSignup {
|
|
155
68
|
/**
|
|
156
69
|
* Hosted signup ID
|
|
157
70
|
*/
|
|
@@ -188,6 +101,14 @@ export interface HostedSignupListResponse {
|
|
|
188
101
|
url?: string;
|
|
189
102
|
}
|
|
190
103
|
|
|
104
|
+
export interface HostedSignupCreateResponse {
|
|
105
|
+
data?: WhatsappHostedSignup;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export interface HostedSignupRetrieveResponse {
|
|
109
|
+
data?: WhatsappHostedSignup;
|
|
110
|
+
}
|
|
111
|
+
|
|
191
112
|
export interface HostedSignupListParams extends DefaultFlatPaginationParams {}
|
|
192
113
|
|
|
193
114
|
export interface HostedSignupCreateParams {
|
|
@@ -212,10 +133,10 @@ export interface HostedSignupCreateParams {
|
|
|
212
133
|
|
|
213
134
|
export declare namespace HostedSignups {
|
|
214
135
|
export {
|
|
136
|
+
type WhatsappHostedSignup as WhatsappHostedSignup,
|
|
215
137
|
type HostedSignupCreateResponse as HostedSignupCreateResponse,
|
|
216
138
|
type HostedSignupRetrieveResponse as HostedSignupRetrieveResponse,
|
|
217
|
-
type
|
|
218
|
-
type HostedSignupListResponsesDefaultFlatPagination as HostedSignupListResponsesDefaultFlatPagination,
|
|
139
|
+
type WhatsappHostedSignupsDefaultFlatPagination as WhatsappHostedSignupsDefaultFlatPagination,
|
|
219
140
|
type HostedSignupListParams as HostedSignupListParams,
|
|
220
141
|
type HostedSignupCreateParams as HostedSignupCreateParams,
|
|
221
142
|
};
|
|
@@ -9,16 +9,16 @@ export {
|
|
|
9
9
|
} from './business-accounts/index';
|
|
10
10
|
export {
|
|
11
11
|
HostedSignups,
|
|
12
|
+
type WhatsappHostedSignup,
|
|
12
13
|
type HostedSignupCreateResponse,
|
|
13
14
|
type HostedSignupRetrieveResponse,
|
|
14
|
-
type HostedSignupListResponse,
|
|
15
15
|
type HostedSignupListParams,
|
|
16
16
|
type HostedSignupCreateParams,
|
|
17
|
-
type
|
|
17
|
+
type WhatsappHostedSignupsDefaultFlatPagination,
|
|
18
18
|
} from './hosted-signups';
|
|
19
19
|
export {
|
|
20
20
|
PhoneNumbers,
|
|
21
|
-
type
|
|
21
|
+
type WhatsappPhoneResponse,
|
|
22
22
|
type PhoneNumberGetResponse,
|
|
23
23
|
type PhoneNumberRetrieveConversationWindowResponse,
|
|
24
24
|
type PhoneNumberRetrievePhoneNumberResponse,
|
|
@@ -27,7 +27,7 @@ export {
|
|
|
27
27
|
type PhoneNumberVerifyParams,
|
|
28
28
|
type PhoneNumberRetrieveConversationWindowParams,
|
|
29
29
|
type PhoneNumberGetParams,
|
|
30
|
-
type
|
|
30
|
+
type WhatsappPhoneResponsesDefaultFlatPagination,
|
|
31
31
|
} from './phone-numbers/index';
|
|
32
32
|
export {
|
|
33
33
|
Signup,
|
|
@@ -23,7 +23,7 @@ export {
|
|
|
23
23
|
} from './conversational-components';
|
|
24
24
|
export {
|
|
25
25
|
PhoneNumbers,
|
|
26
|
-
type
|
|
26
|
+
type WhatsappPhoneResponse,
|
|
27
27
|
type PhoneNumberGetResponse,
|
|
28
28
|
type PhoneNumberRetrieveConversationWindowResponse,
|
|
29
29
|
type PhoneNumberRetrievePhoneNumberResponse,
|
|
@@ -32,7 +32,7 @@ export {
|
|
|
32
32
|
type PhoneNumberVerifyParams,
|
|
33
33
|
type PhoneNumberRetrieveConversationWindowParams,
|
|
34
34
|
type PhoneNumberGetParams,
|
|
35
|
-
type
|
|
35
|
+
type WhatsappPhoneResponsesDefaultFlatPagination,
|
|
36
36
|
} from './phone-numbers';
|
|
37
37
|
export {
|
|
38
38
|
Profile,
|