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
|
@@ -14,6 +14,8 @@ module Sentdm
|
|
|
14
14
|
sig { params(id: String).void }
|
|
15
15
|
attr_writer :id
|
|
16
16
|
|
|
17
|
+
# Failed attempts since the last success. Version 1 only: always 0 on a version 2
|
|
18
|
+
# webhook, whose deliveries are in its events (GET /v3/webhooks/{id}/events).
|
|
17
19
|
sig { returns(T.nilable(Integer)) }
|
|
18
20
|
attr_reader :consecutive_failures
|
|
19
21
|
|
|
@@ -61,9 +63,22 @@ module Sentdm
|
|
|
61
63
|
sig { params(is_active: T::Boolean).void }
|
|
62
64
|
attr_writer :is_active
|
|
63
65
|
|
|
66
|
+
# Whether the webhook also receives its organization's sender profiles' events,
|
|
67
|
+
# and each profile sees it and reads the events about itself. Always false on a
|
|
68
|
+
# version 1 webhook.
|
|
69
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
70
|
+
attr_reader :is_inheritable
|
|
71
|
+
|
|
72
|
+
sig { params(is_inheritable: T::Boolean).void }
|
|
73
|
+
attr_writer :is_inheritable
|
|
74
|
+
|
|
75
|
+
# When the webhook was last attempted. Version 1 only: always null on a version 2
|
|
76
|
+
# webhook.
|
|
64
77
|
sig { returns(T.nilable(Time)) }
|
|
65
78
|
attr_accessor :last_delivery_attempt_at
|
|
66
79
|
|
|
80
|
+
# When the webhook last received an event. Version 1 only: always null on a
|
|
81
|
+
# version 2 webhook.
|
|
67
82
|
sig { returns(T.nilable(Time)) }
|
|
68
83
|
attr_accessor :last_successful_delivery_at
|
|
69
84
|
|
|
@@ -73,6 +88,22 @@ module Sentdm
|
|
|
73
88
|
sig { params(retry_count: Integer).void }
|
|
74
89
|
attr_writer :retry_count
|
|
75
90
|
|
|
91
|
+
# The events a version 1 webhook's sender profile clones receive, as a response
|
|
92
|
+
# reports them.
|
|
93
|
+
#
|
|
94
|
+
# Its own type, field for field the same as the request's sender_profile. A
|
|
95
|
+
# response is not a request, whatever it carries.
|
|
96
|
+
sig { returns(T.nilable(Sentdm::WebhookResponse::SenderProfile)) }
|
|
97
|
+
attr_reader :sender_profile
|
|
98
|
+
|
|
99
|
+
sig do
|
|
100
|
+
params(
|
|
101
|
+
sender_profile:
|
|
102
|
+
T.nilable(Sentdm::WebhookResponse::SenderProfile::OrHash)
|
|
103
|
+
).void
|
|
104
|
+
end
|
|
105
|
+
attr_writer :sender_profile
|
|
106
|
+
|
|
76
107
|
sig { returns(T.nilable(String)) }
|
|
77
108
|
attr_accessor :signing_secret
|
|
78
109
|
|
|
@@ -85,6 +116,14 @@ module Sentdm
|
|
|
85
116
|
sig { returns(T.nilable(Time)) }
|
|
86
117
|
attr_accessor :updated_at
|
|
87
118
|
|
|
119
|
+
# Who delivers the webhook: 1 the older delivery, which will be retired, or 2
|
|
120
|
+
# Svix. A webhook is created as version 2 unless the request asks for 1.
|
|
121
|
+
sig { returns(T.nilable(Integer)) }
|
|
122
|
+
attr_reader :webhook_version
|
|
123
|
+
|
|
124
|
+
sig { params(webhook_version: Integer).void }
|
|
125
|
+
attr_writer :webhook_version
|
|
126
|
+
|
|
88
127
|
sig do
|
|
89
128
|
params(
|
|
90
129
|
id: String,
|
|
@@ -96,16 +135,22 @@ module Sentdm
|
|
|
96
135
|
event_filters: T.nilable(T::Hash[Symbol, T::Array[String]]),
|
|
97
136
|
event_types: T::Array[String],
|
|
98
137
|
is_active: T::Boolean,
|
|
138
|
+
is_inheritable: T::Boolean,
|
|
99
139
|
last_delivery_attempt_at: T.nilable(Time),
|
|
100
140
|
last_successful_delivery_at: T.nilable(Time),
|
|
101
141
|
retry_count: Integer,
|
|
142
|
+
sender_profile:
|
|
143
|
+
T.nilable(Sentdm::WebhookResponse::SenderProfile::OrHash),
|
|
102
144
|
signing_secret: T.nilable(String),
|
|
103
145
|
timeout_seconds: Integer,
|
|
104
|
-
updated_at: T.nilable(Time)
|
|
146
|
+
updated_at: T.nilable(Time),
|
|
147
|
+
webhook_version: Integer
|
|
105
148
|
).returns(T.attached_class)
|
|
106
149
|
end
|
|
107
150
|
def self.new(
|
|
108
151
|
id: nil,
|
|
152
|
+
# Failed attempts since the last success. Version 1 only: always 0 on a version 2
|
|
153
|
+
# webhook, whose deliveries are in its events (GET /v3/webhooks/{id}/events).
|
|
109
154
|
consecutive_failures: nil,
|
|
110
155
|
created_at: nil,
|
|
111
156
|
# Which customer owns this — the key's own, or the profile named in x-profile-id.
|
|
@@ -116,12 +161,29 @@ module Sentdm
|
|
|
116
161
|
event_filters: nil,
|
|
117
162
|
event_types: nil,
|
|
118
163
|
is_active: nil,
|
|
164
|
+
# Whether the webhook also receives its organization's sender profiles' events,
|
|
165
|
+
# and each profile sees it and reads the events about itself. Always false on a
|
|
166
|
+
# version 1 webhook.
|
|
167
|
+
is_inheritable: nil,
|
|
168
|
+
# When the webhook was last attempted. Version 1 only: always null on a version 2
|
|
169
|
+
# webhook.
|
|
119
170
|
last_delivery_attempt_at: nil,
|
|
171
|
+
# When the webhook last received an event. Version 1 only: always null on a
|
|
172
|
+
# version 2 webhook.
|
|
120
173
|
last_successful_delivery_at: nil,
|
|
121
174
|
retry_count: nil,
|
|
175
|
+
# The events a version 1 webhook's sender profile clones receive, as a response
|
|
176
|
+
# reports them.
|
|
177
|
+
#
|
|
178
|
+
# Its own type, field for field the same as the request's sender_profile. A
|
|
179
|
+
# response is not a request, whatever it carries.
|
|
180
|
+
sender_profile: nil,
|
|
122
181
|
signing_secret: nil,
|
|
123
182
|
timeout_seconds: nil,
|
|
124
|
-
updated_at: nil
|
|
183
|
+
updated_at: nil,
|
|
184
|
+
# Who delivers the webhook: 1 the older delivery, which will be retired, or 2
|
|
185
|
+
# Svix. A webhook is created as version 2 unless the request asks for 1.
|
|
186
|
+
webhook_version: nil
|
|
125
187
|
)
|
|
126
188
|
end
|
|
127
189
|
|
|
@@ -137,17 +199,64 @@ module Sentdm
|
|
|
137
199
|
event_filters: T.nilable(T::Hash[Symbol, T::Array[String]]),
|
|
138
200
|
event_types: T::Array[String],
|
|
139
201
|
is_active: T::Boolean,
|
|
202
|
+
is_inheritable: T::Boolean,
|
|
140
203
|
last_delivery_attempt_at: T.nilable(Time),
|
|
141
204
|
last_successful_delivery_at: T.nilable(Time),
|
|
142
205
|
retry_count: Integer,
|
|
206
|
+
sender_profile: T.nilable(Sentdm::WebhookResponse::SenderProfile),
|
|
143
207
|
signing_secret: T.nilable(String),
|
|
144
208
|
timeout_seconds: Integer,
|
|
145
|
-
updated_at: T.nilable(Time)
|
|
209
|
+
updated_at: T.nilable(Time),
|
|
210
|
+
webhook_version: Integer
|
|
146
211
|
}
|
|
147
212
|
)
|
|
148
213
|
end
|
|
149
214
|
def to_hash
|
|
150
215
|
end
|
|
216
|
+
|
|
217
|
+
class SenderProfile < Sentdm::Internal::Type::BaseModel
|
|
218
|
+
OrHash =
|
|
219
|
+
T.type_alias do
|
|
220
|
+
T.any(
|
|
221
|
+
Sentdm::WebhookResponse::SenderProfile,
|
|
222
|
+
Sentdm::Internal::AnyHash
|
|
223
|
+
)
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
sig { returns(T.nilable(T::Hash[Symbol, T::Array[String]])) }
|
|
227
|
+
attr_accessor :event_filters
|
|
228
|
+
|
|
229
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
230
|
+
attr_reader :event_types
|
|
231
|
+
|
|
232
|
+
sig { params(event_types: T::Array[String]).void }
|
|
233
|
+
attr_writer :event_types
|
|
234
|
+
|
|
235
|
+
# The events a version 1 webhook's sender profile clones receive, as a response
|
|
236
|
+
# reports them.
|
|
237
|
+
#
|
|
238
|
+
# Its own type, field for field the same as the request's sender_profile. A
|
|
239
|
+
# response is not a request, whatever it carries.
|
|
240
|
+
sig do
|
|
241
|
+
params(
|
|
242
|
+
event_filters: T.nilable(T::Hash[Symbol, T::Array[String]]),
|
|
243
|
+
event_types: T::Array[String]
|
|
244
|
+
).returns(T.attached_class)
|
|
245
|
+
end
|
|
246
|
+
def self.new(event_filters: nil, event_types: nil)
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
sig do
|
|
250
|
+
override.returns(
|
|
251
|
+
{
|
|
252
|
+
event_filters: T.nilable(T::Hash[Symbol, T::Array[String]]),
|
|
253
|
+
event_types: T::Array[String]
|
|
254
|
+
}
|
|
255
|
+
)
|
|
256
|
+
end
|
|
257
|
+
def to_hash
|
|
258
|
+
end
|
|
259
|
+
end
|
|
151
260
|
end
|
|
152
261
|
end
|
|
153
262
|
end
|
|
@@ -35,6 +35,12 @@ module Sentdm
|
|
|
35
35
|
sig { params(event_types: T::Array[String]).void }
|
|
36
36
|
attr_writer :event_types
|
|
37
37
|
|
|
38
|
+
# Makes this webhook inheritable by the organization's sender profiles (see
|
|
39
|
+
# create), or stops it being inheritable. Omit or pass null to keep it as it is.
|
|
40
|
+
# Only a version 2 webhook can be inheritable.
|
|
41
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
42
|
+
attr_accessor :is_inheritable
|
|
43
|
+
|
|
38
44
|
sig { returns(T.nilable(Integer)) }
|
|
39
45
|
attr_reader :retry_count
|
|
40
46
|
|
|
@@ -50,7 +56,8 @@ module Sentdm
|
|
|
50
56
|
attr_writer :sandbox
|
|
51
57
|
|
|
52
58
|
# Request-only: the events an organization webhook's sender profile clones
|
|
53
|
-
# receive, one clone per existing and future profile.
|
|
59
|
+
# receive, one clone per existing and future profile. A version 1 webhook's
|
|
60
|
+
# responses report it as WebhookSenderProfileV3Response.
|
|
54
61
|
sig { returns(T.nilable(Sentdm::WebhookUpdateParams::SenderProfile)) }
|
|
55
62
|
attr_reader :sender_profile
|
|
56
63
|
|
|
@@ -87,6 +94,7 @@ module Sentdm
|
|
|
87
94
|
endpoint_url: String,
|
|
88
95
|
event_filters: T.nilable(T::Hash[Symbol, T::Array[String]]),
|
|
89
96
|
event_types: T::Array[String],
|
|
97
|
+
is_inheritable: T.nilable(T::Boolean),
|
|
90
98
|
retry_count: Integer,
|
|
91
99
|
sandbox: T::Boolean,
|
|
92
100
|
sender_profile:
|
|
@@ -103,12 +111,17 @@ module Sentdm
|
|
|
103
111
|
endpoint_url: nil,
|
|
104
112
|
event_filters: nil,
|
|
105
113
|
event_types: nil,
|
|
114
|
+
# Makes this webhook inheritable by the organization's sender profiles (see
|
|
115
|
+
# create), or stops it being inheritable. Omit or pass null to keep it as it is.
|
|
116
|
+
# Only a version 2 webhook can be inheritable.
|
|
117
|
+
is_inheritable: nil,
|
|
106
118
|
retry_count: nil,
|
|
107
119
|
# Sandbox flag - when true, the operation is simulated without side effects Useful
|
|
108
120
|
# for testing integrations without actual execution
|
|
109
121
|
sandbox: nil,
|
|
110
122
|
# Request-only: the events an organization webhook's sender profile clones
|
|
111
|
-
# receive, one clone per existing and future profile.
|
|
123
|
+
# receive, one clone per existing and future profile. A version 1 webhook's
|
|
124
|
+
# responses report it as WebhookSenderProfileV3Response.
|
|
112
125
|
sender_profile: nil,
|
|
113
126
|
timeout_seconds: nil,
|
|
114
127
|
idempotency_key: nil,
|
|
@@ -125,6 +138,7 @@ module Sentdm
|
|
|
125
138
|
endpoint_url: String,
|
|
126
139
|
event_filters: T.nilable(T::Hash[Symbol, T::Array[String]]),
|
|
127
140
|
event_types: T::Array[String],
|
|
141
|
+
is_inheritable: T.nilable(T::Boolean),
|
|
128
142
|
retry_count: Integer,
|
|
129
143
|
sandbox: T::Boolean,
|
|
130
144
|
sender_profile:
|
|
@@ -158,7 +172,8 @@ module Sentdm
|
|
|
158
172
|
attr_writer :event_types
|
|
159
173
|
|
|
160
174
|
# Request-only: the events an organization webhook's sender profile clones
|
|
161
|
-
# receive, one clone per existing and future profile.
|
|
175
|
+
# receive, one clone per existing and future profile. A version 1 webhook's
|
|
176
|
+
# responses report it as WebhookSenderProfileV3Response.
|
|
162
177
|
sig do
|
|
163
178
|
params(
|
|
164
179
|
event_filters: T.nilable(T::Hash[Symbol, T::Array[String]]),
|
data/rbi/sentdm/models.rbi
CHANGED
|
@@ -3,12 +3,6 @@
|
|
|
3
3
|
module Sentdm
|
|
4
4
|
APIMeta = Sentdm::Models::APIMeta
|
|
5
5
|
|
|
6
|
-
APIResponseOfCall = Sentdm::Models::APIResponseOfCall
|
|
7
|
-
|
|
8
|
-
APIResponseOfCallRecordings = Sentdm::Models::APIResponseOfCallRecordings
|
|
9
|
-
|
|
10
|
-
APIResponseOfCallsList = Sentdm::Models::APIResponseOfCallsList
|
|
11
|
-
|
|
12
6
|
APIResponseOfContact = Sentdm::Models::APIResponseOfContact
|
|
13
7
|
|
|
14
8
|
APIResponseOfContactMessageSummary =
|
|
@@ -37,34 +31,10 @@ module Sentdm
|
|
|
37
31
|
|
|
38
32
|
BrandsBrandData = Sentdm::Models::BrandsBrandData
|
|
39
33
|
|
|
40
|
-
Call = Sentdm::Models::Call
|
|
41
|
-
|
|
42
34
|
CallEvent = Sentdm::Models::CallEvent
|
|
43
35
|
|
|
44
36
|
CallEventPayload = Sentdm::Models::CallEventPayload
|
|
45
37
|
|
|
46
|
-
CallHangupParams = Sentdm::Models::CallHangupParams
|
|
47
|
-
|
|
48
|
-
CallListParams = Sentdm::Models::CallListParams
|
|
49
|
-
|
|
50
|
-
CallListRecordingsParams = Sentdm::Models::CallListRecordingsParams
|
|
51
|
-
|
|
52
|
-
CallParty = Sentdm::Models::CallParty
|
|
53
|
-
|
|
54
|
-
CallRecording = Sentdm::Models::CallRecording
|
|
55
|
-
|
|
56
|
-
CallRecordings = Sentdm::Models::CallRecordings
|
|
57
|
-
|
|
58
|
-
CallRecordParams = Sentdm::Models::CallRecordParams
|
|
59
|
-
|
|
60
|
-
CallRetrieveParams = Sentdm::Models::CallRetrieveParams
|
|
61
|
-
|
|
62
|
-
Calls = Sentdm::Models::Calls
|
|
63
|
-
|
|
64
|
-
CallsList = Sentdm::Models::CallsList
|
|
65
|
-
|
|
66
|
-
CallTimelineEntry = Sentdm::Models::CallTimelineEntry
|
|
67
|
-
|
|
68
38
|
ChannelEvent = Sentdm::Models::ChannelEvent
|
|
69
39
|
|
|
70
40
|
ChannelEventPayload = Sentdm::Models::ChannelEventPayload
|
|
@@ -194,6 +164,8 @@ module Sentdm
|
|
|
194
164
|
|
|
195
165
|
UserUpdateRoleParams = Sentdm::Models::UserUpdateRoleParams
|
|
196
166
|
|
|
167
|
+
Voice = Sentdm::Models::Voice
|
|
168
|
+
|
|
197
169
|
WebhookCreateParams = Sentdm::Models::WebhookCreateParams
|
|
198
170
|
|
|
199
171
|
WebhookDeleteParams = Sentdm::Models::WebhookDeleteParams
|
|
@@ -12,8 +12,8 @@ module Sentdm
|
|
|
12
12
|
# number**: each number you hold can carry phone calls on its own
|
|
13
13
|
# (`POST /v3/channels/voice`), each with the callback URL Sent asks what to do
|
|
14
14
|
# with its calls, one of them is the default line for calls placed from your app,
|
|
15
|
-
# and voice tokens are minted
|
|
16
|
-
#
|
|
15
|
+
# and voice tokens are minted with `POST /v3/voice/tokens`. Read your voice
|
|
16
|
+
# numbers with `GET /v3/channels/voice` and change one with
|
|
17
17
|
# `PATCH /v3/channels/voice/{number}`.
|
|
18
18
|
#
|
|
19
19
|
# ## Compliance lives on the market
|
|
@@ -44,6 +44,16 @@ module Sentdm
|
|
|
44
44
|
# question the way you verify a webhook. `POST /v3/channels/voice/{number}/test`
|
|
45
45
|
# sends a test question and reports the verdict.
|
|
46
46
|
#
|
|
47
|
+
# Send `agent_id` instead of `callback_url`, or with it, to have one of your voice
|
|
48
|
+
# agents (`GET /v3/voice/agents`) answer calls to the number. The agent wins over
|
|
49
|
+
# the callback URL for calls to the number; calls your app places from it still
|
|
50
|
+
# follow your app. `routes_to` in the response says which answers, and reads
|
|
51
|
+
# `agent_pending` while the number is still being moved to the agent. Calls follow
|
|
52
|
+
# the move within about an hour, as the provider applies it on its own clock.
|
|
53
|
+
# While numbers cannot be bound to agents, a request with `agent_id` is refused
|
|
54
|
+
# with `502` before any number is obtained or anything is written; send
|
|
55
|
+
# `callback_url` instead.
|
|
56
|
+
#
|
|
47
57
|
# Your first voice number becomes the line app-originated calls are placed from
|
|
48
58
|
# when a voice token names no number; send `default_for_app_calls: true` to give
|
|
49
59
|
# that role to another number. A number you turned off earlier is turned back on,
|
|
@@ -57,8 +67,9 @@ module Sentdm
|
|
|
57
67
|
# with `202`; nothing is written and no number is bought.
|
|
58
68
|
sig do
|
|
59
69
|
params(
|
|
60
|
-
|
|
70
|
+
agent_id: T.nilable(String),
|
|
61
71
|
area_code: T.nilable(String),
|
|
72
|
+
callback_url: T.nilable(String),
|
|
62
73
|
default_for_app_calls: T.nilable(T::Boolean),
|
|
63
74
|
number: T.nilable(String),
|
|
64
75
|
sandbox: T::Boolean,
|
|
@@ -68,18 +79,24 @@ module Sentdm
|
|
|
68
79
|
).returns(Sentdm::Channels::APIResponseOfVoiceNumberCreated)
|
|
69
80
|
end
|
|
70
81
|
def create(
|
|
71
|
-
# Body param:
|
|
72
|
-
#
|
|
73
|
-
#
|
|
74
|
-
#
|
|
75
|
-
#
|
|
76
|
-
|
|
77
|
-
callback_url:,
|
|
82
|
+
# Body param: One of your voice agents (GET /v3/voice/agents), such as
|
|
83
|
+
# agent_9f2ab000-0000-4000-8000-000000000001, to answer calls to this number. It
|
|
84
|
+
# wins over callback_url for calls to the number, and both may be sent; calls your
|
|
85
|
+
# app places from the number still follow your app. Send it instead of
|
|
86
|
+
# callback_url for a number only an agent answers.
|
|
87
|
+
agent_id: nil,
|
|
78
88
|
# Body param: The US area code a new number should be in, as 212. Only for a
|
|
79
89
|
# request that leaves number out — sending both says two different things about
|
|
80
90
|
# which number to use, and is refused. Omit it too and the number comes from
|
|
81
91
|
# anywhere in the country.
|
|
82
92
|
area_code: nil,
|
|
93
|
+
# Body param: Where Sent asks what to do with each call on this number: an
|
|
94
|
+
# absolute HTTP or HTTPS URL on a public host. A signed question is POSTed here
|
|
95
|
+
# when a call arrives or a caller presses a key, and the answer decides the call.
|
|
96
|
+
# Every question is signed with the callback_secret the response returns, the same
|
|
97
|
+
# way your webhooks are signed. Turning the number on again with a different URL
|
|
98
|
+
# replaces it and keeps the secret. Required unless agent_id is sent.
|
|
99
|
+
callback_url: nil,
|
|
83
100
|
# Body param: Make this the line app-originated calls are placed from when a voice
|
|
84
101
|
# token names no number. Omit it and your first voice number takes that role; a
|
|
85
102
|
# later one leaves it where it is.
|
|
@@ -134,18 +151,27 @@ module Sentdm
|
|
|
134
151
|
#
|
|
135
152
|
# ## What it changes
|
|
136
153
|
#
|
|
137
|
-
# | Body | Effect
|
|
138
|
-
# | --------------------------------------------- |
|
|
139
|
-
# | `"status": "ACTIVE"` | turns calls on again for a number you turned off; the callback URL and the secret it had are kept
|
|
140
|
-
# | `"status": "INACTIVE"` | turns calls off; the callback URL and the secret stay on the number
|
|
141
|
-
# | `"default_for_app_calls": true` | makes this the line app-originated calls are placed from when a voice token names no number
|
|
142
|
-
# | `"callback_url": "https://example.com/voice"` | replaces where Sent asks what to do with each call on the number; the signing secret
|
|
143
|
-
# |
|
|
154
|
+
# | Body | Effect |
|
|
155
|
+
# | --------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
156
|
+
# | `"status": "ACTIVE"` | turns calls on again for a number you turned off; the callback URL and the secret it had are kept |
|
|
157
|
+
# | `"status": "INACTIVE"` | turns calls off; the callback URL and the secret stay on the number |
|
|
158
|
+
# | `"default_for_app_calls": true` | makes this the line app-originated calls are placed from when a voice token names no number |
|
|
159
|
+
# | `"callback_url": "https://example.com/voice"` | replaces where Sent asks what to do with each call on the number; the signing secret and the status are kept |
|
|
160
|
+
# | `"agent_id": "agent_…"` | one of your voice agents answers calls to the number, within about an hour of the change (the provider applies the move on its own clock, and `routes_to` reads `agent` as soon as it has recorded it); it wins over `callback_url` for calls to the number, and calls your app places from it still follow your app. `routes_to` reads `agent_pending` while the number is still being moved to the agent |
|
|
161
|
+
# | `"agent_id": null` | unbinds the agent, so `callback_url` answers calls to the number again |
|
|
162
|
+
# | key omitted | left exactly as it is |
|
|
144
163
|
#
|
|
145
164
|
# `status` is matched ignoring case. Any combination is accepted:
|
|
146
165
|
# `status: "ACTIVE"` with `default_for_app_calls: true` turns a number on as the
|
|
147
|
-
# new default, and a `callback_url` sent with either status is written too.
|
|
148
|
-
#
|
|
166
|
+
# new default, and a `callback_url` sent with either status is written too.
|
|
167
|
+
# `agent_id` is applied first, so a refusal to move the number to or from the
|
|
168
|
+
# agent leaves everything as it was, and the `409` and `400` refusals below are
|
|
169
|
+
# decided before anything is written, so they leave everything as it was too. A
|
|
170
|
+
# body that names none of them is refused.
|
|
171
|
+
#
|
|
172
|
+
# A number can be on without a callback URL: calls placed from your app then
|
|
173
|
+
# connect straight to the number or user they dial, and calls to the number are
|
|
174
|
+
# declined.
|
|
149
175
|
#
|
|
150
176
|
# ## What it will refuse
|
|
151
177
|
#
|
|
@@ -160,13 +186,12 @@ module Sentdm
|
|
|
160
186
|
# **Making an inactive number the default is `400`.** Send `status: "ACTIVE"` in
|
|
161
187
|
# the same call.
|
|
162
188
|
#
|
|
163
|
-
# A number
|
|
164
|
-
#
|
|
165
|
-
# line if you have no other active voice number. A number you turned off while it
|
|
166
|
-
# had a URL stays off.
|
|
189
|
+
# **A number you never turned voice on for is `404`**, and so is an `agent_id`
|
|
190
|
+
# that is not one of your agents. Add the number with `POST /v3/channels/voice`.
|
|
167
191
|
#
|
|
168
|
-
#
|
|
169
|
-
# `
|
|
192
|
+
# **`502` means the number could not be moved to or from the agent**, or an
|
|
193
|
+
# `agent_id` was sent while numbers cannot be bound to agents; nothing was
|
|
194
|
+
# written.
|
|
170
195
|
#
|
|
171
196
|
# The number is the E.164 value in the path with the plus sign URL-encoded
|
|
172
197
|
# (`%2B`).
|
|
@@ -177,6 +202,7 @@ module Sentdm
|
|
|
177
202
|
sig do
|
|
178
203
|
params(
|
|
179
204
|
number: String,
|
|
205
|
+
agent_id: T.nilable(String),
|
|
180
206
|
callback_url: T.nilable(String),
|
|
181
207
|
default_for_app_calls: T.nilable(T::Boolean),
|
|
182
208
|
sandbox: T::Boolean,
|
|
@@ -191,6 +217,12 @@ module Sentdm
|
|
|
191
217
|
# Path param: The number in E.164 format with the plus sign URL-encoded, e.g.
|
|
192
218
|
# %2B12125550100
|
|
193
219
|
number,
|
|
220
|
+
# Body param: One of your voice agents, such as
|
|
221
|
+
# agent_9f2ab000-0000-4000-8000-000000000001, to answer calls to the number, or
|
|
222
|
+
# null to unbind it so the callback URL answers them again. The agent wins over
|
|
223
|
+
# callback_url for calls to the number; calls your app places from it still follow
|
|
224
|
+
# your app.
|
|
225
|
+
agent_id: nil,
|
|
194
226
|
# Body param: A new callback URL for the number, active or not: an absolute HTTP
|
|
195
227
|
# or HTTPS URL on a public host, where Sent asks what to do with each call. The
|
|
196
228
|
# signing secret is kept.
|
|
@@ -242,48 +274,6 @@ module Sentdm
|
|
|
242
274
|
)
|
|
243
275
|
end
|
|
244
276
|
|
|
245
|
-
# Mints a short-lived token for one of your app users. Call this from your backend
|
|
246
|
-
# and return the token to your app, which passes it to the voice client SDK to
|
|
247
|
-
# register. The identity is bound to the given number, or to your default app-call
|
|
248
|
-
# number when omitted, and calls placed by that identity are routed through the
|
|
249
|
-
# bound number. Minting again re-binds the identity, so an identity can move
|
|
250
|
-
# between numbers.
|
|
251
|
-
sig do
|
|
252
|
-
params(
|
|
253
|
-
identity: String,
|
|
254
|
-
number: T.nilable(String),
|
|
255
|
-
sandbox: T::Boolean,
|
|
256
|
-
ttl: T.nilable(Integer),
|
|
257
|
-
idempotency_key: String,
|
|
258
|
-
x_profile_id: String,
|
|
259
|
-
request_options: Sentdm::RequestOptions::OrHash
|
|
260
|
-
).returns(Sentdm::Channels::APIResponseOfVoiceToken)
|
|
261
|
-
end
|
|
262
|
-
def create_token(
|
|
263
|
-
# Body param: Your identifier for the app user, such as an agent or account id.
|
|
264
|
-
# Letters, digits, hyphens and underscores only, up to 200 characters.
|
|
265
|
-
identity: nil,
|
|
266
|
-
# Body param: One of your voice-enabled phone numbers in E.164 format. Calls
|
|
267
|
-
# placed by this identity are routed through that number. Omit to use your default
|
|
268
|
-
# app-call number.
|
|
269
|
-
number: nil,
|
|
270
|
-
# Body param: Sandbox flag - when true, the operation is simulated without side
|
|
271
|
-
# effects Useful for testing integrations without actual execution
|
|
272
|
-
sandbox: nil,
|
|
273
|
-
# Body param: Token lifetime in seconds. Defaults to 600 and cannot exceed 3600.
|
|
274
|
-
ttl: nil,
|
|
275
|
-
# Header param: Unique key to ensure idempotent request processing. Must be 1-255
|
|
276
|
-
# alphanumeric characters, hyphens, or underscores. Responses are cached for 24
|
|
277
|
-
# hours per key per customer.
|
|
278
|
-
idempotency_key: nil,
|
|
279
|
-
# Header param: Profile UUID to scope the request to a child profile. Only
|
|
280
|
-
# organization API keys can use this header. The profile must belong to the
|
|
281
|
-
# calling organization.
|
|
282
|
-
x_profile_id: nil,
|
|
283
|
-
request_options: {}
|
|
284
|
-
)
|
|
285
|
-
end
|
|
286
|
-
|
|
287
277
|
# Generates a new signing secret for the questions Sent sends to this number's
|
|
288
278
|
# callback URL and returns it. The previous secret stops signing immediately, so
|
|
289
279
|
# update your backend before the next call reaches it. The number is the E.164
|
|
@@ -12,8 +12,8 @@ module Sentdm
|
|
|
12
12
|
# number**: each number you hold can carry phone calls on its own
|
|
13
13
|
# (`POST /v3/channels/voice`), each with the callback URL Sent asks what to do
|
|
14
14
|
# with its calls, one of them is the default line for calls placed from your app,
|
|
15
|
-
# and voice tokens are minted
|
|
16
|
-
#
|
|
15
|
+
# and voice tokens are minted with `POST /v3/voice/tokens`. Read your voice
|
|
16
|
+
# numbers with `GET /v3/channels/voice` and change one with
|
|
17
17
|
# `PATCH /v3/channels/voice/{number}`.
|
|
18
18
|
#
|
|
19
19
|
# ## Compliance lives on the market
|
|
@@ -145,6 +145,11 @@ module Sentdm
|
|
|
145
145
|
# itself is unchanged: the same rules are scored and ranked the same way, with
|
|
146
146
|
# routes pinned to numbers you did not list removed from the running.
|
|
147
147
|
#
|
|
148
|
+
# Each channel's list is independent: an sms list does not restrict MMS. To choose
|
|
149
|
+
# the numbers a message may go out from as MMS, name them under mms. MMS sends
|
|
150
|
+
# from your SMS numbers, so an mms list may name any of your active SMS numbers
|
|
151
|
+
# whose market carries MMS — the ones listed under mms in your channels.
|
|
152
|
+
#
|
|
148
153
|
# Every number must be an active sender on your account. The request itself is
|
|
149
154
|
# still accepted (202) if one is not — like every other send-time rule, that is
|
|
150
155
|
# decided per message, so each affected message is recorded BLOCKED with error
|
|
@@ -159,7 +164,9 @@ module Sentdm
|
|
|
159
164
|
#
|
|
160
165
|
# Their presence is also what makes a message eligible for MMS on an auto-detect
|
|
161
166
|
# send: a message with nothing attached is delivered as SMS, because an MMS with
|
|
162
|
-
# no media is a more expensive text message.
|
|
167
|
+
# no media is a more expensive text message. For the same reason a send that names
|
|
168
|
+
# mms in channel with nothing attached, here or on the template, is refused with
|
|
169
|
+
# a 400.
|
|
163
170
|
#
|
|
164
171
|
# The recipient's carrier fetches each URL after the send is accepted, so it must
|
|
165
172
|
# stay publicly reachable — a link that expires, or one behind auth, arrives as a
|
|
@@ -55,8 +55,9 @@ module Sentdm
|
|
|
55
55
|
# which models a profile's markets, compliance, brand, campaigns and billing
|
|
56
56
|
# explicitly.
|
|
57
57
|
#
|
|
58
|
-
# Updates an existing campaign under the brand of the specified profile.
|
|
59
|
-
#
|
|
58
|
+
# Updates an existing campaign under the brand of the specified profile. Once the
|
|
59
|
+
# campaign has been submitted to TCR its volume can no longer move between low
|
|
60
|
+
# volume (under 2,000 messages a day) and high volume.
|
|
60
61
|
sig do
|
|
61
62
|
params(
|
|
62
63
|
campaign_id: String,
|