sentdm 0.38.1 → 0.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/README.md +1 -1
- data/lib/sentdm/client.rb +3 -20
- data/lib/sentdm/models/call_event_payload.rb +4 -3
- data/lib/sentdm/models/message_send_params.rb +8 -1
- data/lib/sentdm/models/template.rb +6 -5
- data/lib/sentdm/models/template_body.rb +8 -8
- data/lib/sentdm/models/{calls/api_response_of_list_of_call_participant.rb → voice/api_response_of_call.rb} +7 -7
- data/lib/sentdm/models/voice/api_response_of_call_recordings.rb +45 -0
- data/lib/sentdm/models/voice/api_response_of_calls_list.rb +44 -0
- data/lib/sentdm/models/{channels → voice}/api_response_of_voice_token.rb +5 -5
- data/lib/sentdm/models/voice/call.rb +149 -0
- data/lib/sentdm/models/{calls/participant_remove_params.rb → voice/call_hangup_params.rb} +8 -8
- data/lib/sentdm/models/voice/call_list_params.rb +85 -0
- data/lib/sentdm/models/{calls/participant_remove_all_params.rb → voice/call_list_recordings_params.rb} +3 -3
- data/lib/sentdm/models/voice/call_party.rb +33 -0
- data/lib/sentdm/models/{calls/participant_update_params.rb → voice/call_record_params.rb} +10 -17
- data/lib/sentdm/models/voice/call_recording.rb +40 -0
- data/lib/sentdm/models/voice/call_recordings.rb +26 -0
- data/lib/sentdm/models/{calls/participant_list_params.rb → voice/call_retrieve_params.rb} +3 -3
- data/lib/sentdm/models/voice/call_timeline_entry.rb +28 -0
- data/lib/sentdm/models/voice/calls/api_response_of_list_of_call_participant.rb +51 -0
- data/lib/sentdm/models/voice/calls/call_participant.rb +62 -0
- data/lib/sentdm/models/voice/calls/call_participant_target.rb +32 -0
- data/lib/sentdm/models/voice/calls/participant_add_params.rb +68 -0
- data/lib/sentdm/models/voice/calls/participant_list_params.rb +30 -0
- data/lib/sentdm/models/voice/calls/participant_remove_all_params.rb +30 -0
- data/lib/sentdm/models/voice/calls/participant_remove_params.rb +36 -0
- data/lib/sentdm/models/voice/calls/participant_update_params.rb +66 -0
- data/lib/sentdm/models/voice/calls_list.rb +28 -0
- data/lib/sentdm/models/{channels/voice_create_token_params.rb → voice/token_create_params.rb} +4 -4
- data/lib/sentdm/models/{channels → voice}/voice_token.rb +9 -3
- data/lib/sentdm/models.rb +2 -30
- data/lib/sentdm/resources/channels/voice.rb +13 -56
- data/lib/sentdm/resources/channels.rb +2 -2
- data/lib/sentdm/resources/voice/calls/participants.rb +233 -0
- data/lib/sentdm/resources/voice/calls.rb +238 -0
- data/lib/sentdm/resources/voice/tokens.rb +75 -0
- data/lib/sentdm/resources/voice.rb +56 -0
- data/lib/sentdm/version.rb +1 -1
- data/lib/sentdm.rb +30 -28
- data/rbi/sentdm/client.rbi +2 -19
- data/rbi/sentdm/models/call_event_payload.rbi +6 -4
- data/rbi/sentdm/models/message_send_params.rbi +16 -2
- data/rbi/sentdm/models/template.rbi +12 -10
- data/rbi/sentdm/models/template_body.rbi +12 -12
- data/rbi/sentdm/models/voice/api_response_of_call.rbi +76 -0
- data/rbi/sentdm/models/voice/api_response_of_call_recordings.rbi +81 -0
- data/rbi/sentdm/models/{calls/api_response_of_list_of_call_participant.rbi → voice/api_response_of_calls_list.rbi} +12 -9
- data/rbi/sentdm/models/{channels → voice}/api_response_of_voice_token.rbi +6 -8
- data/rbi/sentdm/models/voice/call.rbi +196 -0
- data/rbi/sentdm/models/{calls/participant_remove_params.rbi → voice/call_hangup_params.rbi} +11 -11
- data/rbi/sentdm/models/voice/call_list_params.rbi +114 -0
- data/rbi/sentdm/models/{calls/participant_list_params.rbi → voice/call_list_recordings_params.rbi} +3 -3
- data/rbi/sentdm/models/voice/call_party.rbi +47 -0
- data/rbi/sentdm/models/{calls/participant_update_params.rbi → voice/call_record_params.rbi} +12 -21
- data/rbi/sentdm/models/voice/call_recording.rbi +63 -0
- data/rbi/sentdm/models/voice/call_recordings.rbi +49 -0
- data/rbi/sentdm/models/{calls/participant_remove_all_params.rbi → voice/call_retrieve_params.rbi} +3 -6
- data/rbi/sentdm/models/voice/call_timeline_entry.rbi +44 -0
- data/rbi/sentdm/models/voice/calls/api_response_of_list_of_call_participant.rbi +84 -0
- data/rbi/sentdm/models/voice/calls/call_participant.rbi +97 -0
- data/rbi/sentdm/models/voice/calls/call_participant_target.rbi +49 -0
- data/rbi/sentdm/models/voice/calls/participant_add_params.rbi +104 -0
- data/rbi/sentdm/models/voice/calls/participant_list_params.rbi +53 -0
- data/rbi/sentdm/models/voice/calls/participant_remove_all_params.rbi +53 -0
- data/rbi/sentdm/models/voice/calls/participant_remove_params.rbi +63 -0
- data/rbi/sentdm/models/voice/calls/participant_update_params.rbi +96 -0
- data/rbi/sentdm/models/voice/calls_list.rbi +54 -0
- data/rbi/sentdm/models/{channels/voice_create_token_params.rbi → voice/token_create_params.rbi} +3 -6
- data/rbi/sentdm/models/{channels → voice}/voice_token.rbi +8 -4
- data/rbi/sentdm/models.rbi +2 -30
- data/rbi/sentdm/resources/channels/voice.rbi +13 -56
- data/rbi/sentdm/resources/channels.rbi +2 -2
- data/rbi/sentdm/resources/messages.rbi +8 -1
- data/rbi/sentdm/resources/voice/calls/participants.rbi +201 -0
- data/rbi/sentdm/resources/voice/calls.rbi +209 -0
- data/rbi/sentdm/resources/voice/tokens.rbi +73 -0
- data/rbi/sentdm/resources/voice.rbi +52 -0
- data/sig/sentdm/client.rbs +1 -1
- data/sig/sentdm/models/{calls/api_response_of_list_of_call_participant.rbs → voice/api_response_of_call.rbs} +7 -7
- data/sig/sentdm/models/voice/api_response_of_call_recordings.rbs +41 -0
- data/sig/sentdm/models/voice/api_response_of_calls_list.rbs +41 -0
- data/sig/sentdm/models/{channels → voice}/api_response_of_voice_token.rbs +5 -5
- data/sig/sentdm/models/voice/call.rbs +110 -0
- data/sig/sentdm/models/{calls/participant_remove_params.rbs → voice/call_hangup_params.rbs} +8 -8
- data/sig/sentdm/models/voice/call_list_params.rbs +69 -0
- data/sig/sentdm/models/{calls/participant_remove_all_params.rbs → voice/call_list_recordings_params.rbs} +6 -8
- data/sig/sentdm/models/voice/call_party.rbs +19 -0
- data/sig/sentdm/models/{calls/participant_update_params.rbs → voice/call_record_params.rbs} +8 -13
- data/sig/sentdm/models/voice/call_recording.rbs +34 -0
- data/sig/sentdm/models/voice/call_recordings.rbs +22 -0
- data/sig/sentdm/models/{calls/participant_list_params.rbs → voice/call_retrieve_params.rbs} +3 -3
- data/sig/sentdm/models/voice/call_timeline_entry.rbs +21 -0
- data/sig/sentdm/models/voice/calls/api_response_of_list_of_call_participant.rbs +43 -0
- data/sig/sentdm/models/voice/calls/call_participant.rbs +54 -0
- data/sig/sentdm/models/voice/calls/call_participant_target.rbs +25 -0
- data/sig/sentdm/models/voice/calls/participant_add_params.rbs +65 -0
- data/sig/sentdm/models/voice/calls/participant_list_params.rbs +34 -0
- data/sig/sentdm/models/voice/calls/participant_remove_all_params.rbs +36 -0
- data/sig/sentdm/models/voice/calls/participant_remove_params.rbs +42 -0
- data/sig/sentdm/models/voice/calls/participant_update_params.rbs +63 -0
- data/sig/sentdm/models/voice/calls_list.rbs +33 -0
- data/sig/sentdm/models/{channels/voice_create_token_params.rbs → voice/token_create_params.rbs} +3 -3
- data/sig/sentdm/models/{channels → voice}/voice_token.rbs +3 -1
- data/sig/sentdm/models.rbs +2 -30
- data/sig/sentdm/resources/channels/voice.rbs +0 -10
- data/sig/sentdm/resources/voice/calls/participants.rbs +52 -0
- data/sig/sentdm/resources/{calls/participants.rbs → voice/calls.rbs} +23 -21
- data/sig/sentdm/resources/voice/tokens.rbs +19 -0
- data/sig/sentdm/resources/voice.rbs +11 -0
- metadata +89 -83
- data/lib/sentdm/models/api_response_of_call.rb +0 -43
- data/lib/sentdm/models/api_response_of_call_recordings.rb +0 -43
- data/lib/sentdm/models/api_response_of_calls_list.rb +0 -42
- data/lib/sentdm/models/call.rb +0 -134
- data/lib/sentdm/models/call_hangup_params.rb +0 -32
- data/lib/sentdm/models/call_list_params.rb +0 -83
- data/lib/sentdm/models/call_list_recordings_params.rb +0 -26
- data/lib/sentdm/models/call_party.rb +0 -31
- data/lib/sentdm/models/call_record_params.rb +0 -55
- data/lib/sentdm/models/call_recording.rb +0 -38
- data/lib/sentdm/models/call_recordings.rb +0 -24
- data/lib/sentdm/models/call_retrieve_params.rb +0 -26
- data/lib/sentdm/models/call_timeline_entry.rb +0 -26
- data/lib/sentdm/models/calls/call_participant.rb +0 -60
- data/lib/sentdm/models/calls/call_participant_target.rb +0 -30
- data/lib/sentdm/models/calls/participant_add_params.rb +0 -66
- data/lib/sentdm/models/calls_list.rb +0 -26
- data/lib/sentdm/resources/calls/participants.rb +0 -231
- data/lib/sentdm/resources/calls.rb +0 -236
- data/rbi/sentdm/models/api_response_of_call.rbi +0 -74
- data/rbi/sentdm/models/api_response_of_call_recordings.rbi +0 -74
- data/rbi/sentdm/models/api_response_of_calls_list.rbi +0 -74
- data/rbi/sentdm/models/call.rbi +0 -179
- data/rbi/sentdm/models/call_hangup_params.rbi +0 -59
- data/rbi/sentdm/models/call_list_params.rbi +0 -112
- data/rbi/sentdm/models/call_list_recordings_params.rbi +0 -46
- data/rbi/sentdm/models/call_party.rbi +0 -41
- data/rbi/sentdm/models/call_record_params.rbi +0 -83
- data/rbi/sentdm/models/call_recording.rbi +0 -59
- data/rbi/sentdm/models/call_recordings.rbi +0 -39
- data/rbi/sentdm/models/call_retrieve_params.rbi +0 -46
- data/rbi/sentdm/models/call_timeline_entry.rbi +0 -40
- data/rbi/sentdm/models/calls/call_participant.rbi +0 -92
- data/rbi/sentdm/models/calls/call_participant_target.rbi +0 -47
- data/rbi/sentdm/models/calls/participant_add_params.rbi +0 -98
- data/rbi/sentdm/models/calls_list.rbi +0 -47
- data/rbi/sentdm/resources/calls/participants.rbi +0 -199
- data/rbi/sentdm/resources/calls.rbi +0 -207
- data/sig/sentdm/models/api_response_of_call.rbs +0 -39
- data/sig/sentdm/models/api_response_of_call_recordings.rbs +0 -39
- data/sig/sentdm/models/api_response_of_calls_list.rbs +0 -39
- data/sig/sentdm/models/call.rbs +0 -101
- data/sig/sentdm/models/call_hangup_params.rbs +0 -38
- data/sig/sentdm/models/call_list_params.rbs +0 -67
- data/sig/sentdm/models/call_list_recordings_params.rbs +0 -30
- data/sig/sentdm/models/call_party.rbs +0 -17
- data/sig/sentdm/models/call_record_params.rbs +0 -54
- data/sig/sentdm/models/call_recording.rbs +0 -32
- data/sig/sentdm/models/call_recordings.rbs +0 -17
- data/sig/sentdm/models/call_retrieve_params.rbs +0 -30
- data/sig/sentdm/models/call_timeline_entry.rbs +0 -19
- data/sig/sentdm/models/calls/call_participant.rbs +0 -52
- data/sig/sentdm/models/calls/call_participant_target.rbs +0 -23
- data/sig/sentdm/models/calls/participant_add_params.rbs +0 -63
- data/sig/sentdm/models/calls_list.rbs +0 -26
- data/sig/sentdm/resources/calls.rbs +0 -50
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Resources
|
|
5
|
+
class Voice
|
|
6
|
+
# Phone calls from the numbers you hold, driven by your own callback URL.
|
|
7
|
+
#
|
|
8
|
+
# `POST /v3/channels/voice` enables a number for calls, with the callback URL Sent
|
|
9
|
+
# asks what to do with each call on it, and `POST /v3/voice/tokens` mints a
|
|
10
|
+
# short-lived token that lets a user of your app place and receive calls as that
|
|
11
|
+
# number. When a call arrives or a caller presses a key, a signed question is
|
|
12
|
+
# POSTed to the callback URL and the answer decides the call;
|
|
13
|
+
# `POST /v3/channels/voice/{number}/test` checks the URL answers the way we need
|
|
14
|
+
# before a real call reaches it, and
|
|
15
|
+
# `POST /v3/channels/voice/{number}/rotate-secret` replaces the signing secret.
|
|
16
|
+
# The call events themselves (`call.completed` and the rest) arrive through your
|
|
17
|
+
# webhooks.
|
|
18
|
+
#
|
|
19
|
+
# Every call is a record under `/v3/voice/calls`: read it, list its recordings
|
|
20
|
+
# once one is ready, hang it up, start or stop recording, and add, mute or remove
|
|
21
|
+
# conference participants while it is live. A leg to a phone number runs for at
|
|
22
|
+
# most what your balance affords at the destination's rate.
|
|
23
|
+
class Tokens
|
|
24
|
+
# Some parameter documentations has been truncated, see
|
|
25
|
+
# {Sentdm::Models::Voice::TokenCreateParams} for more details.
|
|
26
|
+
#
|
|
27
|
+
# Mints a short-lived token for one of your app users. Call this from your backend
|
|
28
|
+
# and return the token to your app, which passes it to the voice client SDK to
|
|
29
|
+
# register. The identity is bound to the given number, or to your default app-call
|
|
30
|
+
# number when omitted, and calls placed by that identity are routed through the
|
|
31
|
+
# bound number. Minting again re-binds the identity, so an identity can move
|
|
32
|
+
# between numbers.
|
|
33
|
+
#
|
|
34
|
+
# @overload create(identity: nil, number: nil, sandbox: nil, ttl: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
|
|
35
|
+
#
|
|
36
|
+
# @param identity [String] Body param: Your identifier for the app user, such as an agent or account id. Le
|
|
37
|
+
#
|
|
38
|
+
# @param number [String, nil] Body param: One of your voice-enabled phone numbers in E.164 format. Calls place
|
|
39
|
+
#
|
|
40
|
+
# @param sandbox [Boolean] Body param: Sandbox flag - when true, the operation is simulated without side ef
|
|
41
|
+
#
|
|
42
|
+
# @param ttl [Integer, nil] Body param: Token lifetime in seconds. Defaults to 600 and cannot exceed 3600.
|
|
43
|
+
#
|
|
44
|
+
# @param idempotency_key [String] Header param: Unique key to ensure idempotent request processing. Must be 1-255
|
|
45
|
+
#
|
|
46
|
+
# @param x_profile_id [String] Header param: Profile UUID to scope the request to a child profile. Only organiz
|
|
47
|
+
#
|
|
48
|
+
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
49
|
+
#
|
|
50
|
+
# @return [Sentdm::Models::Voice::APIResponseOfVoiceToken]
|
|
51
|
+
#
|
|
52
|
+
# @see Sentdm::Models::Voice::TokenCreateParams
|
|
53
|
+
def create(params = {})
|
|
54
|
+
parsed, options = Sentdm::Voice::TokenCreateParams.dump_request(params)
|
|
55
|
+
header_params = {idempotency_key: "idempotency-key", x_profile_id: "x-profile-id"}
|
|
56
|
+
@client.request(
|
|
57
|
+
method: :post,
|
|
58
|
+
path: "v3/voice/tokens",
|
|
59
|
+
headers: parsed.slice(*header_params.keys).transform_keys(header_params),
|
|
60
|
+
body: parsed.except(*header_params.keys),
|
|
61
|
+
model: Sentdm::Voice::APIResponseOfVoiceToken,
|
|
62
|
+
options: options
|
|
63
|
+
)
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# @api private
|
|
67
|
+
#
|
|
68
|
+
# @param client [Sentdm::Client]
|
|
69
|
+
def initialize(client:)
|
|
70
|
+
@client = client
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Resources
|
|
5
|
+
class Voice
|
|
6
|
+
# Phone calls from the numbers you hold, driven by your own callback URL.
|
|
7
|
+
#
|
|
8
|
+
# `POST /v3/channels/voice` enables a number for calls, with the callback URL Sent
|
|
9
|
+
# asks what to do with each call on it, and `POST /v3/voice/tokens` mints a
|
|
10
|
+
# short-lived token that lets a user of your app place and receive calls as that
|
|
11
|
+
# number. When a call arrives or a caller presses a key, a signed question is
|
|
12
|
+
# POSTed to the callback URL and the answer decides the call;
|
|
13
|
+
# `POST /v3/channels/voice/{number}/test` checks the URL answers the way we need
|
|
14
|
+
# before a real call reaches it, and
|
|
15
|
+
# `POST /v3/channels/voice/{number}/rotate-secret` replaces the signing secret.
|
|
16
|
+
# The call events themselves (`call.completed` and the rest) arrive through your
|
|
17
|
+
# webhooks.
|
|
18
|
+
#
|
|
19
|
+
# Every call is a record under `/v3/voice/calls`: read it, list its recordings
|
|
20
|
+
# once one is ready, hang it up, start or stop recording, and add, mute or remove
|
|
21
|
+
# conference participants while it is live. A leg to a phone number runs for at
|
|
22
|
+
# most what your balance affords at the destination's rate.
|
|
23
|
+
# @return [Sentdm::Resources::Voice::Calls]
|
|
24
|
+
attr_reader :calls
|
|
25
|
+
|
|
26
|
+
# Phone calls from the numbers you hold, driven by your own callback URL.
|
|
27
|
+
#
|
|
28
|
+
# `POST /v3/channels/voice` enables a number for calls, with the callback URL Sent
|
|
29
|
+
# asks what to do with each call on it, and `POST /v3/voice/tokens` mints a
|
|
30
|
+
# short-lived token that lets a user of your app place and receive calls as that
|
|
31
|
+
# number. When a call arrives or a caller presses a key, a signed question is
|
|
32
|
+
# POSTed to the callback URL and the answer decides the call;
|
|
33
|
+
# `POST /v3/channels/voice/{number}/test` checks the URL answers the way we need
|
|
34
|
+
# before a real call reaches it, and
|
|
35
|
+
# `POST /v3/channels/voice/{number}/rotate-secret` replaces the signing secret.
|
|
36
|
+
# The call events themselves (`call.completed` and the rest) arrive through your
|
|
37
|
+
# webhooks.
|
|
38
|
+
#
|
|
39
|
+
# Every call is a record under `/v3/voice/calls`: read it, list its recordings
|
|
40
|
+
# once one is ready, hang it up, start or stop recording, and add, mute or remove
|
|
41
|
+
# conference participants while it is live. A leg to a phone number runs for at
|
|
42
|
+
# most what your balance affords at the destination's rate.
|
|
43
|
+
# @return [Sentdm::Resources::Voice::Tokens]
|
|
44
|
+
attr_reader :tokens
|
|
45
|
+
|
|
46
|
+
# @api private
|
|
47
|
+
#
|
|
48
|
+
# @param client [Sentdm::Client]
|
|
49
|
+
def initialize(client:)
|
|
50
|
+
@client = client
|
|
51
|
+
@calls = Sentdm::Resources::Voice::Calls.new(client: client)
|
|
52
|
+
@tokens = Sentdm::Resources::Voice::Tokens.new(client: client)
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
data/lib/sentdm/version.rb
CHANGED
data/lib/sentdm.rb
CHANGED
|
@@ -58,13 +58,10 @@ require_relative "sentdm/internal/conversations_page"
|
|
|
58
58
|
require_relative "sentdm/internal/templates_page"
|
|
59
59
|
require_relative "sentdm/internal/webhook_events_page"
|
|
60
60
|
require_relative "sentdm/internal/webhooks_page"
|
|
61
|
-
require_relative "sentdm/models/mutation_request"
|
|
62
61
|
require_relative "sentdm/models/channels/voice_number"
|
|
62
|
+
require_relative "sentdm/models/mutation_request"
|
|
63
63
|
require_relative "sentdm/models/template_body_content"
|
|
64
64
|
require_relative "sentdm/models/api_meta"
|
|
65
|
-
require_relative "sentdm/models/api_response_of_call"
|
|
66
|
-
require_relative "sentdm/models/api_response_of_call_recordings"
|
|
67
|
-
require_relative "sentdm/models/api_response_of_calls_list"
|
|
68
65
|
require_relative "sentdm/models/api_response_of_contact"
|
|
69
66
|
require_relative "sentdm/models/api_response_of_contact_message_summary"
|
|
70
67
|
require_relative "sentdm/models/api_response_of_conversation_messages_list"
|
|
@@ -78,27 +75,8 @@ require_relative "sentdm/models/brand_business_info"
|
|
|
78
75
|
require_relative "sentdm/models/brand_compliance_info"
|
|
79
76
|
require_relative "sentdm/models/brand_contact_info"
|
|
80
77
|
require_relative "sentdm/models/brands_brand_data"
|
|
81
|
-
require_relative "sentdm/models/call"
|
|
82
78
|
require_relative "sentdm/models/call_event"
|
|
83
79
|
require_relative "sentdm/models/call_event_payload"
|
|
84
|
-
require_relative "sentdm/models/call_hangup_params"
|
|
85
|
-
require_relative "sentdm/models/call_list_params"
|
|
86
|
-
require_relative "sentdm/models/call_list_recordings_params"
|
|
87
|
-
require_relative "sentdm/models/call_party"
|
|
88
|
-
require_relative "sentdm/models/call_recording"
|
|
89
|
-
require_relative "sentdm/models/call_recordings"
|
|
90
|
-
require_relative "sentdm/models/call_record_params"
|
|
91
|
-
require_relative "sentdm/models/call_retrieve_params"
|
|
92
|
-
require_relative "sentdm/models/calls/api_response_of_list_of_call_participant"
|
|
93
|
-
require_relative "sentdm/models/calls/call_participant"
|
|
94
|
-
require_relative "sentdm/models/calls/call_participant_target"
|
|
95
|
-
require_relative "sentdm/models/calls/participant_add_params"
|
|
96
|
-
require_relative "sentdm/models/calls/participant_list_params"
|
|
97
|
-
require_relative "sentdm/models/calls/participant_remove_all_params"
|
|
98
|
-
require_relative "sentdm/models/calls/participant_remove_params"
|
|
99
|
-
require_relative "sentdm/models/calls/participant_update_params"
|
|
100
|
-
require_relative "sentdm/models/calls_list"
|
|
101
|
-
require_relative "sentdm/models/call_timeline_entry"
|
|
102
80
|
require_relative "sentdm/models/channel_event"
|
|
103
81
|
require_relative "sentdm/models/channel_event_payload"
|
|
104
82
|
require_relative "sentdm/models/channels/api_response_of_list_of_voice_number"
|
|
@@ -106,20 +84,17 @@ require_relative "sentdm/models/channels/api_response_of_voice_callback_test"
|
|
|
106
84
|
require_relative "sentdm/models/channels/api_response_of_voice_number"
|
|
107
85
|
require_relative "sentdm/models/channels/api_response_of_voice_number_created"
|
|
108
86
|
require_relative "sentdm/models/channels/api_response_of_voice_secret"
|
|
109
|
-
require_relative "sentdm/models/channels/api_response_of_voice_token"
|
|
110
87
|
require_relative "sentdm/models/channels/voice_callback_test"
|
|
111
88
|
require_relative "sentdm/models/channels/voice_callback_test_error_info"
|
|
112
89
|
require_relative "sentdm/models/channels/voice_callback_test_request_info"
|
|
113
90
|
require_relative "sentdm/models/channels/voice_callback_test_response_info"
|
|
114
91
|
require_relative "sentdm/models/channels/voice_create_params"
|
|
115
|
-
require_relative "sentdm/models/channels/voice_create_token_params"
|
|
116
92
|
require_relative "sentdm/models/channels/voice_list_params"
|
|
117
93
|
require_relative "sentdm/models/channels/voice_number_created"
|
|
118
94
|
require_relative "sentdm/models/channels/voice_retrieve_params"
|
|
119
95
|
require_relative "sentdm/models/channels/voice_rotate_secret_params"
|
|
120
96
|
require_relative "sentdm/models/channels/voice_secret"
|
|
121
97
|
require_relative "sentdm/models/channels/voice_test_params"
|
|
122
|
-
require_relative "sentdm/models/channels/voice_token"
|
|
123
98
|
require_relative "sentdm/models/channels/voice_update_params"
|
|
124
99
|
require_relative "sentdm/models/contact_create_params"
|
|
125
100
|
require_relative "sentdm/models/contact_delete_params"
|
|
@@ -197,6 +172,31 @@ require_relative "sentdm/models/user_remove_params"
|
|
|
197
172
|
require_relative "sentdm/models/user_response"
|
|
198
173
|
require_relative "sentdm/models/user_retrieve_params"
|
|
199
174
|
require_relative "sentdm/models/user_update_role_params"
|
|
175
|
+
require_relative "sentdm/models/voice/api_response_of_call"
|
|
176
|
+
require_relative "sentdm/models/voice/api_response_of_call_recordings"
|
|
177
|
+
require_relative "sentdm/models/voice/api_response_of_calls_list"
|
|
178
|
+
require_relative "sentdm/models/voice/api_response_of_voice_token"
|
|
179
|
+
require_relative "sentdm/models/voice/call"
|
|
180
|
+
require_relative "sentdm/models/voice/call_hangup_params"
|
|
181
|
+
require_relative "sentdm/models/voice/call_list_params"
|
|
182
|
+
require_relative "sentdm/models/voice/call_list_recordings_params"
|
|
183
|
+
require_relative "sentdm/models/voice/call_party"
|
|
184
|
+
require_relative "sentdm/models/voice/call_recording"
|
|
185
|
+
require_relative "sentdm/models/voice/call_recordings"
|
|
186
|
+
require_relative "sentdm/models/voice/call_record_params"
|
|
187
|
+
require_relative "sentdm/models/voice/call_retrieve_params"
|
|
188
|
+
require_relative "sentdm/models/voice/calls/api_response_of_list_of_call_participant"
|
|
189
|
+
require_relative "sentdm/models/voice/calls/call_participant"
|
|
190
|
+
require_relative "sentdm/models/voice/calls/call_participant_target"
|
|
191
|
+
require_relative "sentdm/models/voice/calls/participant_add_params"
|
|
192
|
+
require_relative "sentdm/models/voice/calls/participant_list_params"
|
|
193
|
+
require_relative "sentdm/models/voice/calls/participant_remove_all_params"
|
|
194
|
+
require_relative "sentdm/models/voice/calls/participant_remove_params"
|
|
195
|
+
require_relative "sentdm/models/voice/calls/participant_update_params"
|
|
196
|
+
require_relative "sentdm/models/voice/calls_list"
|
|
197
|
+
require_relative "sentdm/models/voice/call_timeline_entry"
|
|
198
|
+
require_relative "sentdm/models/voice/token_create_params"
|
|
199
|
+
require_relative "sentdm/models/voice/voice_token"
|
|
200
200
|
require_relative "sentdm/models/webhook_create_params"
|
|
201
201
|
require_relative "sentdm/models/webhook_delete_params"
|
|
202
202
|
require_relative "sentdm/models/webhook_event_type"
|
|
@@ -214,8 +214,6 @@ require_relative "sentdm/models/webhook_test_response"
|
|
|
214
214
|
require_relative "sentdm/models/webhook_toggle_status_params"
|
|
215
215
|
require_relative "sentdm/models/webhook_update_params"
|
|
216
216
|
require_relative "sentdm/models"
|
|
217
|
-
require_relative "sentdm/resources/calls"
|
|
218
|
-
require_relative "sentdm/resources/calls/participants"
|
|
219
217
|
require_relative "sentdm/resources/channels"
|
|
220
218
|
require_relative "sentdm/resources/channels/voice"
|
|
221
219
|
require_relative "sentdm/resources/contacts"
|
|
@@ -227,4 +225,8 @@ require_relative "sentdm/resources/profiles"
|
|
|
227
225
|
require_relative "sentdm/resources/profiles/campaigns"
|
|
228
226
|
require_relative "sentdm/resources/templates"
|
|
229
227
|
require_relative "sentdm/resources/users"
|
|
228
|
+
require_relative "sentdm/resources/voice"
|
|
229
|
+
require_relative "sentdm/resources/voice/calls"
|
|
230
|
+
require_relative "sentdm/resources/voice/calls/participants"
|
|
231
|
+
require_relative "sentdm/resources/voice/tokens"
|
|
230
232
|
require_relative "sentdm/resources/webhooks"
|
data/rbi/sentdm/client.rbi
CHANGED
|
@@ -115,25 +115,8 @@ module Sentdm
|
|
|
115
115
|
sig { returns(Sentdm::Resources::Conversations) }
|
|
116
116
|
attr_reader :conversations
|
|
117
117
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
# `POST /v3/channels/voice` enables a number for calls, with the callback URL Sent
|
|
121
|
-
# asks what to do with each call on it, and `POST /v3/channels/voice/tokens` mints
|
|
122
|
-
# a short-lived token that lets a user of your app place and receive calls as that
|
|
123
|
-
# number. When a call arrives or a caller presses a key, a signed question is
|
|
124
|
-
# POSTed to the callback URL and the answer decides the call;
|
|
125
|
-
# `POST /v3/channels/voice/{number}/test` checks the URL answers the way we need
|
|
126
|
-
# before a real call reaches it, and
|
|
127
|
-
# `POST /v3/channels/voice/{number}/rotate-secret` replaces the signing secret.
|
|
128
|
-
# The call events themselves (`call.completed` and the rest) arrive through your
|
|
129
|
-
# webhooks.
|
|
130
|
-
#
|
|
131
|
-
# Every call is a record under `/v3/calls`: read it, list its recordings once one
|
|
132
|
-
# is ready, hang it up, start or stop recording, and add, mute or remove
|
|
133
|
-
# conference participants while it is live. A leg to a phone number runs for at
|
|
134
|
-
# most what your balance affords at the destination's rate.
|
|
135
|
-
sig { returns(Sentdm::Resources::Calls) }
|
|
136
|
-
attr_reader :calls
|
|
118
|
+
sig { returns(Sentdm::Resources::Voice) }
|
|
119
|
+
attr_reader :voice
|
|
137
120
|
|
|
138
121
|
sig { returns(Sentdm::Resources::Channels) }
|
|
139
122
|
attr_reader :channels
|
|
@@ -48,8 +48,9 @@ module Sentdm
|
|
|
48
48
|
sig { returns(T.nilable(String)) }
|
|
49
49
|
attr_accessor :reason
|
|
50
50
|
|
|
51
|
-
# The recording that became available, the same id GET
|
|
52
|
-
# lists it under. Only on call.recording_ready,
|
|
51
|
+
# The recording that became available, the same id GET
|
|
52
|
+
# /v3/voice/calls/{id}/recordings lists it under. Only on call.recording_ready,
|
|
53
|
+
# which is sent once per recording.
|
|
53
54
|
sig { returns(T.nilable(String)) }
|
|
54
55
|
attr_accessor :recording_id
|
|
55
56
|
|
|
@@ -105,8 +106,9 @@ module Sentdm
|
|
|
105
106
|
# The machine-readable reason the call did not complete. Only on call.failed, and
|
|
106
107
|
# omitted when no reason was recorded.
|
|
107
108
|
reason: nil,
|
|
108
|
-
# The recording that became available, the same id GET
|
|
109
|
-
# lists it under. Only on call.recording_ready,
|
|
109
|
+
# The recording that became available, the same id GET
|
|
110
|
+
# /v3/voice/calls/{id}/recordings lists it under. Only on call.recording_ready,
|
|
111
|
+
# which is sent once per recording.
|
|
110
112
|
recording_id: nil,
|
|
111
113
|
# When the change happened on the call, as opposed to when the event was emitted.
|
|
112
114
|
updated_at: nil
|
|
@@ -31,6 +31,11 @@ module Sentdm
|
|
|
31
31
|
# itself is unchanged: the same rules are scored and ranked the same way, with
|
|
32
32
|
# routes pinned to numbers you did not list removed from the running.
|
|
33
33
|
#
|
|
34
|
+
# Each channel's list is independent: an sms list does not restrict MMS. To choose
|
|
35
|
+
# the numbers a message may go out from as MMS, name them under mms. MMS sends
|
|
36
|
+
# from your SMS numbers, so an mms list may name any of your active SMS numbers
|
|
37
|
+
# whose market carries MMS — the ones listed under mms in your channels.
|
|
38
|
+
#
|
|
34
39
|
# Every number must be an active sender on your account. The request itself is
|
|
35
40
|
# still accepted (202) if one is not — like every other send-time rule, that is
|
|
36
41
|
# decided per message, so each affected message is recorded BLOCKED with error
|
|
@@ -53,7 +58,9 @@ module Sentdm
|
|
|
53
58
|
#
|
|
54
59
|
# Their presence is also what makes a message eligible for MMS on an auto-detect
|
|
55
60
|
# send: a message with nothing attached is delivered as SMS, because an MMS with
|
|
56
|
-
# no media is a more expensive text message.
|
|
61
|
+
# no media is a more expensive text message. For the same reason a send that names
|
|
62
|
+
# mms in channel with nothing attached, here or on the template, is refused with
|
|
63
|
+
# a 400.
|
|
57
64
|
#
|
|
58
65
|
# The recipient's carrier fetches each URL after the send is accepted, so it must
|
|
59
66
|
# stay publicly reachable — a link that expires, or one behind auth, arrives as a
|
|
@@ -164,6 +171,11 @@ module Sentdm
|
|
|
164
171
|
# itself is unchanged: the same rules are scored and ranked the same way, with
|
|
165
172
|
# routes pinned to numbers you did not list removed from the running.
|
|
166
173
|
#
|
|
174
|
+
# Each channel's list is independent: an sms list does not restrict MMS. To choose
|
|
175
|
+
# the numbers a message may go out from as MMS, name them under mms. MMS sends
|
|
176
|
+
# from your SMS numbers, so an mms list may name any of your active SMS numbers
|
|
177
|
+
# whose market carries MMS — the ones listed under mms in your channels.
|
|
178
|
+
#
|
|
167
179
|
# Every number must be an active sender on your account. The request itself is
|
|
168
180
|
# still accepted (202) if one is not — like every other send-time rule, that is
|
|
169
181
|
# decided per message, so each affected message is recorded BLOCKED with error
|
|
@@ -178,7 +190,9 @@ module Sentdm
|
|
|
178
190
|
#
|
|
179
191
|
# Their presence is also what makes a message eligible for MMS on an auto-detect
|
|
180
192
|
# send: a message with nothing attached is delivered as SMS, because an MMS with
|
|
181
|
-
# no media is a more expensive text message.
|
|
193
|
+
# no media is a more expensive text message. For the same reason a send that names
|
|
194
|
+
# mms in channel with nothing attached, here or on the template, is refused with
|
|
195
|
+
# a 400.
|
|
182
196
|
#
|
|
183
197
|
# The recipient's carrier fetches each URL after the send is accepted, so it must
|
|
184
198
|
# stay publicly reachable — a link that expires, or one behind auth, arrives as a
|
|
@@ -41,17 +41,18 @@ module Sentdm
|
|
|
41
41
|
attr_writer :category
|
|
42
42
|
|
|
43
43
|
# The channels this template's definition can render on, in canonical order: sms,
|
|
44
|
-
# whatsapp, rcs.
|
|
44
|
+
# whatsapp, rcs, mms.
|
|
45
45
|
#
|
|
46
46
|
# Derived from the definition's body, mirroring each channel's send-time fallback
|
|
47
47
|
# chain, so a channel is listed only when a real body would be produced for it:
|
|
48
48
|
# SMS reads sms ?? multiChannel, WhatsApp reads whatsapp ?? multiChannel, and RCS
|
|
49
|
-
#
|
|
50
|
-
#
|
|
51
|
-
# too.
|
|
49
|
+
# and MMS read rcs ?? multiChannel ?? sms and mms ?? multiChannel ?? sms. A
|
|
50
|
+
# multiChannel body therefore reports all four, and the extra SMS fallback is why
|
|
51
|
+
# an sms/whatsapp pair reports RCS and MMS too.
|
|
52
52
|
#
|
|
53
53
|
# This says what the content can render on, not what may be sent: sending also
|
|
54
|
-
# needs the template approved for that channel
|
|
54
|
+
# needs the template approved for that channel, and MMS needs an attachment, from
|
|
55
|
+
# media_urls or the template's mms body.
|
|
55
56
|
sig { returns(T.nilable(T::Array[String])) }
|
|
56
57
|
attr_accessor :channels
|
|
57
58
|
|
|
@@ -138,17 +139,18 @@ module Sentdm
|
|
|
138
139
|
# Template category: MARKETING, UTILITY, AUTHENTICATION
|
|
139
140
|
category: nil,
|
|
140
141
|
# The channels this template's definition can render on, in canonical order: sms,
|
|
141
|
-
# whatsapp, rcs.
|
|
142
|
+
# whatsapp, rcs, mms.
|
|
142
143
|
#
|
|
143
144
|
# Derived from the definition's body, mirroring each channel's send-time fallback
|
|
144
145
|
# chain, so a channel is listed only when a real body would be produced for it:
|
|
145
146
|
# SMS reads sms ?? multiChannel, WhatsApp reads whatsapp ?? multiChannel, and RCS
|
|
146
|
-
#
|
|
147
|
-
#
|
|
148
|
-
# too.
|
|
147
|
+
# and MMS read rcs ?? multiChannel ?? sms and mms ?? multiChannel ?? sms. A
|
|
148
|
+
# multiChannel body therefore reports all four, and the extra SMS fallback is why
|
|
149
|
+
# an sms/whatsapp pair reports RCS and MMS too.
|
|
149
150
|
#
|
|
150
151
|
# This says what the content can render on, not what may be sent: sending also
|
|
151
|
-
# needs the template approved for that channel
|
|
152
|
+
# needs the template approved for that channel, and MMS needs an attachment, from
|
|
153
|
+
# media_urls or the template's mms body.
|
|
152
154
|
channels: nil,
|
|
153
155
|
# When the template was created
|
|
154
156
|
created_at: nil,
|
|
@@ -9,10 +9,10 @@ module Sentdm
|
|
|
9
9
|
# MMS-specific content — subject, text and attachments.
|
|
10
10
|
#
|
|
11
11
|
# Like Rcs, an override that cannot stand on its own: a template still needs a
|
|
12
|
-
# MultiChannel body or the Sms + Whatsapp pair to be deliverable at all.
|
|
13
|
-
#
|
|
14
|
-
#
|
|
15
|
-
#
|
|
12
|
+
# MultiChannel body or the Sms + Whatsapp pair to be deliverable at all. Without
|
|
13
|
+
# this slot MMS renders the shared or SMS body, so it is only needed for
|
|
14
|
+
# MMS-specific copy, a subject or attachments. When present it replaces that body
|
|
15
|
+
# on MMS rather than adding to it.
|
|
16
16
|
sig { returns(T.nilable(Sentdm::TemplateBody::Mms)) }
|
|
17
17
|
attr_reader :mms
|
|
18
18
|
|
|
@@ -78,10 +78,10 @@ module Sentdm
|
|
|
78
78
|
# MMS-specific content — subject, text and attachments.
|
|
79
79
|
#
|
|
80
80
|
# Like Rcs, an override that cannot stand on its own: a template still needs a
|
|
81
|
-
# MultiChannel body or the Sms + Whatsapp pair to be deliverable at all.
|
|
82
|
-
#
|
|
83
|
-
#
|
|
84
|
-
#
|
|
81
|
+
# MultiChannel body or the Sms + Whatsapp pair to be deliverable at all. Without
|
|
82
|
+
# this slot MMS renders the shared or SMS body, so it is only needed for
|
|
83
|
+
# MMS-specific copy, a subject or attachments. When present it replaces that body
|
|
84
|
+
# on MMS rather than adding to it.
|
|
85
85
|
mms: nil,
|
|
86
86
|
# The shared body, used for every channel. One half of the choice described above.
|
|
87
87
|
multi_channel: nil,
|
|
@@ -134,10 +134,10 @@ module Sentdm
|
|
|
134
134
|
# MMS-specific content — subject, text and attachments.
|
|
135
135
|
#
|
|
136
136
|
# Like Rcs, an override that cannot stand on its own: a template still needs a
|
|
137
|
-
# MultiChannel body or the Sms + Whatsapp pair to be deliverable at all.
|
|
138
|
-
#
|
|
139
|
-
#
|
|
140
|
-
#
|
|
137
|
+
# MultiChannel body or the Sms + Whatsapp pair to be deliverable at all. Without
|
|
138
|
+
# this slot MMS renders the shared or SMS body, so it is only needed for
|
|
139
|
+
# MMS-specific copy, a subject or attachments. When present it replaces that body
|
|
140
|
+
# on MMS rather than adding to it.
|
|
141
141
|
sig do
|
|
142
142
|
params(
|
|
143
143
|
media:
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
module Voice
|
|
6
|
+
class APIResponseOfCall < Sentdm::Internal::Type::BaseModel
|
|
7
|
+
OrHash =
|
|
8
|
+
T.type_alias do
|
|
9
|
+
T.any(Sentdm::Voice::APIResponseOfCall, Sentdm::Internal::AnyHash)
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
# A call record
|
|
13
|
+
sig { returns(T.nilable(Sentdm::Voice::Call)) }
|
|
14
|
+
attr_reader :data
|
|
15
|
+
|
|
16
|
+
sig { params(data: T.nilable(Sentdm::Voice::Call::OrHash)).void }
|
|
17
|
+
attr_writer :data
|
|
18
|
+
|
|
19
|
+
# Error information
|
|
20
|
+
sig { returns(T.nilable(Sentdm::ErrorDetail)) }
|
|
21
|
+
attr_reader :error
|
|
22
|
+
|
|
23
|
+
sig { params(error: T.nilable(Sentdm::ErrorDetail::OrHash)).void }
|
|
24
|
+
attr_writer :error
|
|
25
|
+
|
|
26
|
+
# Request and response metadata
|
|
27
|
+
sig { returns(T.nilable(Sentdm::APIMeta)) }
|
|
28
|
+
attr_reader :meta
|
|
29
|
+
|
|
30
|
+
sig { params(meta: Sentdm::APIMeta::OrHash).void }
|
|
31
|
+
attr_writer :meta
|
|
32
|
+
|
|
33
|
+
# Indicates whether the request was successful
|
|
34
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
35
|
+
attr_reader :success
|
|
36
|
+
|
|
37
|
+
sig { params(success: T::Boolean).void }
|
|
38
|
+
attr_writer :success
|
|
39
|
+
|
|
40
|
+
# Standard API response envelope for all v3 endpoints
|
|
41
|
+
sig do
|
|
42
|
+
params(
|
|
43
|
+
data: T.nilable(Sentdm::Voice::Call::OrHash),
|
|
44
|
+
error: T.nilable(Sentdm::ErrorDetail::OrHash),
|
|
45
|
+
meta: Sentdm::APIMeta::OrHash,
|
|
46
|
+
success: T::Boolean
|
|
47
|
+
).returns(T.attached_class)
|
|
48
|
+
end
|
|
49
|
+
def self.new(
|
|
50
|
+
# A call record
|
|
51
|
+
data: nil,
|
|
52
|
+
# Error information
|
|
53
|
+
error: nil,
|
|
54
|
+
# Request and response metadata
|
|
55
|
+
meta: nil,
|
|
56
|
+
# Indicates whether the request was successful
|
|
57
|
+
success: nil
|
|
58
|
+
)
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
sig do
|
|
62
|
+
override.returns(
|
|
63
|
+
{
|
|
64
|
+
data: T.nilable(Sentdm::Voice::Call),
|
|
65
|
+
error: T.nilable(Sentdm::ErrorDetail),
|
|
66
|
+
meta: Sentdm::APIMeta,
|
|
67
|
+
success: T::Boolean
|
|
68
|
+
}
|
|
69
|
+
)
|
|
70
|
+
end
|
|
71
|
+
def to_hash
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
module Voice
|
|
6
|
+
class APIResponseOfCallRecordings < Sentdm::Internal::Type::BaseModel
|
|
7
|
+
OrHash =
|
|
8
|
+
T.type_alias do
|
|
9
|
+
T.any(
|
|
10
|
+
Sentdm::Voice::APIResponseOfCallRecordings,
|
|
11
|
+
Sentdm::Internal::AnyHash
|
|
12
|
+
)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# The recordings of a call, each as a short-lived download link
|
|
16
|
+
sig { returns(T.nilable(Sentdm::Voice::CallRecordings)) }
|
|
17
|
+
attr_reader :data
|
|
18
|
+
|
|
19
|
+
sig do
|
|
20
|
+
params(data: T.nilable(Sentdm::Voice::CallRecordings::OrHash)).void
|
|
21
|
+
end
|
|
22
|
+
attr_writer :data
|
|
23
|
+
|
|
24
|
+
# Error information
|
|
25
|
+
sig { returns(T.nilable(Sentdm::ErrorDetail)) }
|
|
26
|
+
attr_reader :error
|
|
27
|
+
|
|
28
|
+
sig { params(error: T.nilable(Sentdm::ErrorDetail::OrHash)).void }
|
|
29
|
+
attr_writer :error
|
|
30
|
+
|
|
31
|
+
# Request and response metadata
|
|
32
|
+
sig { returns(T.nilable(Sentdm::APIMeta)) }
|
|
33
|
+
attr_reader :meta
|
|
34
|
+
|
|
35
|
+
sig { params(meta: Sentdm::APIMeta::OrHash).void }
|
|
36
|
+
attr_writer :meta
|
|
37
|
+
|
|
38
|
+
# Indicates whether the request was successful
|
|
39
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
40
|
+
attr_reader :success
|
|
41
|
+
|
|
42
|
+
sig { params(success: T::Boolean).void }
|
|
43
|
+
attr_writer :success
|
|
44
|
+
|
|
45
|
+
# Standard API response envelope for all v3 endpoints
|
|
46
|
+
sig do
|
|
47
|
+
params(
|
|
48
|
+
data: T.nilable(Sentdm::Voice::CallRecordings::OrHash),
|
|
49
|
+
error: T.nilable(Sentdm::ErrorDetail::OrHash),
|
|
50
|
+
meta: Sentdm::APIMeta::OrHash,
|
|
51
|
+
success: T::Boolean
|
|
52
|
+
).returns(T.attached_class)
|
|
53
|
+
end
|
|
54
|
+
def self.new(
|
|
55
|
+
# The recordings of a call, each as a short-lived download link
|
|
56
|
+
data: nil,
|
|
57
|
+
# Error information
|
|
58
|
+
error: nil,
|
|
59
|
+
# Request and response metadata
|
|
60
|
+
meta: nil,
|
|
61
|
+
# Indicates whether the request was successful
|
|
62
|
+
success: nil
|
|
63
|
+
)
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
sig do
|
|
67
|
+
override.returns(
|
|
68
|
+
{
|
|
69
|
+
data: T.nilable(Sentdm::Voice::CallRecordings),
|
|
70
|
+
error: T.nilable(Sentdm::ErrorDetail),
|
|
71
|
+
meta: Sentdm::APIMeta,
|
|
72
|
+
success: T::Boolean
|
|
73
|
+
}
|
|
74
|
+
)
|
|
75
|
+
end
|
|
76
|
+
def to_hash
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
end
|