sentdm 0.38.1 → 0.40.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +21 -0
- data/README.md +1 -1
- data/lib/sentdm/client.rb +3 -20
- data/lib/sentdm/internal/voice_agents_page.rb +115 -0
- data/lib/sentdm/models/call_event.rb +8 -6
- data/lib/sentdm/models/call_event_payload.rb +29 -9
- data/lib/sentdm/models/channels/voice_create_params.rb +23 -11
- data/lib/sentdm/models/channels/voice_number.rb +23 -1
- data/lib/sentdm/models/channels/voice_update_params.rb +12 -1
- data/lib/sentdm/models/message_send_params.rb +8 -1
- data/lib/sentdm/models/template.rb +6 -5
- data/lib/sentdm/models/template_body.rb +8 -8
- data/lib/sentdm/models/voice/agent_create_params.rb +142 -0
- data/lib/sentdm/models/{calls/participant_list_params.rb → voice/agent_delete_params.rb} +3 -3
- data/lib/sentdm/models/voice/agent_list_params.rb +38 -0
- data/lib/sentdm/models/{calls/participant_remove_all_params.rb → voice/agent_retrieve_params.rb} +3 -3
- data/lib/sentdm/models/voice/agent_rotate_secret_params.rb +34 -0
- data/lib/sentdm/models/voice/agent_update_params.rb +141 -0
- data/lib/sentdm/models/{calls/api_response_of_list_of_call_participant.rb → voice/api_response_of_call.rb} +7 -7
- data/lib/sentdm/models/voice/api_response_of_call_recordings.rb +45 -0
- data/lib/sentdm/models/voice/api_response_of_calls_list.rb +44 -0
- data/lib/sentdm/models/voice/api_response_of_voice_agent.rb +51 -0
- data/lib/sentdm/models/voice/api_response_of_voice_agent_secret.rb +45 -0
- data/lib/sentdm/models/voice/api_response_of_voice_agents_list.rb +48 -0
- data/lib/sentdm/models/voice/api_response_of_voice_catalogue.rb +49 -0
- data/lib/sentdm/models/{channels → voice}/api_response_of_voice_token.rb +5 -5
- data/lib/sentdm/models/voice/call.rb +241 -0
- data/lib/sentdm/models/{calls/participant_remove_params.rb → voice/call_hangup_params.rb} +8 -8
- data/lib/sentdm/models/voice/call_list_params.rb +103 -0
- data/lib/sentdm/models/voice/call_list_recordings_params.rb +28 -0
- data/lib/sentdm/models/voice/call_party.rb +33 -0
- data/lib/sentdm/models/{calls/participant_update_params.rb → voice/call_record_params.rb} +10 -17
- data/lib/sentdm/models/voice/call_recording.rb +40 -0
- data/lib/sentdm/models/voice/call_recordings.rb +26 -0
- data/lib/sentdm/models/voice/call_retrieve_params.rb +28 -0
- data/lib/sentdm/models/voice/call_timeline_entry.rb +28 -0
- data/lib/sentdm/models/voice/calls/api_response_of_list_of_call_participant.rb +51 -0
- data/lib/sentdm/models/voice/calls/call_participant.rb +62 -0
- data/lib/sentdm/models/voice/calls/call_participant_target.rb +32 -0
- data/lib/sentdm/models/voice/calls/participant_add_params.rb +68 -0
- data/lib/sentdm/models/voice/calls/participant_list_params.rb +30 -0
- data/lib/sentdm/models/voice/calls/participant_remove_all_params.rb +30 -0
- data/lib/sentdm/models/voice/calls/participant_remove_params.rb +36 -0
- data/lib/sentdm/models/voice/calls/participant_update_params.rb +66 -0
- data/lib/sentdm/models/voice/calls_list.rb +28 -0
- data/lib/sentdm/models/voice/catalogue_list_params.rb +22 -0
- data/lib/sentdm/models/{channels/voice_create_token_params.rb → voice/token_create_params.rb} +4 -4
- data/lib/sentdm/models/voice/voice_agent.rb +138 -0
- data/lib/sentdm/models/voice/voice_agent_audio.rb +19 -0
- data/lib/sentdm/models/voice/voice_agent_audio_spec.rb +20 -0
- data/lib/sentdm/models/voice/voice_agent_limits.rb +31 -0
- data/lib/sentdm/models/voice/voice_agent_limits_spec.rb +40 -0
- data/lib/sentdm/models/voice/voice_agent_party.rb +25 -0
- data/lib/sentdm/models/voice/voice_agent_party_spec.rb +28 -0
- data/lib/sentdm/models/voice/voice_agent_secret.rb +27 -0
- data/lib/sentdm/models/voice/voice_agent_speech.rb +31 -0
- data/lib/sentdm/models/voice/voice_agent_speech_spec.rb +40 -0
- data/lib/sentdm/models/voice/voice_agent_transcripts.rb +25 -0
- data/lib/sentdm/models/voice/voice_agent_transcripts_spec.rb +32 -0
- data/lib/sentdm/models/voice/voice_agents_list.rb +30 -0
- data/lib/sentdm/models/voice/voice_catalogue.rb +30 -0
- data/lib/sentdm/models/voice/voice_catalogue_voice.rb +43 -0
- data/lib/sentdm/models/{channels → voice}/voice_token.rb +9 -3
- data/lib/sentdm/models/webhook_create_params.rb +31 -5
- data/lib/sentdm/models/webhook_response.rb +66 -4
- data/lib/sentdm/models/webhook_update_params.rb +15 -3
- data/lib/sentdm/models.rb +2 -30
- data/lib/sentdm/resources/channels/voice.rb +43 -63
- data/lib/sentdm/resources/channels.rb +2 -2
- data/lib/sentdm/resources/profiles/campaigns.rb +3 -2
- data/lib/sentdm/resources/voice/agents.rb +319 -0
- data/lib/sentdm/resources/voice/calls/participants.rb +244 -0
- data/lib/sentdm/resources/voice/calls.rb +269 -0
- data/lib/sentdm/resources/voice/catalogue.rb +71 -0
- data/lib/sentdm/resources/voice/tokens.rb +86 -0
- data/lib/sentdm/resources/voice.rb +142 -0
- data/lib/sentdm/resources/webhooks.rb +43 -15
- data/lib/sentdm/version.rb +1 -1
- data/lib/sentdm.rb +59 -28
- data/rbi/sentdm/client.rbi +2 -19
- data/rbi/sentdm/internal/voice_agents_page.rbi +71 -0
- data/rbi/sentdm/models/call_event.rbi +14 -10
- data/rbi/sentdm/models/call_event_payload.rbi +34 -9
- data/rbi/sentdm/models/channels/voice_create_params.rbi +33 -17
- data/rbi/sentdm/models/channels/voice_number.rbi +31 -0
- data/rbi/sentdm/models/channels/voice_update_params.rbi +14 -0
- data/rbi/sentdm/models/message_send_params.rbi +16 -2
- data/rbi/sentdm/models/template.rbi +12 -10
- data/rbi/sentdm/models/template_body.rbi +12 -12
- data/rbi/sentdm/models/voice/agent_create_params.rbi +215 -0
- data/rbi/sentdm/models/{calls/participant_remove_all_params.rbi → voice/agent_delete_params.rbi} +3 -6
- data/rbi/sentdm/models/voice/agent_list_params.rbi +66 -0
- data/rbi/sentdm/models/voice/agent_retrieve_params.rbi +48 -0
- data/rbi/sentdm/models/{calls/participant_remove_params.rbi → voice/agent_rotate_secret_params.rbi} +11 -8
- data/rbi/sentdm/models/voice/agent_update_params.rbi +211 -0
- data/rbi/sentdm/models/voice/api_response_of_call.rbi +76 -0
- data/rbi/sentdm/models/voice/api_response_of_call_recordings.rbi +81 -0
- data/rbi/sentdm/models/{calls/api_response_of_list_of_call_participant.rbi → voice/api_response_of_calls_list.rbi} +12 -9
- data/rbi/sentdm/models/voice/api_response_of_voice_agent.rbi +85 -0
- data/rbi/sentdm/models/voice/api_response_of_voice_agent_secret.rbi +81 -0
- data/rbi/sentdm/models/voice/api_response_of_voice_agents_list.rbi +83 -0
- data/rbi/sentdm/models/voice/api_response_of_voice_catalogue.rbi +83 -0
- data/rbi/sentdm/models/{channels → voice}/api_response_of_voice_token.rbi +6 -8
- data/rbi/sentdm/models/voice/call.rbi +329 -0
- data/rbi/sentdm/models/voice/call_hangup_params.rbi +61 -0
- data/rbi/sentdm/models/voice/call_list_params.rbi +134 -0
- data/rbi/sentdm/models/{calls/participant_list_params.rbi → voice/call_list_recordings_params.rbi} +3 -3
- data/rbi/sentdm/models/voice/call_party.rbi +47 -0
- data/rbi/sentdm/models/{calls/participant_update_params.rbi → voice/call_record_params.rbi} +12 -21
- data/rbi/sentdm/models/voice/call_recording.rbi +63 -0
- data/rbi/sentdm/models/voice/call_recordings.rbi +49 -0
- data/rbi/sentdm/models/voice/call_retrieve_params.rbi +48 -0
- data/rbi/sentdm/models/voice/call_timeline_entry.rbi +44 -0
- data/rbi/sentdm/models/voice/calls/api_response_of_list_of_call_participant.rbi +84 -0
- data/rbi/sentdm/models/voice/calls/call_participant.rbi +97 -0
- data/rbi/sentdm/models/voice/calls/call_participant_target.rbi +49 -0
- data/rbi/sentdm/models/voice/calls/participant_add_params.rbi +104 -0
- data/rbi/sentdm/models/voice/calls/participant_list_params.rbi +53 -0
- data/rbi/sentdm/models/voice/calls/participant_remove_all_params.rbi +53 -0
- data/rbi/sentdm/models/voice/calls/participant_remove_params.rbi +63 -0
- data/rbi/sentdm/models/voice/calls/participant_update_params.rbi +96 -0
- data/rbi/sentdm/models/voice/calls_list.rbi +54 -0
- data/rbi/sentdm/models/voice/catalogue_list_params.rbi +40 -0
- data/rbi/sentdm/models/{channels/voice_create_token_params.rbi → voice/token_create_params.rbi} +3 -6
- data/rbi/sentdm/models/voice/voice_agent.rbi +196 -0
- data/rbi/sentdm/models/voice/voice_agent_audio.rbi +30 -0
- data/rbi/sentdm/models/voice/voice_agent_audio_spec.rbi +33 -0
- data/rbi/sentdm/models/voice/voice_agent_limits.rbi +57 -0
- data/rbi/sentdm/models/voice/voice_agent_limits_spec.rbi +62 -0
- data/rbi/sentdm/models/voice/voice_agent_party.rbi +36 -0
- data/rbi/sentdm/models/voice/voice_agent_party_spec.rbi +45 -0
- data/rbi/sentdm/models/voice/voice_agent_secret.rbi +37 -0
- data/rbi/sentdm/models/voice/voice_agent_speech.rbi +48 -0
- data/rbi/sentdm/models/voice/voice_agent_speech_spec.rbi +62 -0
- data/rbi/sentdm/models/voice/voice_agent_transcripts.rbi +43 -0
- data/rbi/sentdm/models/voice/voice_agent_transcripts_spec.rbi +51 -0
- data/rbi/sentdm/models/voice/voice_agents_list.rbi +55 -0
- data/rbi/sentdm/models/voice/voice_catalogue.rbi +59 -0
- data/rbi/sentdm/models/voice/voice_catalogue_voice.rbi +75 -0
- data/rbi/sentdm/models/{channels → voice}/voice_token.rbi +8 -4
- data/rbi/sentdm/models/webhook_create_params.rbi +41 -3
- data/rbi/sentdm/models/webhook_response.rbi +112 -3
- data/rbi/sentdm/models/webhook_update_params.rbi +18 -3
- data/rbi/sentdm/models.rbi +2 -30
- data/rbi/sentdm/resources/channels/voice.rbi +57 -67
- data/rbi/sentdm/resources/channels.rbi +2 -2
- data/rbi/sentdm/resources/messages.rbi +8 -1
- data/rbi/sentdm/resources/profiles/campaigns.rbi +3 -2
- data/rbi/sentdm/resources/voice/agents.rbi +316 -0
- data/rbi/sentdm/resources/voice/calls/participants.rbi +212 -0
- data/rbi/sentdm/resources/voice/calls.rbi +244 -0
- data/rbi/sentdm/resources/voice/catalogue.rbi +59 -0
- data/rbi/sentdm/resources/voice/tokens.rbi +84 -0
- data/rbi/sentdm/resources/voice.rbi +136 -0
- data/rbi/sentdm/resources/webhooks.rbi +56 -16
- data/sig/sentdm/client.rbs +1 -1
- data/sig/sentdm/internal/voice_agents_page.rbs +41 -0
- data/sig/sentdm/models/call_event_payload.rbs +12 -0
- data/sig/sentdm/models/channels/voice_create_params.rbs +9 -4
- data/sig/sentdm/models/channels/voice_number.rbs +12 -0
- data/sig/sentdm/models/channels/voice_update_params.rbs +5 -0
- data/sig/sentdm/models/voice/agent_create_params.rbs +99 -0
- data/sig/sentdm/models/{calls/participant_remove_all_params.rbs → voice/agent_delete_params.rbs} +3 -3
- data/sig/sentdm/models/voice/agent_list_params.rbs +40 -0
- data/sig/sentdm/models/{calls/participant_list_params.rbs → voice/agent_retrieve_params.rbs} +3 -3
- data/sig/sentdm/models/{calls/participant_remove_params.rbs → voice/agent_rotate_secret_params.rbs} +8 -8
- data/sig/sentdm/models/voice/agent_update_params.rbs +108 -0
- data/sig/sentdm/models/{calls/api_response_of_list_of_call_participant.rbs → voice/api_response_of_call.rbs} +7 -7
- data/sig/sentdm/models/voice/api_response_of_call_recordings.rbs +41 -0
- data/sig/sentdm/models/voice/api_response_of_calls_list.rbs +41 -0
- data/sig/sentdm/models/voice/api_response_of_voice_agent.rbs +41 -0
- data/sig/sentdm/models/voice/api_response_of_voice_agent_secret.rbs +41 -0
- data/sig/sentdm/models/voice/api_response_of_voice_agents_list.rbs +41 -0
- data/sig/sentdm/models/voice/api_response_of_voice_catalogue.rbs +41 -0
- data/sig/sentdm/models/{channels → voice}/api_response_of_voice_token.rbs +5 -5
- data/sig/sentdm/models/voice/call.rbs +175 -0
- data/sig/sentdm/models/voice/call_hangup_params.rbs +40 -0
- data/sig/sentdm/models/voice/call_list_params.rbs +79 -0
- data/sig/sentdm/models/voice/call_list_recordings_params.rbs +32 -0
- data/sig/sentdm/models/voice/call_party.rbs +19 -0
- data/sig/sentdm/models/{calls/participant_update_params.rbs → voice/call_record_params.rbs} +8 -13
- data/sig/sentdm/models/voice/call_recording.rbs +34 -0
- data/sig/sentdm/models/voice/call_recordings.rbs +22 -0
- data/sig/sentdm/models/voice/call_retrieve_params.rbs +32 -0
- data/sig/sentdm/models/voice/call_timeline_entry.rbs +21 -0
- data/sig/sentdm/models/voice/calls/api_response_of_list_of_call_participant.rbs +43 -0
- data/sig/sentdm/models/voice/calls/call_participant.rbs +54 -0
- data/sig/sentdm/models/voice/calls/call_participant_target.rbs +25 -0
- data/sig/sentdm/models/voice/calls/participant_add_params.rbs +65 -0
- data/sig/sentdm/models/voice/calls/participant_list_params.rbs +34 -0
- data/sig/sentdm/models/voice/calls/participant_remove_all_params.rbs +36 -0
- data/sig/sentdm/models/voice/calls/participant_remove_params.rbs +42 -0
- data/sig/sentdm/models/voice/calls/participant_update_params.rbs +63 -0
- data/sig/sentdm/models/voice/calls_list.rbs +33 -0
- data/sig/sentdm/models/voice/catalogue_list_params.rbs +27 -0
- data/sig/sentdm/models/{channels/voice_create_token_params.rbs → voice/token_create_params.rbs} +3 -3
- data/sig/sentdm/models/voice/voice_agent.rbs +116 -0
- data/sig/sentdm/models/voice/voice_agent_audio.rbs +19 -0
- data/sig/sentdm/models/voice/voice_agent_audio_spec.rbs +17 -0
- data/sig/sentdm/models/voice/voice_agent_limits.rbs +38 -0
- data/sig/sentdm/models/voice/voice_agent_limits_spec.rbs +34 -0
- data/sig/sentdm/models/{calls/call_participant_target.rbs → voice/voice_agent_party.rbs} +4 -4
- data/sig/sentdm/models/voice/voice_agent_party_spec.rbs +19 -0
- data/sig/sentdm/models/voice/voice_agent_secret.rbs +19 -0
- data/sig/sentdm/models/voice/voice_agent_speech.rbs +32 -0
- data/sig/sentdm/models/voice/voice_agent_speech_spec.rbs +26 -0
- data/sig/sentdm/models/voice/voice_agent_transcripts.rbs +23 -0
- data/sig/sentdm/models/voice/voice_agent_transcripts_spec.rbs +20 -0
- data/sig/sentdm/models/voice/voice_agents_list.rbs +35 -0
- data/sig/sentdm/models/voice/voice_catalogue.rbs +35 -0
- data/sig/sentdm/models/voice/voice_catalogue_voice.rbs +42 -0
- data/sig/sentdm/models/{channels → voice}/voice_token.rbs +3 -1
- data/sig/sentdm/models/webhook_create_params.rbs +12 -0
- data/sig/sentdm/models/webhook_response.rbs +46 -3
- data/sig/sentdm/models/webhook_update_params.rbs +5 -0
- data/sig/sentdm/models.rbs +2 -30
- data/sig/sentdm/resources/channels/voice.rbs +3 -11
- data/sig/sentdm/resources/voice/agents.rbs +74 -0
- data/sig/sentdm/resources/voice/calls/participants.rbs +52 -0
- data/sig/sentdm/resources/{calls/participants.rbs → voice/calls.rbs} +25 -21
- data/sig/sentdm/resources/voice/catalogue.rbs +14 -0
- data/sig/sentdm/resources/voice/tokens.rbs +19 -0
- data/sig/sentdm/resources/voice.rbs +15 -0
- data/sig/sentdm/resources/webhooks.rbs +3 -0
- metadata +176 -83
- data/lib/sentdm/models/api_response_of_call.rb +0 -43
- data/lib/sentdm/models/api_response_of_call_recordings.rb +0 -43
- data/lib/sentdm/models/api_response_of_calls_list.rb +0 -42
- data/lib/sentdm/models/call.rb +0 -134
- data/lib/sentdm/models/call_hangup_params.rb +0 -32
- data/lib/sentdm/models/call_list_params.rb +0 -83
- data/lib/sentdm/models/call_list_recordings_params.rb +0 -26
- data/lib/sentdm/models/call_party.rb +0 -31
- data/lib/sentdm/models/call_record_params.rb +0 -55
- data/lib/sentdm/models/call_recording.rb +0 -38
- data/lib/sentdm/models/call_recordings.rb +0 -24
- data/lib/sentdm/models/call_retrieve_params.rb +0 -26
- data/lib/sentdm/models/call_timeline_entry.rb +0 -26
- data/lib/sentdm/models/calls/call_participant.rb +0 -60
- data/lib/sentdm/models/calls/call_participant_target.rb +0 -30
- data/lib/sentdm/models/calls/participant_add_params.rb +0 -66
- data/lib/sentdm/models/calls_list.rb +0 -26
- data/lib/sentdm/resources/calls/participants.rb +0 -231
- data/lib/sentdm/resources/calls.rb +0 -236
- data/rbi/sentdm/models/api_response_of_call.rbi +0 -74
- data/rbi/sentdm/models/api_response_of_call_recordings.rbi +0 -74
- data/rbi/sentdm/models/api_response_of_calls_list.rbi +0 -74
- data/rbi/sentdm/models/call.rbi +0 -179
- data/rbi/sentdm/models/call_hangup_params.rbi +0 -59
- data/rbi/sentdm/models/call_list_params.rbi +0 -112
- data/rbi/sentdm/models/call_list_recordings_params.rbi +0 -46
- data/rbi/sentdm/models/call_party.rbi +0 -41
- data/rbi/sentdm/models/call_record_params.rbi +0 -83
- data/rbi/sentdm/models/call_recording.rbi +0 -59
- data/rbi/sentdm/models/call_recordings.rbi +0 -39
- data/rbi/sentdm/models/call_retrieve_params.rbi +0 -46
- data/rbi/sentdm/models/call_timeline_entry.rbi +0 -40
- data/rbi/sentdm/models/calls/call_participant.rbi +0 -92
- data/rbi/sentdm/models/calls/call_participant_target.rbi +0 -47
- data/rbi/sentdm/models/calls/participant_add_params.rbi +0 -98
- data/rbi/sentdm/models/calls_list.rbi +0 -47
- data/rbi/sentdm/resources/calls/participants.rbi +0 -199
- data/rbi/sentdm/resources/calls.rbi +0 -207
- data/sig/sentdm/models/api_response_of_call.rbs +0 -39
- data/sig/sentdm/models/api_response_of_call_recordings.rbs +0 -39
- data/sig/sentdm/models/api_response_of_calls_list.rbs +0 -39
- data/sig/sentdm/models/call.rbs +0 -101
- data/sig/sentdm/models/call_hangup_params.rbs +0 -38
- data/sig/sentdm/models/call_list_params.rbs +0 -67
- data/sig/sentdm/models/call_list_recordings_params.rbs +0 -30
- data/sig/sentdm/models/call_party.rbs +0 -17
- data/sig/sentdm/models/call_record_params.rbs +0 -54
- data/sig/sentdm/models/call_recording.rbs +0 -32
- data/sig/sentdm/models/call_recordings.rbs +0 -17
- data/sig/sentdm/models/call_retrieve_params.rbs +0 -30
- data/sig/sentdm/models/call_timeline_entry.rbs +0 -19
- data/sig/sentdm/models/calls/call_participant.rbs +0 -52
- data/sig/sentdm/models/calls/participant_add_params.rbs +0 -63
- data/sig/sentdm/models/calls_list.rbs +0 -26
- data/sig/sentdm/resources/calls.rbs +0 -50
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Resources
|
|
5
|
+
class Voice
|
|
6
|
+
# Phone calls from the numbers you hold, driven by your own callback URL.
|
|
7
|
+
#
|
|
8
|
+
# `POST /v3/channels/voice` enables a number for calls, with the callback URL Sent
|
|
9
|
+
# asks what to do with each call on it, and `POST /v3/voice/tokens` mints a
|
|
10
|
+
# short-lived token that lets a user of your app place and receive calls as that
|
|
11
|
+
# number. When a call arrives or a caller presses a key, a signed question is
|
|
12
|
+
# POSTed to the callback URL and the answer decides the call;
|
|
13
|
+
# `POST /v3/channels/voice/{number}/test` checks the URL answers the way we need
|
|
14
|
+
# before a real call reaches it, and
|
|
15
|
+
# `POST /v3/channels/voice/{number}/rotate-secret` replaces the signing secret.
|
|
16
|
+
# The call events themselves (`call.completed` and the rest) arrive through your
|
|
17
|
+
# webhooks.
|
|
18
|
+
#
|
|
19
|
+
# Every call is a record under `/v3/voice/calls`: read it, list its recordings
|
|
20
|
+
# once one is ready, hang it up, start or stop recording, and add, mute or remove
|
|
21
|
+
# conference participants while it is live. A leg to a phone number runs for at
|
|
22
|
+
# most what your balance affords at the destination's rate.
|
|
23
|
+
#
|
|
24
|
+
# **Voice agents.** `POST /v3/voice/agents` creates an agent that answers calls
|
|
25
|
+
# through the Sent Voice Gateway: `session_type` says whether Sent carries the
|
|
26
|
+
# call as text (speech recognised and spoken for the agent) or as audio,
|
|
27
|
+
# `websocket_url` is where the gateway dials the agent for each call (leave it out
|
|
28
|
+
# and the agent dials in with your API key), and `tools`, `transfer_targets`,
|
|
29
|
+
# `fallback` and `limits` say what it may do on a call. The agent's
|
|
30
|
+
# `signing_secret` is shown on create and on
|
|
31
|
+
# `POST /v3/voice/agents/{id}/rotate-secret` only. Voices and languages for text
|
|
32
|
+
# sessions come from `GET /v3/voice/voices`. A number takes calls to an agent once
|
|
33
|
+
# it is bound to it on `/v3/channels/voice`.
|
|
34
|
+
class Agents
|
|
35
|
+
# Creates an agent that answers phone calls through the Sent Voice Gateway.
|
|
36
|
+
# `session_type` says whether Sent carries the call as text (the caller's speech
|
|
37
|
+
# recognised for the agent, the agent's text spoken) or as audio. With
|
|
38
|
+
# `websocket_url` the gateway dials your agent for each call and signs the
|
|
39
|
+
# handshake with the `signing_secret` this response returns; without it, your
|
|
40
|
+
# agent dials in with your API key and this agent's `id`.
|
|
41
|
+
#
|
|
42
|
+
# `tools`, `transfer_targets`, `fallback` and `limits` say what the agent may do
|
|
43
|
+
# on a call. Voices and languages for text sessions come from
|
|
44
|
+
# `GET /v3/voice/voices`. Calls reach the agent once a number is bound to it on
|
|
45
|
+
# `/v3/channels/voice`.
|
|
46
|
+
#
|
|
47
|
+
# `signing_secret` is shown here and on `POST /v3/voice/agents/{id}/rotate-secret`
|
|
48
|
+
# only; store it now. With `sandbox: true` the request is validated and the agent
|
|
49
|
+
# reported with `202`; nothing is written.
|
|
50
|
+
sig do
|
|
51
|
+
params(
|
|
52
|
+
audio: T.nilable(Sentdm::Voice::VoiceAgentAudioSpec::OrHash),
|
|
53
|
+
fallback: T.nilable(Sentdm::Voice::VoiceAgentPartySpec::OrHash),
|
|
54
|
+
greeting: T.nilable(String),
|
|
55
|
+
limits: T.nilable(Sentdm::Voice::VoiceAgentLimitsSpec::OrHash),
|
|
56
|
+
name: T.nilable(String),
|
|
57
|
+
sandbox: T::Boolean,
|
|
58
|
+
session_type: T.nilable(String),
|
|
59
|
+
speech: T.nilable(Sentdm::Voice::VoiceAgentSpeechSpec::OrHash),
|
|
60
|
+
tools: T.nilable(T::Array[String]),
|
|
61
|
+
transcripts:
|
|
62
|
+
T.nilable(Sentdm::Voice::VoiceAgentTranscriptsSpec::OrHash),
|
|
63
|
+
transfer_targets:
|
|
64
|
+
T.nilable(T::Array[Sentdm::Voice::VoiceAgentPartySpec::OrHash]),
|
|
65
|
+
websocket_url: T.nilable(String),
|
|
66
|
+
idempotency_key: String,
|
|
67
|
+
x_profile_id: String,
|
|
68
|
+
request_options: Sentdm::RequestOptions::OrHash
|
|
69
|
+
).returns(Sentdm::Voice::APIResponseOfVoiceAgent)
|
|
70
|
+
end
|
|
71
|
+
def create(
|
|
72
|
+
# Body param: Audio sessions only: the sound format.
|
|
73
|
+
audio: nil,
|
|
74
|
+
# Body param: Who takes the call when the agent cannot: a phone number (kind:
|
|
75
|
+
# number). Omit it and such a call hangs up.
|
|
76
|
+
fallback: nil,
|
|
77
|
+
# Body param: Text sessions only: what the caller hears as soon as the call is
|
|
78
|
+
# answered, before the agent's first turn. 1 to 4,096 characters. Omit it and the
|
|
79
|
+
# agent speaks first.
|
|
80
|
+
greeting: nil,
|
|
81
|
+
# Body param
|
|
82
|
+
limits: nil,
|
|
83
|
+
# Body param: A name for your own reference, 1 to 100 characters.
|
|
84
|
+
name: nil,
|
|
85
|
+
# Body param: Sandbox flag - when true, the operation is simulated without side
|
|
86
|
+
# effects Useful for testing integrations without actual execution
|
|
87
|
+
sandbox: nil,
|
|
88
|
+
# Body param: text: Sent turns the caller's speech into text and the agent's text
|
|
89
|
+
# into speech, so the agent exchanges text frames. audio: the agent receives and
|
|
90
|
+
# sends the sound itself.
|
|
91
|
+
session_type: nil,
|
|
92
|
+
# Body param: Text sessions only: how the caller is spoken to and listened to.
|
|
93
|
+
speech: nil,
|
|
94
|
+
# Body param: What the agent may do to the call: any of transfer, hangup,
|
|
95
|
+
# send_dtmf and hold. Default ["hangup"]. transfer needs at least one
|
|
96
|
+
# transfer_targets entry.
|
|
97
|
+
tools: nil,
|
|
98
|
+
# Body param
|
|
99
|
+
transcripts: nil,
|
|
100
|
+
# Body param: Where the agent may transfer a call to, up to 20 parties: a phone
|
|
101
|
+
# number (kind: number, E.164), one of your app users (kind: user, the identity)
|
|
102
|
+
# or another of your agents (kind: agent, its id). The agent can only transfer to
|
|
103
|
+
# a party listed here.
|
|
104
|
+
transfer_targets: nil,
|
|
105
|
+
# Body param: Where the gateway connects to the agent for each call: an absolute
|
|
106
|
+
# wss:// URL on a public host, at most 2,048 characters. The handshake is signed
|
|
107
|
+
# with the agent's signing_secret. Leave it out and the agent dials in instead,
|
|
108
|
+
# connecting to the gateway with your API key.
|
|
109
|
+
websocket_url: nil,
|
|
110
|
+
# Header param: Unique key to ensure idempotent request processing. Must be 1-255
|
|
111
|
+
# alphanumeric characters, hyphens, or underscores. Responses are cached for 24
|
|
112
|
+
# hours per key per customer.
|
|
113
|
+
idempotency_key: nil,
|
|
114
|
+
# Header param: Profile UUID to scope the request to a child profile. Only
|
|
115
|
+
# organization API keys can use this header. The profile must belong to the
|
|
116
|
+
# calling organization.
|
|
117
|
+
x_profile_id: nil,
|
|
118
|
+
request_options: {}
|
|
119
|
+
)
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# The agent as stored, without its signing secret.
|
|
123
|
+
sig do
|
|
124
|
+
params(
|
|
125
|
+
id: String,
|
|
126
|
+
x_profile_id: String,
|
|
127
|
+
request_options: Sentdm::RequestOptions::OrHash
|
|
128
|
+
).returns(Sentdm::Voice::APIResponseOfVoiceAgent)
|
|
129
|
+
end
|
|
130
|
+
def retrieve(
|
|
131
|
+
# The agent id, such as agent_9f2ab000-0000-4000-8000-000000000001
|
|
132
|
+
id,
|
|
133
|
+
# Profile UUID to scope the request to a child profile. Only organization API keys
|
|
134
|
+
# can use this header. The profile must belong to the calling organization.
|
|
135
|
+
x_profile_id: nil,
|
|
136
|
+
request_options: {}
|
|
137
|
+
)
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# Changes the fields you name and answers with the agent as stored, the same shape
|
|
141
|
+
# `GET` returns.
|
|
142
|
+
#
|
|
143
|
+
# A key left out is left alone. A key sent as `null` clears an optional field
|
|
144
|
+
# (`websocket_url` makes the agent dial in, `greeting` and `fallback` go,
|
|
145
|
+
# `speech`, `audio`, `tools`, `limits` and `transcripts` return to their
|
|
146
|
+
# defaults). A key sent with a value replaces that field whole: send the whole
|
|
147
|
+
# `limits` object, not one of its keys. Changing `session_type` drops `speech`,
|
|
148
|
+
# `audio` and `greeting` unless the body sends them, since the other type cannot
|
|
149
|
+
# carry them. The result is checked like a new agent, and a body that changes
|
|
150
|
+
# nothing is `400`.
|
|
151
|
+
#
|
|
152
|
+
# With `sandbox: true` nothing is written: the request is validated against the
|
|
153
|
+
# stored agent and the agent is reported with `200` as it would read after the
|
|
154
|
+
# change.
|
|
155
|
+
sig do
|
|
156
|
+
params(
|
|
157
|
+
id: String,
|
|
158
|
+
audio: T.nilable(Sentdm::Voice::VoiceAgentAudioSpec::OrHash),
|
|
159
|
+
fallback: T.nilable(Sentdm::Voice::VoiceAgentPartySpec::OrHash),
|
|
160
|
+
greeting: T.nilable(String),
|
|
161
|
+
limits: T.nilable(Sentdm::Voice::VoiceAgentLimitsSpec::OrHash),
|
|
162
|
+
name: String,
|
|
163
|
+
sandbox: T::Boolean,
|
|
164
|
+
session_type: String,
|
|
165
|
+
speech: T.nilable(Sentdm::Voice::VoiceAgentSpeechSpec::OrHash),
|
|
166
|
+
tools: T.nilable(T::Array[String]),
|
|
167
|
+
transcripts:
|
|
168
|
+
T.nilable(Sentdm::Voice::VoiceAgentTranscriptsSpec::OrHash),
|
|
169
|
+
transfer_targets:
|
|
170
|
+
T.nilable(T::Array[Sentdm::Voice::VoiceAgentPartySpec::OrHash]),
|
|
171
|
+
websocket_url: T.nilable(String),
|
|
172
|
+
idempotency_key: String,
|
|
173
|
+
x_profile_id: String,
|
|
174
|
+
request_options: Sentdm::RequestOptions::OrHash
|
|
175
|
+
).returns(Sentdm::Voice::APIResponseOfVoiceAgent)
|
|
176
|
+
end
|
|
177
|
+
def update(
|
|
178
|
+
# Path param: The agent id, such as agent_9f2ab000-0000-4000-8000-000000000001
|
|
179
|
+
id,
|
|
180
|
+
# Body param: Audio sessions: { sample_rate }; null restores the default.
|
|
181
|
+
audio: nil,
|
|
182
|
+
# Body param: A new fallback party, or null for none.
|
|
183
|
+
fallback: nil,
|
|
184
|
+
# Body param: A new greeting, or null for none.
|
|
185
|
+
greeting: nil,
|
|
186
|
+
# Body param: The whole limits object; null restores the defaults.
|
|
187
|
+
limits: nil,
|
|
188
|
+
# Body param: A new name, 1 to 100 characters.
|
|
189
|
+
name: nil,
|
|
190
|
+
# Body param: Sandbox flag - when true, the operation is simulated without side
|
|
191
|
+
# effects Useful for testing integrations without actual execution
|
|
192
|
+
sandbox: nil,
|
|
193
|
+
# Body param: text or audio. Changing it drops the settings the other type cannot
|
|
194
|
+
# have (speech, audio, greeting) unless the body sends them.
|
|
195
|
+
session_type: nil,
|
|
196
|
+
# Body param: Text sessions: { setting, voice, language }, replaced whole; null
|
|
197
|
+
# restores the defaults.
|
|
198
|
+
speech: nil,
|
|
199
|
+
# Body param: The whole list of tools; null restores the default.
|
|
200
|
+
tools: nil,
|
|
201
|
+
# Body param: The whole transcripts object; null restores the defaults.
|
|
202
|
+
transcripts: nil,
|
|
203
|
+
# Body param: The whole list of parties; null clears it.
|
|
204
|
+
transfer_targets: nil,
|
|
205
|
+
# Body param: A new wss:// URL, or null for an agent that dials in.
|
|
206
|
+
websocket_url: nil,
|
|
207
|
+
# Header param: Unique key to ensure idempotent request processing. Must be 1-255
|
|
208
|
+
# alphanumeric characters, hyphens, or underscores. Responses are cached for 24
|
|
209
|
+
# hours per key per customer.
|
|
210
|
+
idempotency_key: nil,
|
|
211
|
+
# Header param: Profile UUID to scope the request to a child profile. Only
|
|
212
|
+
# organization API keys can use this header. The profile must belong to the
|
|
213
|
+
# calling organization.
|
|
214
|
+
x_profile_id: nil,
|
|
215
|
+
request_options: {}
|
|
216
|
+
)
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
# Your voice agents, newest first. `page` and `page_size` (1 to 100, default 20)
|
|
220
|
+
# page the list. Signing secrets are never listed.
|
|
221
|
+
sig do
|
|
222
|
+
params(
|
|
223
|
+
page: Integer,
|
|
224
|
+
page_size: Integer,
|
|
225
|
+
x_profile_id: String,
|
|
226
|
+
request_options: Sentdm::RequestOptions::OrHash
|
|
227
|
+
).returns(
|
|
228
|
+
Sentdm::Internal::VoiceAgentsPage[Sentdm::Voice::VoiceAgent]
|
|
229
|
+
)
|
|
230
|
+
end
|
|
231
|
+
def list(
|
|
232
|
+
# Query param: Page number, from 1
|
|
233
|
+
page: nil,
|
|
234
|
+
# Query param
|
|
235
|
+
page_size: nil,
|
|
236
|
+
# Header param: Profile UUID to scope the request to a child profile. Only
|
|
237
|
+
# organization API keys can use this header. The profile must belong to the
|
|
238
|
+
# calling organization.
|
|
239
|
+
x_profile_id: nil,
|
|
240
|
+
request_options: {}
|
|
241
|
+
)
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
# Removes the agent. Calls it already took keep their `agent_id`.
|
|
245
|
+
#
|
|
246
|
+
# An agent that one of your voice numbers routes to, or that another of your
|
|
247
|
+
# agents lists in `transfer_targets`, is not deleted: the answer is `409` with a
|
|
248
|
+
# message naming those numbers and agents. Unbind the numbers
|
|
249
|
+
# (`PATCH /v3/channels/voice/{number}` with `"agent_id": null`), take the agent
|
|
250
|
+
# out of the others' `transfer_targets` or delete them, and try again.
|
|
251
|
+
#
|
|
252
|
+
# With `sandbox: true` nothing is written: the agent is looked up and the answer
|
|
253
|
+
# is the one a real delete would give.
|
|
254
|
+
sig do
|
|
255
|
+
params(
|
|
256
|
+
id: String,
|
|
257
|
+
sandbox: T::Boolean,
|
|
258
|
+
x_profile_id: String,
|
|
259
|
+
request_options: Sentdm::RequestOptions::OrHash
|
|
260
|
+
).void
|
|
261
|
+
end
|
|
262
|
+
def delete(
|
|
263
|
+
# Path param: The agent id, such as agent_9f2ab000-0000-4000-8000-000000000001
|
|
264
|
+
id,
|
|
265
|
+
# Body param: Sandbox flag - when true, the operation is simulated without side
|
|
266
|
+
# effects Useful for testing integrations without actual execution
|
|
267
|
+
sandbox: nil,
|
|
268
|
+
# Header param: Profile UUID to scope the request to a child profile. Only
|
|
269
|
+
# organization API keys can use this header. The profile must belong to the
|
|
270
|
+
# calling organization.
|
|
271
|
+
x_profile_id: nil,
|
|
272
|
+
request_options: {}
|
|
273
|
+
)
|
|
274
|
+
end
|
|
275
|
+
|
|
276
|
+
# Generates a new `signing_secret` for the agent and returns it. The previous
|
|
277
|
+
# secret stops signing immediately, so update your agent before the next call
|
|
278
|
+
# reaches it.
|
|
279
|
+
#
|
|
280
|
+
# With `sandbox: true` a secret is generated and returned with `202`, and nothing
|
|
281
|
+
# is written.
|
|
282
|
+
sig do
|
|
283
|
+
params(
|
|
284
|
+
id: String,
|
|
285
|
+
sandbox: T::Boolean,
|
|
286
|
+
idempotency_key: String,
|
|
287
|
+
x_profile_id: String,
|
|
288
|
+
request_options: Sentdm::RequestOptions::OrHash
|
|
289
|
+
).returns(Sentdm::Voice::APIResponseOfVoiceAgentSecret)
|
|
290
|
+
end
|
|
291
|
+
def rotate_secret(
|
|
292
|
+
# Path param: The agent id, such as agent_9f2ab000-0000-4000-8000-000000000001
|
|
293
|
+
id,
|
|
294
|
+
# Body param: Sandbox flag - when true, the operation is simulated without side
|
|
295
|
+
# effects Useful for testing integrations without actual execution
|
|
296
|
+
sandbox: nil,
|
|
297
|
+
# Header param: Unique key to ensure idempotent request processing. Must be 1-255
|
|
298
|
+
# alphanumeric characters, hyphens, or underscores. Responses are cached for 24
|
|
299
|
+
# hours per key per customer.
|
|
300
|
+
idempotency_key: nil,
|
|
301
|
+
# Header param: Profile UUID to scope the request to a child profile. Only
|
|
302
|
+
# organization API keys can use this header. The profile must belong to the
|
|
303
|
+
# calling organization.
|
|
304
|
+
x_profile_id: nil,
|
|
305
|
+
request_options: {}
|
|
306
|
+
)
|
|
307
|
+
end
|
|
308
|
+
|
|
309
|
+
# @api private
|
|
310
|
+
sig { params(client: Sentdm::Client).returns(T.attached_class) }
|
|
311
|
+
def self.new(client:)
|
|
312
|
+
end
|
|
313
|
+
end
|
|
314
|
+
end
|
|
315
|
+
end
|
|
316
|
+
end
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Resources
|
|
5
|
+
class Voice
|
|
6
|
+
class Calls
|
|
7
|
+
# Phone calls from the numbers you hold, driven by your own callback URL.
|
|
8
|
+
#
|
|
9
|
+
# `POST /v3/channels/voice` enables a number for calls, with the callback URL Sent
|
|
10
|
+
# asks what to do with each call on it, and `POST /v3/voice/tokens` mints a
|
|
11
|
+
# short-lived token that lets a user of your app place and receive calls as that
|
|
12
|
+
# number. When a call arrives or a caller presses a key, a signed question is
|
|
13
|
+
# POSTed to the callback URL and the answer decides the call;
|
|
14
|
+
# `POST /v3/channels/voice/{number}/test` checks the URL answers the way we need
|
|
15
|
+
# before a real call reaches it, and
|
|
16
|
+
# `POST /v3/channels/voice/{number}/rotate-secret` replaces the signing secret.
|
|
17
|
+
# The call events themselves (`call.completed` and the rest) arrive through your
|
|
18
|
+
# webhooks.
|
|
19
|
+
#
|
|
20
|
+
# Every call is a record under `/v3/voice/calls`: read it, list its recordings
|
|
21
|
+
# once one is ready, hang it up, start or stop recording, and add, mute or remove
|
|
22
|
+
# conference participants while it is live. A leg to a phone number runs for at
|
|
23
|
+
# most what your balance affords at the destination's rate.
|
|
24
|
+
#
|
|
25
|
+
# **Voice agents.** `POST /v3/voice/agents` creates an agent that answers calls
|
|
26
|
+
# through the Sent Voice Gateway: `session_type` says whether Sent carries the
|
|
27
|
+
# call as text (speech recognised and spoken for the agent) or as audio,
|
|
28
|
+
# `websocket_url` is where the gateway dials the agent for each call (leave it out
|
|
29
|
+
# and the agent dials in with your API key), and `tools`, `transfer_targets`,
|
|
30
|
+
# `fallback` and `limits` say what it may do on a call. The agent's
|
|
31
|
+
# `signing_secret` is shown on create and on
|
|
32
|
+
# `POST /v3/voice/agents/{id}/rotate-secret` only. Voices and languages for text
|
|
33
|
+
# sessions come from `GET /v3/voice/voices`. A number takes calls to an agent once
|
|
34
|
+
# it is bound to it on `/v3/channels/voice`.
|
|
35
|
+
class Participants
|
|
36
|
+
# Mutes or unmutes one participant of the conference room a live call is in, named
|
|
37
|
+
# by the participant's own call id from the participants list: send muted true to
|
|
38
|
+
# silence them, muted false to let them be heard again. Muting a participant who
|
|
39
|
+
# is already muted succeeds, as does unmuting one who is not. A participant who is
|
|
40
|
+
# not in this call's room answers 404. A call that has ended answers 409, as does
|
|
41
|
+
# a call that is not in a conference.
|
|
42
|
+
sig do
|
|
43
|
+
params(
|
|
44
|
+
participant_id: String,
|
|
45
|
+
id: String,
|
|
46
|
+
muted: T::Boolean,
|
|
47
|
+
sandbox: T::Boolean,
|
|
48
|
+
idempotency_key: String,
|
|
49
|
+
x_profile_id: String,
|
|
50
|
+
request_options: Sentdm::RequestOptions::OrHash
|
|
51
|
+
).void
|
|
52
|
+
end
|
|
53
|
+
def update(
|
|
54
|
+
# Path param: The participant's own call id from the route, as listed by the
|
|
55
|
+
# participants endpoint, for example call_9f2ab000-0000-4000-8000-000000000002
|
|
56
|
+
participant_id,
|
|
57
|
+
# Path param: The call id from the route, as carried by call webhooks and the
|
|
58
|
+
# calls list, for example call_9f2ab000-0000-4000-8000-000000000001
|
|
59
|
+
id:,
|
|
60
|
+
# Body param: true to mute the participant, false to unmute them
|
|
61
|
+
muted: nil,
|
|
62
|
+
# Body param: Sandbox flag - when true, the operation is simulated without side
|
|
63
|
+
# effects Useful for testing integrations without actual execution
|
|
64
|
+
sandbox: nil,
|
|
65
|
+
# Header param: Unique key to ensure idempotent request processing. Must be 1-255
|
|
66
|
+
# alphanumeric characters, hyphens, or underscores. Responses are cached for 24
|
|
67
|
+
# hours per key per customer.
|
|
68
|
+
idempotency_key: nil,
|
|
69
|
+
# Header param: Profile UUID to scope the request to a child profile. Only
|
|
70
|
+
# organization API keys can use this header. The profile must belong to the
|
|
71
|
+
# calling organization.
|
|
72
|
+
x_profile_id: nil,
|
|
73
|
+
request_options: {}
|
|
74
|
+
)
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Lists who is in the conference room one of your live calls is in: each
|
|
78
|
+
# participant's own call id, who they are, whether the room mutes them, and how
|
|
79
|
+
# long they have been connected. The call itself is one of the participants. Use a
|
|
80
|
+
# participant's id to mute or remove them; it is also a call id, so GET
|
|
81
|
+
# /v3/voice/calls/{id} accepts it. A call that has ended answers 409, as does a
|
|
82
|
+
# call that is not in a conference.
|
|
83
|
+
sig do
|
|
84
|
+
params(
|
|
85
|
+
id: String,
|
|
86
|
+
x_profile_id: String,
|
|
87
|
+
request_options: Sentdm::RequestOptions::OrHash
|
|
88
|
+
).returns(Sentdm::Voice::Calls::APIResponseOfListOfCallParticipant)
|
|
89
|
+
end
|
|
90
|
+
def list(
|
|
91
|
+
# The call id from the route, as carried by call webhooks and the calls list, for
|
|
92
|
+
# example call_9f2ab000-0000-4000-8000-000000000001
|
|
93
|
+
id,
|
|
94
|
+
# Profile UUID to scope the request to a child profile. Only organization API keys
|
|
95
|
+
# can use this header. The profile must belong to the calling organization.
|
|
96
|
+
x_profile_id: nil,
|
|
97
|
+
request_options: {}
|
|
98
|
+
)
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Dials one of your app users or a phone number into a call that is in a
|
|
102
|
+
# conference room, and answers with the participant's own call record. The
|
|
103
|
+
# participant is a call of their own: it has its own id, can be looked up and hung
|
|
104
|
+
# up, and is billed and reported through call.completed and call.failed like any
|
|
105
|
+
# other call. Every participant needs a positive balance. A phone participant is
|
|
106
|
+
# called from caller_id, which must be one of your numbers, or from the call's
|
|
107
|
+
# owning number when omitted, and needs a destination you may call. Only a call
|
|
108
|
+
# your answer connected to a conference can take participants: a call connected to
|
|
109
|
+
# a user or a number answers 409.
|
|
110
|
+
sig do
|
|
111
|
+
params(
|
|
112
|
+
id: String,
|
|
113
|
+
caller_id: T.nilable(String),
|
|
114
|
+
sandbox: T::Boolean,
|
|
115
|
+
to: Sentdm::Voice::Calls::CallParticipantTarget::OrHash,
|
|
116
|
+
idempotency_key: String,
|
|
117
|
+
x_profile_id: String,
|
|
118
|
+
request_options: Sentdm::RequestOptions::OrHash
|
|
119
|
+
).returns(Sentdm::Voice::APIResponseOfCall)
|
|
120
|
+
end
|
|
121
|
+
def add(
|
|
122
|
+
# Path param: The call id from the route, as carried by call webhooks and the
|
|
123
|
+
# calls list, for example call_9f2ab000-0000-4000-8000-000000000001
|
|
124
|
+
id,
|
|
125
|
+
# Body param: The number shown to a phone participant as the caller, in E.164
|
|
126
|
+
# format. Must be one of your numbers. The call's owning number when omitted
|
|
127
|
+
caller_id: nil,
|
|
128
|
+
# Body param: Sandbox flag - when true, the operation is simulated without side
|
|
129
|
+
# effects Useful for testing integrations without actual execution
|
|
130
|
+
sandbox: nil,
|
|
131
|
+
# Body param: A participant to add to a call
|
|
132
|
+
to: nil,
|
|
133
|
+
# Header param: Unique key to ensure idempotent request processing. Must be 1-255
|
|
134
|
+
# alphanumeric characters, hyphens, or underscores. Responses are cached for 24
|
|
135
|
+
# hours per key per customer.
|
|
136
|
+
idempotency_key: nil,
|
|
137
|
+
# Header param: Profile UUID to scope the request to a child profile. Only
|
|
138
|
+
# organization API keys can use this header. The profile must belong to the
|
|
139
|
+
# calling organization.
|
|
140
|
+
x_profile_id: nil,
|
|
141
|
+
request_options: {}
|
|
142
|
+
)
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Removes one participant from the conference room a live call is in, named by the
|
|
146
|
+
# participant's own call id from the participants list. Their leg ends and is
|
|
147
|
+
# reported through call.completed like any other call; everyone else stays
|
|
148
|
+
# connected. A participant who is not in this call's room answers 404. A call that
|
|
149
|
+
# has ended answers 409, as does a call that is not in a conference.
|
|
150
|
+
sig do
|
|
151
|
+
params(
|
|
152
|
+
participant_id: String,
|
|
153
|
+
id: String,
|
|
154
|
+
sandbox: T::Boolean,
|
|
155
|
+
x_profile_id: String,
|
|
156
|
+
request_options: Sentdm::RequestOptions::OrHash
|
|
157
|
+
).void
|
|
158
|
+
end
|
|
159
|
+
def remove(
|
|
160
|
+
# Path param: The participant's own call id from the route, as listed by the
|
|
161
|
+
# participants endpoint, for example call_9f2ab000-0000-4000-8000-000000000002
|
|
162
|
+
participant_id,
|
|
163
|
+
# Path param: The call id from the route, as carried by call webhooks and the
|
|
164
|
+
# calls list, for example call_9f2ab000-0000-4000-8000-000000000001
|
|
165
|
+
id:,
|
|
166
|
+
# Body param: Sandbox flag - when true, the operation is simulated without side
|
|
167
|
+
# effects Useful for testing integrations without actual execution
|
|
168
|
+
sandbox: nil,
|
|
169
|
+
# Header param: Profile UUID to scope the request to a child profile. Only
|
|
170
|
+
# organization API keys can use this header. The profile must belong to the
|
|
171
|
+
# calling organization.
|
|
172
|
+
x_profile_id: nil,
|
|
173
|
+
request_options: {}
|
|
174
|
+
)
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# Removes every participant from the conference room a live call is in, the call
|
|
178
|
+
# itself included. Every leg ends and is reported through call.completed like any
|
|
179
|
+
# other call. A room that is already empty answers 204 as well. A call that has
|
|
180
|
+
# ended answers 409, as does a call that is not in a conference.
|
|
181
|
+
sig do
|
|
182
|
+
params(
|
|
183
|
+
id: String,
|
|
184
|
+
sandbox: T::Boolean,
|
|
185
|
+
x_profile_id: String,
|
|
186
|
+
request_options: Sentdm::RequestOptions::OrHash
|
|
187
|
+
).void
|
|
188
|
+
end
|
|
189
|
+
def remove_all(
|
|
190
|
+
# Path param: The call id from the route, as carried by call webhooks and the
|
|
191
|
+
# calls list, for example call_9f2ab000-0000-4000-8000-000000000001
|
|
192
|
+
id,
|
|
193
|
+
# Body param: Sandbox flag - when true, the operation is simulated without side
|
|
194
|
+
# effects Useful for testing integrations without actual execution
|
|
195
|
+
sandbox: nil,
|
|
196
|
+
# Header param: Profile UUID to scope the request to a child profile. Only
|
|
197
|
+
# organization API keys can use this header. The profile must belong to the
|
|
198
|
+
# calling organization.
|
|
199
|
+
x_profile_id: nil,
|
|
200
|
+
request_options: {}
|
|
201
|
+
)
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
# @api private
|
|
205
|
+
sig { params(client: Sentdm::Client).returns(T.attached_class) }
|
|
206
|
+
def self.new(client:)
|
|
207
|
+
end
|
|
208
|
+
end
|
|
209
|
+
end
|
|
210
|
+
end
|
|
211
|
+
end
|
|
212
|
+
end
|