telnyx 7.24.0 → 7.25.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 +19 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +19 -4
- package/client.d.ts.map +1 -1
- package/client.js +15 -0
- package/client.js.map +1 -1
- package/client.mjs +15 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/ai/ai.d.mts +7 -6
- package/resources/ai/ai.d.mts.map +1 -1
- package/resources/ai/ai.d.ts +7 -6
- 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 +320 -28
- package/resources/ai/assistants/assistants.d.mts.map +1 -1
- package/resources/ai/assistants/assistants.d.ts +320 -28
- package/resources/ai/assistants/assistants.d.ts.map +1 -1
- package/resources/ai/assistants/assistants.js +79 -2
- package/resources/ai/assistants/assistants.js.map +1 -1
- package/resources/ai/assistants/assistants.mjs +79 -2
- package/resources/ai/assistants/assistants.mjs.map +1 -1
- package/resources/ai/assistants/deleted.d.mts +60 -0
- package/resources/ai/assistants/deleted.d.mts.map +1 -0
- package/resources/ai/assistants/deleted.d.ts +60 -0
- package/resources/ai/assistants/deleted.d.ts.map +1 -0
- package/resources/ai/assistants/deleted.js +49 -0
- package/resources/ai/assistants/deleted.js.map +1 -0
- package/resources/ai/assistants/deleted.mjs +45 -0
- package/resources/ai/assistants/deleted.mjs.map +1 -0
- package/resources/ai/assistants/index.d.mts +2 -1
- package/resources/ai/assistants/index.d.mts.map +1 -1
- package/resources/ai/assistants/index.d.ts +2 -1
- package/resources/ai/assistants/index.d.ts.map +1 -1
- package/resources/ai/assistants/index.js +3 -1
- package/resources/ai/assistants/index.js.map +1 -1
- package/resources/ai/assistants/index.mjs +1 -0
- package/resources/ai/assistants/index.mjs.map +1 -1
- package/resources/ai/assistants/versions.d.mts +36 -0
- package/resources/ai/assistants/versions.d.mts.map +1 -1
- package/resources/ai/assistants/versions.d.ts +36 -0
- package/resources/ai/assistants/versions.d.ts.map +1 -1
- package/resources/ai/chat.d.mts +7 -2
- package/resources/ai/chat.d.mts.map +1 -1
- package/resources/ai/chat.d.ts +7 -2
- package/resources/ai/chat.d.ts.map +1 -1
- package/resources/ai/embeddings/embeddings.d.mts +1 -1
- package/resources/ai/embeddings/embeddings.d.ts +1 -1
- package/resources/ai/embeddings/embeddings.js +1 -1
- package/resources/ai/embeddings/embeddings.mjs +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/index.d.mts +1 -1
- package/resources/ai/memory/index.d.mts.map +1 -1
- package/resources/ai/memory/index.d.ts +1 -1
- package/resources/ai/memory/index.d.ts.map +1 -1
- package/resources/ai/memory/index.js.map +1 -1
- package/resources/ai/memory/index.mjs +1 -1
- package/resources/ai/memory/index.mjs.map +1 -1
- package/resources/ai/memory/memory.d.mts +2 -2
- package/resources/ai/memory/memory.d.mts.map +1 -1
- package/resources/ai/memory/memory.d.ts +2 -2
- package/resources/ai/memory/memory.d.ts.map +1 -1
- package/resources/ai/memory/memory.js.map +1 -1
- package/resources/ai/memory/memory.mjs +1 -1
- package/resources/ai/memory/memory.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 +60 -4
- package/resources/ai/memory/namespaces/namespaces.d.mts.map +1 -1
- package/resources/ai/memory/namespaces/namespaces.d.ts +60 -4
- package/resources/ai/memory/namespaces/namespaces.d.ts.map +1 -1
- package/resources/ai/memory/namespaces/namespaces.js +41 -3
- package/resources/ai/memory/namespaces/namespaces.js.map +1 -1
- package/resources/ai/memory/namespaces/namespaces.mjs +41 -3
- package/resources/ai/memory/namespaces/namespaces.mjs.map +1 -1
- package/resources/ai/openai/chat.d.mts +7 -2
- package/resources/ai/openai/chat.d.mts.map +1 -1
- package/resources/ai/openai/chat.d.ts +7 -2
- package/resources/ai/openai/chat.d.ts.map +1 -1
- package/resources/ai/tools.d.mts +3 -4
- package/resources/ai/tools.d.mts.map +1 -1
- package/resources/ai/tools.d.ts +3 -4
- package/resources/ai/tools.d.ts.map +1 -1
- package/resources/ai/tools.js +5 -2
- package/resources/ai/tools.js.map +1 -1
- package/resources/ai/tools.mjs +5 -2
- package/resources/ai/tools.mjs.map +1 -1
- package/resources/calls/actions.d.mts +76 -17
- package/resources/calls/actions.d.mts.map +1 -1
- package/resources/calls/actions.d.ts +76 -17
- package/resources/calls/actions.d.ts.map +1 -1
- package/resources/calls/actions.js +31 -0
- package/resources/calls/actions.js.map +1 -1
- package/resources/calls/actions.mjs +31 -0
- package/resources/calls/actions.mjs.map +1 -1
- package/resources/calls/calls.d.mts +48 -11
- package/resources/calls/calls.d.mts.map +1 -1
- package/resources/calls/calls.d.ts +48 -11
- package/resources/calls/calls.d.ts.map +1 -1
- package/resources/calls/calls.js +3 -0
- package/resources/calls/calls.js.map +1 -1
- package/resources/calls/calls.mjs +3 -0
- package/resources/calls/calls.mjs.map +1 -1
- package/resources/dir/dir.d.mts +220 -28
- package/resources/dir/dir.d.mts.map +1 -1
- package/resources/dir/dir.d.ts +220 -28
- package/resources/dir/dir.d.ts.map +1 -1
- package/resources/dir/dir.js +77 -13
- package/resources/dir/dir.js.map +1 -1
- package/resources/dir/dir.mjs +77 -13
- package/resources/dir/dir.mjs.map +1 -1
- package/resources/dir/index.d.mts +1 -1
- package/resources/dir/index.d.mts.map +1 -1
- package/resources/dir/index.d.ts +1 -1
- package/resources/dir/index.d.ts.map +1 -1
- package/resources/dir/index.js.map +1 -1
- package/resources/dir/index.mjs.map +1 -1
- package/resources/dir/phone-numbers.d.mts +8 -4
- package/resources/dir/phone-numbers.d.mts.map +1 -1
- package/resources/dir/phone-numbers.d.ts +8 -4
- package/resources/dir/phone-numbers.d.ts.map +1 -1
- package/resources/dir/phone-numbers.js +4 -4
- package/resources/dir/phone-numbers.mjs +4 -4
- package/resources/dir/references.d.mts +9 -6
- package/resources/dir/references.d.mts.map +1 -1
- package/resources/dir/references.d.ts +9 -6
- package/resources/dir/references.d.ts.map +1 -1
- package/resources/enterprises/dir.d.mts +17 -1
- package/resources/enterprises/dir.d.mts.map +1 -1
- package/resources/enterprises/dir.d.ts +17 -1
- package/resources/enterprises/dir.d.ts.map +1 -1
- package/resources/enterprises/enterprises.d.mts +237 -23
- package/resources/enterprises/enterprises.d.mts.map +1 -1
- package/resources/enterprises/enterprises.d.ts +237 -23
- package/resources/enterprises/enterprises.d.ts.map +1 -1
- package/resources/enterprises/enterprises.js +26 -4
- package/resources/enterprises/enterprises.js.map +1 -1
- package/resources/enterprises/enterprises.mjs +26 -4
- package/resources/enterprises/enterprises.mjs.map +1 -1
- package/resources/enterprises/index.d.mts +1 -0
- package/resources/enterprises/index.d.mts.map +1 -1
- package/resources/enterprises/index.d.ts +1 -0
- package/resources/enterprises/index.d.ts.map +1 -1
- package/resources/enterprises/index.js +3 -1
- package/resources/enterprises/index.js.map +1 -1
- package/resources/enterprises/index.mjs +1 -0
- package/resources/enterprises/index.mjs.map +1 -1
- package/resources/enterprises/reputation/loa.d.mts +61 -1
- package/resources/enterprises/reputation/loa.d.mts.map +1 -1
- package/resources/enterprises/reputation/loa.d.ts +61 -1
- package/resources/enterprises/reputation/loa.d.ts.map +1 -1
- package/resources/enterprises/verify-email.d.mts +91 -0
- package/resources/enterprises/verify-email.d.mts.map +1 -0
- package/resources/enterprises/verify-email.d.ts +91 -0
- package/resources/enterprises/verify-email.d.ts.map +1 -0
- package/resources/enterprises/verify-email.js +55 -0
- package/resources/enterprises/verify-email.js.map +1 -0
- package/resources/enterprises/verify-email.mjs +51 -0
- package/resources/enterprises/verify-email.mjs.map +1 -0
- package/resources/index.d.mts +4 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +4 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +7 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -0
- package/resources/index.mjs.map +1 -1
- package/resources/infringement-claims.d.mts +4 -0
- package/resources/infringement-claims.d.mts.map +1 -1
- package/resources/infringement-claims.d.ts +4 -0
- package/resources/infringement-claims.d.ts.map +1 -1
- package/resources/llm-token-gateway/index.d.mts +3 -0
- package/resources/llm-token-gateway/index.d.mts.map +1 -0
- package/resources/llm-token-gateway/index.d.ts +3 -0
- package/resources/llm-token-gateway/index.d.ts.map +1 -0
- package/resources/llm-token-gateway/index.js +9 -0
- package/resources/llm-token-gateway/index.js.map +1 -0
- package/resources/llm-token-gateway/index.mjs +4 -0
- package/resources/llm-token-gateway/index.mjs.map +1 -0
- package/resources/llm-token-gateway/llm-token-gateway.d.mts +10 -0
- package/resources/llm-token-gateway/llm-token-gateway.d.mts.map +1 -0
- package/resources/llm-token-gateway/llm-token-gateway.d.ts +10 -0
- package/resources/llm-token-gateway/llm-token-gateway.d.ts.map +1 -0
- package/resources/llm-token-gateway/llm-token-gateway.js +17 -0
- package/resources/llm-token-gateway/llm-token-gateway.js.map +1 -0
- package/resources/llm-token-gateway/llm-token-gateway.mjs +12 -0
- package/resources/llm-token-gateway/llm-token-gateway.mjs.map +1 -0
- package/resources/llm-token-gateway/usage.d.mts +260 -0
- package/resources/llm-token-gateway/usage.d.mts.map +1 -0
- package/resources/llm-token-gateway/usage.d.ts +260 -0
- package/resources/llm-token-gateway/usage.d.ts.map +1 -0
- package/resources/llm-token-gateway/usage.js +31 -0
- package/resources/llm-token-gateway/usage.js.map +1 -0
- package/resources/llm-token-gateway/usage.mjs +27 -0
- package/resources/llm-token-gateway/usage.mjs.map +1 -0
- package/resources/llm-token-gateway.d.mts +2 -0
- package/resources/llm-token-gateway.d.mts.map +1 -0
- package/resources/llm-token-gateway.d.ts +2 -0
- package/resources/llm-token-gateway.d.ts.map +1 -0
- package/resources/llm-token-gateway.js +6 -0
- package/resources/llm-token-gateway.js.map +1 -0
- package/resources/llm-token-gateway.mjs +3 -0
- package/resources/llm-token-gateway.mjs.map +1 -0
- package/resources/meeting-sessions/meeting-sessions.d.mts +8 -9
- package/resources/meeting-sessions/meeting-sessions.d.mts.map +1 -1
- package/resources/meeting-sessions/meeting-sessions.d.ts +8 -9
- package/resources/meeting-sessions/meeting-sessions.d.ts.map +1 -1
- package/resources/meeting-sessions/meeting-sessions.js +6 -6
- package/resources/meeting-sessions/meeting-sessions.js.map +1 -1
- package/resources/meeting-sessions/meeting-sessions.mjs +6 -6
- package/resources/meeting-sessions/meeting-sessions.mjs.map +1 -1
- package/resources/porting-orders/phone-number-blocks.d.mts +1 -1
- package/resources/porting-orders/phone-number-blocks.d.mts.map +1 -1
- package/resources/porting-orders/phone-number-blocks.d.ts +1 -1
- package/resources/porting-orders/phone-number-blocks.d.ts.map +1 -1
- package/resources/porting-orders/porting-orders.d.mts +1 -1
- package/resources/porting-orders/porting-orders.d.mts.map +1 -1
- package/resources/porting-orders/porting-orders.d.ts +1 -1
- package/resources/porting-orders/porting-orders.d.ts.map +1 -1
- package/resources/porting-orders/porting-orders.js.map +1 -1
- package/resources/porting-orders/porting-orders.mjs.map +1 -1
- package/resources/porting-phone-numbers.d.mts +1 -1
- package/resources/porting-phone-numbers.d.mts.map +1 -1
- package/resources/porting-phone-numbers.d.ts +1 -1
- package/resources/porting-phone-numbers.d.ts.map +1 -1
- package/resources/requirements.d.mts +2 -2
- package/resources/requirements.d.mts.map +1 -1
- package/resources/requirements.d.ts +2 -2
- package/resources/requirements.d.ts.map +1 -1
- package/resources/spend-limits.d.mts +335 -0
- package/resources/spend-limits.d.mts.map +1 -0
- package/resources/spend-limits.d.ts +335 -0
- package/resources/spend-limits.d.ts.map +1 -0
- package/resources/spend-limits.js +91 -0
- package/resources/spend-limits.js.map +1 -0
- package/resources/spend-limits.mjs +87 -0
- package/resources/spend-limits.mjs.map +1 -0
- package/resources/terms-of-service/agreements.d.mts +12 -0
- package/resources/terms-of-service/agreements.d.mts.map +1 -1
- package/resources/terms-of-service/agreements.d.ts +12 -0
- package/resources/terms-of-service/agreements.d.ts.map +1 -1
- package/resources/terms-of-service/terms-of-service.d.mts +15 -0
- package/resources/terms-of-service/terms-of-service.d.mts.map +1 -1
- package/resources/terms-of-service/terms-of-service.d.ts +15 -0
- package/resources/terms-of-service/terms-of-service.d.ts.map +1 -1
- package/resources/terms-of-service/terms-of-service.js.map +1 -1
- package/resources/terms-of-service/terms-of-service.mjs.map +1 -1
- package/resources/text-to-speech/text-to-speech.d.mts +4 -2
- package/resources/text-to-speech/text-to-speech.d.mts.map +1 -1
- package/resources/text-to-speech/text-to-speech.d.ts +4 -2
- package/resources/text-to-speech/text-to-speech.d.ts.map +1 -1
- package/resources/webhooks.d.mts +403 -5
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +403 -5
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/whatsapp/phone-numbers/calling-routing.d.mts +89 -0
- package/resources/whatsapp/phone-numbers/calling-routing.d.mts.map +1 -0
- package/resources/whatsapp/phone-numbers/calling-routing.d.ts +89 -0
- package/resources/whatsapp/phone-numbers/calling-routing.d.ts.map +1 -0
- package/resources/whatsapp/phone-numbers/calling-routing.js +65 -0
- package/resources/whatsapp/phone-numbers/calling-routing.js.map +1 -0
- package/resources/whatsapp/phone-numbers/calling-routing.mjs +61 -0
- package/resources/whatsapp/phone-numbers/calling-routing.mjs.map +1 -0
- package/resources/whatsapp/phone-numbers/index.d.mts +1 -0
- package/resources/whatsapp/phone-numbers/index.d.mts.map +1 -1
- package/resources/whatsapp/phone-numbers/index.d.ts +1 -0
- package/resources/whatsapp/phone-numbers/index.d.ts.map +1 -1
- package/resources/whatsapp/phone-numbers/index.js +3 -1
- package/resources/whatsapp/phone-numbers/index.js.map +1 -1
- package/resources/whatsapp/phone-numbers/index.mjs +1 -0
- package/resources/whatsapp/phone-numbers/index.mjs.map +1 -1
- package/resources/whatsapp/phone-numbers/phone-numbers.d.mts +4 -0
- package/resources/whatsapp/phone-numbers/phone-numbers.d.mts.map +1 -1
- package/resources/whatsapp/phone-numbers/phone-numbers.d.ts +4 -0
- package/resources/whatsapp/phone-numbers/phone-numbers.d.ts.map +1 -1
- package/resources/whatsapp/phone-numbers/phone-numbers.js +4 -0
- package/resources/whatsapp/phone-numbers/phone-numbers.js.map +1 -1
- package/resources/whatsapp/phone-numbers/phone-numbers.mjs +4 -0
- package/resources/whatsapp/phone-numbers/phone-numbers.mjs.map +1 -1
- package/src/client.ts +55 -0
- package/src/resources/ai/ai.ts +13 -4
- package/src/resources/ai/assistants/assistants.ts +384 -28
- package/src/resources/ai/assistants/deleted.ts +86 -0
- package/src/resources/ai/assistants/index.ts +11 -0
- package/src/resources/ai/assistants/versions.ts +40 -0
- package/src/resources/ai/chat.ts +7 -2
- package/src/resources/ai/embeddings/embeddings.ts +1 -1
- package/src/resources/ai/index.ts +5 -1
- package/src/resources/ai/memory/index.ts +9 -1
- package/src/resources/ai/memory/memory.ts +13 -1
- package/src/resources/ai/memory/namespaces/index.ts +9 -1
- package/src/resources/ai/memory/namespaces/namespaces.ts +81 -3
- package/src/resources/ai/openai/chat.ts +7 -2
- package/src/resources/ai/tools.ts +6 -6
- package/src/resources/calls/actions.ts +76 -15
- package/src/resources/calls/calls.ts +49 -9
- package/src/resources/dir/dir.ts +263 -32
- package/src/resources/dir/index.ts +6 -0
- package/src/resources/dir/phone-numbers.ts +8 -4
- package/src/resources/dir/references.ts +9 -6
- package/src/resources/enterprises/dir.ts +19 -1
- package/src/resources/enterprises/enterprises.ts +250 -23
- package/src/resources/enterprises/index.ts +5 -0
- package/src/resources/enterprises/reputation/loa.ts +73 -1
- package/src/resources/enterprises/verify-email.ts +117 -0
- package/src/resources/index.ts +20 -0
- package/src/resources/infringement-claims.ts +4 -0
- package/src/resources/llm-token-gateway/index.ts +4 -0
- package/src/resources/llm-token-gateway/llm-token-gateway.ts +19 -0
- package/src/resources/llm-token-gateway/usage.ts +336 -0
- package/src/resources/llm-token-gateway.ts +3 -0
- package/src/resources/meeting-sessions/meeting-sessions.ts +8 -9
- package/src/resources/porting-orders/phone-number-blocks.ts +9 -1
- package/src/resources/porting-orders/porting-orders.ts +9 -1
- package/src/resources/porting-phone-numbers.ts +9 -1
- package/src/resources/requirements.ts +2 -2
- package/src/resources/spend-limits.ts +428 -0
- package/src/resources/terms-of-service/agreements.ts +12 -0
- package/src/resources/terms-of-service/terms-of-service.ts +15 -0
- package/src/resources/text-to-speech/text-to-speech.ts +4 -2
- package/src/resources/webhooks.ts +495 -2
- package/src/resources/whatsapp/phone-numbers/calling-routing.ts +113 -0
- package/src/resources/whatsapp/phone-numbers/index.ts +7 -0
- package/src/resources/whatsapp/phone-numbers/phone-numbers.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
|
@@ -1645,9 +1645,11 @@ export namespace CallMachinePremiumGreetingEnded {
|
|
|
1645
1645
|
from?: string;
|
|
1646
1646
|
|
|
1647
1647
|
/**
|
|
1648
|
-
* Premium Answering Machine Greeting Ended result.
|
|
1648
|
+
* Premium Answering Machine Greeting Ended result. `prompt_ended` is only sent
|
|
1649
|
+
* when `answering_machine_detection` is `premium_ios_call_screening_detection` and
|
|
1650
|
+
* the iOS call-screening prompt ends without a beep.
|
|
1649
1651
|
*/
|
|
1650
|
-
result?: 'beep_detected' | 'no_beep_detected';
|
|
1652
|
+
result?: 'beep_detected' | 'no_beep_detected' | 'prompt_ended';
|
|
1651
1653
|
|
|
1652
1654
|
/**
|
|
1653
1655
|
* Destination number or SIP URI of the call.
|
|
@@ -4848,6 +4850,98 @@ export interface CallBridgedWebhookEvent {
|
|
|
4848
4850
|
data?: CallBridged;
|
|
4849
4851
|
}
|
|
4850
4852
|
|
|
4853
|
+
export interface CallConversationCreatedWebhookEvent {
|
|
4854
|
+
/**
|
|
4855
|
+
* A conversation has been created for the call. Use the conversation ID to
|
|
4856
|
+
* correlate subsequent conversation events.
|
|
4857
|
+
*/
|
|
4858
|
+
data?: CallConversationCreatedWebhookEvent.Data;
|
|
4859
|
+
}
|
|
4860
|
+
|
|
4861
|
+
export namespace CallConversationCreatedWebhookEvent {
|
|
4862
|
+
/**
|
|
4863
|
+
* A conversation has been created for the call. Use the conversation ID to
|
|
4864
|
+
* correlate subsequent conversation events.
|
|
4865
|
+
*/
|
|
4866
|
+
export interface Data {
|
|
4867
|
+
/**
|
|
4868
|
+
* Unique identifier for the event.
|
|
4869
|
+
*/
|
|
4870
|
+
id?: string;
|
|
4871
|
+
|
|
4872
|
+
/**
|
|
4873
|
+
* Timestamp when the event was created in the system.
|
|
4874
|
+
*/
|
|
4875
|
+
created_at?: string;
|
|
4876
|
+
|
|
4877
|
+
/**
|
|
4878
|
+
* The type of event being delivered.
|
|
4879
|
+
*/
|
|
4880
|
+
event_type?: 'call.conversation.created';
|
|
4881
|
+
|
|
4882
|
+
/**
|
|
4883
|
+
* ISO 8601 datetime of when the event occurred.
|
|
4884
|
+
*/
|
|
4885
|
+
occurred_at?: string;
|
|
4886
|
+
|
|
4887
|
+
payload?: Data.Payload;
|
|
4888
|
+
|
|
4889
|
+
/**
|
|
4890
|
+
* Identifies the type of the resource.
|
|
4891
|
+
*/
|
|
4892
|
+
record_type?: 'event';
|
|
4893
|
+
}
|
|
4894
|
+
|
|
4895
|
+
export namespace Data {
|
|
4896
|
+
export interface Payload {
|
|
4897
|
+
/**
|
|
4898
|
+
* Call ID used to issue commands via Call Control API.
|
|
4899
|
+
*/
|
|
4900
|
+
call_control_id?: string;
|
|
4901
|
+
|
|
4902
|
+
/**
|
|
4903
|
+
* ID that is unique to the call leg.
|
|
4904
|
+
*/
|
|
4905
|
+
call_leg_id?: string;
|
|
4906
|
+
|
|
4907
|
+
/**
|
|
4908
|
+
* ID that is unique to the call session (group of related call legs).
|
|
4909
|
+
*/
|
|
4910
|
+
call_session_id?: string;
|
|
4911
|
+
|
|
4912
|
+
/**
|
|
4913
|
+
* The type of calling party connection.
|
|
4914
|
+
*/
|
|
4915
|
+
calling_party_type?: 'pstn' | 'sip';
|
|
4916
|
+
|
|
4917
|
+
/**
|
|
4918
|
+
* Base64-encoded state received from a command.
|
|
4919
|
+
*/
|
|
4920
|
+
client_state?: string;
|
|
4921
|
+
|
|
4922
|
+
/**
|
|
4923
|
+
* Call Control App ID (formerly Telnyx connection ID) used in the call.
|
|
4924
|
+
*/
|
|
4925
|
+
connection_id?: string;
|
|
4926
|
+
|
|
4927
|
+
/**
|
|
4928
|
+
* Unique identifier of the conversation created for this call.
|
|
4929
|
+
*/
|
|
4930
|
+
conversation_id?: string;
|
|
4931
|
+
|
|
4932
|
+
/**
|
|
4933
|
+
* The caller's number or identifier.
|
|
4934
|
+
*/
|
|
4935
|
+
from?: string;
|
|
4936
|
+
|
|
4937
|
+
/**
|
|
4938
|
+
* The callee's number or SIP address.
|
|
4939
|
+
*/
|
|
4940
|
+
to?: string;
|
|
4941
|
+
}
|
|
4942
|
+
}
|
|
4943
|
+
}
|
|
4944
|
+
|
|
4851
4945
|
export interface CallConversationEndedWebhookEvent {
|
|
4852
4946
|
data?: CallConversationEnded;
|
|
4853
4947
|
}
|
|
@@ -5238,10 +5332,159 @@ export interface CallMachineGreetingEndedWebhookEvent {
|
|
|
5238
5332
|
data?: CallMachineGreetingEnded;
|
|
5239
5333
|
}
|
|
5240
5334
|
|
|
5335
|
+
export interface CallMachinePremiumCallScreeningDetectedWebhookEvent {
|
|
5336
|
+
data?: CallMachinePremiumCallScreeningDetectedWebhookEvent.Data;
|
|
5337
|
+
}
|
|
5338
|
+
|
|
5339
|
+
export namespace CallMachinePremiumCallScreeningDetectedWebhookEvent {
|
|
5340
|
+
export interface Data {
|
|
5341
|
+
/**
|
|
5342
|
+
* Identifies the type of resource.
|
|
5343
|
+
*/
|
|
5344
|
+
id?: string;
|
|
5345
|
+
|
|
5346
|
+
/**
|
|
5347
|
+
* The type of event being delivered.
|
|
5348
|
+
*/
|
|
5349
|
+
event_type?: 'call.machine.premium.call_screening.detected';
|
|
5350
|
+
|
|
5351
|
+
/**
|
|
5352
|
+
* ISO 8601 datetime of when the event occurred.
|
|
5353
|
+
*/
|
|
5354
|
+
occurred_at?: string;
|
|
5355
|
+
|
|
5356
|
+
payload?: Data.Payload;
|
|
5357
|
+
|
|
5358
|
+
/**
|
|
5359
|
+
* Identifies the type of the resource.
|
|
5360
|
+
*/
|
|
5361
|
+
record_type?: 'event';
|
|
5362
|
+
}
|
|
5363
|
+
|
|
5364
|
+
export namespace Data {
|
|
5365
|
+
export interface Payload {
|
|
5366
|
+
/**
|
|
5367
|
+
* Call ID used to issue commands via Call Control API.
|
|
5368
|
+
*/
|
|
5369
|
+
call_control_id?: string;
|
|
5370
|
+
|
|
5371
|
+
/**
|
|
5372
|
+
* ID that is unique to the call and can be used to correlate webhook events.
|
|
5373
|
+
*/
|
|
5374
|
+
call_leg_id?: string;
|
|
5375
|
+
|
|
5376
|
+
/**
|
|
5377
|
+
* ID that is unique to the call session and can be used to correlate webhook
|
|
5378
|
+
* events. Call session is a group of related call legs that logically belong to
|
|
5379
|
+
* the same phone call, e.g. an inbound and outbound leg of a transferred call.
|
|
5380
|
+
*/
|
|
5381
|
+
call_session_id?: string;
|
|
5382
|
+
|
|
5383
|
+
/**
|
|
5384
|
+
* State received from a command.
|
|
5385
|
+
*/
|
|
5386
|
+
client_state?: string;
|
|
5387
|
+
|
|
5388
|
+
/**
|
|
5389
|
+
* Call Control App ID (formerly Telnyx connection ID) used in the call.
|
|
5390
|
+
*/
|
|
5391
|
+
connection_id?: string;
|
|
5392
|
+
|
|
5393
|
+
/**
|
|
5394
|
+
* Number or SIP URI placing the call.
|
|
5395
|
+
*/
|
|
5396
|
+
from?: string;
|
|
5397
|
+
|
|
5398
|
+
/**
|
|
5399
|
+
* Apple Call Screening detection result. Sent when an Apple Call Screening tone is
|
|
5400
|
+
* detected; Premium Answering Machine Detection is restarted on the screened call
|
|
5401
|
+
* afterwards.
|
|
5402
|
+
*/
|
|
5403
|
+
result?: 'screening';
|
|
5404
|
+
|
|
5405
|
+
/**
|
|
5406
|
+
* Destination number or SIP URI of the call.
|
|
5407
|
+
*/
|
|
5408
|
+
to?: string;
|
|
5409
|
+
}
|
|
5410
|
+
}
|
|
5411
|
+
}
|
|
5412
|
+
|
|
5241
5413
|
export interface CallMachinePremiumDetectionEndedWebhookEvent {
|
|
5242
5414
|
data?: CallMachinePremiumDetectionEnded;
|
|
5243
5415
|
}
|
|
5244
5416
|
|
|
5417
|
+
export interface CallMachinePremiumDetectionStartedWebhookEvent {
|
|
5418
|
+
data?: CallMachinePremiumDetectionStartedWebhookEvent.Data;
|
|
5419
|
+
}
|
|
5420
|
+
|
|
5421
|
+
export namespace CallMachinePremiumDetectionStartedWebhookEvent {
|
|
5422
|
+
export interface Data {
|
|
5423
|
+
/**
|
|
5424
|
+
* Identifies the type of resource.
|
|
5425
|
+
*/
|
|
5426
|
+
id?: string;
|
|
5427
|
+
|
|
5428
|
+
/**
|
|
5429
|
+
* The type of event being delivered.
|
|
5430
|
+
*/
|
|
5431
|
+
event_type?: 'call.machine.premium.detection.started';
|
|
5432
|
+
|
|
5433
|
+
/**
|
|
5434
|
+
* ISO 8601 datetime of when the event occurred.
|
|
5435
|
+
*/
|
|
5436
|
+
occurred_at?: string;
|
|
5437
|
+
|
|
5438
|
+
payload?: Data.Payload;
|
|
5439
|
+
|
|
5440
|
+
/**
|
|
5441
|
+
* Identifies the type of the resource.
|
|
5442
|
+
*/
|
|
5443
|
+
record_type?: 'event';
|
|
5444
|
+
}
|
|
5445
|
+
|
|
5446
|
+
export namespace Data {
|
|
5447
|
+
export interface Payload {
|
|
5448
|
+
/**
|
|
5449
|
+
* Call ID used to issue commands via Call Control API.
|
|
5450
|
+
*/
|
|
5451
|
+
call_control_id?: string;
|
|
5452
|
+
|
|
5453
|
+
/**
|
|
5454
|
+
* ID that is unique to the call and can be used to correlate webhook events.
|
|
5455
|
+
*/
|
|
5456
|
+
call_leg_id?: string;
|
|
5457
|
+
|
|
5458
|
+
/**
|
|
5459
|
+
* ID that is unique to the call session and can be used to correlate webhook
|
|
5460
|
+
* events. Call session is a group of related call legs that logically belong to
|
|
5461
|
+
* the same phone call, e.g. an inbound and outbound leg of a transferred call.
|
|
5462
|
+
*/
|
|
5463
|
+
call_session_id?: string;
|
|
5464
|
+
|
|
5465
|
+
/**
|
|
5466
|
+
* State received from a command.
|
|
5467
|
+
*/
|
|
5468
|
+
client_state?: string;
|
|
5469
|
+
|
|
5470
|
+
/**
|
|
5471
|
+
* Call Control App ID (formerly Telnyx connection ID) used in the call.
|
|
5472
|
+
*/
|
|
5473
|
+
connection_id?: string;
|
|
5474
|
+
|
|
5475
|
+
/**
|
|
5476
|
+
* Number or SIP URI placing the call.
|
|
5477
|
+
*/
|
|
5478
|
+
from?: string;
|
|
5479
|
+
|
|
5480
|
+
/**
|
|
5481
|
+
* Destination number or SIP URI of the call.
|
|
5482
|
+
*/
|
|
5483
|
+
to?: string;
|
|
5484
|
+
}
|
|
5485
|
+
}
|
|
5486
|
+
}
|
|
5487
|
+
|
|
5245
5488
|
export interface CallMachinePremiumGreetingEndedWebhookEvent {
|
|
5246
5489
|
data?: CallMachinePremiumGreetingEnded;
|
|
5247
5490
|
}
|
|
@@ -6417,6 +6660,98 @@ export interface CallBridgedWebhookEvent {
|
|
|
6417
6660
|
data?: CallBridged;
|
|
6418
6661
|
}
|
|
6419
6662
|
|
|
6663
|
+
export interface CallConversationCreatedWebhookEvent {
|
|
6664
|
+
/**
|
|
6665
|
+
* A conversation has been created for the call. Use the conversation ID to
|
|
6666
|
+
* correlate subsequent conversation events.
|
|
6667
|
+
*/
|
|
6668
|
+
data?: CallConversationCreatedWebhookEvent.Data;
|
|
6669
|
+
}
|
|
6670
|
+
|
|
6671
|
+
export namespace CallConversationCreatedWebhookEvent {
|
|
6672
|
+
/**
|
|
6673
|
+
* A conversation has been created for the call. Use the conversation ID to
|
|
6674
|
+
* correlate subsequent conversation events.
|
|
6675
|
+
*/
|
|
6676
|
+
export interface Data {
|
|
6677
|
+
/**
|
|
6678
|
+
* Unique identifier for the event.
|
|
6679
|
+
*/
|
|
6680
|
+
id?: string;
|
|
6681
|
+
|
|
6682
|
+
/**
|
|
6683
|
+
* Timestamp when the event was created in the system.
|
|
6684
|
+
*/
|
|
6685
|
+
created_at?: string;
|
|
6686
|
+
|
|
6687
|
+
/**
|
|
6688
|
+
* The type of event being delivered.
|
|
6689
|
+
*/
|
|
6690
|
+
event_type?: 'call.conversation.created';
|
|
6691
|
+
|
|
6692
|
+
/**
|
|
6693
|
+
* ISO 8601 datetime of when the event occurred.
|
|
6694
|
+
*/
|
|
6695
|
+
occurred_at?: string;
|
|
6696
|
+
|
|
6697
|
+
payload?: Data.Payload;
|
|
6698
|
+
|
|
6699
|
+
/**
|
|
6700
|
+
* Identifies the type of the resource.
|
|
6701
|
+
*/
|
|
6702
|
+
record_type?: 'event';
|
|
6703
|
+
}
|
|
6704
|
+
|
|
6705
|
+
export namespace Data {
|
|
6706
|
+
export interface Payload {
|
|
6707
|
+
/**
|
|
6708
|
+
* Call ID used to issue commands via Call Control API.
|
|
6709
|
+
*/
|
|
6710
|
+
call_control_id?: string;
|
|
6711
|
+
|
|
6712
|
+
/**
|
|
6713
|
+
* ID that is unique to the call leg.
|
|
6714
|
+
*/
|
|
6715
|
+
call_leg_id?: string;
|
|
6716
|
+
|
|
6717
|
+
/**
|
|
6718
|
+
* ID that is unique to the call session (group of related call legs).
|
|
6719
|
+
*/
|
|
6720
|
+
call_session_id?: string;
|
|
6721
|
+
|
|
6722
|
+
/**
|
|
6723
|
+
* The type of calling party connection.
|
|
6724
|
+
*/
|
|
6725
|
+
calling_party_type?: 'pstn' | 'sip';
|
|
6726
|
+
|
|
6727
|
+
/**
|
|
6728
|
+
* Base64-encoded state received from a command.
|
|
6729
|
+
*/
|
|
6730
|
+
client_state?: string;
|
|
6731
|
+
|
|
6732
|
+
/**
|
|
6733
|
+
* Call Control App ID (formerly Telnyx connection ID) used in the call.
|
|
6734
|
+
*/
|
|
6735
|
+
connection_id?: string;
|
|
6736
|
+
|
|
6737
|
+
/**
|
|
6738
|
+
* Unique identifier of the conversation created for this call.
|
|
6739
|
+
*/
|
|
6740
|
+
conversation_id?: string;
|
|
6741
|
+
|
|
6742
|
+
/**
|
|
6743
|
+
* The caller's number or identifier.
|
|
6744
|
+
*/
|
|
6745
|
+
from?: string;
|
|
6746
|
+
|
|
6747
|
+
/**
|
|
6748
|
+
* The callee's number or SIP address.
|
|
6749
|
+
*/
|
|
6750
|
+
to?: string;
|
|
6751
|
+
}
|
|
6752
|
+
}
|
|
6753
|
+
}
|
|
6754
|
+
|
|
6420
6755
|
export interface CallConversationEndedWebhookEvent {
|
|
6421
6756
|
data?: CallConversationEnded;
|
|
6422
6757
|
}
|
|
@@ -6807,10 +7142,159 @@ export interface CallMachineGreetingEndedWebhookEvent {
|
|
|
6807
7142
|
data?: CallMachineGreetingEnded;
|
|
6808
7143
|
}
|
|
6809
7144
|
|
|
7145
|
+
export interface CallMachinePremiumCallScreeningDetectedWebhookEvent {
|
|
7146
|
+
data?: CallMachinePremiumCallScreeningDetectedWebhookEvent.Data;
|
|
7147
|
+
}
|
|
7148
|
+
|
|
7149
|
+
export namespace CallMachinePremiumCallScreeningDetectedWebhookEvent {
|
|
7150
|
+
export interface Data {
|
|
7151
|
+
/**
|
|
7152
|
+
* Identifies the type of resource.
|
|
7153
|
+
*/
|
|
7154
|
+
id?: string;
|
|
7155
|
+
|
|
7156
|
+
/**
|
|
7157
|
+
* The type of event being delivered.
|
|
7158
|
+
*/
|
|
7159
|
+
event_type?: 'call.machine.premium.call_screening.detected';
|
|
7160
|
+
|
|
7161
|
+
/**
|
|
7162
|
+
* ISO 8601 datetime of when the event occurred.
|
|
7163
|
+
*/
|
|
7164
|
+
occurred_at?: string;
|
|
7165
|
+
|
|
7166
|
+
payload?: Data.Payload;
|
|
7167
|
+
|
|
7168
|
+
/**
|
|
7169
|
+
* Identifies the type of the resource.
|
|
7170
|
+
*/
|
|
7171
|
+
record_type?: 'event';
|
|
7172
|
+
}
|
|
7173
|
+
|
|
7174
|
+
export namespace Data {
|
|
7175
|
+
export interface Payload {
|
|
7176
|
+
/**
|
|
7177
|
+
* Call ID used to issue commands via Call Control API.
|
|
7178
|
+
*/
|
|
7179
|
+
call_control_id?: string;
|
|
7180
|
+
|
|
7181
|
+
/**
|
|
7182
|
+
* ID that is unique to the call and can be used to correlate webhook events.
|
|
7183
|
+
*/
|
|
7184
|
+
call_leg_id?: string;
|
|
7185
|
+
|
|
7186
|
+
/**
|
|
7187
|
+
* ID that is unique to the call session and can be used to correlate webhook
|
|
7188
|
+
* events. Call session is a group of related call legs that logically belong to
|
|
7189
|
+
* the same phone call, e.g. an inbound and outbound leg of a transferred call.
|
|
7190
|
+
*/
|
|
7191
|
+
call_session_id?: string;
|
|
7192
|
+
|
|
7193
|
+
/**
|
|
7194
|
+
* State received from a command.
|
|
7195
|
+
*/
|
|
7196
|
+
client_state?: string;
|
|
7197
|
+
|
|
7198
|
+
/**
|
|
7199
|
+
* Call Control App ID (formerly Telnyx connection ID) used in the call.
|
|
7200
|
+
*/
|
|
7201
|
+
connection_id?: string;
|
|
7202
|
+
|
|
7203
|
+
/**
|
|
7204
|
+
* Number or SIP URI placing the call.
|
|
7205
|
+
*/
|
|
7206
|
+
from?: string;
|
|
7207
|
+
|
|
7208
|
+
/**
|
|
7209
|
+
* Apple Call Screening detection result. Sent when an Apple Call Screening tone is
|
|
7210
|
+
* detected; Premium Answering Machine Detection is restarted on the screened call
|
|
7211
|
+
* afterwards.
|
|
7212
|
+
*/
|
|
7213
|
+
result?: 'screening';
|
|
7214
|
+
|
|
7215
|
+
/**
|
|
7216
|
+
* Destination number or SIP URI of the call.
|
|
7217
|
+
*/
|
|
7218
|
+
to?: string;
|
|
7219
|
+
}
|
|
7220
|
+
}
|
|
7221
|
+
}
|
|
7222
|
+
|
|
6810
7223
|
export interface CallMachinePremiumDetectionEndedWebhookEvent {
|
|
6811
7224
|
data?: CallMachinePremiumDetectionEnded;
|
|
6812
7225
|
}
|
|
6813
7226
|
|
|
7227
|
+
export interface CallMachinePremiumDetectionStartedWebhookEvent {
|
|
7228
|
+
data?: CallMachinePremiumDetectionStartedWebhookEvent.Data;
|
|
7229
|
+
}
|
|
7230
|
+
|
|
7231
|
+
export namespace CallMachinePremiumDetectionStartedWebhookEvent {
|
|
7232
|
+
export interface Data {
|
|
7233
|
+
/**
|
|
7234
|
+
* Identifies the type of resource.
|
|
7235
|
+
*/
|
|
7236
|
+
id?: string;
|
|
7237
|
+
|
|
7238
|
+
/**
|
|
7239
|
+
* The type of event being delivered.
|
|
7240
|
+
*/
|
|
7241
|
+
event_type?: 'call.machine.premium.detection.started';
|
|
7242
|
+
|
|
7243
|
+
/**
|
|
7244
|
+
* ISO 8601 datetime of when the event occurred.
|
|
7245
|
+
*/
|
|
7246
|
+
occurred_at?: string;
|
|
7247
|
+
|
|
7248
|
+
payload?: Data.Payload;
|
|
7249
|
+
|
|
7250
|
+
/**
|
|
7251
|
+
* Identifies the type of the resource.
|
|
7252
|
+
*/
|
|
7253
|
+
record_type?: 'event';
|
|
7254
|
+
}
|
|
7255
|
+
|
|
7256
|
+
export namespace Data {
|
|
7257
|
+
export interface Payload {
|
|
7258
|
+
/**
|
|
7259
|
+
* Call ID used to issue commands via Call Control API.
|
|
7260
|
+
*/
|
|
7261
|
+
call_control_id?: string;
|
|
7262
|
+
|
|
7263
|
+
/**
|
|
7264
|
+
* ID that is unique to the call and can be used to correlate webhook events.
|
|
7265
|
+
*/
|
|
7266
|
+
call_leg_id?: string;
|
|
7267
|
+
|
|
7268
|
+
/**
|
|
7269
|
+
* ID that is unique to the call session and can be used to correlate webhook
|
|
7270
|
+
* events. Call session is a group of related call legs that logically belong to
|
|
7271
|
+
* the same phone call, e.g. an inbound and outbound leg of a transferred call.
|
|
7272
|
+
*/
|
|
7273
|
+
call_session_id?: string;
|
|
7274
|
+
|
|
7275
|
+
/**
|
|
7276
|
+
* State received from a command.
|
|
7277
|
+
*/
|
|
7278
|
+
client_state?: string;
|
|
7279
|
+
|
|
7280
|
+
/**
|
|
7281
|
+
* Call Control App ID (formerly Telnyx connection ID) used in the call.
|
|
7282
|
+
*/
|
|
7283
|
+
connection_id?: string;
|
|
7284
|
+
|
|
7285
|
+
/**
|
|
7286
|
+
* Number or SIP URI placing the call.
|
|
7287
|
+
*/
|
|
7288
|
+
from?: string;
|
|
7289
|
+
|
|
7290
|
+
/**
|
|
7291
|
+
* Destination number or SIP URI of the call.
|
|
7292
|
+
*/
|
|
7293
|
+
to?: string;
|
|
7294
|
+
}
|
|
7295
|
+
}
|
|
7296
|
+
}
|
|
7297
|
+
|
|
6814
7298
|
export interface CallMachinePremiumGreetingEndedWebhookEvent {
|
|
6815
7299
|
data?: CallMachinePremiumGreetingEnded;
|
|
6816
7300
|
}
|
|
@@ -7839,6 +8323,7 @@ export type UnsafeUnwrapWebhookEvent =
|
|
|
7839
8323
|
| ArtifactFailedWebhookEvent
|
|
7840
8324
|
| CallAnsweredWebhookEvent
|
|
7841
8325
|
| CallBridgedWebhookEvent
|
|
8326
|
+
| CallConversationCreatedWebhookEvent
|
|
7842
8327
|
| CallConversationEndedWebhookEvent
|
|
7843
8328
|
| CallConversationInsightsGeneratedWebhookEvent
|
|
7844
8329
|
| CallCostWebhookEvent
|
|
@@ -7855,7 +8340,9 @@ export type UnsafeUnwrapWebhookEvent =
|
|
|
7855
8340
|
| CallLeftQueueWebhookEvent
|
|
7856
8341
|
| CallMachineDetectionEndedWebhookEvent
|
|
7857
8342
|
| CallMachineGreetingEndedWebhookEvent
|
|
8343
|
+
| CallMachinePremiumCallScreeningDetectedWebhookEvent
|
|
7858
8344
|
| CallMachinePremiumDetectionEndedWebhookEvent
|
|
8345
|
+
| CallMachinePremiumDetectionStartedWebhookEvent
|
|
7859
8346
|
| CallMachinePremiumGreetingEndedWebhookEvent
|
|
7860
8347
|
| CallPaymentCompletedWebhookEvent
|
|
7861
8348
|
| CallPaymentProgressWebhookEvent
|
|
@@ -7916,6 +8403,7 @@ export type UnwrapWebhookEvent =
|
|
|
7916
8403
|
| ArtifactFailedWebhookEvent
|
|
7917
8404
|
| CallAnsweredWebhookEvent
|
|
7918
8405
|
| CallBridgedWebhookEvent
|
|
8406
|
+
| CallConversationCreatedWebhookEvent
|
|
7919
8407
|
| CallConversationEndedWebhookEvent
|
|
7920
8408
|
| CallConversationInsightsGeneratedWebhookEvent
|
|
7921
8409
|
| CallCostWebhookEvent
|
|
@@ -7932,7 +8420,9 @@ export type UnwrapWebhookEvent =
|
|
|
7932
8420
|
| CallLeftQueueWebhookEvent
|
|
7933
8421
|
| CallMachineDetectionEndedWebhookEvent
|
|
7934
8422
|
| CallMachineGreetingEndedWebhookEvent
|
|
8423
|
+
| CallMachinePremiumCallScreeningDetectedWebhookEvent
|
|
7935
8424
|
| CallMachinePremiumDetectionEndedWebhookEvent
|
|
8425
|
+
| CallMachinePremiumDetectionStartedWebhookEvent
|
|
7936
8426
|
| CallMachinePremiumGreetingEndedWebhookEvent
|
|
7937
8427
|
| CallPaymentCompletedWebhookEvent
|
|
7938
8428
|
| CallPaymentProgressWebhookEvent
|
|
@@ -8058,6 +8548,7 @@ export declare namespace Webhooks {
|
|
|
8058
8548
|
type ArtifactFailedWebhookEvent as ArtifactFailedWebhookEvent,
|
|
8059
8549
|
type CallAnsweredWebhookEvent as CallAnsweredWebhookEvent,
|
|
8060
8550
|
type CallBridgedWebhookEvent as CallBridgedWebhookEvent,
|
|
8551
|
+
type CallConversationCreatedWebhookEvent as CallConversationCreatedWebhookEvent,
|
|
8061
8552
|
type CallConversationEndedWebhookEvent as CallConversationEndedWebhookEvent,
|
|
8062
8553
|
type CallConversationInsightsGeneratedWebhookEvent as CallConversationInsightsGeneratedWebhookEvent,
|
|
8063
8554
|
type CallCostWebhookEvent as CallCostWebhookEvent,
|
|
@@ -8074,7 +8565,9 @@ export declare namespace Webhooks {
|
|
|
8074
8565
|
type CallLeftQueueWebhookEvent as CallLeftQueueWebhookEvent,
|
|
8075
8566
|
type CallMachineDetectionEndedWebhookEvent as CallMachineDetectionEndedWebhookEvent,
|
|
8076
8567
|
type CallMachineGreetingEndedWebhookEvent as CallMachineGreetingEndedWebhookEvent,
|
|
8568
|
+
type CallMachinePremiumCallScreeningDetectedWebhookEvent as CallMachinePremiumCallScreeningDetectedWebhookEvent,
|
|
8077
8569
|
type CallMachinePremiumDetectionEndedWebhookEvent as CallMachinePremiumDetectionEndedWebhookEvent,
|
|
8570
|
+
type CallMachinePremiumDetectionStartedWebhookEvent as CallMachinePremiumDetectionStartedWebhookEvent,
|
|
8078
8571
|
type CallMachinePremiumGreetingEndedWebhookEvent as CallMachinePremiumGreetingEndedWebhookEvent,
|
|
8079
8572
|
type CallPaymentCompletedWebhookEvent as CallPaymentCompletedWebhookEvent,
|
|
8080
8573
|
type CallPaymentProgressWebhookEvent as CallPaymentProgressWebhookEvent,
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../../../internal/request-options';
|
|
6
|
+
import { path } from '../../../internal/utils/path';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Manage Whatsapp phone numbers
|
|
10
|
+
*/
|
|
11
|
+
export class CallingRouting extends APIResource {
|
|
12
|
+
/**
|
|
13
|
+
* Retrieve the routing connection currently stored for a BYON (Bring Your Own
|
|
14
|
+
* Number) phone number: the connection that inbound WhatsApp calls to the number
|
|
15
|
+
* are delivered to.
|
|
16
|
+
*
|
|
17
|
+
* Use it to check the result of
|
|
18
|
+
* `PATCH /whatsapp/phone_numbers/{id}/calling_routing`. A read made immediately
|
|
19
|
+
* after an update can still return the previous value.
|
|
20
|
+
*
|
|
21
|
+
* Sub-users need read permission on connections.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* const callingRoutings =
|
|
26
|
+
* await client.whatsapp.phoneNumbers.callingRouting.list(
|
|
27
|
+
* '+13125550100',
|
|
28
|
+
* );
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
list(id: string, options?: RequestOptions): APIPromise<CallingRoutingListResponse> {
|
|
32
|
+
return this._client.get(path`/whatsapp/phone_numbers/${id}/calling_routing`, options);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Set or clear the connection that inbound WhatsApp calls to a BYON (Bring Your
|
|
37
|
+
* Own Number) phone number are delivered to.
|
|
38
|
+
*
|
|
39
|
+
* The update is processed asynchronously. A `202` response means the request was
|
|
40
|
+
* accepted, not that the routing changed. Check the result with
|
|
41
|
+
* `GET /whatsapp/phone_numbers/{id}/calling_routing`, which can return the
|
|
42
|
+
* previous value immediately after an update. An update for a number that is not a
|
|
43
|
+
* WhatsApp Calling number in the account returns 404.
|
|
44
|
+
*
|
|
45
|
+
* The connection must belong to the same account and must not be a WhatsApp
|
|
46
|
+
* connection. Send `connection_id: null` to clear the routing; omitting
|
|
47
|
+
* `connection_id` is rejected. Numbers active on Telnyx are rejected, because they
|
|
48
|
+
* route through their own connection assignment.
|
|
49
|
+
*
|
|
50
|
+
* Sub-users need update permission on connections, and read permission to check
|
|
51
|
+
* the result with `GET`.
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```ts
|
|
55
|
+
* const response =
|
|
56
|
+
* await client.whatsapp.phoneNumbers.callingRouting.patchAll(
|
|
57
|
+
* '+13125550100',
|
|
58
|
+
* { connection_id: '1234567890' },
|
|
59
|
+
* );
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
62
|
+
patchAll(
|
|
63
|
+
id: string,
|
|
64
|
+
body: CallingRoutingPatchAllParams,
|
|
65
|
+
options?: RequestOptions,
|
|
66
|
+
): APIPromise<CallingRoutingPatchAllResponse> {
|
|
67
|
+
return this._client.patch(path`/whatsapp/phone_numbers/${id}/calling_routing`, { body, ...options });
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export interface WhatsappCallingRoutingData {
|
|
72
|
+
/**
|
|
73
|
+
* ID of the routing connection, or `null` when none is set.
|
|
74
|
+
*/
|
|
75
|
+
connection_id: string | null;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Phone number in E.164 format, with a leading `+`.
|
|
79
|
+
*/
|
|
80
|
+
phone_number: string;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Identifies the type of the resource.
|
|
84
|
+
*/
|
|
85
|
+
record_type: 'whatsapp_calling_routing';
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export interface CallingRoutingListResponse {
|
|
89
|
+
data: WhatsappCallingRoutingData;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export interface CallingRoutingPatchAllResponse {
|
|
93
|
+
data: WhatsappCallingRoutingData;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export interface CallingRoutingPatchAllParams {
|
|
97
|
+
/**
|
|
98
|
+
* ID of the connection to deliver inbound WhatsApp calls to: a positive integer up
|
|
99
|
+
* to 9223372036854775807, sent as a decimal string or an integer. Send a string to
|
|
100
|
+
* keep large IDs exact. Non-null values are returned as strings. `null` clears the
|
|
101
|
+
* routing.
|
|
102
|
+
*/
|
|
103
|
+
connection_id: string | number | null;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export declare namespace CallingRouting {
|
|
107
|
+
export {
|
|
108
|
+
type WhatsappCallingRoutingData as WhatsappCallingRoutingData,
|
|
109
|
+
type CallingRoutingListResponse as CallingRoutingListResponse,
|
|
110
|
+
type CallingRoutingPatchAllResponse as CallingRoutingPatchAllResponse,
|
|
111
|
+
type CallingRoutingPatchAllParams as CallingRoutingPatchAllParams,
|
|
112
|
+
};
|
|
113
|
+
}
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
+
export {
|
|
4
|
+
CallingRouting,
|
|
5
|
+
type WhatsappCallingRoutingData,
|
|
6
|
+
type CallingRoutingListResponse,
|
|
7
|
+
type CallingRoutingPatchAllResponse,
|
|
8
|
+
type CallingRoutingPatchAllParams,
|
|
9
|
+
} from './calling-routing';
|
|
3
10
|
export {
|
|
4
11
|
CallingSettings,
|
|
5
12
|
type WhatsappCallingSettingsData,
|