sentdm 0.38.0 → 0.39.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 +19 -0
- data/README.md +1 -1
- data/lib/sentdm/client.rb +3 -20
- data/lib/sentdm/models/call_event_payload.rb +4 -3
- 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/{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/{channels → voice}/api_response_of_voice_token.rb +5 -5
- data/lib/sentdm/models/voice/call.rb +149 -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 +85 -0
- data/lib/sentdm/models/{calls/participant_remove_all_params.rb → voice/call_list_recordings_params.rb} +3 -3
- 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/{calls/participant_list_params.rb → voice/call_retrieve_params.rb} +3 -3
- 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/{channels/voice_create_token_params.rb → voice/token_create_params.rb} +4 -4
- data/lib/sentdm/models/{channels → voice}/voice_token.rb +9 -3
- data/lib/sentdm/models.rb +2 -30
- data/lib/sentdm/resources/channels/voice.rb +13 -56
- data/lib/sentdm/resources/channels.rb +2 -2
- data/lib/sentdm/resources/voice/calls/participants.rb +233 -0
- data/lib/sentdm/resources/voice/calls.rb +238 -0
- data/lib/sentdm/resources/voice/tokens.rb +75 -0
- data/lib/sentdm/resources/voice.rb +56 -0
- data/lib/sentdm/version.rb +1 -1
- data/lib/sentdm.rb +30 -28
- data/rbi/sentdm/client.rbi +2 -19
- data/rbi/sentdm/models/call_event_payload.rbi +6 -4
- 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/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/{channels → voice}/api_response_of_voice_token.rbi +6 -8
- data/rbi/sentdm/models/voice/call.rbi +196 -0
- data/rbi/sentdm/models/{calls/participant_remove_params.rbi → voice/call_hangup_params.rbi} +11 -11
- data/rbi/sentdm/models/voice/call_list_params.rbi +114 -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/{calls/participant_remove_all_params.rbi → voice/call_retrieve_params.rbi} +3 -6
- 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/{channels/voice_create_token_params.rbi → voice/token_create_params.rbi} +3 -6
- data/rbi/sentdm/models/{channels → voice}/voice_token.rbi +8 -4
- data/rbi/sentdm/models.rbi +2 -30
- data/rbi/sentdm/resources/channels/voice.rbi +13 -56
- data/rbi/sentdm/resources/channels.rbi +2 -2
- data/rbi/sentdm/resources/messages.rbi +8 -1
- data/rbi/sentdm/resources/voice/calls/participants.rbi +201 -0
- data/rbi/sentdm/resources/voice/calls.rbi +209 -0
- data/rbi/sentdm/resources/voice/tokens.rbi +73 -0
- data/rbi/sentdm/resources/voice.rbi +52 -0
- data/sig/sentdm/client.rbs +1 -1
- 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/{channels → voice}/api_response_of_voice_token.rbs +5 -5
- data/sig/sentdm/models/voice/call.rbs +110 -0
- data/sig/sentdm/models/{calls/participant_remove_params.rbs → voice/call_hangup_params.rbs} +8 -8
- data/sig/sentdm/models/voice/call_list_params.rbs +69 -0
- data/sig/sentdm/models/{calls/participant_remove_all_params.rbs → voice/call_list_recordings_params.rbs} +6 -8
- 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/{calls/participant_list_params.rbs → voice/call_retrieve_params.rbs} +3 -3
- 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/{channels/voice_create_token_params.rbs → voice/token_create_params.rbs} +3 -3
- data/sig/sentdm/models/{channels → voice}/voice_token.rbs +3 -1
- data/sig/sentdm/models.rbs +2 -30
- data/sig/sentdm/resources/channels/voice.rbs +0 -10
- data/sig/sentdm/resources/voice/calls/participants.rbs +52 -0
- data/sig/sentdm/resources/{calls/participants.rbs → voice/calls.rbs} +23 -21
- data/sig/sentdm/resources/voice/tokens.rbs +19 -0
- data/sig/sentdm/resources/voice.rbs +11 -0
- metadata +89 -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/call_participant_target.rbs +0 -23
- 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
|
@@ -2,19 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
module Sentdm
|
|
4
4
|
module Models
|
|
5
|
-
module
|
|
6
|
-
class
|
|
5
|
+
module Voice
|
|
6
|
+
class APIResponseOfCallsList < Sentdm::Internal::Type::BaseModel
|
|
7
7
|
OrHash =
|
|
8
8
|
T.type_alias do
|
|
9
9
|
T.any(
|
|
10
|
-
Sentdm::
|
|
10
|
+
Sentdm::Voice::APIResponseOfCallsList,
|
|
11
11
|
Sentdm::Internal::AnyHash
|
|
12
12
|
)
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
-
#
|
|
16
|
-
sig { returns(T.nilable(
|
|
17
|
-
|
|
15
|
+
# Paginated list of calls
|
|
16
|
+
sig { returns(T.nilable(Sentdm::Voice::CallsList)) }
|
|
17
|
+
attr_reader :data
|
|
18
|
+
|
|
19
|
+
sig { params(data: T.nilable(Sentdm::Voice::CallsList::OrHash)).void }
|
|
20
|
+
attr_writer :data
|
|
18
21
|
|
|
19
22
|
# Error information
|
|
20
23
|
sig { returns(T.nilable(Sentdm::ErrorDetail)) }
|
|
@@ -40,14 +43,14 @@ module Sentdm
|
|
|
40
43
|
# Standard API response envelope for all v3 endpoints
|
|
41
44
|
sig do
|
|
42
45
|
params(
|
|
43
|
-
data: T.nilable(
|
|
46
|
+
data: T.nilable(Sentdm::Voice::CallsList::OrHash),
|
|
44
47
|
error: T.nilable(Sentdm::ErrorDetail::OrHash),
|
|
45
48
|
meta: Sentdm::APIMeta::OrHash,
|
|
46
49
|
success: T::Boolean
|
|
47
50
|
).returns(T.attached_class)
|
|
48
51
|
end
|
|
49
52
|
def self.new(
|
|
50
|
-
#
|
|
53
|
+
# Paginated list of calls
|
|
51
54
|
data: nil,
|
|
52
55
|
# Error information
|
|
53
56
|
error: nil,
|
|
@@ -61,7 +64,7 @@ module Sentdm
|
|
|
61
64
|
sig do
|
|
62
65
|
override.returns(
|
|
63
66
|
{
|
|
64
|
-
data: T.nilable(
|
|
67
|
+
data: T.nilable(Sentdm::Voice::CallsList),
|
|
65
68
|
error: T.nilable(Sentdm::ErrorDetail),
|
|
66
69
|
meta: Sentdm::APIMeta,
|
|
67
70
|
success: T::Boolean
|
|
@@ -2,23 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
module Sentdm
|
|
4
4
|
module Models
|
|
5
|
-
module
|
|
5
|
+
module Voice
|
|
6
6
|
class APIResponseOfVoiceToken < Sentdm::Internal::Type::BaseModel
|
|
7
7
|
OrHash =
|
|
8
8
|
T.type_alias do
|
|
9
9
|
T.any(
|
|
10
|
-
Sentdm::
|
|
10
|
+
Sentdm::Voice::APIResponseOfVoiceToken,
|
|
11
11
|
Sentdm::Internal::AnyHash
|
|
12
12
|
)
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
# A short-lived token your app passes to the voice client SDK to register
|
|
16
|
-
sig { returns(T.nilable(Sentdm::
|
|
16
|
+
sig { returns(T.nilable(Sentdm::Voice::VoiceToken)) }
|
|
17
17
|
attr_reader :data
|
|
18
18
|
|
|
19
|
-
sig
|
|
20
|
-
params(data: T.nilable(Sentdm::Channels::VoiceToken::OrHash)).void
|
|
21
|
-
end
|
|
19
|
+
sig { params(data: T.nilable(Sentdm::Voice::VoiceToken::OrHash)).void }
|
|
22
20
|
attr_writer :data
|
|
23
21
|
|
|
24
22
|
# Error information
|
|
@@ -45,7 +43,7 @@ module Sentdm
|
|
|
45
43
|
# Standard API response envelope for all v3 endpoints
|
|
46
44
|
sig do
|
|
47
45
|
params(
|
|
48
|
-
data: T.nilable(Sentdm::
|
|
46
|
+
data: T.nilable(Sentdm::Voice::VoiceToken::OrHash),
|
|
49
47
|
error: T.nilable(Sentdm::ErrorDetail::OrHash),
|
|
50
48
|
meta: Sentdm::APIMeta::OrHash,
|
|
51
49
|
success: T::Boolean
|
|
@@ -66,7 +64,7 @@ module Sentdm
|
|
|
66
64
|
sig do
|
|
67
65
|
override.returns(
|
|
68
66
|
{
|
|
69
|
-
data: T.nilable(Sentdm::
|
|
67
|
+
data: T.nilable(Sentdm::Voice::VoiceToken),
|
|
70
68
|
error: T.nilable(Sentdm::ErrorDetail),
|
|
71
69
|
meta: Sentdm::APIMeta,
|
|
72
70
|
success: T::Boolean
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
module Voice
|
|
6
|
+
class Call < Sentdm::Internal::Type::BaseModel
|
|
7
|
+
OrHash =
|
|
8
|
+
T.type_alias { T.any(Sentdm::Voice::Call, Sentdm::Internal::AnyHash) }
|
|
9
|
+
|
|
10
|
+
# The call id, the same one carried by the call.request question and every call
|
|
11
|
+
# webhook
|
|
12
|
+
sig { returns(T.nilable(String)) }
|
|
13
|
+
attr_reader :id
|
|
14
|
+
|
|
15
|
+
sig { params(id: String).void }
|
|
16
|
+
attr_writer :id
|
|
17
|
+
|
|
18
|
+
# When the call was answered (UTC). Null until then, and always null for a call
|
|
19
|
+
# between two of your app users
|
|
20
|
+
sig { returns(T.nilable(Time)) }
|
|
21
|
+
attr_accessor :answered_at
|
|
22
|
+
|
|
23
|
+
# outbound for a call placed from your app, inbound for a call to one of your
|
|
24
|
+
# numbers
|
|
25
|
+
sig { returns(T.nilable(String)) }
|
|
26
|
+
attr_reader :direction
|
|
27
|
+
|
|
28
|
+
sig { params(direction: String).void }
|
|
29
|
+
attr_writer :direction
|
|
30
|
+
|
|
31
|
+
# Billable duration in seconds. Null while the call is live
|
|
32
|
+
sig { returns(T.nilable(Integer)) }
|
|
33
|
+
attr_accessor :duration_seconds
|
|
34
|
+
|
|
35
|
+
# When the call ended (UTC). Null while the call is live
|
|
36
|
+
sig { returns(T.nilable(Time)) }
|
|
37
|
+
attr_accessor :ended_at
|
|
38
|
+
|
|
39
|
+
# Why the call did not complete: callback_timeout, invalid_answer,
|
|
40
|
+
# insufficient_balance, destination_blocked, callback_not_configured, rejected or
|
|
41
|
+
# no_answer. Null while the call is live, when it completed, and when it failed
|
|
42
|
+
# without a recorded reason
|
|
43
|
+
sig { returns(T.nilable(String)) }
|
|
44
|
+
attr_accessor :failure_reason
|
|
45
|
+
|
|
46
|
+
# One end of a call
|
|
47
|
+
sig { returns(T.nilable(Sentdm::Voice::CallParty)) }
|
|
48
|
+
attr_reader :from
|
|
49
|
+
|
|
50
|
+
sig { params(from: Sentdm::Voice::CallParty::OrHash).void }
|
|
51
|
+
attr_writer :from
|
|
52
|
+
|
|
53
|
+
# The calling mode: inapp for a call between people in your app and phone numbers,
|
|
54
|
+
# routed by your number's callback URL
|
|
55
|
+
sig { returns(T.nilable(String)) }
|
|
56
|
+
attr_reader :mode
|
|
57
|
+
|
|
58
|
+
sig { params(mode: String).void }
|
|
59
|
+
attr_writer :mode
|
|
60
|
+
|
|
61
|
+
# Your number that owns the call, in E.164 format: the dialed number for an
|
|
62
|
+
# inbound call, the caller's bound number for a call placed from your app
|
|
63
|
+
sig { returns(T.nilable(String)) }
|
|
64
|
+
attr_reader :number
|
|
65
|
+
|
|
66
|
+
sig { params(number: String).void }
|
|
67
|
+
attr_writer :number
|
|
68
|
+
|
|
69
|
+
# What the call cost. Null until it has been priced
|
|
70
|
+
sig { returns(T.nilable(Float)) }
|
|
71
|
+
attr_accessor :price
|
|
72
|
+
|
|
73
|
+
# True once a recording of the call is available
|
|
74
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
75
|
+
attr_reader :recording_available
|
|
76
|
+
|
|
77
|
+
sig { params(recording_available: T::Boolean).void }
|
|
78
|
+
attr_writer :recording_available
|
|
79
|
+
|
|
80
|
+
# When the call was placed (UTC)
|
|
81
|
+
sig { returns(T.nilable(Time)) }
|
|
82
|
+
attr_reader :started_at
|
|
83
|
+
|
|
84
|
+
sig { params(started_at: Time).void }
|
|
85
|
+
attr_writer :started_at
|
|
86
|
+
|
|
87
|
+
# INITIATED, RINGING, ANSWERED, COMPLETED, FAILED, NO_ANSWER or REJECTED
|
|
88
|
+
sig { returns(T.nilable(String)) }
|
|
89
|
+
attr_reader :status
|
|
90
|
+
|
|
91
|
+
sig { params(status: String).void }
|
|
92
|
+
attr_writer :status
|
|
93
|
+
|
|
94
|
+
# When the call entered each status, oldest first. Only returned when reading one
|
|
95
|
+
# call
|
|
96
|
+
sig { returns(T.nilable(T::Array[Sentdm::Voice::CallTimelineEntry])) }
|
|
97
|
+
attr_accessor :timeline
|
|
98
|
+
|
|
99
|
+
# One end of a call
|
|
100
|
+
sig { returns(T.nilable(Sentdm::Voice::CallParty)) }
|
|
101
|
+
attr_reader :to
|
|
102
|
+
|
|
103
|
+
sig { params(to: Sentdm::Voice::CallParty::OrHash).void }
|
|
104
|
+
attr_writer :to
|
|
105
|
+
|
|
106
|
+
# A call record
|
|
107
|
+
sig do
|
|
108
|
+
params(
|
|
109
|
+
id: String,
|
|
110
|
+
answered_at: T.nilable(Time),
|
|
111
|
+
direction: String,
|
|
112
|
+
duration_seconds: T.nilable(Integer),
|
|
113
|
+
ended_at: T.nilable(Time),
|
|
114
|
+
failure_reason: T.nilable(String),
|
|
115
|
+
from: Sentdm::Voice::CallParty::OrHash,
|
|
116
|
+
mode: String,
|
|
117
|
+
number: String,
|
|
118
|
+
price: T.nilable(Float),
|
|
119
|
+
recording_available: T::Boolean,
|
|
120
|
+
started_at: Time,
|
|
121
|
+
status: String,
|
|
122
|
+
timeline:
|
|
123
|
+
T.nilable(T::Array[Sentdm::Voice::CallTimelineEntry::OrHash]),
|
|
124
|
+
to: Sentdm::Voice::CallParty::OrHash
|
|
125
|
+
).returns(T.attached_class)
|
|
126
|
+
end
|
|
127
|
+
def self.new(
|
|
128
|
+
# The call id, the same one carried by the call.request question and every call
|
|
129
|
+
# webhook
|
|
130
|
+
id: nil,
|
|
131
|
+
# When the call was answered (UTC). Null until then, and always null for a call
|
|
132
|
+
# between two of your app users
|
|
133
|
+
answered_at: nil,
|
|
134
|
+
# outbound for a call placed from your app, inbound for a call to one of your
|
|
135
|
+
# numbers
|
|
136
|
+
direction: nil,
|
|
137
|
+
# Billable duration in seconds. Null while the call is live
|
|
138
|
+
duration_seconds: nil,
|
|
139
|
+
# When the call ended (UTC). Null while the call is live
|
|
140
|
+
ended_at: nil,
|
|
141
|
+
# Why the call did not complete: callback_timeout, invalid_answer,
|
|
142
|
+
# insufficient_balance, destination_blocked, callback_not_configured, rejected or
|
|
143
|
+
# no_answer. Null while the call is live, when it completed, and when it failed
|
|
144
|
+
# without a recorded reason
|
|
145
|
+
failure_reason: nil,
|
|
146
|
+
# One end of a call
|
|
147
|
+
from: nil,
|
|
148
|
+
# The calling mode: inapp for a call between people in your app and phone numbers,
|
|
149
|
+
# routed by your number's callback URL
|
|
150
|
+
mode: nil,
|
|
151
|
+
# Your number that owns the call, in E.164 format: the dialed number for an
|
|
152
|
+
# inbound call, the caller's bound number for a call placed from your app
|
|
153
|
+
number: nil,
|
|
154
|
+
# What the call cost. Null until it has been priced
|
|
155
|
+
price: nil,
|
|
156
|
+
# True once a recording of the call is available
|
|
157
|
+
recording_available: nil,
|
|
158
|
+
# When the call was placed (UTC)
|
|
159
|
+
started_at: nil,
|
|
160
|
+
# INITIATED, RINGING, ANSWERED, COMPLETED, FAILED, NO_ANSWER or REJECTED
|
|
161
|
+
status: nil,
|
|
162
|
+
# When the call entered each status, oldest first. Only returned when reading one
|
|
163
|
+
# call
|
|
164
|
+
timeline: nil,
|
|
165
|
+
# One end of a call
|
|
166
|
+
to: nil
|
|
167
|
+
)
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
sig do
|
|
171
|
+
override.returns(
|
|
172
|
+
{
|
|
173
|
+
id: String,
|
|
174
|
+
answered_at: T.nilable(Time),
|
|
175
|
+
direction: String,
|
|
176
|
+
duration_seconds: T.nilable(Integer),
|
|
177
|
+
ended_at: T.nilable(Time),
|
|
178
|
+
failure_reason: T.nilable(String),
|
|
179
|
+
from: Sentdm::Voice::CallParty,
|
|
180
|
+
mode: String,
|
|
181
|
+
number: String,
|
|
182
|
+
price: T.nilable(Float),
|
|
183
|
+
recording_available: T::Boolean,
|
|
184
|
+
started_at: Time,
|
|
185
|
+
status: String,
|
|
186
|
+
timeline: T.nilable(T::Array[Sentdm::Voice::CallTimelineEntry]),
|
|
187
|
+
to: Sentdm::Voice::CallParty
|
|
188
|
+
}
|
|
189
|
+
)
|
|
190
|
+
end
|
|
191
|
+
def to_hash
|
|
192
|
+
end
|
|
193
|
+
end
|
|
194
|
+
end
|
|
195
|
+
end
|
|
196
|
+
end
|
|
@@ -2,24 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
module Sentdm
|
|
4
4
|
module Models
|
|
5
|
-
module
|
|
6
|
-
class
|
|
5
|
+
module Voice
|
|
6
|
+
class CallHangupParams < Sentdm::Models::MutationRequest
|
|
7
7
|
extend Sentdm::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Sentdm::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
10
|
OrHash =
|
|
11
11
|
T.type_alias do
|
|
12
|
-
T.any(
|
|
13
|
-
Sentdm::Calls::ParticipantRemoveParams,
|
|
14
|
-
Sentdm::Internal::AnyHash
|
|
15
|
-
)
|
|
12
|
+
T.any(Sentdm::Voice::CallHangupParams, Sentdm::Internal::AnyHash)
|
|
16
13
|
end
|
|
17
14
|
|
|
18
15
|
sig { returns(String) }
|
|
19
16
|
attr_accessor :id
|
|
20
17
|
|
|
21
|
-
sig { returns(String) }
|
|
22
|
-
|
|
18
|
+
sig { returns(T.nilable(String)) }
|
|
19
|
+
attr_reader :idempotency_key
|
|
20
|
+
|
|
21
|
+
sig { params(idempotency_key: String).void }
|
|
22
|
+
attr_writer :idempotency_key
|
|
23
23
|
|
|
24
24
|
sig { returns(T.nilable(String)) }
|
|
25
25
|
attr_reader :x_profile_id
|
|
@@ -30,14 +30,14 @@ module Sentdm
|
|
|
30
30
|
sig do
|
|
31
31
|
params(
|
|
32
32
|
id: String,
|
|
33
|
-
|
|
33
|
+
idempotency_key: String,
|
|
34
34
|
x_profile_id: String,
|
|
35
35
|
request_options: Sentdm::RequestOptions::OrHash
|
|
36
36
|
).returns(T.attached_class)
|
|
37
37
|
end
|
|
38
38
|
def self.new(
|
|
39
39
|
id:,
|
|
40
|
-
|
|
40
|
+
idempotency_key: nil,
|
|
41
41
|
x_profile_id: nil,
|
|
42
42
|
request_options: {}
|
|
43
43
|
)
|
|
@@ -47,7 +47,7 @@ module Sentdm
|
|
|
47
47
|
override.returns(
|
|
48
48
|
{
|
|
49
49
|
id: String,
|
|
50
|
-
|
|
50
|
+
idempotency_key: String,
|
|
51
51
|
x_profile_id: String,
|
|
52
52
|
request_options: Sentdm::RequestOptions
|
|
53
53
|
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
module Voice
|
|
6
|
+
class CallListParams < 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(Sentdm::Voice::CallListParams, Sentdm::Internal::AnyHash)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# Optional direction filter: outbound for calls placed from your app, inbound for
|
|
16
|
+
# calls to one of your numbers
|
|
17
|
+
sig { returns(T.nilable(String)) }
|
|
18
|
+
attr_accessor :direction
|
|
19
|
+
|
|
20
|
+
# Only calls started at or after this time (ISO 8601)
|
|
21
|
+
sig { returns(T.nilable(Time)) }
|
|
22
|
+
attr_accessor :from
|
|
23
|
+
|
|
24
|
+
# Optional filter on the number that owns the call, one of your voice-enabled
|
|
25
|
+
# numbers in E.164 format
|
|
26
|
+
sig { returns(T.nilable(String)) }
|
|
27
|
+
attr_accessor :number
|
|
28
|
+
|
|
29
|
+
# Page number (1-indexed)
|
|
30
|
+
sig { returns(T.nilable(Integer)) }
|
|
31
|
+
attr_reader :page
|
|
32
|
+
|
|
33
|
+
sig { params(page: Integer).void }
|
|
34
|
+
attr_writer :page
|
|
35
|
+
|
|
36
|
+
# Number of items per page
|
|
37
|
+
sig { returns(T.nilable(Integer)) }
|
|
38
|
+
attr_reader :page_size
|
|
39
|
+
|
|
40
|
+
sig { params(page_size: Integer).void }
|
|
41
|
+
attr_writer :page_size
|
|
42
|
+
|
|
43
|
+
# Optional status filter: initiated, ringing, answered, completed, failed,
|
|
44
|
+
# no_answer or rejected
|
|
45
|
+
sig { returns(T.nilable(String)) }
|
|
46
|
+
attr_accessor :status
|
|
47
|
+
|
|
48
|
+
# Only calls started at or before this time (ISO 8601)
|
|
49
|
+
sig { returns(T.nilable(Time)) }
|
|
50
|
+
attr_accessor :to
|
|
51
|
+
|
|
52
|
+
sig { returns(T.nilable(String)) }
|
|
53
|
+
attr_reader :x_profile_id
|
|
54
|
+
|
|
55
|
+
sig { params(x_profile_id: String).void }
|
|
56
|
+
attr_writer :x_profile_id
|
|
57
|
+
|
|
58
|
+
sig do
|
|
59
|
+
params(
|
|
60
|
+
direction: T.nilable(String),
|
|
61
|
+
from: T.nilable(Time),
|
|
62
|
+
number: T.nilable(String),
|
|
63
|
+
page: Integer,
|
|
64
|
+
page_size: Integer,
|
|
65
|
+
status: T.nilable(String),
|
|
66
|
+
to: T.nilable(Time),
|
|
67
|
+
x_profile_id: String,
|
|
68
|
+
request_options: Sentdm::RequestOptions::OrHash
|
|
69
|
+
).returns(T.attached_class)
|
|
70
|
+
end
|
|
71
|
+
def self.new(
|
|
72
|
+
# Optional direction filter: outbound for calls placed from your app, inbound for
|
|
73
|
+
# calls to one of your numbers
|
|
74
|
+
direction: nil,
|
|
75
|
+
# Only calls started at or after this time (ISO 8601)
|
|
76
|
+
from: nil,
|
|
77
|
+
# Optional filter on the number that owns the call, one of your voice-enabled
|
|
78
|
+
# numbers in E.164 format
|
|
79
|
+
number: nil,
|
|
80
|
+
# Page number (1-indexed)
|
|
81
|
+
page: nil,
|
|
82
|
+
# Number of items per page
|
|
83
|
+
page_size: nil,
|
|
84
|
+
# Optional status filter: initiated, ringing, answered, completed, failed,
|
|
85
|
+
# no_answer or rejected
|
|
86
|
+
status: nil,
|
|
87
|
+
# Only calls started at or before this time (ISO 8601)
|
|
88
|
+
to: nil,
|
|
89
|
+
x_profile_id: nil,
|
|
90
|
+
request_options: {}
|
|
91
|
+
)
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
sig do
|
|
95
|
+
override.returns(
|
|
96
|
+
{
|
|
97
|
+
direction: T.nilable(String),
|
|
98
|
+
from: T.nilable(Time),
|
|
99
|
+
number: T.nilable(String),
|
|
100
|
+
page: Integer,
|
|
101
|
+
page_size: Integer,
|
|
102
|
+
status: T.nilable(String),
|
|
103
|
+
to: T.nilable(Time),
|
|
104
|
+
x_profile_id: String,
|
|
105
|
+
request_options: Sentdm::RequestOptions
|
|
106
|
+
}
|
|
107
|
+
)
|
|
108
|
+
end
|
|
109
|
+
def to_hash
|
|
110
|
+
end
|
|
111
|
+
end
|
|
112
|
+
end
|
|
113
|
+
end
|
|
114
|
+
end
|
data/rbi/sentdm/models/{calls/participant_list_params.rbi → voice/call_list_recordings_params.rbi}
RENAMED
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
module Sentdm
|
|
4
4
|
module Models
|
|
5
|
-
module
|
|
6
|
-
class
|
|
5
|
+
module Voice
|
|
6
|
+
class CallListRecordingsParams < Sentdm::Internal::Type::BaseModel
|
|
7
7
|
extend Sentdm::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Sentdm::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
10
|
OrHash =
|
|
11
11
|
T.type_alias do
|
|
12
12
|
T.any(
|
|
13
|
-
Sentdm::
|
|
13
|
+
Sentdm::Voice::CallListRecordingsParams,
|
|
14
14
|
Sentdm::Internal::AnyHash
|
|
15
15
|
)
|
|
16
16
|
end
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
module Voice
|
|
6
|
+
class CallParty < Sentdm::Internal::Type::BaseModel
|
|
7
|
+
OrHash =
|
|
8
|
+
T.type_alias do
|
|
9
|
+
T.any(Sentdm::Voice::CallParty, Sentdm::Internal::AnyHash)
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
# user for one of your app users, number for a phone number, conference for a
|
|
13
|
+
# room, anonymous for a caller who withheld their number
|
|
14
|
+
sig { returns(T.nilable(String)) }
|
|
15
|
+
attr_reader :kind
|
|
16
|
+
|
|
17
|
+
sig { params(kind: String).void }
|
|
18
|
+
attr_writer :kind
|
|
19
|
+
|
|
20
|
+
# The app user's identity, the phone number in E.164 format, or the room name.
|
|
21
|
+
# Null when the kind is anonymous
|
|
22
|
+
sig { returns(T.nilable(String)) }
|
|
23
|
+
attr_accessor :value
|
|
24
|
+
|
|
25
|
+
# One end of a call
|
|
26
|
+
sig do
|
|
27
|
+
params(kind: String, value: T.nilable(String)).returns(
|
|
28
|
+
T.attached_class
|
|
29
|
+
)
|
|
30
|
+
end
|
|
31
|
+
def self.new(
|
|
32
|
+
# user for one of your app users, number for a phone number, conference for a
|
|
33
|
+
# room, anonymous for a caller who withheld their number
|
|
34
|
+
kind: nil,
|
|
35
|
+
# The app user's identity, the phone number in E.164 format, or the room name.
|
|
36
|
+
# Null when the kind is anonymous
|
|
37
|
+
value: nil
|
|
38
|
+
)
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
sig { override.returns({ kind: String, value: T.nilable(String) }) }
|
|
42
|
+
def to_hash
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
@@ -2,31 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
module Sentdm
|
|
4
4
|
module Models
|
|
5
|
-
module
|
|
6
|
-
class
|
|
5
|
+
module Voice
|
|
6
|
+
class CallRecordParams < Sentdm::Internal::Type::BaseModel
|
|
7
7
|
extend Sentdm::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Sentdm::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
10
|
OrHash =
|
|
11
11
|
T.type_alias do
|
|
12
|
-
T.any(
|
|
13
|
-
Sentdm::Calls::ParticipantUpdateParams,
|
|
14
|
-
Sentdm::Internal::AnyHash
|
|
15
|
-
)
|
|
12
|
+
T.any(Sentdm::Voice::CallRecordParams, Sentdm::Internal::AnyHash)
|
|
16
13
|
end
|
|
17
14
|
|
|
18
15
|
sig { returns(String) }
|
|
19
16
|
attr_accessor :id
|
|
20
17
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
# true to mute the participant, false to unmute them
|
|
25
|
-
sig { returns(T.nilable(T::Boolean)) }
|
|
26
|
-
attr_reader :muted
|
|
18
|
+
# start to begin recording, stop to end it
|
|
19
|
+
sig { returns(T.nilable(String)) }
|
|
20
|
+
attr_reader :action
|
|
27
21
|
|
|
28
|
-
sig { params(
|
|
29
|
-
attr_writer :
|
|
22
|
+
sig { params(action: String).void }
|
|
23
|
+
attr_writer :action
|
|
30
24
|
|
|
31
25
|
# Sandbox flag - when true, the operation is simulated without side effects Useful
|
|
32
26
|
# for testing integrations without actual execution
|
|
@@ -51,8 +45,7 @@ module Sentdm
|
|
|
51
45
|
sig do
|
|
52
46
|
params(
|
|
53
47
|
id: String,
|
|
54
|
-
|
|
55
|
-
muted: T::Boolean,
|
|
48
|
+
action: String,
|
|
56
49
|
sandbox: T::Boolean,
|
|
57
50
|
idempotency_key: String,
|
|
58
51
|
x_profile_id: String,
|
|
@@ -61,9 +54,8 @@ module Sentdm
|
|
|
61
54
|
end
|
|
62
55
|
def self.new(
|
|
63
56
|
id:,
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
muted: nil,
|
|
57
|
+
# start to begin recording, stop to end it
|
|
58
|
+
action: nil,
|
|
67
59
|
# Sandbox flag - when true, the operation is simulated without side effects Useful
|
|
68
60
|
# for testing integrations without actual execution
|
|
69
61
|
sandbox: nil,
|
|
@@ -77,8 +69,7 @@ module Sentdm
|
|
|
77
69
|
override.returns(
|
|
78
70
|
{
|
|
79
71
|
id: String,
|
|
80
|
-
|
|
81
|
-
muted: T::Boolean,
|
|
72
|
+
action: String,
|
|
82
73
|
sandbox: T::Boolean,
|
|
83
74
|
idempotency_key: String,
|
|
84
75
|
x_profile_id: String,
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
module Voice
|
|
6
|
+
class CallRecording < Sentdm::Internal::Type::BaseModel
|
|
7
|
+
OrHash =
|
|
8
|
+
T.type_alias do
|
|
9
|
+
T.any(Sentdm::Voice::CallRecording, Sentdm::Internal::AnyHash)
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
# A pre-signed link that downloads the recording as an MP3 file. Anyone holding it
|
|
13
|
+
# can download the recording until it expires
|
|
14
|
+
sig { returns(T.nilable(String)) }
|
|
15
|
+
attr_reader :download_url
|
|
16
|
+
|
|
17
|
+
sig { params(download_url: String).void }
|
|
18
|
+
attr_writer :download_url
|
|
19
|
+
|
|
20
|
+
# The recording's id, the one the call.recording_ready webhook announced it under
|
|
21
|
+
sig { returns(T.nilable(String)) }
|
|
22
|
+
attr_reader :recording_id
|
|
23
|
+
|
|
24
|
+
sig { params(recording_id: String).void }
|
|
25
|
+
attr_writer :recording_id
|
|
26
|
+
|
|
27
|
+
# When the link stops working (UTC). Request the recordings again for a fresh link
|
|
28
|
+
sig { returns(T.nilable(Time)) }
|
|
29
|
+
attr_reader :url_expires_at
|
|
30
|
+
|
|
31
|
+
sig { params(url_expires_at: Time).void }
|
|
32
|
+
attr_writer :url_expires_at
|
|
33
|
+
|
|
34
|
+
# A short-lived link to a call recording
|
|
35
|
+
sig do
|
|
36
|
+
params(
|
|
37
|
+
download_url: String,
|
|
38
|
+
recording_id: String,
|
|
39
|
+
url_expires_at: Time
|
|
40
|
+
).returns(T.attached_class)
|
|
41
|
+
end
|
|
42
|
+
def self.new(
|
|
43
|
+
# A pre-signed link that downloads the recording as an MP3 file. Anyone holding it
|
|
44
|
+
# can download the recording until it expires
|
|
45
|
+
download_url: nil,
|
|
46
|
+
# The recording's id, the one the call.recording_ready webhook announced it under
|
|
47
|
+
recording_id: nil,
|
|
48
|
+
# When the link stops working (UTC). Request the recordings again for a fresh link
|
|
49
|
+
url_expires_at: nil
|
|
50
|
+
)
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
sig do
|
|
54
|
+
override.returns(
|
|
55
|
+
{ download_url: String, recording_id: String, url_expires_at: Time }
|
|
56
|
+
)
|
|
57
|
+
end
|
|
58
|
+
def to_hash
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|