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,142 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
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
|
+
# @return [Sentdm::Resources::Voice::Calls]
|
|
35
|
+
attr_reader :calls
|
|
36
|
+
|
|
37
|
+
# Phone calls from the numbers you hold, driven by your own callback URL.
|
|
38
|
+
#
|
|
39
|
+
# `POST /v3/channels/voice` enables a number for calls, with the callback URL Sent
|
|
40
|
+
# asks what to do with each call on it, and `POST /v3/voice/tokens` mints a
|
|
41
|
+
# short-lived token that lets a user of your app place and receive calls as that
|
|
42
|
+
# number. When a call arrives or a caller presses a key, a signed question is
|
|
43
|
+
# POSTed to the callback URL and the answer decides the call;
|
|
44
|
+
# `POST /v3/channels/voice/{number}/test` checks the URL answers the way we need
|
|
45
|
+
# before a real call reaches it, and
|
|
46
|
+
# `POST /v3/channels/voice/{number}/rotate-secret` replaces the signing secret.
|
|
47
|
+
# The call events themselves (`call.completed` and the rest) arrive through your
|
|
48
|
+
# webhooks.
|
|
49
|
+
#
|
|
50
|
+
# Every call is a record under `/v3/voice/calls`: read it, list its recordings
|
|
51
|
+
# once one is ready, hang it up, start or stop recording, and add, mute or remove
|
|
52
|
+
# conference participants while it is live. A leg to a phone number runs for at
|
|
53
|
+
# most what your balance affords at the destination's rate.
|
|
54
|
+
#
|
|
55
|
+
# **Voice agents.** `POST /v3/voice/agents` creates an agent that answers calls
|
|
56
|
+
# through the Sent Voice Gateway: `session_type` says whether Sent carries the
|
|
57
|
+
# call as text (speech recognised and spoken for the agent) or as audio,
|
|
58
|
+
# `websocket_url` is where the gateway dials the agent for each call (leave it out
|
|
59
|
+
# and the agent dials in with your API key), and `tools`, `transfer_targets`,
|
|
60
|
+
# `fallback` and `limits` say what it may do on a call. The agent's
|
|
61
|
+
# `signing_secret` is shown on create and on
|
|
62
|
+
# `POST /v3/voice/agents/{id}/rotate-secret` only. Voices and languages for text
|
|
63
|
+
# sessions come from `GET /v3/voice/voices`. A number takes calls to an agent once
|
|
64
|
+
# it is bound to it on `/v3/channels/voice`.
|
|
65
|
+
# @return [Sentdm::Resources::Voice::Tokens]
|
|
66
|
+
attr_reader :tokens
|
|
67
|
+
|
|
68
|
+
# Phone calls from the numbers you hold, driven by your own callback URL.
|
|
69
|
+
#
|
|
70
|
+
# `POST /v3/channels/voice` enables a number for calls, with the callback URL Sent
|
|
71
|
+
# asks what to do with each call on it, and `POST /v3/voice/tokens` mints a
|
|
72
|
+
# short-lived token that lets a user of your app place and receive calls as that
|
|
73
|
+
# number. When a call arrives or a caller presses a key, a signed question is
|
|
74
|
+
# POSTed to the callback URL and the answer decides the call;
|
|
75
|
+
# `POST /v3/channels/voice/{number}/test` checks the URL answers the way we need
|
|
76
|
+
# before a real call reaches it, and
|
|
77
|
+
# `POST /v3/channels/voice/{number}/rotate-secret` replaces the signing secret.
|
|
78
|
+
# The call events themselves (`call.completed` and the rest) arrive through your
|
|
79
|
+
# webhooks.
|
|
80
|
+
#
|
|
81
|
+
# Every call is a record under `/v3/voice/calls`: read it, list its recordings
|
|
82
|
+
# once one is ready, hang it up, start or stop recording, and add, mute or remove
|
|
83
|
+
# conference participants while it is live. A leg to a phone number runs for at
|
|
84
|
+
# most what your balance affords at the destination's rate.
|
|
85
|
+
#
|
|
86
|
+
# **Voice agents.** `POST /v3/voice/agents` creates an agent that answers calls
|
|
87
|
+
# through the Sent Voice Gateway: `session_type` says whether Sent carries the
|
|
88
|
+
# call as text (speech recognised and spoken for the agent) or as audio,
|
|
89
|
+
# `websocket_url` is where the gateway dials the agent for each call (leave it out
|
|
90
|
+
# and the agent dials in with your API key), and `tools`, `transfer_targets`,
|
|
91
|
+
# `fallback` and `limits` say what it may do on a call. The agent's
|
|
92
|
+
# `signing_secret` is shown on create and on
|
|
93
|
+
# `POST /v3/voice/agents/{id}/rotate-secret` only. Voices and languages for text
|
|
94
|
+
# sessions come from `GET /v3/voice/voices`. A number takes calls to an agent once
|
|
95
|
+
# it is bound to it on `/v3/channels/voice`.
|
|
96
|
+
# @return [Sentdm::Resources::Voice::Agents]
|
|
97
|
+
attr_reader :agents
|
|
98
|
+
|
|
99
|
+
# Phone calls from the numbers you hold, driven by your own callback URL.
|
|
100
|
+
#
|
|
101
|
+
# `POST /v3/channels/voice` enables a number for calls, with the callback URL Sent
|
|
102
|
+
# asks what to do with each call on it, and `POST /v3/voice/tokens` mints a
|
|
103
|
+
# short-lived token that lets a user of your app place and receive calls as that
|
|
104
|
+
# number. When a call arrives or a caller presses a key, a signed question is
|
|
105
|
+
# POSTed to the callback URL and the answer decides the call;
|
|
106
|
+
# `POST /v3/channels/voice/{number}/test` checks the URL answers the way we need
|
|
107
|
+
# before a real call reaches it, and
|
|
108
|
+
# `POST /v3/channels/voice/{number}/rotate-secret` replaces the signing secret.
|
|
109
|
+
# The call events themselves (`call.completed` and the rest) arrive through your
|
|
110
|
+
# webhooks.
|
|
111
|
+
#
|
|
112
|
+
# Every call is a record under `/v3/voice/calls`: read it, list its recordings
|
|
113
|
+
# once one is ready, hang it up, start or stop recording, and add, mute or remove
|
|
114
|
+
# conference participants while it is live. A leg to a phone number runs for at
|
|
115
|
+
# most what your balance affords at the destination's rate.
|
|
116
|
+
#
|
|
117
|
+
# **Voice agents.** `POST /v3/voice/agents` creates an agent that answers calls
|
|
118
|
+
# through the Sent Voice Gateway: `session_type` says whether Sent carries the
|
|
119
|
+
# call as text (speech recognised and spoken for the agent) or as audio,
|
|
120
|
+
# `websocket_url` is where the gateway dials the agent for each call (leave it out
|
|
121
|
+
# and the agent dials in with your API key), and `tools`, `transfer_targets`,
|
|
122
|
+
# `fallback` and `limits` say what it may do on a call. The agent's
|
|
123
|
+
# `signing_secret` is shown on create and on
|
|
124
|
+
# `POST /v3/voice/agents/{id}/rotate-secret` only. Voices and languages for text
|
|
125
|
+
# sessions come from `GET /v3/voice/voices`. A number takes calls to an agent once
|
|
126
|
+
# it is bound to it on `/v3/channels/voice`.
|
|
127
|
+
# @return [Sentdm::Resources::Voice::Catalogue]
|
|
128
|
+
attr_reader :catalogue
|
|
129
|
+
|
|
130
|
+
# @api private
|
|
131
|
+
#
|
|
132
|
+
# @param client [Sentdm::Client]
|
|
133
|
+
def initialize(client:)
|
|
134
|
+
@client = client
|
|
135
|
+
@calls = Sentdm::Resources::Voice::Calls.new(client: client)
|
|
136
|
+
@tokens = Sentdm::Resources::Voice::Tokens.new(client: client)
|
|
137
|
+
@agents = Sentdm::Resources::Voice::Agents.new(client: client)
|
|
138
|
+
@catalogue = Sentdm::Resources::Voice::Catalogue.new(client: client)
|
|
139
|
+
end
|
|
140
|
+
end
|
|
141
|
+
end
|
|
142
|
+
end
|
|
@@ -17,9 +17,17 @@ module Sentdm
|
|
|
17
17
|
# Some parameter documentations has been truncated, see
|
|
18
18
|
# {Sentdm::Models::WebhookCreateParams} for more details.
|
|
19
19
|
#
|
|
20
|
-
# Creates a new webhook endpoint for the authenticated customer.
|
|
21
|
-
#
|
|
22
|
-
#
|
|
20
|
+
# Creates a new webhook endpoint for the authenticated customer. A webhook is
|
|
21
|
+
# version 2 unless the request sets webhook_version to 1: Svix delivers it, signed
|
|
22
|
+
# with the webhook-id, webhook-timestamp and webhook-signature headers, and
|
|
23
|
+
# retries it on its own schedule, so retry_count and timeout_seconds apply to
|
|
24
|
+
# version 1 only. sender_profile applies to version 1 only and is ignored on
|
|
25
|
+
# version 2; is_inheritable applies to version 2 only. A version 1 webhook's
|
|
26
|
+
# response returns its sender_profile selection, with an empty event_types when it
|
|
27
|
+
# is not cloned onto sender profiles; a version 2 webhook's response leaves
|
|
28
|
+
# sender_profile out.
|
|
29
|
+
#
|
|
30
|
+
# @overload create(display_name: nil, endpoint_url: nil, event_filters: nil, event_types: nil, is_inheritable: nil, retry_count: nil, sandbox: nil, sender_profile: nil, timeout_seconds: nil, webhook_version: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
|
|
23
31
|
#
|
|
24
32
|
# @param display_name [String] Body param
|
|
25
33
|
#
|
|
@@ -29,13 +37,17 @@ module Sentdm
|
|
|
29
37
|
#
|
|
30
38
|
# @param event_types [Array<String>] Body param
|
|
31
39
|
#
|
|
32
|
-
# @param
|
|
40
|
+
# @param is_inheritable [Boolean] Body param: Also delivers every sender profile's events to this webhook, at the
|
|
41
|
+
#
|
|
42
|
+
# @param retry_count [Integer] Body param: Delivery retries. Applies to version 1 only: Svix retries a version
|
|
33
43
|
#
|
|
34
44
|
# @param sandbox [Boolean] Body param: Sandbox flag - when true, the operation is simulated without side ef
|
|
35
45
|
#
|
|
36
46
|
# @param sender_profile [Sentdm::Models::WebhookCreateParams::SenderProfile, nil] Body param: Request-only: the events an organization webhook's sender profile cl
|
|
37
47
|
#
|
|
38
|
-
# @param timeout_seconds [Integer] Body param
|
|
48
|
+
# @param timeout_seconds [Integer] Body param: Delivery timeout. Applies to version 1 only.
|
|
49
|
+
#
|
|
50
|
+
# @param webhook_version [Integer, nil] Body param: Who delivers the webhook: 2, the default, is delivered by Svix and s
|
|
39
51
|
#
|
|
40
52
|
# @param idempotency_key [String] Header param: Unique key to ensure idempotent request processing. Must be 1-255
|
|
41
53
|
#
|
|
@@ -62,7 +74,8 @@ module Sentdm
|
|
|
62
74
|
# Some parameter documentations has been truncated, see
|
|
63
75
|
# {Sentdm::Models::WebhookRetrieveParams} for more details.
|
|
64
76
|
#
|
|
65
|
-
# Retrieves a single webhook by ID for the authenticated customer.
|
|
77
|
+
# Retrieves a single webhook by ID for the authenticated customer. A version 1
|
|
78
|
+
# webhook includes its sender_profile selection.
|
|
66
79
|
#
|
|
67
80
|
# @overload retrieve(id, x_profile_id: nil, request_options: {})
|
|
68
81
|
#
|
|
@@ -89,9 +102,13 @@ module Sentdm
|
|
|
89
102
|
# Some parameter documentations has been truncated, see
|
|
90
103
|
# {Sentdm::Models::WebhookUpdateParams} for more details.
|
|
91
104
|
#
|
|
92
|
-
# Updates an existing webhook for the authenticated customer.
|
|
105
|
+
# Updates an existing webhook for the authenticated customer. Its version does not
|
|
106
|
+
# change. sender_profile applies to a version 1 webhook and is_inheritable to a
|
|
107
|
+
# version 2 one; retry_count and timeout_seconds apply to version 1 only. A
|
|
108
|
+
# version 1 webhook's response returns its sender_profile selection as saved; a
|
|
109
|
+
# version 2 webhook's response leaves sender_profile out.
|
|
93
110
|
#
|
|
94
|
-
# @overload update(id, display_name: nil, endpoint_url: nil, event_filters: nil, event_types: nil, retry_count: nil, sandbox: nil, sender_profile: nil, timeout_seconds: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
|
|
111
|
+
# @overload update(id, display_name: nil, endpoint_url: nil, event_filters: nil, event_types: nil, is_inheritable: nil, retry_count: nil, sandbox: nil, sender_profile: nil, timeout_seconds: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
|
|
95
112
|
#
|
|
96
113
|
# @param id [String] Path param
|
|
97
114
|
#
|
|
@@ -103,6 +120,8 @@ module Sentdm
|
|
|
103
120
|
#
|
|
104
121
|
# @param event_types [Array<String>] Body param
|
|
105
122
|
#
|
|
123
|
+
# @param is_inheritable [Boolean, nil] Body param: Makes this webhook inheritable by the organization's sender profiles
|
|
124
|
+
#
|
|
106
125
|
# @param retry_count [Integer] Body param
|
|
107
126
|
#
|
|
108
127
|
# @param sandbox [Boolean] Body param: Sandbox flag - when true, the operation is simulated without side ef
|
|
@@ -136,7 +155,8 @@ module Sentdm
|
|
|
136
155
|
# Some parameter documentations has been truncated, see
|
|
137
156
|
# {Sentdm::Models::WebhookListParams} for more details.
|
|
138
157
|
#
|
|
139
|
-
# Retrieves a paginated list of webhooks for the authenticated customer.
|
|
158
|
+
# Retrieves a paginated list of webhooks for the authenticated customer. Each
|
|
159
|
+
# version 1 webhook includes its sender_profile selection.
|
|
140
160
|
#
|
|
141
161
|
# @overload list(is_active: nil, page: nil, page_size: nil, search: nil, x_profile_id: nil, request_options: {})
|
|
142
162
|
#
|
|
@@ -225,9 +245,11 @@ module Sentdm
|
|
|
225
245
|
# Some parameter documentations has been truncated, see
|
|
226
246
|
# {Sentdm::Models::WebhookListEventsParams} for more details.
|
|
227
247
|
#
|
|
228
|
-
# Retrieves a paginated list of delivery events for the specified webhook
|
|
229
|
-
# webhook is cloned onto your sender profiles
|
|
230
|
-
#
|
|
248
|
+
# Retrieves a paginated list of delivery events for the specified webhook, newest
|
|
249
|
+
# first. If the webhook is cloned onto your sender profiles (version 1) or
|
|
250
|
+
# inheritable by them (version 2, is_inheritable), the list includes their events;
|
|
251
|
+
# read payload.account_id to tell whose event it is. A sender profile may read its
|
|
252
|
+
# organization's inheritable webhook too, and gets the events about itself.
|
|
231
253
|
#
|
|
232
254
|
# @overload list_events(id, page: nil, page_size: nil, search: nil, x_profile_id: nil, request_options: {})
|
|
233
255
|
#
|
|
@@ -264,8 +286,11 @@ module Sentdm
|
|
|
264
286
|
# Some parameter documentations has been truncated, see
|
|
265
287
|
# {Sentdm::Models::WebhookRotateSecretParams} for more details.
|
|
266
288
|
#
|
|
267
|
-
# Generates a new signing secret for the specified webhook.
|
|
268
|
-
#
|
|
289
|
+
# Generates a new signing secret for the specified webhook. A version 1 webhook's
|
|
290
|
+
# old secret stops verifying at once. A version 2 webhook's deliveries are signed
|
|
291
|
+
# with the new secret at once, and with the old one as well for the next 24 hours,
|
|
292
|
+
# so a receiver can switch over without rejecting any; after that the old secret
|
|
293
|
+
# no longer verifies.
|
|
269
294
|
#
|
|
270
295
|
# @overload rotate_secret(id, sandbox: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
|
|
271
296
|
#
|
|
@@ -298,7 +323,10 @@ module Sentdm
|
|
|
298
323
|
# Some parameter documentations has been truncated, see
|
|
299
324
|
# {Sentdm::Models::WebhookTestParams} for more details.
|
|
300
325
|
#
|
|
301
|
-
# Sends a test event to the specified webhook endpoint to verify connectivity.
|
|
326
|
+
# Sends a test event to the specified webhook endpoint to verify connectivity. A
|
|
327
|
+
# version 1 webhook is tested at once and the answer says whether it was
|
|
328
|
+
# delivered; a version 2 webhook's test is queued with Svix, which delivers it
|
|
329
|
+
# right after, and the answer says it was queued.
|
|
302
330
|
#
|
|
303
331
|
# @overload test_(id, event_type: nil, sandbox: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
|
|
304
332
|
#
|
data/lib/sentdm/version.rb
CHANGED
data/lib/sentdm.rb
CHANGED
|
@@ -56,15 +56,13 @@ require_relative "sentdm/internal/calls_page"
|
|
|
56
56
|
require_relative "sentdm/internal/contacts_page"
|
|
57
57
|
require_relative "sentdm/internal/conversations_page"
|
|
58
58
|
require_relative "sentdm/internal/templates_page"
|
|
59
|
+
require_relative "sentdm/internal/voice_agents_page"
|
|
59
60
|
require_relative "sentdm/internal/webhook_events_page"
|
|
60
61
|
require_relative "sentdm/internal/webhooks_page"
|
|
61
|
-
require_relative "sentdm/models/mutation_request"
|
|
62
62
|
require_relative "sentdm/models/channels/voice_number"
|
|
63
|
+
require_relative "sentdm/models/mutation_request"
|
|
63
64
|
require_relative "sentdm/models/template_body_content"
|
|
64
65
|
require_relative "sentdm/models/api_meta"
|
|
65
|
-
require_relative "sentdm/models/api_response_of_call"
|
|
66
|
-
require_relative "sentdm/models/api_response_of_call_recordings"
|
|
67
|
-
require_relative "sentdm/models/api_response_of_calls_list"
|
|
68
66
|
require_relative "sentdm/models/api_response_of_contact"
|
|
69
67
|
require_relative "sentdm/models/api_response_of_contact_message_summary"
|
|
70
68
|
require_relative "sentdm/models/api_response_of_conversation_messages_list"
|
|
@@ -78,27 +76,8 @@ require_relative "sentdm/models/brand_business_info"
|
|
|
78
76
|
require_relative "sentdm/models/brand_compliance_info"
|
|
79
77
|
require_relative "sentdm/models/brand_contact_info"
|
|
80
78
|
require_relative "sentdm/models/brands_brand_data"
|
|
81
|
-
require_relative "sentdm/models/call"
|
|
82
79
|
require_relative "sentdm/models/call_event"
|
|
83
80
|
require_relative "sentdm/models/call_event_payload"
|
|
84
|
-
require_relative "sentdm/models/call_hangup_params"
|
|
85
|
-
require_relative "sentdm/models/call_list_params"
|
|
86
|
-
require_relative "sentdm/models/call_list_recordings_params"
|
|
87
|
-
require_relative "sentdm/models/call_party"
|
|
88
|
-
require_relative "sentdm/models/call_recording"
|
|
89
|
-
require_relative "sentdm/models/call_recordings"
|
|
90
|
-
require_relative "sentdm/models/call_record_params"
|
|
91
|
-
require_relative "sentdm/models/call_retrieve_params"
|
|
92
|
-
require_relative "sentdm/models/calls/api_response_of_list_of_call_participant"
|
|
93
|
-
require_relative "sentdm/models/calls/call_participant"
|
|
94
|
-
require_relative "sentdm/models/calls/call_participant_target"
|
|
95
|
-
require_relative "sentdm/models/calls/participant_add_params"
|
|
96
|
-
require_relative "sentdm/models/calls/participant_list_params"
|
|
97
|
-
require_relative "sentdm/models/calls/participant_remove_all_params"
|
|
98
|
-
require_relative "sentdm/models/calls/participant_remove_params"
|
|
99
|
-
require_relative "sentdm/models/calls/participant_update_params"
|
|
100
|
-
require_relative "sentdm/models/calls_list"
|
|
101
|
-
require_relative "sentdm/models/call_timeline_entry"
|
|
102
81
|
require_relative "sentdm/models/channel_event"
|
|
103
82
|
require_relative "sentdm/models/channel_event_payload"
|
|
104
83
|
require_relative "sentdm/models/channels/api_response_of_list_of_voice_number"
|
|
@@ -106,20 +85,17 @@ require_relative "sentdm/models/channels/api_response_of_voice_callback_test"
|
|
|
106
85
|
require_relative "sentdm/models/channels/api_response_of_voice_number"
|
|
107
86
|
require_relative "sentdm/models/channels/api_response_of_voice_number_created"
|
|
108
87
|
require_relative "sentdm/models/channels/api_response_of_voice_secret"
|
|
109
|
-
require_relative "sentdm/models/channels/api_response_of_voice_token"
|
|
110
88
|
require_relative "sentdm/models/channels/voice_callback_test"
|
|
111
89
|
require_relative "sentdm/models/channels/voice_callback_test_error_info"
|
|
112
90
|
require_relative "sentdm/models/channels/voice_callback_test_request_info"
|
|
113
91
|
require_relative "sentdm/models/channels/voice_callback_test_response_info"
|
|
114
92
|
require_relative "sentdm/models/channels/voice_create_params"
|
|
115
|
-
require_relative "sentdm/models/channels/voice_create_token_params"
|
|
116
93
|
require_relative "sentdm/models/channels/voice_list_params"
|
|
117
94
|
require_relative "sentdm/models/channels/voice_number_created"
|
|
118
95
|
require_relative "sentdm/models/channels/voice_retrieve_params"
|
|
119
96
|
require_relative "sentdm/models/channels/voice_rotate_secret_params"
|
|
120
97
|
require_relative "sentdm/models/channels/voice_secret"
|
|
121
98
|
require_relative "sentdm/models/channels/voice_test_params"
|
|
122
|
-
require_relative "sentdm/models/channels/voice_token"
|
|
123
99
|
require_relative "sentdm/models/channels/voice_update_params"
|
|
124
100
|
require_relative "sentdm/models/contact_create_params"
|
|
125
101
|
require_relative "sentdm/models/contact_delete_params"
|
|
@@ -197,6 +173,57 @@ require_relative "sentdm/models/user_remove_params"
|
|
|
197
173
|
require_relative "sentdm/models/user_response"
|
|
198
174
|
require_relative "sentdm/models/user_retrieve_params"
|
|
199
175
|
require_relative "sentdm/models/user_update_role_params"
|
|
176
|
+
require_relative "sentdm/models/voice/agent_create_params"
|
|
177
|
+
require_relative "sentdm/models/voice/agent_delete_params"
|
|
178
|
+
require_relative "sentdm/models/voice/agent_list_params"
|
|
179
|
+
require_relative "sentdm/models/voice/agent_retrieve_params"
|
|
180
|
+
require_relative "sentdm/models/voice/agent_rotate_secret_params"
|
|
181
|
+
require_relative "sentdm/models/voice/agent_update_params"
|
|
182
|
+
require_relative "sentdm/models/voice/api_response_of_call"
|
|
183
|
+
require_relative "sentdm/models/voice/api_response_of_call_recordings"
|
|
184
|
+
require_relative "sentdm/models/voice/api_response_of_calls_list"
|
|
185
|
+
require_relative "sentdm/models/voice/api_response_of_voice_agent"
|
|
186
|
+
require_relative "sentdm/models/voice/api_response_of_voice_agent_secret"
|
|
187
|
+
require_relative "sentdm/models/voice/api_response_of_voice_agents_list"
|
|
188
|
+
require_relative "sentdm/models/voice/api_response_of_voice_catalogue"
|
|
189
|
+
require_relative "sentdm/models/voice/api_response_of_voice_token"
|
|
190
|
+
require_relative "sentdm/models/voice/call"
|
|
191
|
+
require_relative "sentdm/models/voice/call_hangup_params"
|
|
192
|
+
require_relative "sentdm/models/voice/call_list_params"
|
|
193
|
+
require_relative "sentdm/models/voice/call_list_recordings_params"
|
|
194
|
+
require_relative "sentdm/models/voice/call_party"
|
|
195
|
+
require_relative "sentdm/models/voice/call_recording"
|
|
196
|
+
require_relative "sentdm/models/voice/call_recordings"
|
|
197
|
+
require_relative "sentdm/models/voice/call_record_params"
|
|
198
|
+
require_relative "sentdm/models/voice/call_retrieve_params"
|
|
199
|
+
require_relative "sentdm/models/voice/calls/api_response_of_list_of_call_participant"
|
|
200
|
+
require_relative "sentdm/models/voice/calls/call_participant"
|
|
201
|
+
require_relative "sentdm/models/voice/calls/call_participant_target"
|
|
202
|
+
require_relative "sentdm/models/voice/calls/participant_add_params"
|
|
203
|
+
require_relative "sentdm/models/voice/calls/participant_list_params"
|
|
204
|
+
require_relative "sentdm/models/voice/calls/participant_remove_all_params"
|
|
205
|
+
require_relative "sentdm/models/voice/calls/participant_remove_params"
|
|
206
|
+
require_relative "sentdm/models/voice/calls/participant_update_params"
|
|
207
|
+
require_relative "sentdm/models/voice/calls_list"
|
|
208
|
+
require_relative "sentdm/models/voice/call_timeline_entry"
|
|
209
|
+
require_relative "sentdm/models/voice/catalogue_list_params"
|
|
210
|
+
require_relative "sentdm/models/voice/token_create_params"
|
|
211
|
+
require_relative "sentdm/models/voice/voice_agent"
|
|
212
|
+
require_relative "sentdm/models/voice/voice_agent_audio"
|
|
213
|
+
require_relative "sentdm/models/voice/voice_agent_audio_spec"
|
|
214
|
+
require_relative "sentdm/models/voice/voice_agent_limits"
|
|
215
|
+
require_relative "sentdm/models/voice/voice_agent_limits_spec"
|
|
216
|
+
require_relative "sentdm/models/voice/voice_agent_party"
|
|
217
|
+
require_relative "sentdm/models/voice/voice_agent_party_spec"
|
|
218
|
+
require_relative "sentdm/models/voice/voice_agent_secret"
|
|
219
|
+
require_relative "sentdm/models/voice/voice_agents_list"
|
|
220
|
+
require_relative "sentdm/models/voice/voice_agent_speech"
|
|
221
|
+
require_relative "sentdm/models/voice/voice_agent_speech_spec"
|
|
222
|
+
require_relative "sentdm/models/voice/voice_agent_transcripts"
|
|
223
|
+
require_relative "sentdm/models/voice/voice_agent_transcripts_spec"
|
|
224
|
+
require_relative "sentdm/models/voice/voice_catalogue"
|
|
225
|
+
require_relative "sentdm/models/voice/voice_catalogue_voice"
|
|
226
|
+
require_relative "sentdm/models/voice/voice_token"
|
|
200
227
|
require_relative "sentdm/models/webhook_create_params"
|
|
201
228
|
require_relative "sentdm/models/webhook_delete_params"
|
|
202
229
|
require_relative "sentdm/models/webhook_event_type"
|
|
@@ -214,8 +241,6 @@ require_relative "sentdm/models/webhook_test_response"
|
|
|
214
241
|
require_relative "sentdm/models/webhook_toggle_status_params"
|
|
215
242
|
require_relative "sentdm/models/webhook_update_params"
|
|
216
243
|
require_relative "sentdm/models"
|
|
217
|
-
require_relative "sentdm/resources/calls"
|
|
218
|
-
require_relative "sentdm/resources/calls/participants"
|
|
219
244
|
require_relative "sentdm/resources/channels"
|
|
220
245
|
require_relative "sentdm/resources/channels/voice"
|
|
221
246
|
require_relative "sentdm/resources/contacts"
|
|
@@ -227,4 +252,10 @@ require_relative "sentdm/resources/profiles"
|
|
|
227
252
|
require_relative "sentdm/resources/profiles/campaigns"
|
|
228
253
|
require_relative "sentdm/resources/templates"
|
|
229
254
|
require_relative "sentdm/resources/users"
|
|
255
|
+
require_relative "sentdm/resources/voice"
|
|
256
|
+
require_relative "sentdm/resources/voice/agents"
|
|
257
|
+
require_relative "sentdm/resources/voice/calls"
|
|
258
|
+
require_relative "sentdm/resources/voice/calls/participants"
|
|
259
|
+
require_relative "sentdm/resources/voice/catalogue"
|
|
260
|
+
require_relative "sentdm/resources/voice/tokens"
|
|
230
261
|
require_relative "sentdm/resources/webhooks"
|
data/rbi/sentdm/client.rbi
CHANGED
|
@@ -115,25 +115,8 @@ module Sentdm
|
|
|
115
115
|
sig { returns(Sentdm::Resources::Conversations) }
|
|
116
116
|
attr_reader :conversations
|
|
117
117
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
# `POST /v3/channels/voice` enables a number for calls, with the callback URL Sent
|
|
121
|
-
# asks what to do with each call on it, and `POST /v3/channels/voice/tokens` mints
|
|
122
|
-
# a short-lived token that lets a user of your app place and receive calls as that
|
|
123
|
-
# number. When a call arrives or a caller presses a key, a signed question is
|
|
124
|
-
# POSTed to the callback URL and the answer decides the call;
|
|
125
|
-
# `POST /v3/channels/voice/{number}/test` checks the URL answers the way we need
|
|
126
|
-
# before a real call reaches it, and
|
|
127
|
-
# `POST /v3/channels/voice/{number}/rotate-secret` replaces the signing secret.
|
|
128
|
-
# The call events themselves (`call.completed` and the rest) arrive through your
|
|
129
|
-
# webhooks.
|
|
130
|
-
#
|
|
131
|
-
# Every call is a record under `/v3/calls`: read it, list its recordings once one
|
|
132
|
-
# is ready, hang it up, start or stop recording, and add, mute or remove
|
|
133
|
-
# conference participants while it is live. A leg to a phone number runs for at
|
|
134
|
-
# most what your balance affords at the destination's rate.
|
|
135
|
-
sig { returns(Sentdm::Resources::Calls) }
|
|
136
|
-
attr_reader :calls
|
|
118
|
+
sig { returns(Sentdm::Resources::Voice) }
|
|
119
|
+
attr_reader :voice
|
|
137
120
|
|
|
138
121
|
sig { returns(Sentdm::Resources::Channels) }
|
|
139
122
|
attr_reader :channels
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Internal
|
|
5
|
+
class VoiceAgentsPage
|
|
6
|
+
include Sentdm::Internal::Type::BasePage
|
|
7
|
+
|
|
8
|
+
Elem = type_member
|
|
9
|
+
|
|
10
|
+
sig { returns(Data) }
|
|
11
|
+
attr_accessor :data
|
|
12
|
+
|
|
13
|
+
# @api private
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
def inspect
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
class Data < Sentdm::Internal::Type::BaseModel
|
|
19
|
+
OrHash = T.type_alias { T.any(Data, Sentdm::Internal::AnyHash) }
|
|
20
|
+
|
|
21
|
+
sig { returns(T.nilable(T::Array[T.anything])) }
|
|
22
|
+
attr_reader :agents
|
|
23
|
+
|
|
24
|
+
sig { params(agents: T::Array[T.anything]).void }
|
|
25
|
+
attr_writer :agents
|
|
26
|
+
|
|
27
|
+
sig { returns(T.nilable(Data::Pagination)) }
|
|
28
|
+
attr_reader :pagination
|
|
29
|
+
|
|
30
|
+
sig { params(pagination: Data::Pagination::OrHash).void }
|
|
31
|
+
attr_writer :pagination
|
|
32
|
+
|
|
33
|
+
sig do
|
|
34
|
+
params(
|
|
35
|
+
agents: T::Array[T.anything],
|
|
36
|
+
pagination: Data::Pagination::OrHash
|
|
37
|
+
).returns(T.attached_class)
|
|
38
|
+
end
|
|
39
|
+
def self.new(agents: nil, pagination: nil)
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
sig do
|
|
43
|
+
override.returns(
|
|
44
|
+
{ agents: T::Array[T.anything], pagination: Data::Pagination }
|
|
45
|
+
)
|
|
46
|
+
end
|
|
47
|
+
def to_hash
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
class Pagination < Sentdm::Internal::Type::BaseModel
|
|
51
|
+
OrHash =
|
|
52
|
+
T.type_alias { T.any(Data::Pagination, Sentdm::Internal::AnyHash) }
|
|
53
|
+
|
|
54
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
55
|
+
attr_reader :has_more
|
|
56
|
+
|
|
57
|
+
sig { params(has_more: T::Boolean).void }
|
|
58
|
+
attr_writer :has_more
|
|
59
|
+
|
|
60
|
+
sig { params(has_more: T::Boolean).returns(T.attached_class) }
|
|
61
|
+
def self.new(has_more: nil)
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
sig { override.returns({ has_more: T::Boolean }) }
|
|
65
|
+
def to_hash
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
end
|
|
@@ -20,15 +20,17 @@ module Sentdm
|
|
|
20
20
|
sig { params(field: String).void }
|
|
21
21
|
attr_writer :field
|
|
22
22
|
|
|
23
|
-
# Body of a call.initiated, call.answered, call.
|
|
24
|
-
# call.recording_ready event. Which of them occurred is the
|
|
23
|
+
# Body of a call.initiated, call.answered, call.agent_connected, call.completed,
|
|
24
|
+
# call.failed or call.recording_ready event. Which of them occurred is the
|
|
25
|
+
# envelope's event.
|
|
25
26
|
#
|
|
26
27
|
# Shaped like the message, inbound, template and channel payloads: account_id
|
|
27
28
|
# names the account the event is about, channel names the channel, and updated_at
|
|
28
29
|
# is when the change happened on the call, in the same yyyy-MM-ddTHH:mm:ssZ form.
|
|
29
|
-
#
|
|
30
|
-
#
|
|
31
|
-
#
|
|
30
|
+
# Every event says how the call is handled in mode, and an agent call names its
|
|
31
|
+
# agent in agent_id. duration_seconds and price are added on call.completed,
|
|
32
|
+
# reason on call.failed and recording_id on call.recording_ready; each is omitted
|
|
33
|
+
# rather than sent as null when it does not apply.
|
|
32
34
|
#
|
|
33
35
|
# Casing is snake_case because these ride the same webhook stream customers
|
|
34
36
|
# already parse message_id from; the question/answer contract is a separate
|
|
@@ -72,15 +74,17 @@ module Sentdm
|
|
|
72
74
|
# The event family, for example message, templates or contact. Route on this
|
|
73
75
|
# first, then on event for the specific change.
|
|
74
76
|
field: nil,
|
|
75
|
-
# Body of a call.initiated, call.answered, call.
|
|
76
|
-
# call.recording_ready event. Which of them occurred is the
|
|
77
|
+
# Body of a call.initiated, call.answered, call.agent_connected, call.completed,
|
|
78
|
+
# call.failed or call.recording_ready event. Which of them occurred is the
|
|
79
|
+
# envelope's event.
|
|
77
80
|
#
|
|
78
81
|
# Shaped like the message, inbound, template and channel payloads: account_id
|
|
79
82
|
# names the account the event is about, channel names the channel, and updated_at
|
|
80
83
|
# is when the change happened on the call, in the same yyyy-MM-ddTHH:mm:ssZ form.
|
|
81
|
-
#
|
|
82
|
-
#
|
|
83
|
-
#
|
|
84
|
+
# Every event says how the call is handled in mode, and an agent call names its
|
|
85
|
+
# agent in agent_id. duration_seconds and price are added on call.completed,
|
|
86
|
+
# reason on call.failed and recording_id on call.recording_ready; each is omitted
|
|
87
|
+
# rather than sent as null when it does not apply.
|
|
84
88
|
#
|
|
85
89
|
# Casing is snake_case because these ride the same webhook stream customers
|
|
86
90
|
# already parse message_id from; the question/answer contract is a separate
|