sentdm 0.34.0 → 0.36.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 +16 -0
- data/README.md +11 -9
- data/lib/sentdm/client.rb +30 -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 +134 -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/message_event_payload.rb +9 -4
- data/lib/sentdm/models/message_retrieve_activities_response.rb +7 -5
- 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 +236 -0
- data/lib/sentdm/resources/channels/voice.rb +381 -0
- data/lib/sentdm/resources/channels.rb +45 -0
- data/lib/sentdm/resources/messages.rb +10 -4
- data/lib/sentdm/version.rb +1 -1
- data/lib/sentdm.rb +50 -0
- data/rbi/sentdm/client.rbi +28 -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 +179 -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/message_event_payload.rbi +16 -6
- data/rbi/sentdm/models/message_retrieve_activities_response.rbi +12 -8
- 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 +207 -0
- data/rbi/sentdm/resources/channels/voice.rbi +371 -0
- data/rbi/sentdm/resources/channels.rbi +42 -0
- data/rbi/sentdm/resources/messages.rbi +10 -4
- 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,66 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
module Channels
|
|
6
|
+
class VoiceCallbackTestRequestInfo < Sentdm::Internal::Type::BaseModel
|
|
7
|
+
OrHash =
|
|
8
|
+
T.type_alias do
|
|
9
|
+
T.any(
|
|
10
|
+
Sentdm::Channels::VoiceCallbackTestRequestInfo,
|
|
11
|
+
Sentdm::Internal::AnyHash
|
|
12
|
+
)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# The request body byte for byte. This is what the signature covers.
|
|
16
|
+
sig { returns(T.nilable(String)) }
|
|
17
|
+
attr_reader :body
|
|
18
|
+
|
|
19
|
+
sig { params(body: String).void }
|
|
20
|
+
attr_writer :body
|
|
21
|
+
|
|
22
|
+
# Every header Sent added, the signature included, so you can compare against what
|
|
23
|
+
# your endpoint verified. The signing secret itself is never included.
|
|
24
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
25
|
+
attr_reader :headers
|
|
26
|
+
|
|
27
|
+
sig { params(headers: T::Hash[Symbol, String]).void }
|
|
28
|
+
attr_writer :headers
|
|
29
|
+
|
|
30
|
+
# The callback URL that was called
|
|
31
|
+
sig { returns(T.nilable(String)) }
|
|
32
|
+
attr_reader :url
|
|
33
|
+
|
|
34
|
+
sig { params(url: String).void }
|
|
35
|
+
attr_writer :url
|
|
36
|
+
|
|
37
|
+
# The test question exactly as it was sent
|
|
38
|
+
sig do
|
|
39
|
+
params(
|
|
40
|
+
body: String,
|
|
41
|
+
headers: T::Hash[Symbol, String],
|
|
42
|
+
url: String
|
|
43
|
+
).returns(T.attached_class)
|
|
44
|
+
end
|
|
45
|
+
def self.new(
|
|
46
|
+
# The request body byte for byte. This is what the signature covers.
|
|
47
|
+
body: nil,
|
|
48
|
+
# Every header Sent added, the signature included, so you can compare against what
|
|
49
|
+
# your endpoint verified. The signing secret itself is never included.
|
|
50
|
+
headers: nil,
|
|
51
|
+
# The callback URL that was called
|
|
52
|
+
url: nil
|
|
53
|
+
)
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
sig do
|
|
57
|
+
override.returns(
|
|
58
|
+
{ body: String, headers: T::Hash[Symbol, String], url: String }
|
|
59
|
+
)
|
|
60
|
+
end
|
|
61
|
+
def to_hash
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
module Channels
|
|
6
|
+
class VoiceCallbackTestResponseInfo < Sentdm::Internal::Type::BaseModel
|
|
7
|
+
OrHash =
|
|
8
|
+
T.type_alias do
|
|
9
|
+
T.any(
|
|
10
|
+
Sentdm::Channels::VoiceCallbackTestResponseInfo,
|
|
11
|
+
Sentdm::Internal::AnyHash
|
|
12
|
+
)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# The start of the raw response body, capped at 2048 characters
|
|
16
|
+
sig { returns(T.nilable(String)) }
|
|
17
|
+
attr_accessor :body
|
|
18
|
+
|
|
19
|
+
# The HTTP status your endpoint returned
|
|
20
|
+
sig { returns(T.nilable(Integer)) }
|
|
21
|
+
attr_reader :status_code
|
|
22
|
+
|
|
23
|
+
sig { params(status_code: Integer).void }
|
|
24
|
+
attr_writer :status_code
|
|
25
|
+
|
|
26
|
+
# What your endpoint answered
|
|
27
|
+
sig do
|
|
28
|
+
params(body: T.nilable(String), status_code: Integer).returns(
|
|
29
|
+
T.attached_class
|
|
30
|
+
)
|
|
31
|
+
end
|
|
32
|
+
def self.new(
|
|
33
|
+
# The start of the raw response body, capped at 2048 characters
|
|
34
|
+
body: nil,
|
|
35
|
+
# The HTTP status your endpoint returned
|
|
36
|
+
status_code: nil
|
|
37
|
+
)
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
sig do
|
|
41
|
+
override.returns({ body: T.nilable(String), status_code: Integer })
|
|
42
|
+
end
|
|
43
|
+
def to_hash
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
module Channels
|
|
6
|
+
class VoiceCreateParams < Sentdm::Internal::Type::BaseModel
|
|
7
|
+
extend Sentdm::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Sentdm::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
OrHash =
|
|
11
|
+
T.type_alias do
|
|
12
|
+
T.any(
|
|
13
|
+
Sentdm::Channels::VoiceCreateParams,
|
|
14
|
+
Sentdm::Internal::AnyHash
|
|
15
|
+
)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
# Where Sent asks what to do with each call on this number: an absolute HTTP or
|
|
19
|
+
# HTTPS URL on a public host. A signed question is POSTed here when a call arrives
|
|
20
|
+
# or a caller presses a key, and the answer decides the call. Every question is
|
|
21
|
+
# signed with the callback_secret the response returns, the same way your webhooks
|
|
22
|
+
# are signed. Turning the number on again with a different URL replaces it and
|
|
23
|
+
# keeps the secret.
|
|
24
|
+
sig { returns(String) }
|
|
25
|
+
attr_accessor :callback_url
|
|
26
|
+
|
|
27
|
+
# The US area code a new number should be in, as 212. Only for a request that
|
|
28
|
+
# leaves number out — sending both says two different things about which number to
|
|
29
|
+
# use, and is refused. Omit it too and the number comes from anywhere in the
|
|
30
|
+
# country.
|
|
31
|
+
sig { returns(T.nilable(String)) }
|
|
32
|
+
attr_accessor :area_code
|
|
33
|
+
|
|
34
|
+
# Make this the line app-originated calls are placed from when a voice token names
|
|
35
|
+
# no number. Omit it and your first voice number takes that role; a later one
|
|
36
|
+
# leaves it where it is.
|
|
37
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
38
|
+
attr_accessor :default_for_app_calls
|
|
39
|
+
|
|
40
|
+
# One of your phone numbers, in E.164 format. Leave the field out entirely to be
|
|
41
|
+
# given a new one instead; sending it empty is a refused request rather than a
|
|
42
|
+
# request for a new number.
|
|
43
|
+
sig { returns(T.nilable(String)) }
|
|
44
|
+
attr_accessor :number
|
|
45
|
+
|
|
46
|
+
# Sandbox flag - when true, the operation is simulated without side effects Useful
|
|
47
|
+
# for testing integrations without actual execution
|
|
48
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
49
|
+
attr_reader :sandbox
|
|
50
|
+
|
|
51
|
+
sig { params(sandbox: T::Boolean).void }
|
|
52
|
+
attr_writer :sandbox
|
|
53
|
+
|
|
54
|
+
sig { returns(T.nilable(String)) }
|
|
55
|
+
attr_reader :idempotency_key
|
|
56
|
+
|
|
57
|
+
sig { params(idempotency_key: String).void }
|
|
58
|
+
attr_writer :idempotency_key
|
|
59
|
+
|
|
60
|
+
sig { returns(T.nilable(String)) }
|
|
61
|
+
attr_reader :x_profile_id
|
|
62
|
+
|
|
63
|
+
sig { params(x_profile_id: String).void }
|
|
64
|
+
attr_writer :x_profile_id
|
|
65
|
+
|
|
66
|
+
sig do
|
|
67
|
+
params(
|
|
68
|
+
callback_url: String,
|
|
69
|
+
area_code: T.nilable(String),
|
|
70
|
+
default_for_app_calls: T.nilable(T::Boolean),
|
|
71
|
+
number: T.nilable(String),
|
|
72
|
+
sandbox: T::Boolean,
|
|
73
|
+
idempotency_key: String,
|
|
74
|
+
x_profile_id: String,
|
|
75
|
+
request_options: Sentdm::RequestOptions::OrHash
|
|
76
|
+
).returns(T.attached_class)
|
|
77
|
+
end
|
|
78
|
+
def self.new(
|
|
79
|
+
# Where Sent asks what to do with each call on this number: an absolute HTTP or
|
|
80
|
+
# HTTPS URL on a public host. A signed question is POSTed here when a call arrives
|
|
81
|
+
# or a caller presses a key, and the answer decides the call. Every question is
|
|
82
|
+
# signed with the callback_secret the response returns, the same way your webhooks
|
|
83
|
+
# are signed. Turning the number on again with a different URL replaces it and
|
|
84
|
+
# keeps the secret.
|
|
85
|
+
callback_url:,
|
|
86
|
+
# The US area code a new number should be in, as 212. Only for a request that
|
|
87
|
+
# leaves number out — sending both says two different things about which number to
|
|
88
|
+
# use, and is refused. Omit it too and the number comes from anywhere in the
|
|
89
|
+
# country.
|
|
90
|
+
area_code: nil,
|
|
91
|
+
# Make this the line app-originated calls are placed from when a voice token names
|
|
92
|
+
# no number. Omit it and your first voice number takes that role; a later one
|
|
93
|
+
# leaves it where it is.
|
|
94
|
+
default_for_app_calls: nil,
|
|
95
|
+
# One of your phone numbers, in E.164 format. Leave the field out entirely to be
|
|
96
|
+
# given a new one instead; sending it empty is a refused request rather than a
|
|
97
|
+
# request for a new number.
|
|
98
|
+
number: nil,
|
|
99
|
+
# Sandbox flag - when true, the operation is simulated without side effects Useful
|
|
100
|
+
# for testing integrations without actual execution
|
|
101
|
+
sandbox: nil,
|
|
102
|
+
idempotency_key: nil,
|
|
103
|
+
x_profile_id: nil,
|
|
104
|
+
request_options: {}
|
|
105
|
+
)
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
sig do
|
|
109
|
+
override.returns(
|
|
110
|
+
{
|
|
111
|
+
callback_url: String,
|
|
112
|
+
area_code: T.nilable(String),
|
|
113
|
+
default_for_app_calls: T.nilable(T::Boolean),
|
|
114
|
+
number: T.nilable(String),
|
|
115
|
+
sandbox: T::Boolean,
|
|
116
|
+
idempotency_key: String,
|
|
117
|
+
x_profile_id: String,
|
|
118
|
+
request_options: Sentdm::RequestOptions
|
|
119
|
+
}
|
|
120
|
+
)
|
|
121
|
+
end
|
|
122
|
+
def to_hash
|
|
123
|
+
end
|
|
124
|
+
end
|
|
125
|
+
end
|
|
126
|
+
end
|
|
127
|
+
end
|
|
@@ -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
|