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,112 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
class CallListParams < Sentdm::Internal::Type::BaseModel
|
|
6
|
+
extend Sentdm::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include Sentdm::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(Sentdm::CallListParams, Sentdm::Internal::AnyHash)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# Optional direction filter: outbound for calls placed from your app, inbound for
|
|
15
|
+
# calls to one of your numbers
|
|
16
|
+
sig { returns(T.nilable(String)) }
|
|
17
|
+
attr_accessor :direction
|
|
18
|
+
|
|
19
|
+
# Only calls started at or after this time (ISO 8601)
|
|
20
|
+
sig { returns(T.nilable(Time)) }
|
|
21
|
+
attr_accessor :from
|
|
22
|
+
|
|
23
|
+
# Optional filter on the number that owns the call, one of your voice-enabled
|
|
24
|
+
# numbers in E.164 format
|
|
25
|
+
sig { returns(T.nilable(String)) }
|
|
26
|
+
attr_accessor :number
|
|
27
|
+
|
|
28
|
+
# Page number (1-indexed)
|
|
29
|
+
sig { returns(T.nilable(Integer)) }
|
|
30
|
+
attr_reader :page
|
|
31
|
+
|
|
32
|
+
sig { params(page: Integer).void }
|
|
33
|
+
attr_writer :page
|
|
34
|
+
|
|
35
|
+
# Number of items per page
|
|
36
|
+
sig { returns(T.nilable(Integer)) }
|
|
37
|
+
attr_reader :page_size
|
|
38
|
+
|
|
39
|
+
sig { params(page_size: Integer).void }
|
|
40
|
+
attr_writer :page_size
|
|
41
|
+
|
|
42
|
+
# Optional status filter: initiated, ringing, answered, completed, failed,
|
|
43
|
+
# no_answer or rejected
|
|
44
|
+
sig { returns(T.nilable(String)) }
|
|
45
|
+
attr_accessor :status
|
|
46
|
+
|
|
47
|
+
# Only calls started at or before this time (ISO 8601)
|
|
48
|
+
sig { returns(T.nilable(Time)) }
|
|
49
|
+
attr_accessor :to
|
|
50
|
+
|
|
51
|
+
sig { returns(T.nilable(String)) }
|
|
52
|
+
attr_reader :x_profile_id
|
|
53
|
+
|
|
54
|
+
sig { params(x_profile_id: String).void }
|
|
55
|
+
attr_writer :x_profile_id
|
|
56
|
+
|
|
57
|
+
sig do
|
|
58
|
+
params(
|
|
59
|
+
direction: T.nilable(String),
|
|
60
|
+
from: T.nilable(Time),
|
|
61
|
+
number: T.nilable(String),
|
|
62
|
+
page: Integer,
|
|
63
|
+
page_size: Integer,
|
|
64
|
+
status: T.nilable(String),
|
|
65
|
+
to: T.nilable(Time),
|
|
66
|
+
x_profile_id: String,
|
|
67
|
+
request_options: Sentdm::RequestOptions::OrHash
|
|
68
|
+
).returns(T.attached_class)
|
|
69
|
+
end
|
|
70
|
+
def self.new(
|
|
71
|
+
# Optional direction filter: outbound for calls placed from your app, inbound for
|
|
72
|
+
# calls to one of your numbers
|
|
73
|
+
direction: nil,
|
|
74
|
+
# Only calls started at or after this time (ISO 8601)
|
|
75
|
+
from: nil,
|
|
76
|
+
# Optional filter on the number that owns the call, one of your voice-enabled
|
|
77
|
+
# numbers in E.164 format
|
|
78
|
+
number: nil,
|
|
79
|
+
# Page number (1-indexed)
|
|
80
|
+
page: nil,
|
|
81
|
+
# Number of items per page
|
|
82
|
+
page_size: nil,
|
|
83
|
+
# Optional status filter: initiated, ringing, answered, completed, failed,
|
|
84
|
+
# no_answer or rejected
|
|
85
|
+
status: nil,
|
|
86
|
+
# Only calls started at or before this time (ISO 8601)
|
|
87
|
+
to: nil,
|
|
88
|
+
x_profile_id: nil,
|
|
89
|
+
request_options: {}
|
|
90
|
+
)
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
sig do
|
|
94
|
+
override.returns(
|
|
95
|
+
{
|
|
96
|
+
direction: T.nilable(String),
|
|
97
|
+
from: T.nilable(Time),
|
|
98
|
+
number: T.nilable(String),
|
|
99
|
+
page: Integer,
|
|
100
|
+
page_size: Integer,
|
|
101
|
+
status: T.nilable(String),
|
|
102
|
+
to: T.nilable(Time),
|
|
103
|
+
x_profile_id: String,
|
|
104
|
+
request_options: Sentdm::RequestOptions
|
|
105
|
+
}
|
|
106
|
+
)
|
|
107
|
+
end
|
|
108
|
+
def to_hash
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
end
|
|
112
|
+
end
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
class CallListRecordingsParams < Sentdm::Internal::Type::BaseModel
|
|
6
|
+
extend Sentdm::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include Sentdm::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(Sentdm::CallListRecordingsParams, Sentdm::Internal::AnyHash)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :id
|
|
16
|
+
|
|
17
|
+
sig { returns(T.nilable(String)) }
|
|
18
|
+
attr_reader :x_profile_id
|
|
19
|
+
|
|
20
|
+
sig { params(x_profile_id: String).void }
|
|
21
|
+
attr_writer :x_profile_id
|
|
22
|
+
|
|
23
|
+
sig do
|
|
24
|
+
params(
|
|
25
|
+
id: String,
|
|
26
|
+
x_profile_id: String,
|
|
27
|
+
request_options: Sentdm::RequestOptions::OrHash
|
|
28
|
+
).returns(T.attached_class)
|
|
29
|
+
end
|
|
30
|
+
def self.new(id:, x_profile_id: nil, request_options: {})
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
sig do
|
|
34
|
+
override.returns(
|
|
35
|
+
{
|
|
36
|
+
id: String,
|
|
37
|
+
x_profile_id: String,
|
|
38
|
+
request_options: Sentdm::RequestOptions
|
|
39
|
+
}
|
|
40
|
+
)
|
|
41
|
+
end
|
|
42
|
+
def to_hash
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
class CallParty < Sentdm::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias { T.any(Sentdm::CallParty, Sentdm::Internal::AnyHash) }
|
|
8
|
+
|
|
9
|
+
# user for one of your app users, number for a phone number, conference for a
|
|
10
|
+
# room, anonymous for a caller who withheld their number
|
|
11
|
+
sig { returns(T.nilable(String)) }
|
|
12
|
+
attr_reader :kind
|
|
13
|
+
|
|
14
|
+
sig { params(kind: String).void }
|
|
15
|
+
attr_writer :kind
|
|
16
|
+
|
|
17
|
+
# The app user's identity, the phone number in E.164 format, or the room name.
|
|
18
|
+
# Null when the kind is anonymous
|
|
19
|
+
sig { returns(T.nilable(String)) }
|
|
20
|
+
attr_accessor :value
|
|
21
|
+
|
|
22
|
+
# One end of a call
|
|
23
|
+
sig do
|
|
24
|
+
params(kind: String, value: T.nilable(String)).returns(T.attached_class)
|
|
25
|
+
end
|
|
26
|
+
def self.new(
|
|
27
|
+
# user for one of your app users, number for a phone number, conference for a
|
|
28
|
+
# room, anonymous for a caller who withheld their number
|
|
29
|
+
kind: nil,
|
|
30
|
+
# The app user's identity, the phone number in E.164 format, or the room name.
|
|
31
|
+
# Null when the kind is anonymous
|
|
32
|
+
value: nil
|
|
33
|
+
)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
sig { override.returns({ kind: String, value: T.nilable(String) }) }
|
|
37
|
+
def to_hash
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
class CallRecordParams < Sentdm::Internal::Type::BaseModel
|
|
6
|
+
extend Sentdm::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include Sentdm::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(Sentdm::CallRecordParams, Sentdm::Internal::AnyHash)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :id
|
|
16
|
+
|
|
17
|
+
# start to begin recording, stop to end it
|
|
18
|
+
sig { returns(T.nilable(String)) }
|
|
19
|
+
attr_reader :action
|
|
20
|
+
|
|
21
|
+
sig { params(action: String).void }
|
|
22
|
+
attr_writer :action
|
|
23
|
+
|
|
24
|
+
# Sandbox flag - when true, the operation is simulated without side effects Useful
|
|
25
|
+
# for testing integrations without actual execution
|
|
26
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
27
|
+
attr_reader :sandbox
|
|
28
|
+
|
|
29
|
+
sig { params(sandbox: T::Boolean).void }
|
|
30
|
+
attr_writer :sandbox
|
|
31
|
+
|
|
32
|
+
sig { returns(T.nilable(String)) }
|
|
33
|
+
attr_reader :idempotency_key
|
|
34
|
+
|
|
35
|
+
sig { params(idempotency_key: String).void }
|
|
36
|
+
attr_writer :idempotency_key
|
|
37
|
+
|
|
38
|
+
sig { returns(T.nilable(String)) }
|
|
39
|
+
attr_reader :x_profile_id
|
|
40
|
+
|
|
41
|
+
sig { params(x_profile_id: String).void }
|
|
42
|
+
attr_writer :x_profile_id
|
|
43
|
+
|
|
44
|
+
sig do
|
|
45
|
+
params(
|
|
46
|
+
id: String,
|
|
47
|
+
action: String,
|
|
48
|
+
sandbox: T::Boolean,
|
|
49
|
+
idempotency_key: String,
|
|
50
|
+
x_profile_id: String,
|
|
51
|
+
request_options: Sentdm::RequestOptions::OrHash
|
|
52
|
+
).returns(T.attached_class)
|
|
53
|
+
end
|
|
54
|
+
def self.new(
|
|
55
|
+
id:,
|
|
56
|
+
# start to begin recording, stop to end it
|
|
57
|
+
action: nil,
|
|
58
|
+
# Sandbox flag - when true, the operation is simulated without side effects Useful
|
|
59
|
+
# for testing integrations without actual execution
|
|
60
|
+
sandbox: nil,
|
|
61
|
+
idempotency_key: nil,
|
|
62
|
+
x_profile_id: nil,
|
|
63
|
+
request_options: {}
|
|
64
|
+
)
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
sig do
|
|
68
|
+
override.returns(
|
|
69
|
+
{
|
|
70
|
+
id: String,
|
|
71
|
+
action: String,
|
|
72
|
+
sandbox: T::Boolean,
|
|
73
|
+
idempotency_key: String,
|
|
74
|
+
x_profile_id: String,
|
|
75
|
+
request_options: Sentdm::RequestOptions
|
|
76
|
+
}
|
|
77
|
+
)
|
|
78
|
+
end
|
|
79
|
+
def to_hash
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
class CallRecording < Sentdm::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias { T.any(Sentdm::CallRecording, Sentdm::Internal::AnyHash) }
|
|
8
|
+
|
|
9
|
+
# A pre-signed link that downloads the recording as an MP3 file. Anyone holding it
|
|
10
|
+
# can download the recording until it expires
|
|
11
|
+
sig { returns(T.nilable(String)) }
|
|
12
|
+
attr_reader :download_url
|
|
13
|
+
|
|
14
|
+
sig { params(download_url: String).void }
|
|
15
|
+
attr_writer :download_url
|
|
16
|
+
|
|
17
|
+
# The recording's id, the one the call.recording_ready webhook announced it under
|
|
18
|
+
sig { returns(T.nilable(String)) }
|
|
19
|
+
attr_reader :recording_id
|
|
20
|
+
|
|
21
|
+
sig { params(recording_id: String).void }
|
|
22
|
+
attr_writer :recording_id
|
|
23
|
+
|
|
24
|
+
# When the link stops working (UTC). Request the recordings again for a fresh link
|
|
25
|
+
sig { returns(T.nilable(Time)) }
|
|
26
|
+
attr_reader :url_expires_at
|
|
27
|
+
|
|
28
|
+
sig { params(url_expires_at: Time).void }
|
|
29
|
+
attr_writer :url_expires_at
|
|
30
|
+
|
|
31
|
+
# A short-lived link to a call recording
|
|
32
|
+
sig do
|
|
33
|
+
params(
|
|
34
|
+
download_url: String,
|
|
35
|
+
recording_id: String,
|
|
36
|
+
url_expires_at: Time
|
|
37
|
+
).returns(T.attached_class)
|
|
38
|
+
end
|
|
39
|
+
def self.new(
|
|
40
|
+
# A pre-signed link that downloads the recording as an MP3 file. Anyone holding it
|
|
41
|
+
# can download the recording until it expires
|
|
42
|
+
download_url: nil,
|
|
43
|
+
# The recording's id, the one the call.recording_ready webhook announced it under
|
|
44
|
+
recording_id: nil,
|
|
45
|
+
# When the link stops working (UTC). Request the recordings again for a fresh link
|
|
46
|
+
url_expires_at: nil
|
|
47
|
+
)
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
sig do
|
|
51
|
+
override.returns(
|
|
52
|
+
{ download_url: String, recording_id: String, url_expires_at: Time }
|
|
53
|
+
)
|
|
54
|
+
end
|
|
55
|
+
def to_hash
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
class CallRecordings < Sentdm::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(Sentdm::CallRecordings, Sentdm::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# Every recording of the call, oldest first. Empty until the first
|
|
12
|
+
# call.recording_ready webhook has been sent, and for a call that was never
|
|
13
|
+
# recorded
|
|
14
|
+
sig { returns(T.nilable(T::Array[Sentdm::CallRecording])) }
|
|
15
|
+
attr_reader :recordings
|
|
16
|
+
|
|
17
|
+
sig { params(recordings: T::Array[Sentdm::CallRecording::OrHash]).void }
|
|
18
|
+
attr_writer :recordings
|
|
19
|
+
|
|
20
|
+
# The recordings of a call, each as a short-lived download link
|
|
21
|
+
sig do
|
|
22
|
+
params(recordings: T::Array[Sentdm::CallRecording::OrHash]).returns(
|
|
23
|
+
T.attached_class
|
|
24
|
+
)
|
|
25
|
+
end
|
|
26
|
+
def self.new(
|
|
27
|
+
# Every recording of the call, oldest first. Empty until the first
|
|
28
|
+
# call.recording_ready webhook has been sent, and for a call that was never
|
|
29
|
+
# recorded
|
|
30
|
+
recordings: nil
|
|
31
|
+
)
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
sig { override.returns({ recordings: T::Array[Sentdm::CallRecording] }) }
|
|
35
|
+
def to_hash
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
class CallRetrieveParams < Sentdm::Internal::Type::BaseModel
|
|
6
|
+
extend Sentdm::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include Sentdm::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(Sentdm::CallRetrieveParams, Sentdm::Internal::AnyHash)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :id
|
|
16
|
+
|
|
17
|
+
sig { returns(T.nilable(String)) }
|
|
18
|
+
attr_reader :x_profile_id
|
|
19
|
+
|
|
20
|
+
sig { params(x_profile_id: String).void }
|
|
21
|
+
attr_writer :x_profile_id
|
|
22
|
+
|
|
23
|
+
sig do
|
|
24
|
+
params(
|
|
25
|
+
id: String,
|
|
26
|
+
x_profile_id: String,
|
|
27
|
+
request_options: Sentdm::RequestOptions::OrHash
|
|
28
|
+
).returns(T.attached_class)
|
|
29
|
+
end
|
|
30
|
+
def self.new(id:, x_profile_id: nil, request_options: {})
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
sig do
|
|
34
|
+
override.returns(
|
|
35
|
+
{
|
|
36
|
+
id: String,
|
|
37
|
+
x_profile_id: String,
|
|
38
|
+
request_options: Sentdm::RequestOptions
|
|
39
|
+
}
|
|
40
|
+
)
|
|
41
|
+
end
|
|
42
|
+
def to_hash
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
class CallTimelineEntry < Sentdm::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(Sentdm::CallTimelineEntry, Sentdm::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# initiated, ringing, answered, completed, failed, no_answer or rejected
|
|
12
|
+
sig { returns(T.nilable(String)) }
|
|
13
|
+
attr_reader :status
|
|
14
|
+
|
|
15
|
+
sig { params(status: String).void }
|
|
16
|
+
attr_writer :status
|
|
17
|
+
|
|
18
|
+
# When the call entered this status (UTC)
|
|
19
|
+
sig { returns(T.nilable(Time)) }
|
|
20
|
+
attr_reader :timestamp
|
|
21
|
+
|
|
22
|
+
sig { params(timestamp: Time).void }
|
|
23
|
+
attr_writer :timestamp
|
|
24
|
+
|
|
25
|
+
# When a call entered a status
|
|
26
|
+
sig { params(status: String, timestamp: Time).returns(T.attached_class) }
|
|
27
|
+
def self.new(
|
|
28
|
+
# initiated, ringing, answered, completed, failed, no_answer or rejected
|
|
29
|
+
status: nil,
|
|
30
|
+
# When the call entered this status (UTC)
|
|
31
|
+
timestamp: nil
|
|
32
|
+
)
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
sig { override.returns({ status: String, timestamp: Time }) }
|
|
36
|
+
def to_hash
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
module Calls
|
|
6
|
+
class APIResponseOfListOfCallParticipant < Sentdm::Internal::Type::BaseModel
|
|
7
|
+
OrHash =
|
|
8
|
+
T.type_alias do
|
|
9
|
+
T.any(
|
|
10
|
+
Sentdm::Calls::APIResponseOfListOfCallParticipant,
|
|
11
|
+
Sentdm::Internal::AnyHash
|
|
12
|
+
)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# The response data (null if error)
|
|
16
|
+
sig { returns(T.nilable(T::Array[Sentdm::Calls::CallParticipant])) }
|
|
17
|
+
attr_accessor :data
|
|
18
|
+
|
|
19
|
+
# Error information
|
|
20
|
+
sig { returns(T.nilable(Sentdm::ErrorDetail)) }
|
|
21
|
+
attr_reader :error
|
|
22
|
+
|
|
23
|
+
sig { params(error: T.nilable(Sentdm::ErrorDetail::OrHash)).void }
|
|
24
|
+
attr_writer :error
|
|
25
|
+
|
|
26
|
+
# Request and response metadata
|
|
27
|
+
sig { returns(T.nilable(Sentdm::APIMeta)) }
|
|
28
|
+
attr_reader :meta
|
|
29
|
+
|
|
30
|
+
sig { params(meta: Sentdm::APIMeta::OrHash).void }
|
|
31
|
+
attr_writer :meta
|
|
32
|
+
|
|
33
|
+
# Indicates whether the request was successful
|
|
34
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
35
|
+
attr_reader :success
|
|
36
|
+
|
|
37
|
+
sig { params(success: T::Boolean).void }
|
|
38
|
+
attr_writer :success
|
|
39
|
+
|
|
40
|
+
# Standard API response envelope for all v3 endpoints
|
|
41
|
+
sig do
|
|
42
|
+
params(
|
|
43
|
+
data: T.nilable(T::Array[Sentdm::Calls::CallParticipant::OrHash]),
|
|
44
|
+
error: T.nilable(Sentdm::ErrorDetail::OrHash),
|
|
45
|
+
meta: Sentdm::APIMeta::OrHash,
|
|
46
|
+
success: T::Boolean
|
|
47
|
+
).returns(T.attached_class)
|
|
48
|
+
end
|
|
49
|
+
def self.new(
|
|
50
|
+
# The response data (null if error)
|
|
51
|
+
data: nil,
|
|
52
|
+
# Error information
|
|
53
|
+
error: nil,
|
|
54
|
+
# Request and response metadata
|
|
55
|
+
meta: nil,
|
|
56
|
+
# Indicates whether the request was successful
|
|
57
|
+
success: nil
|
|
58
|
+
)
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
sig do
|
|
62
|
+
override.returns(
|
|
63
|
+
{
|
|
64
|
+
data: T.nilable(T::Array[Sentdm::Calls::CallParticipant]),
|
|
65
|
+
error: T.nilable(Sentdm::ErrorDetail),
|
|
66
|
+
meta: Sentdm::APIMeta,
|
|
67
|
+
success: T::Boolean
|
|
68
|
+
}
|
|
69
|
+
)
|
|
70
|
+
end
|
|
71
|
+
def to_hash
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
CallParticipant = Calls::CallParticipant
|
|
6
|
+
|
|
7
|
+
module Calls
|
|
8
|
+
class CallParticipant < Sentdm::Internal::Type::BaseModel
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(Sentdm::Calls::CallParticipant, Sentdm::Internal::AnyHash)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# The participant's own call id: what the mute and remove endpoints take, and what
|
|
15
|
+
# GET /v3/calls/{id} accepts
|
|
16
|
+
sig { returns(T.nilable(String)) }
|
|
17
|
+
attr_reader :id
|
|
18
|
+
|
|
19
|
+
sig { params(id: String).void }
|
|
20
|
+
attr_writer :id
|
|
21
|
+
|
|
22
|
+
# How long the participant has been connected to the room, in seconds
|
|
23
|
+
sig { returns(T.nilable(Integer)) }
|
|
24
|
+
attr_reader :duration_seconds
|
|
25
|
+
|
|
26
|
+
sig { params(duration_seconds: Integer).void }
|
|
27
|
+
attr_writer :duration_seconds
|
|
28
|
+
|
|
29
|
+
# user for one of your app users, number for a phone number, anonymous for a
|
|
30
|
+
# caller who withheld their number
|
|
31
|
+
sig { returns(T.nilable(String)) }
|
|
32
|
+
attr_reader :kind
|
|
33
|
+
|
|
34
|
+
sig { params(kind: String).void }
|
|
35
|
+
attr_writer :kind
|
|
36
|
+
|
|
37
|
+
# True while the room mutes this participant
|
|
38
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
39
|
+
attr_reader :muted
|
|
40
|
+
|
|
41
|
+
sig { params(muted: T::Boolean).void }
|
|
42
|
+
attr_writer :muted
|
|
43
|
+
|
|
44
|
+
# The app user's identity or the phone number in E.164 format. Null when the kind
|
|
45
|
+
# is anonymous
|
|
46
|
+
sig { returns(T.nilable(String)) }
|
|
47
|
+
attr_accessor :value
|
|
48
|
+
|
|
49
|
+
# A participant of a conference call
|
|
50
|
+
sig do
|
|
51
|
+
params(
|
|
52
|
+
id: String,
|
|
53
|
+
duration_seconds: Integer,
|
|
54
|
+
kind: String,
|
|
55
|
+
muted: T::Boolean,
|
|
56
|
+
value: T.nilable(String)
|
|
57
|
+
).returns(T.attached_class)
|
|
58
|
+
end
|
|
59
|
+
def self.new(
|
|
60
|
+
# The participant's own call id: what the mute and remove endpoints take, and what
|
|
61
|
+
# GET /v3/calls/{id} accepts
|
|
62
|
+
id: nil,
|
|
63
|
+
# How long the participant has been connected to the room, in seconds
|
|
64
|
+
duration_seconds: nil,
|
|
65
|
+
# user for one of your app users, number for a phone number, anonymous for a
|
|
66
|
+
# caller who withheld their number
|
|
67
|
+
kind: nil,
|
|
68
|
+
# True while the room mutes this participant
|
|
69
|
+
muted: nil,
|
|
70
|
+
# The app user's identity or the phone number in E.164 format. Null when the kind
|
|
71
|
+
# is anonymous
|
|
72
|
+
value: nil
|
|
73
|
+
)
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
sig do
|
|
77
|
+
override.returns(
|
|
78
|
+
{
|
|
79
|
+
id: String,
|
|
80
|
+
duration_seconds: Integer,
|
|
81
|
+
kind: String,
|
|
82
|
+
muted: T::Boolean,
|
|
83
|
+
value: T.nilable(String)
|
|
84
|
+
}
|
|
85
|
+
)
|
|
86
|
+
end
|
|
87
|
+
def to_hash
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
end
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
CallParticipantTarget = Calls::CallParticipantTarget
|
|
6
|
+
|
|
7
|
+
module Calls
|
|
8
|
+
class CallParticipantTarget < Sentdm::Internal::Type::BaseModel
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
Sentdm::Calls::CallParticipantTarget,
|
|
13
|
+
Sentdm::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# user for one of your app users, number for a phone number
|
|
18
|
+
sig { returns(T.nilable(String)) }
|
|
19
|
+
attr_reader :kind
|
|
20
|
+
|
|
21
|
+
sig { params(kind: String).void }
|
|
22
|
+
attr_writer :kind
|
|
23
|
+
|
|
24
|
+
# The app user's identity, or the phone number in E.164 format
|
|
25
|
+
sig { returns(T.nilable(String)) }
|
|
26
|
+
attr_reader :value
|
|
27
|
+
|
|
28
|
+
sig { params(value: String).void }
|
|
29
|
+
attr_writer :value
|
|
30
|
+
|
|
31
|
+
# A participant to add to a call
|
|
32
|
+
sig { params(kind: String, value: String).returns(T.attached_class) }
|
|
33
|
+
def self.new(
|
|
34
|
+
# user for one of your app users, number for a phone number
|
|
35
|
+
kind: nil,
|
|
36
|
+
# The app user's identity, or the phone number in E.164 format
|
|
37
|
+
value: nil
|
|
38
|
+
)
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
sig { override.returns({ kind: String, value: String }) }
|
|
42
|
+
def to_hash
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|