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,104 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
module Channels
|
|
6
|
+
class VoiceCreateTokenParams < 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::VoiceCreateTokenParams,
|
|
14
|
+
Sentdm::Internal::AnyHash
|
|
15
|
+
)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
# Your identifier for the app user, such as an agent or account id. Letters,
|
|
19
|
+
# digits, hyphens and underscores only, up to 200 characters.
|
|
20
|
+
sig { returns(T.nilable(String)) }
|
|
21
|
+
attr_reader :identity
|
|
22
|
+
|
|
23
|
+
sig { params(identity: String).void }
|
|
24
|
+
attr_writer :identity
|
|
25
|
+
|
|
26
|
+
# One of your voice-enabled phone numbers in E.164 format. Calls placed by this
|
|
27
|
+
# identity are routed through that number. Omit to use your default app-call
|
|
28
|
+
# number.
|
|
29
|
+
sig { returns(T.nilable(String)) }
|
|
30
|
+
attr_accessor :number
|
|
31
|
+
|
|
32
|
+
# Sandbox flag - when true, the operation is simulated without side effects Useful
|
|
33
|
+
# for testing integrations without actual execution
|
|
34
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
35
|
+
attr_reader :sandbox
|
|
36
|
+
|
|
37
|
+
sig { params(sandbox: T::Boolean).void }
|
|
38
|
+
attr_writer :sandbox
|
|
39
|
+
|
|
40
|
+
# Token lifetime in seconds. Defaults to 600 and cannot exceed 3600.
|
|
41
|
+
sig { returns(T.nilable(Integer)) }
|
|
42
|
+
attr_accessor :ttl
|
|
43
|
+
|
|
44
|
+
sig { returns(T.nilable(String)) }
|
|
45
|
+
attr_reader :idempotency_key
|
|
46
|
+
|
|
47
|
+
sig { params(idempotency_key: String).void }
|
|
48
|
+
attr_writer :idempotency_key
|
|
49
|
+
|
|
50
|
+
sig { returns(T.nilable(String)) }
|
|
51
|
+
attr_reader :x_profile_id
|
|
52
|
+
|
|
53
|
+
sig { params(x_profile_id: String).void }
|
|
54
|
+
attr_writer :x_profile_id
|
|
55
|
+
|
|
56
|
+
sig do
|
|
57
|
+
params(
|
|
58
|
+
identity: String,
|
|
59
|
+
number: T.nilable(String),
|
|
60
|
+
sandbox: T::Boolean,
|
|
61
|
+
ttl: T.nilable(Integer),
|
|
62
|
+
idempotency_key: String,
|
|
63
|
+
x_profile_id: String,
|
|
64
|
+
request_options: Sentdm::RequestOptions::OrHash
|
|
65
|
+
).returns(T.attached_class)
|
|
66
|
+
end
|
|
67
|
+
def self.new(
|
|
68
|
+
# Your identifier for the app user, such as an agent or account id. Letters,
|
|
69
|
+
# digits, hyphens and underscores only, up to 200 characters.
|
|
70
|
+
identity: nil,
|
|
71
|
+
# One of your voice-enabled phone numbers in E.164 format. Calls placed by this
|
|
72
|
+
# identity are routed through that number. Omit to use your default app-call
|
|
73
|
+
# number.
|
|
74
|
+
number: nil,
|
|
75
|
+
# Sandbox flag - when true, the operation is simulated without side effects Useful
|
|
76
|
+
# for testing integrations without actual execution
|
|
77
|
+
sandbox: nil,
|
|
78
|
+
# Token lifetime in seconds. Defaults to 600 and cannot exceed 3600.
|
|
79
|
+
ttl: nil,
|
|
80
|
+
idempotency_key: nil,
|
|
81
|
+
x_profile_id: nil,
|
|
82
|
+
request_options: {}
|
|
83
|
+
)
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
sig do
|
|
87
|
+
override.returns(
|
|
88
|
+
{
|
|
89
|
+
identity: String,
|
|
90
|
+
number: T.nilable(String),
|
|
91
|
+
sandbox: T::Boolean,
|
|
92
|
+
ttl: T.nilable(Integer),
|
|
93
|
+
idempotency_key: String,
|
|
94
|
+
x_profile_id: String,
|
|
95
|
+
request_options: Sentdm::RequestOptions
|
|
96
|
+
}
|
|
97
|
+
)
|
|
98
|
+
end
|
|
99
|
+
def to_hash
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
module Channels
|
|
6
|
+
class VoiceListParams < 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::Channels::VoiceListParams, Sentdm::Internal::AnyHash)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
sig { returns(T.nilable(String)) }
|
|
16
|
+
attr_reader :x_profile_id
|
|
17
|
+
|
|
18
|
+
sig { params(x_profile_id: String).void }
|
|
19
|
+
attr_writer :x_profile_id
|
|
20
|
+
|
|
21
|
+
sig do
|
|
22
|
+
params(
|
|
23
|
+
x_profile_id: String,
|
|
24
|
+
request_options: Sentdm::RequestOptions::OrHash
|
|
25
|
+
).returns(T.attached_class)
|
|
26
|
+
end
|
|
27
|
+
def self.new(x_profile_id: nil, request_options: {})
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
sig do
|
|
31
|
+
override.returns(
|
|
32
|
+
{ x_profile_id: String, request_options: Sentdm::RequestOptions }
|
|
33
|
+
)
|
|
34
|
+
end
|
|
35
|
+
def to_hash
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
module Channels
|
|
6
|
+
class VoiceNumber < Sentdm::Internal::Type::BaseModel
|
|
7
|
+
OrHash =
|
|
8
|
+
T.type_alias do
|
|
9
|
+
T.any(Sentdm::Channels::VoiceNumber, Sentdm::Internal::AnyHash)
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
# Where Sent asks what to do with each call on this number: a signed question is
|
|
13
|
+
# POSTed here when a call arrives or a caller presses a key, and the answer
|
|
14
|
+
# decides the call. The signing secret is not on this read; it is shown when voice
|
|
15
|
+
# is turned on and by the rotate endpoint.
|
|
16
|
+
sig { returns(T.nilable(String)) }
|
|
17
|
+
attr_accessor :callback_url
|
|
18
|
+
|
|
19
|
+
sig { returns(T.nilable(Time)) }
|
|
20
|
+
attr_reader :created_at
|
|
21
|
+
|
|
22
|
+
sig { params(created_at: Time).void }
|
|
23
|
+
attr_writer :created_at
|
|
24
|
+
|
|
25
|
+
# Whether this is the line app-originated calls are placed from when a voice token
|
|
26
|
+
# names no number. Exactly one active voice number carries it while the profile
|
|
27
|
+
# has any.
|
|
28
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
29
|
+
attr_reader :default_for_app_calls
|
|
30
|
+
|
|
31
|
+
sig { params(default_for_app_calls: T::Boolean).void }
|
|
32
|
+
attr_writer :default_for_app_calls
|
|
33
|
+
|
|
34
|
+
# The number, in E.164.
|
|
35
|
+
sig { returns(T.nilable(String)) }
|
|
36
|
+
attr_reader :number
|
|
37
|
+
|
|
38
|
+
sig { params(number: String).void }
|
|
39
|
+
attr_writer :number
|
|
40
|
+
|
|
41
|
+
# ACTIVE while the number carries calls, INACTIVE once it was turned off. Nothing
|
|
42
|
+
# provisions: a number the customer holds can carry calls the moment voice is
|
|
43
|
+
# turned on for it.
|
|
44
|
+
sig { returns(T.nilable(String)) }
|
|
45
|
+
attr_reader :status
|
|
46
|
+
|
|
47
|
+
sig { params(status: String).void }
|
|
48
|
+
attr_writer :status
|
|
49
|
+
|
|
50
|
+
sig { returns(T.nilable(Time)) }
|
|
51
|
+
attr_reader :updated_at
|
|
52
|
+
|
|
53
|
+
sig { params(updated_at: Time).void }
|
|
54
|
+
attr_writer :updated_at
|
|
55
|
+
|
|
56
|
+
# One number the profile carries phone calls on.
|
|
57
|
+
sig do
|
|
58
|
+
params(
|
|
59
|
+
callback_url: T.nilable(String),
|
|
60
|
+
created_at: Time,
|
|
61
|
+
default_for_app_calls: T::Boolean,
|
|
62
|
+
number: String,
|
|
63
|
+
status: String,
|
|
64
|
+
updated_at: Time
|
|
65
|
+
).returns(T.attached_class)
|
|
66
|
+
end
|
|
67
|
+
def self.new(
|
|
68
|
+
# Where Sent asks what to do with each call on this number: a signed question is
|
|
69
|
+
# POSTed here when a call arrives or a caller presses a key, and the answer
|
|
70
|
+
# decides the call. The signing secret is not on this read; it is shown when voice
|
|
71
|
+
# is turned on and by the rotate endpoint.
|
|
72
|
+
callback_url: nil,
|
|
73
|
+
created_at: nil,
|
|
74
|
+
# Whether this is the line app-originated calls are placed from when a voice token
|
|
75
|
+
# names no number. Exactly one active voice number carries it while the profile
|
|
76
|
+
# has any.
|
|
77
|
+
default_for_app_calls: nil,
|
|
78
|
+
# The number, in E.164.
|
|
79
|
+
number: nil,
|
|
80
|
+
# ACTIVE while the number carries calls, INACTIVE once it was turned off. Nothing
|
|
81
|
+
# provisions: a number the customer holds can carry calls the moment voice is
|
|
82
|
+
# turned on for it.
|
|
83
|
+
status: nil,
|
|
84
|
+
updated_at: nil
|
|
85
|
+
)
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
sig do
|
|
89
|
+
override.returns(
|
|
90
|
+
{
|
|
91
|
+
callback_url: T.nilable(String),
|
|
92
|
+
created_at: Time,
|
|
93
|
+
default_for_app_calls: T::Boolean,
|
|
94
|
+
number: String,
|
|
95
|
+
status: String,
|
|
96
|
+
updated_at: Time
|
|
97
|
+
}
|
|
98
|
+
)
|
|
99
|
+
end
|
|
100
|
+
def to_hash
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
end
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
module Channels
|
|
6
|
+
class VoiceNumberCreated < Sentdm::Models::Channels::VoiceNumber
|
|
7
|
+
OrHash =
|
|
8
|
+
T.type_alias do
|
|
9
|
+
T.any(
|
|
10
|
+
Sentdm::Channels::VoiceNumberCreated,
|
|
11
|
+
Sentdm::Internal::AnyHash
|
|
12
|
+
)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# The whsec\_ secret every question to callback_url is signed with. Shown here and
|
|
16
|
+
# by POST /v3/channels/voice/{number}/rotate-secret, nowhere else: store it now.
|
|
17
|
+
# Verify a question exactly as you verify a webhook, with X-Webhook-ID,
|
|
18
|
+
# X-Webhook-Timestamp and the body.
|
|
19
|
+
sig { returns(T.nilable(String)) }
|
|
20
|
+
attr_reader :callback_secret
|
|
21
|
+
|
|
22
|
+
sig { params(callback_secret: String).void }
|
|
23
|
+
attr_writer :callback_secret
|
|
24
|
+
|
|
25
|
+
# One number the profile carries phone calls on.
|
|
26
|
+
sig { params(callback_secret: String).returns(T.attached_class) }
|
|
27
|
+
def self.new(
|
|
28
|
+
# The whsec\_ secret every question to callback_url is signed with. Shown here and
|
|
29
|
+
# by POST /v3/channels/voice/{number}/rotate-secret, nowhere else: store it now.
|
|
30
|
+
# Verify a question exactly as you verify a webhook, with X-Webhook-ID,
|
|
31
|
+
# X-Webhook-Timestamp and the body.
|
|
32
|
+
callback_secret: nil
|
|
33
|
+
)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
sig { override.returns({ callback_secret: String }) }
|
|
37
|
+
def to_hash
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
module Channels
|
|
6
|
+
class VoiceRetrieveParams < 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::VoiceRetrieveParams,
|
|
14
|
+
Sentdm::Internal::AnyHash
|
|
15
|
+
)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :number
|
|
20
|
+
|
|
21
|
+
sig { returns(T.nilable(String)) }
|
|
22
|
+
attr_reader :x_profile_id
|
|
23
|
+
|
|
24
|
+
sig { params(x_profile_id: String).void }
|
|
25
|
+
attr_writer :x_profile_id
|
|
26
|
+
|
|
27
|
+
sig do
|
|
28
|
+
params(
|
|
29
|
+
number: String,
|
|
30
|
+
x_profile_id: String,
|
|
31
|
+
request_options: Sentdm::RequestOptions::OrHash
|
|
32
|
+
).returns(T.attached_class)
|
|
33
|
+
end
|
|
34
|
+
def self.new(number:, x_profile_id: nil, request_options: {})
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
sig do
|
|
38
|
+
override.returns(
|
|
39
|
+
{
|
|
40
|
+
number: String,
|
|
41
|
+
x_profile_id: String,
|
|
42
|
+
request_options: Sentdm::RequestOptions
|
|
43
|
+
}
|
|
44
|
+
)
|
|
45
|
+
end
|
|
46
|
+
def to_hash
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
module Channels
|
|
6
|
+
class VoiceRotateSecretParams < Sentdm::Models::MutationRequest
|
|
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::VoiceRotateSecretParams,
|
|
14
|
+
Sentdm::Internal::AnyHash
|
|
15
|
+
)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :number
|
|
20
|
+
|
|
21
|
+
sig { returns(T.nilable(String)) }
|
|
22
|
+
attr_reader :idempotency_key
|
|
23
|
+
|
|
24
|
+
sig { params(idempotency_key: String).void }
|
|
25
|
+
attr_writer :idempotency_key
|
|
26
|
+
|
|
27
|
+
sig { returns(T.nilable(String)) }
|
|
28
|
+
attr_reader :x_profile_id
|
|
29
|
+
|
|
30
|
+
sig { params(x_profile_id: String).void }
|
|
31
|
+
attr_writer :x_profile_id
|
|
32
|
+
|
|
33
|
+
sig do
|
|
34
|
+
params(
|
|
35
|
+
number: String,
|
|
36
|
+
idempotency_key: String,
|
|
37
|
+
x_profile_id: String,
|
|
38
|
+
request_options: Sentdm::RequestOptions::OrHash
|
|
39
|
+
).returns(T.attached_class)
|
|
40
|
+
end
|
|
41
|
+
def self.new(
|
|
42
|
+
number:,
|
|
43
|
+
idempotency_key: nil,
|
|
44
|
+
x_profile_id: nil,
|
|
45
|
+
request_options: {}
|
|
46
|
+
)
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
sig do
|
|
50
|
+
override.returns(
|
|
51
|
+
{
|
|
52
|
+
number: String,
|
|
53
|
+
idempotency_key: String,
|
|
54
|
+
x_profile_id: String,
|
|
55
|
+
request_options: Sentdm::RequestOptions
|
|
56
|
+
}
|
|
57
|
+
)
|
|
58
|
+
end
|
|
59
|
+
def to_hash
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
module Channels
|
|
6
|
+
class VoiceSecret < Sentdm::Internal::Type::BaseModel
|
|
7
|
+
OrHash =
|
|
8
|
+
T.type_alias do
|
|
9
|
+
T.any(Sentdm::Channels::VoiceSecret, Sentdm::Internal::AnyHash)
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
# The new whsec\_ secret. The previous one stopped signing the moment this was
|
|
13
|
+
# returned, so update your backend before the next call reaches it. Shown once.
|
|
14
|
+
sig { returns(T.nilable(String)) }
|
|
15
|
+
attr_reader :callback_secret
|
|
16
|
+
|
|
17
|
+
sig { params(callback_secret: String).void }
|
|
18
|
+
attr_writer :callback_secret
|
|
19
|
+
|
|
20
|
+
# A freshly rotated callback signing secret
|
|
21
|
+
sig { params(callback_secret: String).returns(T.attached_class) }
|
|
22
|
+
def self.new(
|
|
23
|
+
# The new whsec\_ secret. The previous one stopped signing the moment this was
|
|
24
|
+
# returned, so update your backend before the next call reaches it. Shown once.
|
|
25
|
+
callback_secret: nil
|
|
26
|
+
)
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
sig { override.returns({ callback_secret: String }) }
|
|
30
|
+
def to_hash
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
module Channels
|
|
6
|
+
class VoiceTestParams < Sentdm::Models::MutationRequest
|
|
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::Channels::VoiceTestParams, Sentdm::Internal::AnyHash)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
sig { returns(String) }
|
|
16
|
+
attr_accessor :number
|
|
17
|
+
|
|
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
|
+
|
|
24
|
+
sig { returns(T.nilable(String)) }
|
|
25
|
+
attr_reader :x_profile_id
|
|
26
|
+
|
|
27
|
+
sig { params(x_profile_id: String).void }
|
|
28
|
+
attr_writer :x_profile_id
|
|
29
|
+
|
|
30
|
+
sig do
|
|
31
|
+
params(
|
|
32
|
+
number: String,
|
|
33
|
+
idempotency_key: String,
|
|
34
|
+
x_profile_id: String,
|
|
35
|
+
request_options: Sentdm::RequestOptions::OrHash
|
|
36
|
+
).returns(T.attached_class)
|
|
37
|
+
end
|
|
38
|
+
def self.new(
|
|
39
|
+
number:,
|
|
40
|
+
idempotency_key: nil,
|
|
41
|
+
x_profile_id: nil,
|
|
42
|
+
request_options: {}
|
|
43
|
+
)
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
sig do
|
|
47
|
+
override.returns(
|
|
48
|
+
{
|
|
49
|
+
number: String,
|
|
50
|
+
idempotency_key: String,
|
|
51
|
+
x_profile_id: String,
|
|
52
|
+
request_options: Sentdm::RequestOptions
|
|
53
|
+
}
|
|
54
|
+
)
|
|
55
|
+
end
|
|
56
|
+
def to_hash
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
module Channels
|
|
6
|
+
class VoiceToken < Sentdm::Internal::Type::BaseModel
|
|
7
|
+
OrHash =
|
|
8
|
+
T.type_alias do
|
|
9
|
+
T.any(Sentdm::Channels::VoiceToken, Sentdm::Internal::AnyHash)
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
# The signed token. Hand it to the client SDK unchanged.
|
|
13
|
+
sig { returns(T.nilable(String)) }
|
|
14
|
+
attr_reader :token
|
|
15
|
+
|
|
16
|
+
sig { params(token: String).void }
|
|
17
|
+
attr_writer :token
|
|
18
|
+
|
|
19
|
+
# When the token expires (UTC)
|
|
20
|
+
sig { returns(T.nilable(Time)) }
|
|
21
|
+
attr_reader :expires_at
|
|
22
|
+
|
|
23
|
+
sig { params(expires_at: Time).void }
|
|
24
|
+
attr_writer :expires_at
|
|
25
|
+
|
|
26
|
+
# The identity the token was minted for
|
|
27
|
+
sig { returns(T.nilable(String)) }
|
|
28
|
+
attr_reader :identity
|
|
29
|
+
|
|
30
|
+
sig { params(identity: String).void }
|
|
31
|
+
attr_writer :identity
|
|
32
|
+
|
|
33
|
+
# The phone number this identity is now bound to, in E.164 format
|
|
34
|
+
sig { returns(T.nilable(String)) }
|
|
35
|
+
attr_reader :number
|
|
36
|
+
|
|
37
|
+
sig { params(number: String).void }
|
|
38
|
+
attr_writer :number
|
|
39
|
+
|
|
40
|
+
# A short-lived token your app passes to the voice client SDK to register
|
|
41
|
+
sig do
|
|
42
|
+
params(
|
|
43
|
+
token: String,
|
|
44
|
+
expires_at: Time,
|
|
45
|
+
identity: String,
|
|
46
|
+
number: String
|
|
47
|
+
).returns(T.attached_class)
|
|
48
|
+
end
|
|
49
|
+
def self.new(
|
|
50
|
+
# The signed token. Hand it to the client SDK unchanged.
|
|
51
|
+
token: nil,
|
|
52
|
+
# When the token expires (UTC)
|
|
53
|
+
expires_at: nil,
|
|
54
|
+
# The identity the token was minted for
|
|
55
|
+
identity: nil,
|
|
56
|
+
# The phone number this identity is now bound to, in E.164 format
|
|
57
|
+
number: nil
|
|
58
|
+
)
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
sig do
|
|
62
|
+
override.returns(
|
|
63
|
+
{
|
|
64
|
+
token: String,
|
|
65
|
+
expires_at: Time,
|
|
66
|
+
identity: String,
|
|
67
|
+
number: String
|
|
68
|
+
}
|
|
69
|
+
)
|
|
70
|
+
end
|
|
71
|
+
def to_hash
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|