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,64 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
module Calls
|
|
6
|
+
# @see Sentdm::Resources::Calls::Participants#update
|
|
7
|
+
class ParticipantUpdateParams < Sentdm::Internal::Type::BaseModel
|
|
8
|
+
extend Sentdm::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Sentdm::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute id
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :id, String
|
|
15
|
+
|
|
16
|
+
# @!attribute participant_id
|
|
17
|
+
#
|
|
18
|
+
# @return [String]
|
|
19
|
+
required :participant_id, String
|
|
20
|
+
|
|
21
|
+
# @!attribute muted
|
|
22
|
+
# true to mute the participant, false to unmute them
|
|
23
|
+
#
|
|
24
|
+
# @return [Boolean, nil]
|
|
25
|
+
optional :muted, Sentdm::Internal::Type::Boolean
|
|
26
|
+
|
|
27
|
+
# @!attribute sandbox
|
|
28
|
+
# Sandbox flag - when true, the operation is simulated without side effects Useful
|
|
29
|
+
# for testing integrations without actual execution
|
|
30
|
+
#
|
|
31
|
+
# @return [Boolean, nil]
|
|
32
|
+
optional :sandbox, Sentdm::Internal::Type::Boolean
|
|
33
|
+
|
|
34
|
+
# @!attribute idempotency_key
|
|
35
|
+
#
|
|
36
|
+
# @return [String, nil]
|
|
37
|
+
optional :idempotency_key, String
|
|
38
|
+
|
|
39
|
+
# @!attribute x_profile_id
|
|
40
|
+
#
|
|
41
|
+
# @return [String, nil]
|
|
42
|
+
optional :x_profile_id, String
|
|
43
|
+
|
|
44
|
+
# @!method initialize(id:, participant_id:, muted: nil, sandbox: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
|
|
45
|
+
# Some parameter documentations has been truncated, see
|
|
46
|
+
# {Sentdm::Models::Calls::ParticipantUpdateParams} for more details.
|
|
47
|
+
#
|
|
48
|
+
# @param id [String]
|
|
49
|
+
#
|
|
50
|
+
# @param participant_id [String]
|
|
51
|
+
#
|
|
52
|
+
# @param muted [Boolean] true to mute the participant, false to unmute them
|
|
53
|
+
#
|
|
54
|
+
# @param sandbox [Boolean] Sandbox flag - when true, the operation is simulated without side effects
|
|
55
|
+
#
|
|
56
|
+
# @param idempotency_key [String]
|
|
57
|
+
#
|
|
58
|
+
# @param x_profile_id [String]
|
|
59
|
+
#
|
|
60
|
+
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}]
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
class CallsList < Sentdm::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute calls
|
|
7
|
+
# The calls on this page, most recent first
|
|
8
|
+
#
|
|
9
|
+
# @return [Array<Sentdm::Models::Call>, nil]
|
|
10
|
+
optional :calls, -> { Sentdm::Internal::Type::ArrayOf[Sentdm::Call] }
|
|
11
|
+
|
|
12
|
+
# @!attribute pagination
|
|
13
|
+
# Pagination metadata for list responses
|
|
14
|
+
#
|
|
15
|
+
# @return [Sentdm::Models::PaginationMeta, nil]
|
|
16
|
+
optional :pagination, -> { Sentdm::PaginationMeta }
|
|
17
|
+
|
|
18
|
+
# @!method initialize(calls: nil, pagination: nil)
|
|
19
|
+
# Paginated list of calls
|
|
20
|
+
#
|
|
21
|
+
# @param calls [Array<Sentdm::Models::Call>] The calls on this page, most recent first
|
|
22
|
+
#
|
|
23
|
+
# @param pagination [Sentdm::Models::PaginationMeta] Pagination metadata for list responses
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
module Channels
|
|
6
|
+
# @see Sentdm::Resources::Channels::Voice#list
|
|
7
|
+
class APIResponseOfListOfVoiceNumber < Sentdm::Internal::Type::BaseModel
|
|
8
|
+
# @!attribute data
|
|
9
|
+
# The response data (null if error)
|
|
10
|
+
#
|
|
11
|
+
# @return [Array<Sentdm::Models::Channels::VoiceNumber>, nil]
|
|
12
|
+
optional :data, -> { Sentdm::Internal::Type::ArrayOf[Sentdm::Channels::VoiceNumber] }, nil?: true
|
|
13
|
+
|
|
14
|
+
# @!attribute error
|
|
15
|
+
# Error information
|
|
16
|
+
#
|
|
17
|
+
# @return [Sentdm::Models::ErrorDetail, nil]
|
|
18
|
+
optional :error, -> { Sentdm::ErrorDetail }, nil?: true
|
|
19
|
+
|
|
20
|
+
# @!attribute meta
|
|
21
|
+
# Request and response metadata
|
|
22
|
+
#
|
|
23
|
+
# @return [Sentdm::Models::APIMeta, nil]
|
|
24
|
+
optional :meta, -> { Sentdm::APIMeta }
|
|
25
|
+
|
|
26
|
+
# @!attribute success
|
|
27
|
+
# Indicates whether the request was successful
|
|
28
|
+
#
|
|
29
|
+
# @return [Boolean, nil]
|
|
30
|
+
optional :success, Sentdm::Internal::Type::Boolean
|
|
31
|
+
|
|
32
|
+
# @!method initialize(data: nil, error: nil, meta: nil, success: nil)
|
|
33
|
+
# Standard API response envelope for all v3 endpoints
|
|
34
|
+
#
|
|
35
|
+
# @param data [Array<Sentdm::Models::Channels::VoiceNumber>, nil] The response data (null if error)
|
|
36
|
+
#
|
|
37
|
+
# @param error [Sentdm::Models::ErrorDetail, nil] Error information
|
|
38
|
+
#
|
|
39
|
+
# @param meta [Sentdm::Models::APIMeta] Request and response metadata
|
|
40
|
+
#
|
|
41
|
+
# @param success [Boolean] Indicates whether the request was successful
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
module Channels
|
|
6
|
+
# @see Sentdm::Resources::Channels::Voice#test_
|
|
7
|
+
class APIResponseOfVoiceCallbackTest < Sentdm::Internal::Type::BaseModel
|
|
8
|
+
# @!attribute data
|
|
9
|
+
# The verdict of a test question sent to your callback URL
|
|
10
|
+
#
|
|
11
|
+
# @return [Sentdm::Models::Channels::VoiceCallbackTest, nil]
|
|
12
|
+
optional :data, -> { Sentdm::Channels::VoiceCallbackTest }, nil?: true
|
|
13
|
+
|
|
14
|
+
# @!attribute error
|
|
15
|
+
# Error information
|
|
16
|
+
#
|
|
17
|
+
# @return [Sentdm::Models::ErrorDetail, nil]
|
|
18
|
+
optional :error, -> { Sentdm::ErrorDetail }, nil?: true
|
|
19
|
+
|
|
20
|
+
# @!attribute meta
|
|
21
|
+
# Request and response metadata
|
|
22
|
+
#
|
|
23
|
+
# @return [Sentdm::Models::APIMeta, nil]
|
|
24
|
+
optional :meta, -> { Sentdm::APIMeta }
|
|
25
|
+
|
|
26
|
+
# @!attribute success
|
|
27
|
+
# Indicates whether the request was successful
|
|
28
|
+
#
|
|
29
|
+
# @return [Boolean, nil]
|
|
30
|
+
optional :success, Sentdm::Internal::Type::Boolean
|
|
31
|
+
|
|
32
|
+
# @!method initialize(data: nil, error: nil, meta: nil, success: nil)
|
|
33
|
+
# Standard API response envelope for all v3 endpoints
|
|
34
|
+
#
|
|
35
|
+
# @param data [Sentdm::Models::Channels::VoiceCallbackTest, nil] The verdict of a test question sent to your callback URL
|
|
36
|
+
#
|
|
37
|
+
# @param error [Sentdm::Models::ErrorDetail, nil] Error information
|
|
38
|
+
#
|
|
39
|
+
# @param meta [Sentdm::Models::APIMeta] Request and response metadata
|
|
40
|
+
#
|
|
41
|
+
# @param success [Boolean] Indicates whether the request was successful
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
module Channels
|
|
6
|
+
# @see Sentdm::Resources::Channels::Voice#retrieve
|
|
7
|
+
class APIResponseOfVoiceNumber < Sentdm::Internal::Type::BaseModel
|
|
8
|
+
# @!attribute data
|
|
9
|
+
# One number the profile carries phone calls on.
|
|
10
|
+
#
|
|
11
|
+
# @return [Sentdm::Models::Channels::VoiceNumber, nil]
|
|
12
|
+
optional :data, -> { Sentdm::Channels::VoiceNumber }, nil?: true
|
|
13
|
+
|
|
14
|
+
# @!attribute error
|
|
15
|
+
# Error information
|
|
16
|
+
#
|
|
17
|
+
# @return [Sentdm::Models::ErrorDetail, nil]
|
|
18
|
+
optional :error, -> { Sentdm::ErrorDetail }, nil?: true
|
|
19
|
+
|
|
20
|
+
# @!attribute meta
|
|
21
|
+
# Request and response metadata
|
|
22
|
+
#
|
|
23
|
+
# @return [Sentdm::Models::APIMeta, nil]
|
|
24
|
+
optional :meta, -> { Sentdm::APIMeta }
|
|
25
|
+
|
|
26
|
+
# @!attribute success
|
|
27
|
+
# Indicates whether the request was successful
|
|
28
|
+
#
|
|
29
|
+
# @return [Boolean, nil]
|
|
30
|
+
optional :success, Sentdm::Internal::Type::Boolean
|
|
31
|
+
|
|
32
|
+
# @!method initialize(data: nil, error: nil, meta: nil, success: nil)
|
|
33
|
+
# Standard API response envelope for all v3 endpoints
|
|
34
|
+
#
|
|
35
|
+
# @param data [Sentdm::Models::Channels::VoiceNumber, nil] One number the profile carries phone calls on.
|
|
36
|
+
#
|
|
37
|
+
# @param error [Sentdm::Models::ErrorDetail, nil] Error information
|
|
38
|
+
#
|
|
39
|
+
# @param meta [Sentdm::Models::APIMeta] Request and response metadata
|
|
40
|
+
#
|
|
41
|
+
# @param success [Boolean] Indicates whether the request was successful
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
module Channels
|
|
6
|
+
# @see Sentdm::Resources::Channels::Voice#create
|
|
7
|
+
class APIResponseOfVoiceNumberCreated < Sentdm::Internal::Type::BaseModel
|
|
8
|
+
# @!attribute data
|
|
9
|
+
# The response data (null if error)
|
|
10
|
+
#
|
|
11
|
+
# @return [Sentdm::Models::Channels::VoiceNumberCreated, nil]
|
|
12
|
+
optional :data, -> { Sentdm::Channels::VoiceNumberCreated }, nil?: true
|
|
13
|
+
|
|
14
|
+
# @!attribute error
|
|
15
|
+
# Error information
|
|
16
|
+
#
|
|
17
|
+
# @return [Sentdm::Models::ErrorDetail, nil]
|
|
18
|
+
optional :error, -> { Sentdm::ErrorDetail }, nil?: true
|
|
19
|
+
|
|
20
|
+
# @!attribute meta
|
|
21
|
+
# Request and response metadata
|
|
22
|
+
#
|
|
23
|
+
# @return [Sentdm::Models::APIMeta, nil]
|
|
24
|
+
optional :meta, -> { Sentdm::APIMeta }
|
|
25
|
+
|
|
26
|
+
# @!attribute success
|
|
27
|
+
# Indicates whether the request was successful
|
|
28
|
+
#
|
|
29
|
+
# @return [Boolean, nil]
|
|
30
|
+
optional :success, Sentdm::Internal::Type::Boolean
|
|
31
|
+
|
|
32
|
+
# @!method initialize(data: nil, error: nil, meta: nil, success: nil)
|
|
33
|
+
# Standard API response envelope for all v3 endpoints
|
|
34
|
+
#
|
|
35
|
+
# @param data [Sentdm::Models::Channels::VoiceNumberCreated, nil] The response data (null if error)
|
|
36
|
+
#
|
|
37
|
+
# @param error [Sentdm::Models::ErrorDetail, nil] Error information
|
|
38
|
+
#
|
|
39
|
+
# @param meta [Sentdm::Models::APIMeta] Request and response metadata
|
|
40
|
+
#
|
|
41
|
+
# @param success [Boolean] Indicates whether the request was successful
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
module Channels
|
|
6
|
+
# @see Sentdm::Resources::Channels::Voice#rotate_secret
|
|
7
|
+
class APIResponseOfVoiceSecret < Sentdm::Internal::Type::BaseModel
|
|
8
|
+
# @!attribute data
|
|
9
|
+
# A freshly rotated callback signing secret
|
|
10
|
+
#
|
|
11
|
+
# @return [Sentdm::Models::Channels::VoiceSecret, nil]
|
|
12
|
+
optional :data, -> { Sentdm::Channels::VoiceSecret }, nil?: true
|
|
13
|
+
|
|
14
|
+
# @!attribute error
|
|
15
|
+
# Error information
|
|
16
|
+
#
|
|
17
|
+
# @return [Sentdm::Models::ErrorDetail, nil]
|
|
18
|
+
optional :error, -> { Sentdm::ErrorDetail }, nil?: true
|
|
19
|
+
|
|
20
|
+
# @!attribute meta
|
|
21
|
+
# Request and response metadata
|
|
22
|
+
#
|
|
23
|
+
# @return [Sentdm::Models::APIMeta, nil]
|
|
24
|
+
optional :meta, -> { Sentdm::APIMeta }
|
|
25
|
+
|
|
26
|
+
# @!attribute success
|
|
27
|
+
# Indicates whether the request was successful
|
|
28
|
+
#
|
|
29
|
+
# @return [Boolean, nil]
|
|
30
|
+
optional :success, Sentdm::Internal::Type::Boolean
|
|
31
|
+
|
|
32
|
+
# @!method initialize(data: nil, error: nil, meta: nil, success: nil)
|
|
33
|
+
# Standard API response envelope for all v3 endpoints
|
|
34
|
+
#
|
|
35
|
+
# @param data [Sentdm::Models::Channels::VoiceSecret, nil] A freshly rotated callback signing secret
|
|
36
|
+
#
|
|
37
|
+
# @param error [Sentdm::Models::ErrorDetail, nil] Error information
|
|
38
|
+
#
|
|
39
|
+
# @param meta [Sentdm::Models::APIMeta] Request and response metadata
|
|
40
|
+
#
|
|
41
|
+
# @param success [Boolean] Indicates whether the request was successful
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
module Channels
|
|
6
|
+
# @see Sentdm::Resources::Channels::Voice#create_token
|
|
7
|
+
class APIResponseOfVoiceToken < Sentdm::Internal::Type::BaseModel
|
|
8
|
+
# @!attribute data
|
|
9
|
+
# A short-lived token your app passes to the voice client SDK to register
|
|
10
|
+
#
|
|
11
|
+
# @return [Sentdm::Models::Channels::VoiceToken, nil]
|
|
12
|
+
optional :data, -> { Sentdm::Channels::VoiceToken }, nil?: true
|
|
13
|
+
|
|
14
|
+
# @!attribute error
|
|
15
|
+
# Error information
|
|
16
|
+
#
|
|
17
|
+
# @return [Sentdm::Models::ErrorDetail, nil]
|
|
18
|
+
optional :error, -> { Sentdm::ErrorDetail }, nil?: true
|
|
19
|
+
|
|
20
|
+
# @!attribute meta
|
|
21
|
+
# Request and response metadata
|
|
22
|
+
#
|
|
23
|
+
# @return [Sentdm::Models::APIMeta, nil]
|
|
24
|
+
optional :meta, -> { Sentdm::APIMeta }
|
|
25
|
+
|
|
26
|
+
# @!attribute success
|
|
27
|
+
# Indicates whether the request was successful
|
|
28
|
+
#
|
|
29
|
+
# @return [Boolean, nil]
|
|
30
|
+
optional :success, Sentdm::Internal::Type::Boolean
|
|
31
|
+
|
|
32
|
+
# @!method initialize(data: nil, error: nil, meta: nil, success: nil)
|
|
33
|
+
# Standard API response envelope for all v3 endpoints
|
|
34
|
+
#
|
|
35
|
+
# @param data [Sentdm::Models::Channels::VoiceToken, nil] A short-lived token your app passes to the voice client SDK to register
|
|
36
|
+
#
|
|
37
|
+
# @param error [Sentdm::Models::ErrorDetail, nil] Error information
|
|
38
|
+
#
|
|
39
|
+
# @param meta [Sentdm::Models::APIMeta] Request and response metadata
|
|
40
|
+
#
|
|
41
|
+
# @param success [Boolean] Indicates whether the request was successful
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
module Channels
|
|
6
|
+
class VoiceCallbackTest < Sentdm::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute answer
|
|
8
|
+
# Your answer as Sent read it, with numbers in E.164 and a missing caller id
|
|
9
|
+
# filled in. Set only when the outcome is ok.
|
|
10
|
+
#
|
|
11
|
+
# @return [Object, nil]
|
|
12
|
+
optional :answer, Sentdm::Internal::Type::Unknown, nil?: true
|
|
13
|
+
|
|
14
|
+
# @!attribute call_id
|
|
15
|
+
# The call id the test question carried. It does not exist anywhere else and
|
|
16
|
+
# cannot be looked up.
|
|
17
|
+
#
|
|
18
|
+
# @return [String, nil]
|
|
19
|
+
optional :call_id, String
|
|
20
|
+
|
|
21
|
+
# @!attribute error
|
|
22
|
+
# Why the test did not end with ok
|
|
23
|
+
#
|
|
24
|
+
# @return [Sentdm::Models::Channels::VoiceCallbackTestErrorInfo, nil]
|
|
25
|
+
optional :error, -> { Sentdm::Channels::VoiceCallbackTestErrorInfo }, nil?: true
|
|
26
|
+
|
|
27
|
+
# @!attribute outcome
|
|
28
|
+
# What happened: ok, timeout, connection_failed, http_error or invalid_answer
|
|
29
|
+
#
|
|
30
|
+
# @return [String, nil]
|
|
31
|
+
optional :outcome, String
|
|
32
|
+
|
|
33
|
+
# @!attribute request
|
|
34
|
+
# The test question exactly as it was sent
|
|
35
|
+
#
|
|
36
|
+
# @return [Sentdm::Models::Channels::VoiceCallbackTestRequestInfo, nil]
|
|
37
|
+
optional :request, -> { Sentdm::Channels::VoiceCallbackTestRequestInfo }, nil?: true
|
|
38
|
+
|
|
39
|
+
# @!attribute response
|
|
40
|
+
# What your endpoint answered
|
|
41
|
+
#
|
|
42
|
+
# @return [Sentdm::Models::Channels::VoiceCallbackTestResponseInfo, nil]
|
|
43
|
+
optional :response, -> { Sentdm::Channels::VoiceCallbackTestResponseInfo }, nil?: true
|
|
44
|
+
|
|
45
|
+
# @!method initialize(answer: nil, call_id: nil, error: nil, outcome: nil, request: nil, response: nil)
|
|
46
|
+
# Some parameter documentations has been truncated, see
|
|
47
|
+
# {Sentdm::Models::Channels::VoiceCallbackTest} for more details.
|
|
48
|
+
#
|
|
49
|
+
# The verdict of a test question sent to your callback URL
|
|
50
|
+
#
|
|
51
|
+
# @param answer [Object, nil] Your answer as Sent read it, with numbers in E.164 and a missing caller id fille
|
|
52
|
+
#
|
|
53
|
+
# @param call_id [String] The call id the test question carried. It does not exist anywhere else and canno
|
|
54
|
+
#
|
|
55
|
+
# @param error [Sentdm::Models::Channels::VoiceCallbackTestErrorInfo, nil] Why the test did not end with ok
|
|
56
|
+
#
|
|
57
|
+
# @param outcome [String] What happened: ok, timeout, connection_failed, http_error or invalid_answer
|
|
58
|
+
#
|
|
59
|
+
# @param request [Sentdm::Models::Channels::VoiceCallbackTestRequestInfo, nil] The test question exactly as it was sent
|
|
60
|
+
#
|
|
61
|
+
# @param response [Sentdm::Models::Channels::VoiceCallbackTestResponseInfo, nil] What your endpoint answered
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
module Channels
|
|
6
|
+
class VoiceCallbackTestErrorInfo < Sentdm::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute message
|
|
8
|
+
# What to fix
|
|
9
|
+
#
|
|
10
|
+
# @return [String, nil]
|
|
11
|
+
optional :message, String
|
|
12
|
+
|
|
13
|
+
# @!attribute path
|
|
14
|
+
# Dotted path of the answer field at fault, such as action.action, when one field
|
|
15
|
+
# is to blame
|
|
16
|
+
#
|
|
17
|
+
# @return [String, nil]
|
|
18
|
+
optional :path, String, nil?: true
|
|
19
|
+
|
|
20
|
+
# @!attribute reason
|
|
21
|
+
# Machine-readable reason, such as timeout, http_error, malformed_json,
|
|
22
|
+
# missing_action or unknown_action
|
|
23
|
+
#
|
|
24
|
+
# @return [String, nil]
|
|
25
|
+
optional :reason, String
|
|
26
|
+
|
|
27
|
+
# @!method initialize(message: nil, path: nil, reason: nil)
|
|
28
|
+
# Some parameter documentations has been truncated, see
|
|
29
|
+
# {Sentdm::Models::Channels::VoiceCallbackTestErrorInfo} for more details.
|
|
30
|
+
#
|
|
31
|
+
# Why the test did not end with ok
|
|
32
|
+
#
|
|
33
|
+
# @param message [String] What to fix
|
|
34
|
+
#
|
|
35
|
+
# @param path [String, nil] Dotted path of the answer field at fault, such as action.action, when one field
|
|
36
|
+
#
|
|
37
|
+
# @param reason [String] Machine-readable reason, such as timeout, http_error, malformed_json, missing_ac
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
module Channels
|
|
6
|
+
class VoiceCallbackTestRequestInfo < Sentdm::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute body
|
|
8
|
+
# The request body byte for byte. This is what the signature covers.
|
|
9
|
+
#
|
|
10
|
+
# @return [String, nil]
|
|
11
|
+
optional :body, String
|
|
12
|
+
|
|
13
|
+
# @!attribute headers
|
|
14
|
+
# Every header Sent added, the signature included, so you can compare against what
|
|
15
|
+
# your endpoint verified. The signing secret itself is never included.
|
|
16
|
+
#
|
|
17
|
+
# @return [Hash{Symbol=>String}, nil]
|
|
18
|
+
optional :headers, Sentdm::Internal::Type::HashOf[String]
|
|
19
|
+
|
|
20
|
+
# @!attribute url
|
|
21
|
+
# The callback URL that was called
|
|
22
|
+
#
|
|
23
|
+
# @return [String, nil]
|
|
24
|
+
optional :url, String
|
|
25
|
+
|
|
26
|
+
# @!method initialize(body: nil, headers: nil, url: nil)
|
|
27
|
+
# Some parameter documentations has been truncated, see
|
|
28
|
+
# {Sentdm::Models::Channels::VoiceCallbackTestRequestInfo} for more details.
|
|
29
|
+
#
|
|
30
|
+
# The test question exactly as it was sent
|
|
31
|
+
#
|
|
32
|
+
# @param body [String] The request body byte for byte. This is what the signature covers.
|
|
33
|
+
#
|
|
34
|
+
# @param headers [Hash{Symbol=>String}] Every header Sent added, the signature included, so you can compare against what
|
|
35
|
+
#
|
|
36
|
+
# @param url [String] The callback URL that was called
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
module Channels
|
|
6
|
+
class VoiceCallbackTestResponseInfo < Sentdm::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute body
|
|
8
|
+
# The start of the raw response body, capped at 2048 characters
|
|
9
|
+
#
|
|
10
|
+
# @return [String, nil]
|
|
11
|
+
optional :body, String, nil?: true
|
|
12
|
+
|
|
13
|
+
# @!attribute status_code
|
|
14
|
+
# The HTTP status your endpoint returned
|
|
15
|
+
#
|
|
16
|
+
# @return [Integer, nil]
|
|
17
|
+
optional :status_code, Integer
|
|
18
|
+
|
|
19
|
+
# @!method initialize(body: nil, status_code: nil)
|
|
20
|
+
# What your endpoint answered
|
|
21
|
+
#
|
|
22
|
+
# @param body [String, nil] The start of the raw response body, capped at 2048 characters
|
|
23
|
+
#
|
|
24
|
+
# @param status_code [Integer] The HTTP status your endpoint returned
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
module Channels
|
|
6
|
+
# @see Sentdm::Resources::Channels::Voice#create
|
|
7
|
+
class VoiceCreateParams < Sentdm::Internal::Type::BaseModel
|
|
8
|
+
extend Sentdm::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Sentdm::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute callback_url
|
|
12
|
+
# Where Sent asks what to do with each call on this number: an absolute HTTP or
|
|
13
|
+
# HTTPS URL on a public host. A signed question is POSTed here when a call arrives
|
|
14
|
+
# or a caller presses a key, and the answer decides the call. Every question is
|
|
15
|
+
# signed with the callback_secret the response returns, the same way your webhooks
|
|
16
|
+
# are signed. Turning the number on again with a different URL replaces it and
|
|
17
|
+
# keeps the secret.
|
|
18
|
+
#
|
|
19
|
+
# @return [String]
|
|
20
|
+
required :callback_url, String
|
|
21
|
+
|
|
22
|
+
# @!attribute area_code
|
|
23
|
+
# The US area code a new number should be in, as 212. Only for a request that
|
|
24
|
+
# leaves number out — sending both says two different things about which number to
|
|
25
|
+
# use, and is refused. Omit it too and the number comes from anywhere in the
|
|
26
|
+
# country.
|
|
27
|
+
#
|
|
28
|
+
# @return [String, nil]
|
|
29
|
+
optional :area_code, String, nil?: true
|
|
30
|
+
|
|
31
|
+
# @!attribute default_for_app_calls
|
|
32
|
+
# Make this the line app-originated calls are placed from when a voice token names
|
|
33
|
+
# no number. Omit it and your first voice number takes that role; a later one
|
|
34
|
+
# leaves it where it is.
|
|
35
|
+
#
|
|
36
|
+
# @return [Boolean, nil]
|
|
37
|
+
optional :default_for_app_calls, Sentdm::Internal::Type::Boolean, nil?: true
|
|
38
|
+
|
|
39
|
+
# @!attribute number
|
|
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
|
+
#
|
|
44
|
+
# @return [String, nil]
|
|
45
|
+
optional :number, String, nil?: true
|
|
46
|
+
|
|
47
|
+
# @!attribute sandbox
|
|
48
|
+
# Sandbox flag - when true, the operation is simulated without side effects Useful
|
|
49
|
+
# for testing integrations without actual execution
|
|
50
|
+
#
|
|
51
|
+
# @return [Boolean, nil]
|
|
52
|
+
optional :sandbox, Sentdm::Internal::Type::Boolean
|
|
53
|
+
|
|
54
|
+
# @!attribute idempotency_key
|
|
55
|
+
#
|
|
56
|
+
# @return [String, nil]
|
|
57
|
+
optional :idempotency_key, String
|
|
58
|
+
|
|
59
|
+
# @!attribute x_profile_id
|
|
60
|
+
#
|
|
61
|
+
# @return [String, nil]
|
|
62
|
+
optional :x_profile_id, String
|
|
63
|
+
|
|
64
|
+
# @!method initialize(callback_url:, area_code: nil, default_for_app_calls: nil, number: nil, sandbox: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
|
|
65
|
+
# Some parameter documentations has been truncated, see
|
|
66
|
+
# {Sentdm::Models::Channels::VoiceCreateParams} for more details.
|
|
67
|
+
#
|
|
68
|
+
# @param callback_url [String] Where Sent asks what to do with each call on this number: an absolute HTTP or HT
|
|
69
|
+
#
|
|
70
|
+
# @param area_code [String, nil] The US area code a new number should be in, as 212. Only for a request that leav
|
|
71
|
+
#
|
|
72
|
+
# @param default_for_app_calls [Boolean, nil] Make this the line app-originated calls are placed from when a voice token names
|
|
73
|
+
#
|
|
74
|
+
# @param number [String, nil] One of your phone numbers, in E.164 format. Leave the field out entirely to be g
|
|
75
|
+
#
|
|
76
|
+
# @param sandbox [Boolean] Sandbox flag - when true, the operation is simulated without side effects
|
|
77
|
+
#
|
|
78
|
+
# @param idempotency_key [String]
|
|
79
|
+
#
|
|
80
|
+
# @param x_profile_id [String]
|
|
81
|
+
#
|
|
82
|
+
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}]
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
end
|