sentdm 0.34.0 → 0.35.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 +8 -0
- data/README.md +11 -9
- data/lib/sentdm/client.rb +25 -0
- data/lib/sentdm/internal/calls_page.rb +115 -0
- data/lib/sentdm/models/api_response_of_call.rb +43 -0
- data/lib/sentdm/models/api_response_of_call_recordings.rb +43 -0
- data/lib/sentdm/models/api_response_of_calls_list.rb +42 -0
- data/lib/sentdm/models/call.rb +133 -0
- data/lib/sentdm/models/call_event.rb +72 -0
- data/lib/sentdm/models/call_event_payload.rb +102 -0
- data/lib/sentdm/models/call_hangup_params.rb +32 -0
- data/lib/sentdm/models/call_list_params.rb +83 -0
- data/lib/sentdm/models/call_list_recordings_params.rb +26 -0
- data/lib/sentdm/models/call_party.rb +31 -0
- data/lib/sentdm/models/call_record_params.rb +55 -0
- data/lib/sentdm/models/call_recording.rb +38 -0
- data/lib/sentdm/models/call_recordings.rb +24 -0
- data/lib/sentdm/models/call_retrieve_params.rb +26 -0
- data/lib/sentdm/models/call_timeline_entry.rb +26 -0
- data/lib/sentdm/models/calls/api_response_of_list_of_call_participant.rb +45 -0
- data/lib/sentdm/models/calls/call_participant.rb +60 -0
- data/lib/sentdm/models/calls/call_participant_target.rb +30 -0
- data/lib/sentdm/models/calls/participant_add_params.rb +66 -0
- data/lib/sentdm/models/calls/participant_list_params.rb +28 -0
- data/lib/sentdm/models/calls/participant_remove_all_params.rb +28 -0
- data/lib/sentdm/models/calls/participant_remove_params.rb +34 -0
- data/lib/sentdm/models/calls/participant_update_params.rb +64 -0
- data/lib/sentdm/models/calls_list.rb +26 -0
- data/lib/sentdm/models/channels/api_response_of_list_of_voice_number.rb +45 -0
- data/lib/sentdm/models/channels/api_response_of_voice_callback_test.rb +45 -0
- data/lib/sentdm/models/channels/api_response_of_voice_number.rb +45 -0
- data/lib/sentdm/models/channels/api_response_of_voice_number_created.rb +45 -0
- data/lib/sentdm/models/channels/api_response_of_voice_secret.rb +45 -0
- data/lib/sentdm/models/channels/api_response_of_voice_token.rb +45 -0
- data/lib/sentdm/models/channels/voice_callback_test.rb +65 -0
- data/lib/sentdm/models/channels/voice_callback_test_error_info.rb +41 -0
- data/lib/sentdm/models/channels/voice_callback_test_request_info.rb +40 -0
- data/lib/sentdm/models/channels/voice_callback_test_response_info.rb +28 -0
- data/lib/sentdm/models/channels/voice_create_params.rb +86 -0
- data/lib/sentdm/models/channels/voice_create_token_params.rb +69 -0
- data/lib/sentdm/models/channels/voice_list_params.rb +22 -0
- data/lib/sentdm/models/channels/voice_number.rb +68 -0
- data/lib/sentdm/models/channels/voice_number_created.rb +26 -0
- data/lib/sentdm/models/channels/voice_retrieve_params.rb +28 -0
- data/lib/sentdm/models/channels/voice_rotate_secret_params.rb +34 -0
- data/lib/sentdm/models/channels/voice_secret.rb +25 -0
- data/lib/sentdm/models/channels/voice_test_params.rb +34 -0
- data/lib/sentdm/models/channels/voice_token.rb +44 -0
- data/lib/sentdm/models/channels/voice_update_params.rb +95 -0
- data/lib/sentdm/models/webhook_list_events_response.rb +4 -173
- data/lib/sentdm/models.rb +36 -0
- data/lib/sentdm/resources/calls/participants.rb +231 -0
- data/lib/sentdm/resources/calls.rb +235 -0
- data/lib/sentdm/resources/channels/voice.rb +381 -0
- data/lib/sentdm/resources/channels.rb +45 -0
- data/lib/sentdm/version.rb +1 -1
- data/lib/sentdm.rb +50 -0
- data/rbi/sentdm/client.rbi +23 -0
- data/rbi/sentdm/internal/calls_page.rbi +71 -0
- data/rbi/sentdm/models/api_response_of_call.rbi +74 -0
- data/rbi/sentdm/models/api_response_of_call_recordings.rbi +74 -0
- data/rbi/sentdm/models/api_response_of_calls_list.rbi +74 -0
- data/rbi/sentdm/models/call.rbi +177 -0
- data/rbi/sentdm/models/call_event.rbi +114 -0
- data/rbi/sentdm/models/call_event_payload.rbi +135 -0
- data/rbi/sentdm/models/call_hangup_params.rbi +59 -0
- data/rbi/sentdm/models/call_list_params.rbi +112 -0
- data/rbi/sentdm/models/call_list_recordings_params.rbi +46 -0
- data/rbi/sentdm/models/call_party.rbi +41 -0
- data/rbi/sentdm/models/call_record_params.rbi +83 -0
- data/rbi/sentdm/models/call_recording.rbi +59 -0
- data/rbi/sentdm/models/call_recordings.rbi +39 -0
- data/rbi/sentdm/models/call_retrieve_params.rbi +46 -0
- data/rbi/sentdm/models/call_timeline_entry.rbi +40 -0
- data/rbi/sentdm/models/calls/api_response_of_list_of_call_participant.rbi +76 -0
- data/rbi/sentdm/models/calls/call_participant.rbi +92 -0
- data/rbi/sentdm/models/calls/call_participant_target.rbi +47 -0
- data/rbi/sentdm/models/calls/participant_add_params.rbi +98 -0
- data/rbi/sentdm/models/calls/participant_list_params.rbi +51 -0
- data/rbi/sentdm/models/calls/participant_remove_all_params.rbi +51 -0
- data/rbi/sentdm/models/calls/participant_remove_params.rbi +61 -0
- data/rbi/sentdm/models/calls/participant_update_params.rbi +94 -0
- data/rbi/sentdm/models/calls_list.rbi +47 -0
- data/rbi/sentdm/models/channels/api_response_of_list_of_voice_number.rbi +76 -0
- data/rbi/sentdm/models/channels/api_response_of_voice_callback_test.rbi +83 -0
- data/rbi/sentdm/models/channels/api_response_of_voice_number.rbi +81 -0
- data/rbi/sentdm/models/channels/api_response_of_voice_number_created.rbi +83 -0
- data/rbi/sentdm/models/channels/api_response_of_voice_secret.rbi +81 -0
- data/rbi/sentdm/models/channels/api_response_of_voice_token.rbi +81 -0
- data/rbi/sentdm/models/channels/voice_callback_test.rbi +126 -0
- data/rbi/sentdm/models/channels/voice_callback_test_error_info.rbi +65 -0
- data/rbi/sentdm/models/channels/voice_callback_test_request_info.rbi +66 -0
- data/rbi/sentdm/models/channels/voice_callback_test_response_info.rbi +48 -0
- data/rbi/sentdm/models/channels/voice_create_params.rbi +127 -0
- data/rbi/sentdm/models/channels/voice_create_token_params.rbi +104 -0
- data/rbi/sentdm/models/channels/voice_list_params.rbi +40 -0
- data/rbi/sentdm/models/channels/voice_number.rbi +105 -0
- data/rbi/sentdm/models/channels/voice_number_created.rbi +42 -0
- data/rbi/sentdm/models/channels/voice_retrieve_params.rbi +51 -0
- data/rbi/sentdm/models/channels/voice_rotate_secret_params.rbi +64 -0
- data/rbi/sentdm/models/channels/voice_secret.rbi +35 -0
- data/rbi/sentdm/models/channels/voice_test_params.rbi +61 -0
- data/rbi/sentdm/models/channels/voice_token.rbi +76 -0
- data/rbi/sentdm/models/channels/voice_update_params.rbi +158 -0
- data/rbi/sentdm/models/webhook_list_events_response.rbi +3 -269
- data/rbi/sentdm/models.rbi +36 -0
- data/rbi/sentdm/resources/calls/participants.rbi +199 -0
- data/rbi/sentdm/resources/calls.rbi +206 -0
- data/rbi/sentdm/resources/channels/voice.rbi +371 -0
- data/rbi/sentdm/resources/channels.rbi +42 -0
- data/sig/sentdm/client.rbs +4 -0
- data/sig/sentdm/internal/calls_page.rbs +41 -0
- data/sig/sentdm/models/api_response_of_call.rbs +39 -0
- data/sig/sentdm/models/api_response_of_call_recordings.rbs +39 -0
- data/sig/sentdm/models/api_response_of_calls_list.rbs +39 -0
- data/sig/sentdm/models/call.rbs +101 -0
- data/sig/sentdm/models/call_event.rbs +44 -0
- data/sig/sentdm/models/call_event_payload.rbs +68 -0
- data/sig/sentdm/models/call_hangup_params.rbs +38 -0
- data/sig/sentdm/models/call_list_params.rbs +67 -0
- data/sig/sentdm/models/call_list_recordings_params.rbs +30 -0
- data/sig/sentdm/models/call_party.rbs +17 -0
- data/sig/sentdm/models/call_record_params.rbs +54 -0
- data/sig/sentdm/models/call_recording.rbs +32 -0
- data/sig/sentdm/models/call_recordings.rbs +17 -0
- data/sig/sentdm/models/call_retrieve_params.rbs +30 -0
- data/sig/sentdm/models/call_timeline_entry.rbs +19 -0
- data/sig/sentdm/models/calls/api_response_of_list_of_call_participant.rbs +41 -0
- data/sig/sentdm/models/calls/call_participant.rbs +52 -0
- data/sig/sentdm/models/calls/call_participant_target.rbs +23 -0
- data/sig/sentdm/models/calls/participant_add_params.rbs +63 -0
- data/sig/sentdm/models/calls/participant_list_params.rbs +32 -0
- data/sig/sentdm/models/calls/participant_remove_all_params.rbs +34 -0
- data/sig/sentdm/models/calls/participant_remove_params.rbs +40 -0
- data/sig/sentdm/models/calls/participant_update_params.rbs +61 -0
- data/sig/sentdm/models/calls_list.rbs +26 -0
- data/sig/sentdm/models/channels/api_response_of_list_of_voice_number.rbs +41 -0
- data/sig/sentdm/models/channels/api_response_of_voice_callback_test.rbs +41 -0
- data/sig/sentdm/models/channels/api_response_of_voice_number.rbs +41 -0
- data/sig/sentdm/models/channels/api_response_of_voice_number_created.rbs +41 -0
- data/sig/sentdm/models/channels/api_response_of_voice_secret.rbs +41 -0
- data/sig/sentdm/models/channels/api_response_of_voice_token.rbs +41 -0
- data/sig/sentdm/models/channels/voice_callback_test.rbs +51 -0
- data/sig/sentdm/models/channels/voice_callback_test_error_info.rbs +28 -0
- data/sig/sentdm/models/channels/voice_callback_test_request_info.rbs +34 -0
- data/sig/sentdm/models/channels/voice_callback_test_response_info.rbs +20 -0
- data/sig/sentdm/models/channels/voice_create_params.rbs +64 -0
- data/sig/sentdm/models/channels/voice_create_token_params.rbs +61 -0
- data/sig/sentdm/models/channels/voice_list_params.rbs +27 -0
- data/sig/sentdm/models/channels/voice_number.rbs +57 -0
- data/sig/sentdm/models/channels/voice_number_created.rbs +17 -0
- data/sig/sentdm/models/channels/voice_retrieve_params.rbs +32 -0
- data/sig/sentdm/models/channels/voice_rotate_secret_params.rbs +40 -0
- data/sig/sentdm/models/channels/voice_secret.rbs +17 -0
- data/sig/sentdm/models/channels/voice_test_params.rbs +40 -0
- data/sig/sentdm/models/channels/voice_token.rbs +40 -0
- data/sig/sentdm/models/channels/voice_update_params.rbs +78 -0
- data/sig/sentdm/models/webhook_list_events_response.rbs +1 -107
- data/sig/sentdm/models.rbs +36 -0
- data/sig/sentdm/resources/calls/participants.rbs +50 -0
- data/sig/sentdm/resources/calls.rbs +50 -0
- data/sig/sentdm/resources/channels/voice.rbs +68 -0
- data/sig/sentdm/resources/channels.rbs +9 -0
- metadata +152 -2
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
module Channels
|
|
6
|
+
class APIResponseOfVoiceNumberCreated < Sentdm::Internal::Type::BaseModel
|
|
7
|
+
OrHash =
|
|
8
|
+
T.type_alias do
|
|
9
|
+
T.any(
|
|
10
|
+
Sentdm::Channels::APIResponseOfVoiceNumberCreated,
|
|
11
|
+
Sentdm::Internal::AnyHash
|
|
12
|
+
)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# The response data (null if error)
|
|
16
|
+
sig { returns(T.nilable(Sentdm::Channels::VoiceNumberCreated)) }
|
|
17
|
+
attr_reader :data
|
|
18
|
+
|
|
19
|
+
sig do
|
|
20
|
+
params(
|
|
21
|
+
data: T.nilable(Sentdm::Channels::VoiceNumberCreated::OrHash)
|
|
22
|
+
).void
|
|
23
|
+
end
|
|
24
|
+
attr_writer :data
|
|
25
|
+
|
|
26
|
+
# Error information
|
|
27
|
+
sig { returns(T.nilable(Sentdm::ErrorDetail)) }
|
|
28
|
+
attr_reader :error
|
|
29
|
+
|
|
30
|
+
sig { params(error: T.nilable(Sentdm::ErrorDetail::OrHash)).void }
|
|
31
|
+
attr_writer :error
|
|
32
|
+
|
|
33
|
+
# Request and response metadata
|
|
34
|
+
sig { returns(T.nilable(Sentdm::APIMeta)) }
|
|
35
|
+
attr_reader :meta
|
|
36
|
+
|
|
37
|
+
sig { params(meta: Sentdm::APIMeta::OrHash).void }
|
|
38
|
+
attr_writer :meta
|
|
39
|
+
|
|
40
|
+
# Indicates whether the request was successful
|
|
41
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
42
|
+
attr_reader :success
|
|
43
|
+
|
|
44
|
+
sig { params(success: T::Boolean).void }
|
|
45
|
+
attr_writer :success
|
|
46
|
+
|
|
47
|
+
# Standard API response envelope for all v3 endpoints
|
|
48
|
+
sig do
|
|
49
|
+
params(
|
|
50
|
+
data: T.nilable(Sentdm::Channels::VoiceNumberCreated::OrHash),
|
|
51
|
+
error: T.nilable(Sentdm::ErrorDetail::OrHash),
|
|
52
|
+
meta: Sentdm::APIMeta::OrHash,
|
|
53
|
+
success: T::Boolean
|
|
54
|
+
).returns(T.attached_class)
|
|
55
|
+
end
|
|
56
|
+
def self.new(
|
|
57
|
+
# The response data (null if error)
|
|
58
|
+
data: nil,
|
|
59
|
+
# Error information
|
|
60
|
+
error: nil,
|
|
61
|
+
# Request and response metadata
|
|
62
|
+
meta: nil,
|
|
63
|
+
# Indicates whether the request was successful
|
|
64
|
+
success: nil
|
|
65
|
+
)
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
sig do
|
|
69
|
+
override.returns(
|
|
70
|
+
{
|
|
71
|
+
data: T.nilable(Sentdm::Channels::VoiceNumberCreated),
|
|
72
|
+
error: T.nilable(Sentdm::ErrorDetail),
|
|
73
|
+
meta: Sentdm::APIMeta,
|
|
74
|
+
success: T::Boolean
|
|
75
|
+
}
|
|
76
|
+
)
|
|
77
|
+
end
|
|
78
|
+
def to_hash
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
module Channels
|
|
6
|
+
class APIResponseOfVoiceSecret < Sentdm::Internal::Type::BaseModel
|
|
7
|
+
OrHash =
|
|
8
|
+
T.type_alias do
|
|
9
|
+
T.any(
|
|
10
|
+
Sentdm::Channels::APIResponseOfVoiceSecret,
|
|
11
|
+
Sentdm::Internal::AnyHash
|
|
12
|
+
)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# A freshly rotated callback signing secret
|
|
16
|
+
sig { returns(T.nilable(Sentdm::Channels::VoiceSecret)) }
|
|
17
|
+
attr_reader :data
|
|
18
|
+
|
|
19
|
+
sig do
|
|
20
|
+
params(data: T.nilable(Sentdm::Channels::VoiceSecret::OrHash)).void
|
|
21
|
+
end
|
|
22
|
+
attr_writer :data
|
|
23
|
+
|
|
24
|
+
# Error information
|
|
25
|
+
sig { returns(T.nilable(Sentdm::ErrorDetail)) }
|
|
26
|
+
attr_reader :error
|
|
27
|
+
|
|
28
|
+
sig { params(error: T.nilable(Sentdm::ErrorDetail::OrHash)).void }
|
|
29
|
+
attr_writer :error
|
|
30
|
+
|
|
31
|
+
# Request and response metadata
|
|
32
|
+
sig { returns(T.nilable(Sentdm::APIMeta)) }
|
|
33
|
+
attr_reader :meta
|
|
34
|
+
|
|
35
|
+
sig { params(meta: Sentdm::APIMeta::OrHash).void }
|
|
36
|
+
attr_writer :meta
|
|
37
|
+
|
|
38
|
+
# Indicates whether the request was successful
|
|
39
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
40
|
+
attr_reader :success
|
|
41
|
+
|
|
42
|
+
sig { params(success: T::Boolean).void }
|
|
43
|
+
attr_writer :success
|
|
44
|
+
|
|
45
|
+
# Standard API response envelope for all v3 endpoints
|
|
46
|
+
sig do
|
|
47
|
+
params(
|
|
48
|
+
data: T.nilable(Sentdm::Channels::VoiceSecret::OrHash),
|
|
49
|
+
error: T.nilable(Sentdm::ErrorDetail::OrHash),
|
|
50
|
+
meta: Sentdm::APIMeta::OrHash,
|
|
51
|
+
success: T::Boolean
|
|
52
|
+
).returns(T.attached_class)
|
|
53
|
+
end
|
|
54
|
+
def self.new(
|
|
55
|
+
# A freshly rotated callback signing secret
|
|
56
|
+
data: nil,
|
|
57
|
+
# Error information
|
|
58
|
+
error: nil,
|
|
59
|
+
# Request and response metadata
|
|
60
|
+
meta: nil,
|
|
61
|
+
# Indicates whether the request was successful
|
|
62
|
+
success: nil
|
|
63
|
+
)
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
sig do
|
|
67
|
+
override.returns(
|
|
68
|
+
{
|
|
69
|
+
data: T.nilable(Sentdm::Channels::VoiceSecret),
|
|
70
|
+
error: T.nilable(Sentdm::ErrorDetail),
|
|
71
|
+
meta: Sentdm::APIMeta,
|
|
72
|
+
success: T::Boolean
|
|
73
|
+
}
|
|
74
|
+
)
|
|
75
|
+
end
|
|
76
|
+
def to_hash
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
end
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
module Channels
|
|
6
|
+
class APIResponseOfVoiceToken < Sentdm::Internal::Type::BaseModel
|
|
7
|
+
OrHash =
|
|
8
|
+
T.type_alias do
|
|
9
|
+
T.any(
|
|
10
|
+
Sentdm::Channels::APIResponseOfVoiceToken,
|
|
11
|
+
Sentdm::Internal::AnyHash
|
|
12
|
+
)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# A short-lived token your app passes to the voice client SDK to register
|
|
16
|
+
sig { returns(T.nilable(Sentdm::Channels::VoiceToken)) }
|
|
17
|
+
attr_reader :data
|
|
18
|
+
|
|
19
|
+
sig do
|
|
20
|
+
params(data: T.nilable(Sentdm::Channels::VoiceToken::OrHash)).void
|
|
21
|
+
end
|
|
22
|
+
attr_writer :data
|
|
23
|
+
|
|
24
|
+
# Error information
|
|
25
|
+
sig { returns(T.nilable(Sentdm::ErrorDetail)) }
|
|
26
|
+
attr_reader :error
|
|
27
|
+
|
|
28
|
+
sig { params(error: T.nilable(Sentdm::ErrorDetail::OrHash)).void }
|
|
29
|
+
attr_writer :error
|
|
30
|
+
|
|
31
|
+
# Request and response metadata
|
|
32
|
+
sig { returns(T.nilable(Sentdm::APIMeta)) }
|
|
33
|
+
attr_reader :meta
|
|
34
|
+
|
|
35
|
+
sig { params(meta: Sentdm::APIMeta::OrHash).void }
|
|
36
|
+
attr_writer :meta
|
|
37
|
+
|
|
38
|
+
# Indicates whether the request was successful
|
|
39
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
40
|
+
attr_reader :success
|
|
41
|
+
|
|
42
|
+
sig { params(success: T::Boolean).void }
|
|
43
|
+
attr_writer :success
|
|
44
|
+
|
|
45
|
+
# Standard API response envelope for all v3 endpoints
|
|
46
|
+
sig do
|
|
47
|
+
params(
|
|
48
|
+
data: T.nilable(Sentdm::Channels::VoiceToken::OrHash),
|
|
49
|
+
error: T.nilable(Sentdm::ErrorDetail::OrHash),
|
|
50
|
+
meta: Sentdm::APIMeta::OrHash,
|
|
51
|
+
success: T::Boolean
|
|
52
|
+
).returns(T.attached_class)
|
|
53
|
+
end
|
|
54
|
+
def self.new(
|
|
55
|
+
# A short-lived token your app passes to the voice client SDK to register
|
|
56
|
+
data: nil,
|
|
57
|
+
# Error information
|
|
58
|
+
error: nil,
|
|
59
|
+
# Request and response metadata
|
|
60
|
+
meta: nil,
|
|
61
|
+
# Indicates whether the request was successful
|
|
62
|
+
success: nil
|
|
63
|
+
)
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
sig do
|
|
67
|
+
override.returns(
|
|
68
|
+
{
|
|
69
|
+
data: T.nilable(Sentdm::Channels::VoiceToken),
|
|
70
|
+
error: T.nilable(Sentdm::ErrorDetail),
|
|
71
|
+
meta: Sentdm::APIMeta,
|
|
72
|
+
success: T::Boolean
|
|
73
|
+
}
|
|
74
|
+
)
|
|
75
|
+
end
|
|
76
|
+
def to_hash
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
end
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
module Channels
|
|
6
|
+
class VoiceCallbackTest < Sentdm::Internal::Type::BaseModel
|
|
7
|
+
OrHash =
|
|
8
|
+
T.type_alias do
|
|
9
|
+
T.any(
|
|
10
|
+
Sentdm::Channels::VoiceCallbackTest,
|
|
11
|
+
Sentdm::Internal::AnyHash
|
|
12
|
+
)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# Your answer as Sent read it, with numbers in E.164 and a missing caller id
|
|
16
|
+
# filled in. Set only when the outcome is ok.
|
|
17
|
+
sig { returns(T.nilable(T.anything)) }
|
|
18
|
+
attr_accessor :answer
|
|
19
|
+
|
|
20
|
+
# The call id the test question carried. It does not exist anywhere else and
|
|
21
|
+
# cannot be looked up.
|
|
22
|
+
sig { returns(T.nilable(String)) }
|
|
23
|
+
attr_reader :call_id
|
|
24
|
+
|
|
25
|
+
sig { params(call_id: String).void }
|
|
26
|
+
attr_writer :call_id
|
|
27
|
+
|
|
28
|
+
# Why the test did not end with ok
|
|
29
|
+
sig { returns(T.nilable(Sentdm::Channels::VoiceCallbackTestErrorInfo)) }
|
|
30
|
+
attr_reader :error
|
|
31
|
+
|
|
32
|
+
sig do
|
|
33
|
+
params(
|
|
34
|
+
error:
|
|
35
|
+
T.nilable(Sentdm::Channels::VoiceCallbackTestErrorInfo::OrHash)
|
|
36
|
+
).void
|
|
37
|
+
end
|
|
38
|
+
attr_writer :error
|
|
39
|
+
|
|
40
|
+
# What happened: ok, timeout, connection_failed, http_error or invalid_answer
|
|
41
|
+
sig { returns(T.nilable(String)) }
|
|
42
|
+
attr_reader :outcome
|
|
43
|
+
|
|
44
|
+
sig { params(outcome: String).void }
|
|
45
|
+
attr_writer :outcome
|
|
46
|
+
|
|
47
|
+
# The test question exactly as it was sent
|
|
48
|
+
sig do
|
|
49
|
+
returns(T.nilable(Sentdm::Channels::VoiceCallbackTestRequestInfo))
|
|
50
|
+
end
|
|
51
|
+
attr_reader :request
|
|
52
|
+
|
|
53
|
+
sig do
|
|
54
|
+
params(
|
|
55
|
+
request:
|
|
56
|
+
T.nilable(Sentdm::Channels::VoiceCallbackTestRequestInfo::OrHash)
|
|
57
|
+
).void
|
|
58
|
+
end
|
|
59
|
+
attr_writer :request
|
|
60
|
+
|
|
61
|
+
# What your endpoint answered
|
|
62
|
+
sig do
|
|
63
|
+
returns(T.nilable(Sentdm::Channels::VoiceCallbackTestResponseInfo))
|
|
64
|
+
end
|
|
65
|
+
attr_reader :response
|
|
66
|
+
|
|
67
|
+
sig do
|
|
68
|
+
params(
|
|
69
|
+
response:
|
|
70
|
+
T.nilable(Sentdm::Channels::VoiceCallbackTestResponseInfo::OrHash)
|
|
71
|
+
).void
|
|
72
|
+
end
|
|
73
|
+
attr_writer :response
|
|
74
|
+
|
|
75
|
+
# The verdict of a test question sent to your callback URL
|
|
76
|
+
sig do
|
|
77
|
+
params(
|
|
78
|
+
answer: T.nilable(T.anything),
|
|
79
|
+
call_id: String,
|
|
80
|
+
error:
|
|
81
|
+
T.nilable(Sentdm::Channels::VoiceCallbackTestErrorInfo::OrHash),
|
|
82
|
+
outcome: String,
|
|
83
|
+
request:
|
|
84
|
+
T.nilable(Sentdm::Channels::VoiceCallbackTestRequestInfo::OrHash),
|
|
85
|
+
response:
|
|
86
|
+
T.nilable(Sentdm::Channels::VoiceCallbackTestResponseInfo::OrHash)
|
|
87
|
+
).returns(T.attached_class)
|
|
88
|
+
end
|
|
89
|
+
def self.new(
|
|
90
|
+
# Your answer as Sent read it, with numbers in E.164 and a missing caller id
|
|
91
|
+
# filled in. Set only when the outcome is ok.
|
|
92
|
+
answer: nil,
|
|
93
|
+
# The call id the test question carried. It does not exist anywhere else and
|
|
94
|
+
# cannot be looked up.
|
|
95
|
+
call_id: nil,
|
|
96
|
+
# Why the test did not end with ok
|
|
97
|
+
error: nil,
|
|
98
|
+
# What happened: ok, timeout, connection_failed, http_error or invalid_answer
|
|
99
|
+
outcome: nil,
|
|
100
|
+
# The test question exactly as it was sent
|
|
101
|
+
request: nil,
|
|
102
|
+
# What your endpoint answered
|
|
103
|
+
response: nil
|
|
104
|
+
)
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
sig do
|
|
108
|
+
override.returns(
|
|
109
|
+
{
|
|
110
|
+
answer: T.nilable(T.anything),
|
|
111
|
+
call_id: String,
|
|
112
|
+
error: T.nilable(Sentdm::Channels::VoiceCallbackTestErrorInfo),
|
|
113
|
+
outcome: String,
|
|
114
|
+
request:
|
|
115
|
+
T.nilable(Sentdm::Channels::VoiceCallbackTestRequestInfo),
|
|
116
|
+
response:
|
|
117
|
+
T.nilable(Sentdm::Channels::VoiceCallbackTestResponseInfo)
|
|
118
|
+
}
|
|
119
|
+
)
|
|
120
|
+
end
|
|
121
|
+
def to_hash
|
|
122
|
+
end
|
|
123
|
+
end
|
|
124
|
+
end
|
|
125
|
+
end
|
|
126
|
+
end
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
module Channels
|
|
6
|
+
class VoiceCallbackTestErrorInfo < Sentdm::Internal::Type::BaseModel
|
|
7
|
+
OrHash =
|
|
8
|
+
T.type_alias do
|
|
9
|
+
T.any(
|
|
10
|
+
Sentdm::Channels::VoiceCallbackTestErrorInfo,
|
|
11
|
+
Sentdm::Internal::AnyHash
|
|
12
|
+
)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# What to fix
|
|
16
|
+
sig { returns(T.nilable(String)) }
|
|
17
|
+
attr_reader :message
|
|
18
|
+
|
|
19
|
+
sig { params(message: String).void }
|
|
20
|
+
attr_writer :message
|
|
21
|
+
|
|
22
|
+
# Dotted path of the answer field at fault, such as action.action, when one field
|
|
23
|
+
# is to blame
|
|
24
|
+
sig { returns(T.nilable(String)) }
|
|
25
|
+
attr_accessor :path
|
|
26
|
+
|
|
27
|
+
# Machine-readable reason, such as timeout, http_error, malformed_json,
|
|
28
|
+
# missing_action or unknown_action
|
|
29
|
+
sig { returns(T.nilable(String)) }
|
|
30
|
+
attr_reader :reason
|
|
31
|
+
|
|
32
|
+
sig { params(reason: String).void }
|
|
33
|
+
attr_writer :reason
|
|
34
|
+
|
|
35
|
+
# Why the test did not end with ok
|
|
36
|
+
sig do
|
|
37
|
+
params(
|
|
38
|
+
message: String,
|
|
39
|
+
path: T.nilable(String),
|
|
40
|
+
reason: String
|
|
41
|
+
).returns(T.attached_class)
|
|
42
|
+
end
|
|
43
|
+
def self.new(
|
|
44
|
+
# What to fix
|
|
45
|
+
message: nil,
|
|
46
|
+
# Dotted path of the answer field at fault, such as action.action, when one field
|
|
47
|
+
# is to blame
|
|
48
|
+
path: nil,
|
|
49
|
+
# Machine-readable reason, such as timeout, http_error, malformed_json,
|
|
50
|
+
# missing_action or unknown_action
|
|
51
|
+
reason: nil
|
|
52
|
+
)
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
sig do
|
|
56
|
+
override.returns(
|
|
57
|
+
{ message: String, path: T.nilable(String), reason: String }
|
|
58
|
+
)
|
|
59
|
+
end
|
|
60
|
+
def to_hash
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
module Channels
|
|
6
|
+
class VoiceCallbackTestRequestInfo < Sentdm::Internal::Type::BaseModel
|
|
7
|
+
OrHash =
|
|
8
|
+
T.type_alias do
|
|
9
|
+
T.any(
|
|
10
|
+
Sentdm::Channels::VoiceCallbackTestRequestInfo,
|
|
11
|
+
Sentdm::Internal::AnyHash
|
|
12
|
+
)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# The request body byte for byte. This is what the signature covers.
|
|
16
|
+
sig { returns(T.nilable(String)) }
|
|
17
|
+
attr_reader :body
|
|
18
|
+
|
|
19
|
+
sig { params(body: String).void }
|
|
20
|
+
attr_writer :body
|
|
21
|
+
|
|
22
|
+
# Every header Sent added, the signature included, so you can compare against what
|
|
23
|
+
# your endpoint verified. The signing secret itself is never included.
|
|
24
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
25
|
+
attr_reader :headers
|
|
26
|
+
|
|
27
|
+
sig { params(headers: T::Hash[Symbol, String]).void }
|
|
28
|
+
attr_writer :headers
|
|
29
|
+
|
|
30
|
+
# The callback URL that was called
|
|
31
|
+
sig { returns(T.nilable(String)) }
|
|
32
|
+
attr_reader :url
|
|
33
|
+
|
|
34
|
+
sig { params(url: String).void }
|
|
35
|
+
attr_writer :url
|
|
36
|
+
|
|
37
|
+
# The test question exactly as it was sent
|
|
38
|
+
sig do
|
|
39
|
+
params(
|
|
40
|
+
body: String,
|
|
41
|
+
headers: T::Hash[Symbol, String],
|
|
42
|
+
url: String
|
|
43
|
+
).returns(T.attached_class)
|
|
44
|
+
end
|
|
45
|
+
def self.new(
|
|
46
|
+
# The request body byte for byte. This is what the signature covers.
|
|
47
|
+
body: nil,
|
|
48
|
+
# Every header Sent added, the signature included, so you can compare against what
|
|
49
|
+
# your endpoint verified. The signing secret itself is never included.
|
|
50
|
+
headers: nil,
|
|
51
|
+
# The callback URL that was called
|
|
52
|
+
url: nil
|
|
53
|
+
)
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
sig do
|
|
57
|
+
override.returns(
|
|
58
|
+
{ body: String, headers: T::Hash[Symbol, String], url: String }
|
|
59
|
+
)
|
|
60
|
+
end
|
|
61
|
+
def to_hash
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
module Channels
|
|
6
|
+
class VoiceCallbackTestResponseInfo < Sentdm::Internal::Type::BaseModel
|
|
7
|
+
OrHash =
|
|
8
|
+
T.type_alias do
|
|
9
|
+
T.any(
|
|
10
|
+
Sentdm::Channels::VoiceCallbackTestResponseInfo,
|
|
11
|
+
Sentdm::Internal::AnyHash
|
|
12
|
+
)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# The start of the raw response body, capped at 2048 characters
|
|
16
|
+
sig { returns(T.nilable(String)) }
|
|
17
|
+
attr_accessor :body
|
|
18
|
+
|
|
19
|
+
# The HTTP status your endpoint returned
|
|
20
|
+
sig { returns(T.nilable(Integer)) }
|
|
21
|
+
attr_reader :status_code
|
|
22
|
+
|
|
23
|
+
sig { params(status_code: Integer).void }
|
|
24
|
+
attr_writer :status_code
|
|
25
|
+
|
|
26
|
+
# What your endpoint answered
|
|
27
|
+
sig do
|
|
28
|
+
params(body: T.nilable(String), status_code: Integer).returns(
|
|
29
|
+
T.attached_class
|
|
30
|
+
)
|
|
31
|
+
end
|
|
32
|
+
def self.new(
|
|
33
|
+
# The start of the raw response body, capped at 2048 characters
|
|
34
|
+
body: nil,
|
|
35
|
+
# The HTTP status your endpoint returned
|
|
36
|
+
status_code: nil
|
|
37
|
+
)
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
sig do
|
|
41
|
+
override.returns({ body: T.nilable(String), status_code: Integer })
|
|
42
|
+
end
|
|
43
|
+
def to_hash
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
module Channels
|
|
6
|
+
class VoiceCreateParams < Sentdm::Internal::Type::BaseModel
|
|
7
|
+
extend Sentdm::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Sentdm::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
OrHash =
|
|
11
|
+
T.type_alias do
|
|
12
|
+
T.any(
|
|
13
|
+
Sentdm::Channels::VoiceCreateParams,
|
|
14
|
+
Sentdm::Internal::AnyHash
|
|
15
|
+
)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
# Where Sent asks what to do with each call on this number: an absolute HTTP or
|
|
19
|
+
# HTTPS URL on a public host. A signed question is POSTed here when a call arrives
|
|
20
|
+
# or a caller presses a key, and the answer decides the call. Every question is
|
|
21
|
+
# signed with the callback_secret the response returns, the same way your webhooks
|
|
22
|
+
# are signed. Turning the number on again with a different URL replaces it and
|
|
23
|
+
# keeps the secret.
|
|
24
|
+
sig { returns(String) }
|
|
25
|
+
attr_accessor :callback_url
|
|
26
|
+
|
|
27
|
+
# The US area code a new number should be in, as 212. Only for a request that
|
|
28
|
+
# leaves number out — sending both says two different things about which number to
|
|
29
|
+
# use, and is refused. Omit it too and the number comes from anywhere in the
|
|
30
|
+
# country.
|
|
31
|
+
sig { returns(T.nilable(String)) }
|
|
32
|
+
attr_accessor :area_code
|
|
33
|
+
|
|
34
|
+
# Make this the line app-originated calls are placed from when a voice token names
|
|
35
|
+
# no number. Omit it and your first voice number takes that role; a later one
|
|
36
|
+
# leaves it where it is.
|
|
37
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
38
|
+
attr_accessor :default_for_app_calls
|
|
39
|
+
|
|
40
|
+
# One of your phone numbers, in E.164 format. Leave the field out entirely to be
|
|
41
|
+
# given a new one instead; sending it empty is a refused request rather than a
|
|
42
|
+
# request for a new number.
|
|
43
|
+
sig { returns(T.nilable(String)) }
|
|
44
|
+
attr_accessor :number
|
|
45
|
+
|
|
46
|
+
# Sandbox flag - when true, the operation is simulated without side effects Useful
|
|
47
|
+
# for testing integrations without actual execution
|
|
48
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
49
|
+
attr_reader :sandbox
|
|
50
|
+
|
|
51
|
+
sig { params(sandbox: T::Boolean).void }
|
|
52
|
+
attr_writer :sandbox
|
|
53
|
+
|
|
54
|
+
sig { returns(T.nilable(String)) }
|
|
55
|
+
attr_reader :idempotency_key
|
|
56
|
+
|
|
57
|
+
sig { params(idempotency_key: String).void }
|
|
58
|
+
attr_writer :idempotency_key
|
|
59
|
+
|
|
60
|
+
sig { returns(T.nilable(String)) }
|
|
61
|
+
attr_reader :x_profile_id
|
|
62
|
+
|
|
63
|
+
sig { params(x_profile_id: String).void }
|
|
64
|
+
attr_writer :x_profile_id
|
|
65
|
+
|
|
66
|
+
sig do
|
|
67
|
+
params(
|
|
68
|
+
callback_url: String,
|
|
69
|
+
area_code: T.nilable(String),
|
|
70
|
+
default_for_app_calls: T.nilable(T::Boolean),
|
|
71
|
+
number: T.nilable(String),
|
|
72
|
+
sandbox: T::Boolean,
|
|
73
|
+
idempotency_key: String,
|
|
74
|
+
x_profile_id: String,
|
|
75
|
+
request_options: Sentdm::RequestOptions::OrHash
|
|
76
|
+
).returns(T.attached_class)
|
|
77
|
+
end
|
|
78
|
+
def self.new(
|
|
79
|
+
# Where Sent asks what to do with each call on this number: an absolute HTTP or
|
|
80
|
+
# HTTPS URL on a public host. A signed question is POSTed here when a call arrives
|
|
81
|
+
# or a caller presses a key, and the answer decides the call. Every question is
|
|
82
|
+
# signed with the callback_secret the response returns, the same way your webhooks
|
|
83
|
+
# are signed. Turning the number on again with a different URL replaces it and
|
|
84
|
+
# keeps the secret.
|
|
85
|
+
callback_url:,
|
|
86
|
+
# The US area code a new number should be in, as 212. Only for a request that
|
|
87
|
+
# leaves number out — sending both says two different things about which number to
|
|
88
|
+
# use, and is refused. Omit it too and the number comes from anywhere in the
|
|
89
|
+
# country.
|
|
90
|
+
area_code: nil,
|
|
91
|
+
# Make this the line app-originated calls are placed from when a voice token names
|
|
92
|
+
# no number. Omit it and your first voice number takes that role; a later one
|
|
93
|
+
# leaves it where it is.
|
|
94
|
+
default_for_app_calls: nil,
|
|
95
|
+
# One of your phone numbers, in E.164 format. Leave the field out entirely to be
|
|
96
|
+
# given a new one instead; sending it empty is a refused request rather than a
|
|
97
|
+
# request for a new number.
|
|
98
|
+
number: nil,
|
|
99
|
+
# Sandbox flag - when true, the operation is simulated without side effects Useful
|
|
100
|
+
# for testing integrations without actual execution
|
|
101
|
+
sandbox: nil,
|
|
102
|
+
idempotency_key: nil,
|
|
103
|
+
x_profile_id: nil,
|
|
104
|
+
request_options: {}
|
|
105
|
+
)
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
sig do
|
|
109
|
+
override.returns(
|
|
110
|
+
{
|
|
111
|
+
callback_url: String,
|
|
112
|
+
area_code: T.nilable(String),
|
|
113
|
+
default_for_app_calls: T.nilable(T::Boolean),
|
|
114
|
+
number: T.nilable(String),
|
|
115
|
+
sandbox: T::Boolean,
|
|
116
|
+
idempotency_key: String,
|
|
117
|
+
x_profile_id: String,
|
|
118
|
+
request_options: Sentdm::RequestOptions
|
|
119
|
+
}
|
|
120
|
+
)
|
|
121
|
+
end
|
|
122
|
+
def to_hash
|
|
123
|
+
end
|
|
124
|
+
end
|
|
125
|
+
end
|
|
126
|
+
end
|
|
127
|
+
end
|