telnyx 7.25.0 → 7.26.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/client.d.mts +10 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +10 -4
- package/client.d.ts.map +1 -1
- package/client.js +6 -0
- package/client.js.map +1 -1
- package/client.mjs +6 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/ai/ai.d.mts +14 -5
- package/resources/ai/ai.d.mts.map +1 -1
- package/resources/ai/ai.d.ts +14 -5
- 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 +232 -6
- package/resources/ai/assistants/assistants.d.mts.map +1 -1
- package/resources/ai/assistants/assistants.d.ts +232 -6
- package/resources/ai/assistants/assistants.d.ts.map +1 -1
- package/resources/ai/assistants/assistants.js.map +1 -1
- package/resources/ai/assistants/assistants.mjs.map +1 -1
- package/resources/ai/assistants/index.d.mts +1 -1
- package/resources/ai/assistants/index.d.mts.map +1 -1
- package/resources/ai/assistants/index.d.ts +1 -1
- package/resources/ai/assistants/index.d.ts.map +1 -1
- package/resources/ai/assistants/index.js.map +1 -1
- package/resources/ai/assistants/index.mjs.map +1 -1
- package/resources/ai/assistants/versions.d.mts +12 -0
- package/resources/ai/assistants/versions.d.mts.map +1 -1
- package/resources/ai/assistants/versions.d.ts +12 -0
- package/resources/ai/assistants/versions.d.ts.map +1 -1
- package/resources/ai/avatars.d.mts +187 -0
- package/resources/ai/avatars.d.mts.map +1 -0
- package/resources/ai/avatars.d.ts +187 -0
- package/resources/ai/avatars.d.ts.map +1 -0
- package/resources/ai/avatars.js +93 -0
- package/resources/ai/avatars.js.map +1 -0
- package/resources/ai/avatars.mjs +89 -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 +2 -1
- package/resources/ai/index.d.mts.map +1 -1
- package/resources/ai/index.d.ts +2 -1
- 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 +17 -1
- package/resources/ai/tools.d.mts.map +1 -1
- package/resources/ai/tools.d.ts +17 -1
- package/resources/ai/tools.d.ts.map +1 -1
- package/resources/calls/actions.d.mts +59 -13
- package/resources/calls/actions.d.mts.map +1 -1
- package/resources/calls/actions.d.ts +59 -13
- 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/dir/dir.d.mts +10 -7
- package/resources/dir/dir.d.mts.map +1 -1
- package/resources/dir/dir.d.ts +10 -7
- package/resources/dir/dir.d.ts.map +1 -1
- package/resources/dir/dir.js +1 -1
- package/resources/dir/dir.js.map +1 -1
- package/resources/dir/dir.mjs +1 -1
- 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/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/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 +3 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.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/phone-numbers/jobs.d.mts +17 -5
- package/resources/phone-numbers/jobs.d.mts.map +1 -1
- package/resources/phone-numbers/jobs.d.ts +17 -5
- package/resources/phone-numbers/jobs.d.ts.map +1 -1
- package/resources/phone-numbers/jobs.js +4 -3
- package/resources/phone-numbers/jobs.js.map +1 -1
- package/resources/phone-numbers/jobs.mjs +4 -3
- package/resources/phone-numbers/jobs.mjs.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/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/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/webhooks.d.mts +566 -3
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +566 -3
- 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/index.d.mts +1 -0
- package/resources/whatsapp/index.d.mts.map +1 -1
- package/resources/whatsapp/index.d.ts +1 -0
- package/resources/whatsapp/index.d.ts.map +1 -1
- package/resources/whatsapp/index.js +3 -1
- package/resources/whatsapp/index.js.map +1 -1
- package/resources/whatsapp/index.mjs +1 -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 +4 -0
- package/resources/whatsapp/whatsapp.d.mts.map +1 -1
- package/resources/whatsapp/whatsapp.d.ts +4 -0
- package/resources/whatsapp/whatsapp.d.ts.map +1 -1
- package/resources/whatsapp/whatsapp.js +4 -0
- package/resources/whatsapp/whatsapp.js.map +1 -1
- package/resources/whatsapp/whatsapp.mjs +4 -0
- package/resources/whatsapp/whatsapp.mjs.map +1 -1
- package/src/client.ts +28 -0
- package/src/resources/ai/ai.ts +38 -3
- package/src/resources/ai/assistants/assistants.ts +292 -5
- package/src/resources/ai/assistants/index.ts +2 -0
- package/src/resources/ai/assistants/versions.ts +14 -0
- package/src/resources/ai/avatars.ts +238 -0
- package/src/resources/ai/chat.ts +20 -6
- package/src/resources/ai/conversations/conversations.ts +9 -0
- package/src/resources/ai/index.ts +13 -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 +19 -1
- package/src/resources/calls/actions.ts +65 -10
- package/src/resources/calls/calls.ts +24 -8
- package/src/resources/calls/index.ts +1 -0
- package/src/resources/dir/dir.ts +10 -7
- package/src/resources/dir/phone-numbers.ts +1 -6
- 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/global-ip-assignment-health.ts +4 -4
- package/src/resources/global-ip-assignments-usage.ts +4 -4
- package/src/resources/index.ts +11 -0
- 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/phone-numbers/jobs.ts +18 -5
- package/src/resources/reputation/numbers.ts +12 -0
- package/src/resources/sip-registration-status.ts +188 -0
- package/src/resources/texml/texml.ts +7 -3
- package/src/resources/webhooks.ts +754 -15
- package/src/resources/whatsapp/index.ts +7 -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 +18 -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,125 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../../core/resource';
|
|
4
|
+
import * as ExternalVerificationAPI from './external-verification';
|
|
5
|
+
import { APIPromise } from '../../../core/api-promise';
|
|
6
|
+
import { RequestOptions } from '../../../internal/request-options';
|
|
7
|
+
import { path } from '../../../internal/utils/path';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Phone-number reputation monitoring (spam-score lookup and tracking).
|
|
11
|
+
*/
|
|
12
|
+
export class ExternalVerification extends APIResource {
|
|
13
|
+
/**
|
|
14
|
+
* Get the review status of the enterprise's ownership proof for phone numbers
|
|
15
|
+
* hosted with another provider. Returns 404 when no proof has been submitted.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* const externalVerificationWrapped =
|
|
20
|
+
* await client.enterprises.reputation.externalVerification.list(
|
|
21
|
+
* '4a6192a4-573d-446d-b3ce-aff9117272a6',
|
|
22
|
+
* );
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
list(enterpriseID: string, options?: RequestOptions): APIPromise<ExternalVerificationWrapped> {
|
|
26
|
+
return this._client.get(path`/enterprises/${enterpriseID}/reputation/external_verification`, options);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Request permission to add phone numbers that the enterprise owns but that are
|
|
31
|
+
* hosted with another provider. Submit one or more uploaded documents proving
|
|
32
|
+
* ownership, such as a carrier invoice or account statement. The request is
|
|
33
|
+
* reviewed once per enterprise. While it is `pending` or `rejected` you can submit
|
|
34
|
+
* again to replace the documents; once `approved` it cannot be changed.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* const externalVerificationWrapped =
|
|
39
|
+
* await client.enterprises.reputation.externalVerification.create(
|
|
40
|
+
* '4a6192a4-573d-446d-b3ce-aff9117272a6',
|
|
41
|
+
* {
|
|
42
|
+
* document_ids: [
|
|
43
|
+
* '2a7e8337-e803-4057-a4ae-26c40eb0bc6c',
|
|
44
|
+
* ],
|
|
45
|
+
* },
|
|
46
|
+
* );
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
create(
|
|
50
|
+
enterpriseID: string,
|
|
51
|
+
body: ExternalVerificationCreateParams,
|
|
52
|
+
options?: RequestOptions,
|
|
53
|
+
): APIPromise<ExternalVerificationWrapped> {
|
|
54
|
+
return this._client.post(path`/enterprises/${enterpriseID}/reputation/external_verification`, {
|
|
55
|
+
body,
|
|
56
|
+
...options,
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Review state of the ownership proof that allows adding phone numbers hosted with
|
|
63
|
+
* another provider.
|
|
64
|
+
*/
|
|
65
|
+
export type ExternalVerificationStatus = 'pending' | 'approved' | 'rejected';
|
|
66
|
+
|
|
67
|
+
export interface ExternalVerificationWrapped {
|
|
68
|
+
data: ExternalVerificationWrapped.Data;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export namespace ExternalVerificationWrapped {
|
|
72
|
+
export interface Data {
|
|
73
|
+
/**
|
|
74
|
+
* The ownership-proof documents on file.
|
|
75
|
+
*/
|
|
76
|
+
document_ids?: Array<string>;
|
|
77
|
+
|
|
78
|
+
enterprise_id?: string;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* The phone numbers you listed with the documents.
|
|
82
|
+
*/
|
|
83
|
+
phone_numbers?: Array<string>;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Why the proof was rejected. Set only when `status` is `rejected`.
|
|
87
|
+
*/
|
|
88
|
+
rejection_reason?: string | null;
|
|
89
|
+
|
|
90
|
+
reviewed_at?: string | null;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Review state of the ownership proof that allows adding phone numbers hosted with
|
|
94
|
+
* another provider.
|
|
95
|
+
*/
|
|
96
|
+
status?: ExternalVerificationAPI.ExternalVerificationStatus;
|
|
97
|
+
|
|
98
|
+
submitted_at?: string | null;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export interface ExternalVerificationCreateParams {
|
|
103
|
+
/**
|
|
104
|
+
* Ids of uploaded documents (Documents API) proving the enterprise owns its phone
|
|
105
|
+
* numbers hosted with another provider, for example a carrier invoice or account
|
|
106
|
+
* statement.
|
|
107
|
+
*/
|
|
108
|
+
document_ids: Array<string>;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Optional. The phone numbers hosted with another provider that the documents
|
|
112
|
+
* cover, in E.164 format. Shown to the reviewer to match the documents to your
|
|
113
|
+
* numbers; you can still add numbers that are not listed here, and each is checked
|
|
114
|
+
* on its own.
|
|
115
|
+
*/
|
|
116
|
+
phone_numbers?: Array<string>;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export declare namespace ExternalVerification {
|
|
120
|
+
export {
|
|
121
|
+
type ExternalVerificationStatus as ExternalVerificationStatus,
|
|
122
|
+
type ExternalVerificationWrapped as ExternalVerificationWrapped,
|
|
123
|
+
type ExternalVerificationCreateParams as ExternalVerificationCreateParams,
|
|
124
|
+
};
|
|
125
|
+
}
|
|
@@ -1,18 +1,29 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
+
export {
|
|
4
|
+
ExternalVerification,
|
|
5
|
+
type ExternalVerificationStatus,
|
|
6
|
+
type ExternalVerificationWrapped,
|
|
7
|
+
type ExternalVerificationCreateParams,
|
|
8
|
+
} from './external-verification';
|
|
3
9
|
export { Loa, type AgentInput, type LoaUpdateParams, type LoaRenderParams } from './loa';
|
|
4
10
|
export {
|
|
5
11
|
Numbers,
|
|
12
|
+
type ReputationNumberSource,
|
|
13
|
+
type ReputationOwnershipStatus,
|
|
6
14
|
type ReputationPhoneNumber,
|
|
7
15
|
type ReputationPhoneNumberList,
|
|
8
16
|
type ReputationPhoneNumberListWithReputation,
|
|
9
17
|
type ReputationPhoneNumberWithReputation,
|
|
10
18
|
type NumberRefreshResponse,
|
|
19
|
+
type NumberRetrieveOwnershipResponse,
|
|
11
20
|
type NumberListParams,
|
|
12
21
|
type NumberAssociateParams,
|
|
13
22
|
type NumberDisassociateParams,
|
|
14
23
|
type NumberRetrieveParams,
|
|
15
24
|
type NumberRefreshParams,
|
|
25
|
+
type NumberRetrieveOwnershipParams,
|
|
26
|
+
type NumberOwnershipConfirmParams,
|
|
16
27
|
type ReputationPhoneNumbersDefaultFlatPagination,
|
|
17
28
|
} from './numbers';
|
|
18
29
|
export {
|
|
@@ -34,4 +45,5 @@ export {
|
|
|
34
45
|
type ReputationCheckFrequency,
|
|
35
46
|
type ReputationEnableParams,
|
|
36
47
|
type ReputationUpdateFrequencyParams,
|
|
48
|
+
type ReputationUpdateWebhookParams,
|
|
37
49
|
} from './reputation';
|
|
@@ -71,8 +71,9 @@ export class Loa extends APIResource {
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
/**
|
|
74
|
-
* Third-party reseller / partner managing the enterprise's phone numbers
|
|
75
|
-
*
|
|
74
|
+
* Third-party reseller / partner managing the enterprise's phone numbers on its
|
|
75
|
+
* behalf, such as a call center (BPO) acting for a client. Omit when the
|
|
76
|
+
* enterprise manages its own numbers.
|
|
76
77
|
*/
|
|
77
78
|
export interface AgentInput {
|
|
78
79
|
/**
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../../core/resource';
|
|
4
|
+
import * as NumbersAPI from './numbers';
|
|
4
5
|
import * as Shared from '../../shared';
|
|
5
6
|
import * as EnterprisesAPI from '../enterprises';
|
|
6
7
|
import { APIPromise } from '../../../core/api-promise';
|
|
@@ -46,8 +47,9 @@ export class Numbers extends APIResource {
|
|
|
46
47
|
|
|
47
48
|
/**
|
|
48
49
|
* Add up to 100 phone numbers to reputation monitoring on this enterprise. Each
|
|
49
|
-
* must be in E.164 format (`+1NPANXXXXXX` for US/CA)
|
|
50
|
-
* phone-number inventory
|
|
50
|
+
* must be in E.164 format (`+1NPANXXXXXX` for US/CA). A number in your Telnyx
|
|
51
|
+
* phone-number inventory is accepted as `source: telnyx`; a number that is not is
|
|
52
|
+
* treated as hosted with another provider and must meet the requirements below.
|
|
51
53
|
*
|
|
52
54
|
* **Prerequisite**: reputation must already be enabled on this enterprise (see
|
|
53
55
|
* `POST .../reputation`).
|
|
@@ -55,6 +57,14 @@ export class Numbers extends APIResource {
|
|
|
55
57
|
* **Pricing:** This is a billable action. See https://telnyx.com/pricing/numbers
|
|
56
58
|
* for current pricing.
|
|
57
59
|
*
|
|
60
|
+
* A phone number that is not in your Telnyx inventory is treated as a number
|
|
61
|
+
* hosted with another provider (`source: external`). It must be a US local number,
|
|
62
|
+
* and the enterprise's ownership proof must be approved first
|
|
63
|
+
* (`POST /enterprises/{enterprise_id}/reputation/external_verification`);
|
|
64
|
+
* otherwise the request fails with a 400 whose `detail` contains
|
|
65
|
+
* `external_verification_required`. Ownership of such numbers is checked every
|
|
66
|
+
* day.
|
|
67
|
+
*
|
|
58
68
|
* @example
|
|
59
69
|
* ```ts
|
|
60
70
|
* const reputationPhoneNumberList =
|
|
@@ -152,27 +162,161 @@ export class Numbers extends APIResource {
|
|
|
152
162
|
...options,
|
|
153
163
|
});
|
|
154
164
|
}
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Get the ownership status of a phone number, when it was last checked, the
|
|
168
|
+
* carrier recorded as its baseline, and the history of ownership events.
|
|
169
|
+
*
|
|
170
|
+
* @example
|
|
171
|
+
* ```ts
|
|
172
|
+
* const response =
|
|
173
|
+
* await client.enterprises.reputation.numbers.retrieveOwnership(
|
|
174
|
+
* '+19493253498',
|
|
175
|
+
* {
|
|
176
|
+
* enterprise_id: '4a6192a4-573d-446d-b3ce-aff9117272a6',
|
|
177
|
+
* },
|
|
178
|
+
* );
|
|
179
|
+
* ```
|
|
180
|
+
*/
|
|
181
|
+
retrieveOwnership(
|
|
182
|
+
phoneNumber: string,
|
|
183
|
+
params: NumberRetrieveOwnershipParams,
|
|
184
|
+
options?: RequestOptions,
|
|
185
|
+
): APIPromise<NumberRetrieveOwnershipResponse> {
|
|
186
|
+
const { enterprise_id } = params;
|
|
187
|
+
return this._client.get(
|
|
188
|
+
path`/enterprises/${enterprise_id}/reputation/numbers/${phoneNumber}/ownership`,
|
|
189
|
+
options,
|
|
190
|
+
);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Answer an ownership question about a phone number hosted with another provider.
|
|
195
|
+
*
|
|
196
|
+
* Send `still_own: true` to confirm you still own a number whose
|
|
197
|
+
* `ownership_status` is `pending_confirmation` or `flagged`; its status returns to
|
|
198
|
+
* `verified` and, after a carrier change, the new carrier becomes the one on
|
|
199
|
+
* record.
|
|
200
|
+
*
|
|
201
|
+
* Send `still_own: false` to report that you no longer own the number. It is
|
|
202
|
+
* removed from Number Reputation immediately, whatever its current status, and the
|
|
203
|
+
* response shows it with `ownership_status: removed`.
|
|
204
|
+
*
|
|
205
|
+
* @example
|
|
206
|
+
* ```ts
|
|
207
|
+
* const reputationPhoneNumberWithReputation =
|
|
208
|
+
* await client.enterprises.reputation.numbers.ownershipConfirm(
|
|
209
|
+
* '+19493253498',
|
|
210
|
+
* {
|
|
211
|
+
* enterprise_id: '4a6192a4-573d-446d-b3ce-aff9117272a6',
|
|
212
|
+
* still_own: true,
|
|
213
|
+
* },
|
|
214
|
+
* );
|
|
215
|
+
* ```
|
|
216
|
+
*/
|
|
217
|
+
ownershipConfirm(
|
|
218
|
+
phoneNumber: string,
|
|
219
|
+
params: NumberOwnershipConfirmParams,
|
|
220
|
+
options?: RequestOptions,
|
|
221
|
+
): APIPromise<ReputationPhoneNumberWithReputation> {
|
|
222
|
+
const { enterprise_id, ...body } = params;
|
|
223
|
+
return this._client.post(
|
|
224
|
+
path`/enterprises/${enterprise_id}/reputation/numbers/${phoneNumber}/ownership_confirm`,
|
|
225
|
+
{ body, ...options },
|
|
226
|
+
);
|
|
227
|
+
}
|
|
155
228
|
}
|
|
156
229
|
|
|
157
230
|
export type ReputationPhoneNumbersDefaultFlatPagination = DefaultFlatPagination<ReputationPhoneNumber>;
|
|
158
231
|
|
|
232
|
+
/**
|
|
233
|
+
* Where the phone number is hosted. `telnyx`: in your Telnyx inventory.
|
|
234
|
+
* `external`: a number you own that is hosted with another provider.
|
|
235
|
+
*/
|
|
236
|
+
export type ReputationNumberSource = 'telnyx' | 'external';
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* Result of ongoing ownership checks. `verified`: the number is with the carrier
|
|
240
|
+
* on record. `pending_confirmation`: the number's carrier changed, or a periodic
|
|
241
|
+
* ownership re-verification is due; confirm you still own it before `confirm_by`.
|
|
242
|
+
* `flagged`: a periodic re-verification went unanswered; the number stays
|
|
243
|
+
* monitored and is not removed, but confirm ownership
|
|
244
|
+
* (`POST .../ownership_confirm`) to return it to `verified`. `removed`: the number
|
|
245
|
+
* is no longer monitored; returned by `POST .../ownership_confirm` with
|
|
246
|
+
* `still_own: false`, and when listing numbers with
|
|
247
|
+
* `filter[ownership_status]=removed`.
|
|
248
|
+
*/
|
|
249
|
+
export type ReputationOwnershipStatus = 'verified' | 'flagged' | 'pending_confirmation' | 'removed';
|
|
250
|
+
|
|
159
251
|
export interface ReputationPhoneNumber {
|
|
160
252
|
id?: string;
|
|
161
253
|
|
|
254
|
+
/**
|
|
255
|
+
* Deadline to confirm you still own the number. Set only while `ownership_status`
|
|
256
|
+
* is `pending_confirmation`.
|
|
257
|
+
*/
|
|
258
|
+
confirm_by?: string | null;
|
|
259
|
+
|
|
162
260
|
created_at?: string;
|
|
163
261
|
|
|
164
262
|
enterprise_id?: string;
|
|
165
263
|
|
|
264
|
+
/**
|
|
265
|
+
* Why the number's ownership was flagged. `carrier_changed` when an ownership
|
|
266
|
+
* check found the number with a different carrier.
|
|
267
|
+
*/
|
|
268
|
+
flag_reason?: string | null;
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* Result of ongoing ownership checks. `verified`: the number is with the carrier
|
|
272
|
+
* on record. `pending_confirmation`: the number's carrier changed, or a periodic
|
|
273
|
+
* ownership re-verification is due; confirm you still own it before `confirm_by`.
|
|
274
|
+
* `flagged`: a periodic re-verification went unanswered; the number stays
|
|
275
|
+
* monitored and is not removed, but confirm ownership
|
|
276
|
+
* (`POST .../ownership_confirm`) to return it to `verified`. `removed`: the number
|
|
277
|
+
* is no longer monitored; returned by `POST .../ownership_confirm` with
|
|
278
|
+
* `still_own: false`, and when listing numbers with
|
|
279
|
+
* `filter[ownership_status]=removed`.
|
|
280
|
+
*/
|
|
281
|
+
ownership_status?: ReputationOwnershipStatus;
|
|
282
|
+
|
|
166
283
|
/**
|
|
167
284
|
* E.164 with leading `+`.
|
|
168
285
|
*/
|
|
169
286
|
phone_number?: string;
|
|
170
287
|
|
|
171
288
|
/**
|
|
172
|
-
*
|
|
289
|
+
* Why a number was removed. `ported_away`: you confirmed the number left your
|
|
290
|
+
* control after a carrier change. `unconfirmed_ownership`: a carrier change was
|
|
291
|
+
* not confirmed before the deadline. `reassigned`: the number was reported as
|
|
292
|
+
* permanently disconnected. `customer_reported`: you reported that you no longer
|
|
293
|
+
* own the number. `customer_removed`: you removed the number.
|
|
294
|
+
*/
|
|
295
|
+
removal_reason?:
|
|
296
|
+
| 'ported_away'
|
|
297
|
+
| 'unconfirmed_ownership'
|
|
298
|
+
| 'reassigned'
|
|
299
|
+
| 'customer_reported'
|
|
300
|
+
| 'customer_removed'
|
|
301
|
+
| null;
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* When the number was removed. Set only for removed numbers.
|
|
305
|
+
*/
|
|
306
|
+
removed_at?: string | null;
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* Reputation snapshot for a phone number. Each metric is a 0–100 score;
|
|
310
|
+
* `spam_risk` is a coarse bucket. Field set may grow over time - read by key.
|
|
173
311
|
*/
|
|
174
312
|
reputation_data?: Shared.ReputationData | null;
|
|
175
313
|
|
|
314
|
+
/**
|
|
315
|
+
* Where the phone number is hosted. `telnyx`: in your Telnyx inventory.
|
|
316
|
+
* `external`: a number you own that is hosted with another provider.
|
|
317
|
+
*/
|
|
318
|
+
source?: ReputationNumberSource;
|
|
319
|
+
|
|
176
320
|
updated_at?: string;
|
|
177
321
|
}
|
|
178
322
|
|
|
@@ -240,7 +384,81 @@ export namespace NumberRefreshResponse {
|
|
|
240
384
|
}
|
|
241
385
|
}
|
|
242
386
|
|
|
387
|
+
export interface NumberRetrieveOwnershipResponse {
|
|
388
|
+
data: NumberRetrieveOwnershipResponse.Data;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
export namespace NumberRetrieveOwnershipResponse {
|
|
392
|
+
export interface Data {
|
|
393
|
+
/**
|
|
394
|
+
* Service provider ID (SPID) of the carrier that held the number when its
|
|
395
|
+
* ownership was last established.
|
|
396
|
+
*/
|
|
397
|
+
baseline_carrier?: string | null;
|
|
398
|
+
|
|
399
|
+
baseline_recorded_at?: string | null;
|
|
400
|
+
|
|
401
|
+
confirm_by?: string | null;
|
|
402
|
+
|
|
403
|
+
flag_reason?: string | null;
|
|
404
|
+
|
|
405
|
+
/**
|
|
406
|
+
* Ownership events, most recent first.
|
|
407
|
+
*/
|
|
408
|
+
history?: Array<Data.History>;
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* When ownership of the number was last checked.
|
|
412
|
+
*/
|
|
413
|
+
last_checked_at?: string | null;
|
|
414
|
+
|
|
415
|
+
/**
|
|
416
|
+
* Result of ongoing ownership checks. `verified`: the number is with the carrier
|
|
417
|
+
* on record. `pending_confirmation`: the number's carrier changed, or a periodic
|
|
418
|
+
* ownership re-verification is due; confirm you still own it before `confirm_by`.
|
|
419
|
+
* `flagged`: a periodic re-verification went unanswered; the number stays
|
|
420
|
+
* monitored and is not removed, but confirm ownership
|
|
421
|
+
* (`POST .../ownership_confirm`) to return it to `verified`. `removed`: the number
|
|
422
|
+
* is no longer monitored; returned by `POST .../ownership_confirm` with
|
|
423
|
+
* `still_own: false`, and when listing numbers with
|
|
424
|
+
* `filter[ownership_status]=removed`.
|
|
425
|
+
*/
|
|
426
|
+
ownership_status?: NumbersAPI.ReputationOwnershipStatus;
|
|
427
|
+
|
|
428
|
+
phone_number?: string;
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* Where the phone number is hosted. `telnyx`: in your Telnyx inventory.
|
|
432
|
+
* `external`: a number you own that is hosted with another provider.
|
|
433
|
+
*/
|
|
434
|
+
source?: NumbersAPI.ReputationNumberSource;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
export namespace Data {
|
|
438
|
+
export interface History {
|
|
439
|
+
/**
|
|
440
|
+
* `added`, `check`, `flag`, `confirm` or `removed`.
|
|
441
|
+
*/
|
|
442
|
+
event_type?: string;
|
|
443
|
+
|
|
444
|
+
occurred_at?: string;
|
|
445
|
+
|
|
446
|
+
/**
|
|
447
|
+
* What the event found or did, for example `unchanged` or `carrier_changed`.
|
|
448
|
+
*/
|
|
449
|
+
outcome?: string | null;
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
|
|
243
454
|
export interface NumberListParams extends DefaultFlatPaginationParams {
|
|
455
|
+
/**
|
|
456
|
+
* Only numbers with this ownership status. `removed` lists the numbers that were
|
|
457
|
+
* removed, each with its `removal_reason` and `removed_at`; removed numbers are
|
|
458
|
+
* not returned otherwise.
|
|
459
|
+
*/
|
|
460
|
+
'filter[ownership_status]'?: ReputationOwnershipStatus;
|
|
461
|
+
|
|
244
462
|
/**
|
|
245
463
|
* Partial match on phone number. Must contain at least 5 digits.
|
|
246
464
|
*/
|
|
@@ -250,6 +468,11 @@ export interface NumberListParams extends DefaultFlatPaginationParams {
|
|
|
250
468
|
* Exact phone-number match (E.164).
|
|
251
469
|
*/
|
|
252
470
|
'filter[phone_number][eq]'?: string;
|
|
471
|
+
|
|
472
|
+
/**
|
|
473
|
+
* Only numbers with this source.
|
|
474
|
+
*/
|
|
475
|
+
'filter[source]'?: ReputationNumberSource;
|
|
253
476
|
}
|
|
254
477
|
|
|
255
478
|
export interface NumberAssociateParams {
|
|
@@ -287,18 +510,48 @@ export interface NumberRefreshParams {
|
|
|
287
510
|
phone_numbers: Array<string>;
|
|
288
511
|
}
|
|
289
512
|
|
|
513
|
+
export interface NumberRetrieveOwnershipParams {
|
|
514
|
+
/**
|
|
515
|
+
* The enterprise id. Lowercase UUID.
|
|
516
|
+
*/
|
|
517
|
+
enterprise_id: string;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
export interface NumberOwnershipConfirmParams {
|
|
521
|
+
/**
|
|
522
|
+
* Path param: The enterprise id. Lowercase UUID.
|
|
523
|
+
*/
|
|
524
|
+
enterprise_id: string;
|
|
525
|
+
|
|
526
|
+
/**
|
|
527
|
+
* Body param: `true` confirms you still own the number. `false` reports that you
|
|
528
|
+
* no longer own it and removes it from Number Reputation.
|
|
529
|
+
*/
|
|
530
|
+
still_own: boolean;
|
|
531
|
+
|
|
532
|
+
/**
|
|
533
|
+
* Body param: Optional id of an uploaded document supporting the confirmation.
|
|
534
|
+
*/
|
|
535
|
+
evidence_document_id?: string;
|
|
536
|
+
}
|
|
537
|
+
|
|
290
538
|
export declare namespace Numbers {
|
|
291
539
|
export {
|
|
540
|
+
type ReputationNumberSource as ReputationNumberSource,
|
|
541
|
+
type ReputationOwnershipStatus as ReputationOwnershipStatus,
|
|
292
542
|
type ReputationPhoneNumber as ReputationPhoneNumber,
|
|
293
543
|
type ReputationPhoneNumberList as ReputationPhoneNumberList,
|
|
294
544
|
type ReputationPhoneNumberListWithReputation as ReputationPhoneNumberListWithReputation,
|
|
295
545
|
type ReputationPhoneNumberWithReputation as ReputationPhoneNumberWithReputation,
|
|
296
546
|
type NumberRefreshResponse as NumberRefreshResponse,
|
|
547
|
+
type NumberRetrieveOwnershipResponse as NumberRetrieveOwnershipResponse,
|
|
297
548
|
type ReputationPhoneNumbersDefaultFlatPagination as ReputationPhoneNumbersDefaultFlatPagination,
|
|
298
549
|
type NumberListParams as NumberListParams,
|
|
299
550
|
type NumberAssociateParams as NumberAssociateParams,
|
|
300
551
|
type NumberDisassociateParams as NumberDisassociateParams,
|
|
301
552
|
type NumberRetrieveParams as NumberRetrieveParams,
|
|
302
553
|
type NumberRefreshParams as NumberRefreshParams,
|
|
554
|
+
type NumberRetrieveOwnershipParams as NumberRetrieveOwnershipParams,
|
|
555
|
+
type NumberOwnershipConfirmParams as NumberOwnershipConfirmParams,
|
|
303
556
|
};
|
|
304
557
|
}
|
|
@@ -160,8 +160,9 @@ export interface RemediationRequest {
|
|
|
160
160
|
contact_email?: string | null;
|
|
161
161
|
|
|
162
162
|
/**
|
|
163
|
-
* Per-category buckets
|
|
164
|
-
*
|
|
163
|
+
* Per-category buckets of phone numbers, populated once results are available.
|
|
164
|
+
* Empty lists are kept (not omitted) so consumers can iterate without
|
|
165
|
+
* null-checking each key.
|
|
165
166
|
*/
|
|
166
167
|
results?: RemediationPerNumberResults | null;
|
|
167
168
|
|
|
@@ -1,6 +1,13 @@
|
|
|
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 ExternalVerificationAPI from './external-verification';
|
|
5
|
+
import {
|
|
6
|
+
ExternalVerification,
|
|
7
|
+
ExternalVerificationCreateParams,
|
|
8
|
+
ExternalVerificationStatus,
|
|
9
|
+
ExternalVerificationWrapped,
|
|
10
|
+
} from './external-verification';
|
|
4
11
|
import * as LoaAPI from './loa';
|
|
5
12
|
import { AgentInput, Loa, LoaRenderParams, LoaUpdateParams } from './loa';
|
|
6
13
|
import * as NumbersAPI from './numbers';
|
|
@@ -8,10 +15,15 @@ import {
|
|
|
8
15
|
NumberAssociateParams,
|
|
9
16
|
NumberDisassociateParams,
|
|
10
17
|
NumberListParams,
|
|
18
|
+
NumberOwnershipConfirmParams,
|
|
11
19
|
NumberRefreshParams,
|
|
12
20
|
NumberRefreshResponse,
|
|
21
|
+
NumberRetrieveOwnershipParams,
|
|
22
|
+
NumberRetrieveOwnershipResponse,
|
|
13
23
|
NumberRetrieveParams,
|
|
14
24
|
Numbers,
|
|
25
|
+
ReputationNumberSource,
|
|
26
|
+
ReputationOwnershipStatus,
|
|
15
27
|
ReputationPhoneNumber,
|
|
16
28
|
ReputationPhoneNumberList,
|
|
17
29
|
ReputationPhoneNumberListWithReputation,
|
|
@@ -43,6 +55,8 @@ export class Reputation extends APIResource {
|
|
|
43
55
|
numbers: NumbersAPI.Numbers = new NumbersAPI.Numbers(this._client);
|
|
44
56
|
loa: LoaAPI.Loa = new LoaAPI.Loa(this._client);
|
|
45
57
|
remediation: RemediationAPI.Remediation = new RemediationAPI.Remediation(this._client);
|
|
58
|
+
externalVerification: ExternalVerificationAPI.ExternalVerification =
|
|
59
|
+
new ExternalVerificationAPI.ExternalVerification(this._client);
|
|
46
60
|
|
|
47
61
|
/**
|
|
48
62
|
* Disable Phone Number Reputation. All registered numbers are de-registered as a
|
|
@@ -147,6 +161,29 @@ export class Reputation extends APIResource {
|
|
|
147
161
|
): APIPromise<EnterpriseReputationPublicWrapped> {
|
|
148
162
|
return this._client.patch(path`/enterprises/${enterpriseID}/reputation/frequency`, { body, ...options });
|
|
149
163
|
}
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Set the HTTPS URL that receives number-ownership events for this enterprise:
|
|
167
|
+
* `number_reputation.number.flagged`, `number_reputation.number.removed` and
|
|
168
|
+
* `number_reputation.external_verification.status_changed`. Send
|
|
169
|
+
* `webhook_url: null` to stop receiving them.
|
|
170
|
+
*
|
|
171
|
+
* @example
|
|
172
|
+
* ```ts
|
|
173
|
+
* const enterpriseReputationPublicWrapped =
|
|
174
|
+
* await client.enterprises.reputation.updateWebhook(
|
|
175
|
+
* '4a6192a4-573d-446d-b3ce-aff9117272a6',
|
|
176
|
+
* { webhook_url: 'https://example.com/webhooks/telnyx' },
|
|
177
|
+
* );
|
|
178
|
+
* ```
|
|
179
|
+
*/
|
|
180
|
+
updateWebhook(
|
|
181
|
+
enterpriseID: string,
|
|
182
|
+
body: ReputationUpdateWebhookParams,
|
|
183
|
+
options?: RequestOptions,
|
|
184
|
+
): APIPromise<EnterpriseReputationPublicWrapped> {
|
|
185
|
+
return this._client.patch(path`/enterprises/${enterpriseID}/reputation/webhook`, { body, ...options });
|
|
186
|
+
}
|
|
150
187
|
}
|
|
151
188
|
|
|
152
189
|
export interface EnterpriseReputationPublic {
|
|
@@ -160,6 +197,12 @@ export interface EnterpriseReputationPublic {
|
|
|
160
197
|
|
|
161
198
|
enterprise_id?: string;
|
|
162
199
|
|
|
200
|
+
/**
|
|
201
|
+
* Review state of the ownership proof that allows adding phone numbers hosted with
|
|
202
|
+
* another provider.
|
|
203
|
+
*/
|
|
204
|
+
external_verification_status?: ExternalVerificationAPI.ExternalVerificationStatus | null;
|
|
205
|
+
|
|
163
206
|
/**
|
|
164
207
|
* Id of the signed LOA document.
|
|
165
208
|
*/
|
|
@@ -182,6 +225,11 @@ export interface EnterpriseReputationPublic {
|
|
|
182
225
|
status?: 'pending' | 'approved' | 'deleted' | 'rejected';
|
|
183
226
|
|
|
184
227
|
updated_at?: string;
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* HTTPS URL that receives number-ownership webhook events for this enterprise.
|
|
231
|
+
*/
|
|
232
|
+
webhook_url?: string | null;
|
|
185
233
|
}
|
|
186
234
|
|
|
187
235
|
export interface EnterpriseReputationPublicWrapped {
|
|
@@ -223,9 +271,18 @@ export interface ReputationUpdateFrequencyParams {
|
|
|
223
271
|
check_frequency: ReputationCheckFrequency;
|
|
224
272
|
}
|
|
225
273
|
|
|
274
|
+
export interface ReputationUpdateWebhookParams {
|
|
275
|
+
/**
|
|
276
|
+
* HTTPS URL on a publicly routable host. Send `null` to stop receiving
|
|
277
|
+
* number-ownership events.
|
|
278
|
+
*/
|
|
279
|
+
webhook_url: string | null;
|
|
280
|
+
}
|
|
281
|
+
|
|
226
282
|
Reputation.Numbers = Numbers;
|
|
227
283
|
Reputation.Loa = Loa;
|
|
228
284
|
Reputation.Remediation = Remediation;
|
|
285
|
+
Reputation.ExternalVerification = ExternalVerification;
|
|
229
286
|
|
|
230
287
|
export declare namespace Reputation {
|
|
231
288
|
export {
|
|
@@ -234,21 +291,27 @@ export declare namespace Reputation {
|
|
|
234
291
|
type ReputationCheckFrequency as ReputationCheckFrequency,
|
|
235
292
|
type ReputationEnableParams as ReputationEnableParams,
|
|
236
293
|
type ReputationUpdateFrequencyParams as ReputationUpdateFrequencyParams,
|
|
294
|
+
type ReputationUpdateWebhookParams as ReputationUpdateWebhookParams,
|
|
237
295
|
};
|
|
238
296
|
|
|
239
297
|
export {
|
|
240
298
|
Numbers as Numbers,
|
|
299
|
+
type ReputationNumberSource as ReputationNumberSource,
|
|
300
|
+
type ReputationOwnershipStatus as ReputationOwnershipStatus,
|
|
241
301
|
type ReputationPhoneNumber as ReputationPhoneNumber,
|
|
242
302
|
type ReputationPhoneNumberList as ReputationPhoneNumberList,
|
|
243
303
|
type ReputationPhoneNumberListWithReputation as ReputationPhoneNumberListWithReputation,
|
|
244
304
|
type ReputationPhoneNumberWithReputation as ReputationPhoneNumberWithReputation,
|
|
245
305
|
type NumberRefreshResponse as NumberRefreshResponse,
|
|
306
|
+
type NumberRetrieveOwnershipResponse as NumberRetrieveOwnershipResponse,
|
|
246
307
|
type ReputationPhoneNumbersDefaultFlatPagination as ReputationPhoneNumbersDefaultFlatPagination,
|
|
247
308
|
type NumberListParams as NumberListParams,
|
|
248
309
|
type NumberAssociateParams as NumberAssociateParams,
|
|
249
310
|
type NumberDisassociateParams as NumberDisassociateParams,
|
|
250
311
|
type NumberRetrieveParams as NumberRetrieveParams,
|
|
251
312
|
type NumberRefreshParams as NumberRefreshParams,
|
|
313
|
+
type NumberRetrieveOwnershipParams as NumberRetrieveOwnershipParams,
|
|
314
|
+
type NumberOwnershipConfirmParams as NumberOwnershipConfirmParams,
|
|
252
315
|
};
|
|
253
316
|
|
|
254
317
|
export {
|
|
@@ -270,4 +333,11 @@ export declare namespace Reputation {
|
|
|
270
333
|
type RemediationCreateParams as RemediationCreateParams,
|
|
271
334
|
type RemediationRetrieveParams as RemediationRetrieveParams,
|
|
272
335
|
};
|
|
336
|
+
|
|
337
|
+
export {
|
|
338
|
+
ExternalVerification as ExternalVerification,
|
|
339
|
+
type ExternalVerificationStatus as ExternalVerificationStatus,
|
|
340
|
+
type ExternalVerificationWrapped as ExternalVerificationWrapped,
|
|
341
|
+
type ExternalVerificationCreateParams as ExternalVerificationCreateParams,
|
|
342
|
+
};
|
|
273
343
|
}
|