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.
Files changed (169) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +12 -0
  3. data/README.md +1 -1
  4. data/lib/sentdm/client.rb +3 -20
  5. data/lib/sentdm/models/call_event_payload.rb +4 -3
  6. data/lib/sentdm/models/message_send_params.rb +8 -1
  7. data/lib/sentdm/models/template.rb +6 -5
  8. data/lib/sentdm/models/template_body.rb +8 -8
  9. data/lib/sentdm/models/{calls/api_response_of_list_of_call_participant.rb → voice/api_response_of_call.rb} +7 -7
  10. data/lib/sentdm/models/voice/api_response_of_call_recordings.rb +45 -0
  11. data/lib/sentdm/models/voice/api_response_of_calls_list.rb +44 -0
  12. data/lib/sentdm/models/{channels → voice}/api_response_of_voice_token.rb +5 -5
  13. data/lib/sentdm/models/voice/call.rb +149 -0
  14. data/lib/sentdm/models/{calls/participant_remove_params.rb → voice/call_hangup_params.rb} +8 -8
  15. data/lib/sentdm/models/voice/call_list_params.rb +85 -0
  16. data/lib/sentdm/models/{calls/participant_remove_all_params.rb → voice/call_list_recordings_params.rb} +3 -3
  17. data/lib/sentdm/models/voice/call_party.rb +33 -0
  18. data/lib/sentdm/models/{calls/participant_update_params.rb → voice/call_record_params.rb} +10 -17
  19. data/lib/sentdm/models/voice/call_recording.rb +40 -0
  20. data/lib/sentdm/models/voice/call_recordings.rb +26 -0
  21. data/lib/sentdm/models/{calls/participant_list_params.rb → voice/call_retrieve_params.rb} +3 -3
  22. data/lib/sentdm/models/voice/call_timeline_entry.rb +28 -0
  23. data/lib/sentdm/models/voice/calls/api_response_of_list_of_call_participant.rb +51 -0
  24. data/lib/sentdm/models/voice/calls/call_participant.rb +62 -0
  25. data/lib/sentdm/models/voice/calls/call_participant_target.rb +32 -0
  26. data/lib/sentdm/models/voice/calls/participant_add_params.rb +68 -0
  27. data/lib/sentdm/models/voice/calls/participant_list_params.rb +30 -0
  28. data/lib/sentdm/models/voice/calls/participant_remove_all_params.rb +30 -0
  29. data/lib/sentdm/models/voice/calls/participant_remove_params.rb +36 -0
  30. data/lib/sentdm/models/voice/calls/participant_update_params.rb +66 -0
  31. data/lib/sentdm/models/voice/calls_list.rb +28 -0
  32. data/lib/sentdm/models/{channels/voice_create_token_params.rb → voice/token_create_params.rb} +4 -4
  33. data/lib/sentdm/models/{channels → voice}/voice_token.rb +9 -3
  34. data/lib/sentdm/models.rb +2 -30
  35. data/lib/sentdm/resources/channels/voice.rb +13 -56
  36. data/lib/sentdm/resources/channels.rb +2 -2
  37. data/lib/sentdm/resources/voice/calls/participants.rb +233 -0
  38. data/lib/sentdm/resources/voice/calls.rb +238 -0
  39. data/lib/sentdm/resources/voice/tokens.rb +75 -0
  40. data/lib/sentdm/resources/voice.rb +56 -0
  41. data/lib/sentdm/version.rb +1 -1
  42. data/lib/sentdm.rb +30 -28
  43. data/rbi/sentdm/client.rbi +2 -19
  44. data/rbi/sentdm/models/call_event_payload.rbi +6 -4
  45. data/rbi/sentdm/models/message_send_params.rbi +16 -2
  46. data/rbi/sentdm/models/template.rbi +12 -10
  47. data/rbi/sentdm/models/template_body.rbi +12 -12
  48. data/rbi/sentdm/models/voice/api_response_of_call.rbi +76 -0
  49. data/rbi/sentdm/models/voice/api_response_of_call_recordings.rbi +81 -0
  50. data/rbi/sentdm/models/{calls/api_response_of_list_of_call_participant.rbi → voice/api_response_of_calls_list.rbi} +12 -9
  51. data/rbi/sentdm/models/{channels → voice}/api_response_of_voice_token.rbi +6 -8
  52. data/rbi/sentdm/models/voice/call.rbi +196 -0
  53. data/rbi/sentdm/models/{calls/participant_remove_params.rbi → voice/call_hangup_params.rbi} +11 -11
  54. data/rbi/sentdm/models/voice/call_list_params.rbi +114 -0
  55. data/rbi/sentdm/models/{calls/participant_list_params.rbi → voice/call_list_recordings_params.rbi} +3 -3
  56. data/rbi/sentdm/models/voice/call_party.rbi +47 -0
  57. data/rbi/sentdm/models/{calls/participant_update_params.rbi → voice/call_record_params.rbi} +12 -21
  58. data/rbi/sentdm/models/voice/call_recording.rbi +63 -0
  59. data/rbi/sentdm/models/voice/call_recordings.rbi +49 -0
  60. data/rbi/sentdm/models/{calls/participant_remove_all_params.rbi → voice/call_retrieve_params.rbi} +3 -6
  61. data/rbi/sentdm/models/voice/call_timeline_entry.rbi +44 -0
  62. data/rbi/sentdm/models/voice/calls/api_response_of_list_of_call_participant.rbi +84 -0
  63. data/rbi/sentdm/models/voice/calls/call_participant.rbi +97 -0
  64. data/rbi/sentdm/models/voice/calls/call_participant_target.rbi +49 -0
  65. data/rbi/sentdm/models/voice/calls/participant_add_params.rbi +104 -0
  66. data/rbi/sentdm/models/voice/calls/participant_list_params.rbi +53 -0
  67. data/rbi/sentdm/models/voice/calls/participant_remove_all_params.rbi +53 -0
  68. data/rbi/sentdm/models/voice/calls/participant_remove_params.rbi +63 -0
  69. data/rbi/sentdm/models/voice/calls/participant_update_params.rbi +96 -0
  70. data/rbi/sentdm/models/voice/calls_list.rbi +54 -0
  71. data/rbi/sentdm/models/{channels/voice_create_token_params.rbi → voice/token_create_params.rbi} +3 -6
  72. data/rbi/sentdm/models/{channels → voice}/voice_token.rbi +8 -4
  73. data/rbi/sentdm/models.rbi +2 -30
  74. data/rbi/sentdm/resources/channels/voice.rbi +13 -56
  75. data/rbi/sentdm/resources/channels.rbi +2 -2
  76. data/rbi/sentdm/resources/messages.rbi +8 -1
  77. data/rbi/sentdm/resources/voice/calls/participants.rbi +201 -0
  78. data/rbi/sentdm/resources/voice/calls.rbi +209 -0
  79. data/rbi/sentdm/resources/voice/tokens.rbi +73 -0
  80. data/rbi/sentdm/resources/voice.rbi +52 -0
  81. data/sig/sentdm/client.rbs +1 -1
  82. data/sig/sentdm/models/{calls/api_response_of_list_of_call_participant.rbs → voice/api_response_of_call.rbs} +7 -7
  83. data/sig/sentdm/models/voice/api_response_of_call_recordings.rbs +41 -0
  84. data/sig/sentdm/models/voice/api_response_of_calls_list.rbs +41 -0
  85. data/sig/sentdm/models/{channels → voice}/api_response_of_voice_token.rbs +5 -5
  86. data/sig/sentdm/models/voice/call.rbs +110 -0
  87. data/sig/sentdm/models/{calls/participant_remove_params.rbs → voice/call_hangup_params.rbs} +8 -8
  88. data/sig/sentdm/models/voice/call_list_params.rbs +69 -0
  89. data/sig/sentdm/models/{calls/participant_remove_all_params.rbs → voice/call_list_recordings_params.rbs} +6 -8
  90. data/sig/sentdm/models/voice/call_party.rbs +19 -0
  91. data/sig/sentdm/models/{calls/participant_update_params.rbs → voice/call_record_params.rbs} +8 -13
  92. data/sig/sentdm/models/voice/call_recording.rbs +34 -0
  93. data/sig/sentdm/models/voice/call_recordings.rbs +22 -0
  94. data/sig/sentdm/models/{calls/participant_list_params.rbs → voice/call_retrieve_params.rbs} +3 -3
  95. data/sig/sentdm/models/voice/call_timeline_entry.rbs +21 -0
  96. data/sig/sentdm/models/voice/calls/api_response_of_list_of_call_participant.rbs +43 -0
  97. data/sig/sentdm/models/voice/calls/call_participant.rbs +54 -0
  98. data/sig/sentdm/models/voice/calls/call_participant_target.rbs +25 -0
  99. data/sig/sentdm/models/voice/calls/participant_add_params.rbs +65 -0
  100. data/sig/sentdm/models/voice/calls/participant_list_params.rbs +34 -0
  101. data/sig/sentdm/models/voice/calls/participant_remove_all_params.rbs +36 -0
  102. data/sig/sentdm/models/voice/calls/participant_remove_params.rbs +42 -0
  103. data/sig/sentdm/models/voice/calls/participant_update_params.rbs +63 -0
  104. data/sig/sentdm/models/voice/calls_list.rbs +33 -0
  105. data/sig/sentdm/models/{channels/voice_create_token_params.rbs → voice/token_create_params.rbs} +3 -3
  106. data/sig/sentdm/models/{channels → voice}/voice_token.rbs +3 -1
  107. data/sig/sentdm/models.rbs +2 -30
  108. data/sig/sentdm/resources/channels/voice.rbs +0 -10
  109. data/sig/sentdm/resources/voice/calls/participants.rbs +52 -0
  110. data/sig/sentdm/resources/{calls/participants.rbs → voice/calls.rbs} +23 -21
  111. data/sig/sentdm/resources/voice/tokens.rbs +19 -0
  112. data/sig/sentdm/resources/voice.rbs +11 -0
  113. metadata +89 -83
  114. data/lib/sentdm/models/api_response_of_call.rb +0 -43
  115. data/lib/sentdm/models/api_response_of_call_recordings.rb +0 -43
  116. data/lib/sentdm/models/api_response_of_calls_list.rb +0 -42
  117. data/lib/sentdm/models/call.rb +0 -134
  118. data/lib/sentdm/models/call_hangup_params.rb +0 -32
  119. data/lib/sentdm/models/call_list_params.rb +0 -83
  120. data/lib/sentdm/models/call_list_recordings_params.rb +0 -26
  121. data/lib/sentdm/models/call_party.rb +0 -31
  122. data/lib/sentdm/models/call_record_params.rb +0 -55
  123. data/lib/sentdm/models/call_recording.rb +0 -38
  124. data/lib/sentdm/models/call_recordings.rb +0 -24
  125. data/lib/sentdm/models/call_retrieve_params.rb +0 -26
  126. data/lib/sentdm/models/call_timeline_entry.rb +0 -26
  127. data/lib/sentdm/models/calls/call_participant.rb +0 -60
  128. data/lib/sentdm/models/calls/call_participant_target.rb +0 -30
  129. data/lib/sentdm/models/calls/participant_add_params.rb +0 -66
  130. data/lib/sentdm/models/calls_list.rb +0 -26
  131. data/lib/sentdm/resources/calls/participants.rb +0 -231
  132. data/lib/sentdm/resources/calls.rb +0 -236
  133. data/rbi/sentdm/models/api_response_of_call.rbi +0 -74
  134. data/rbi/sentdm/models/api_response_of_call_recordings.rbi +0 -74
  135. data/rbi/sentdm/models/api_response_of_calls_list.rbi +0 -74
  136. data/rbi/sentdm/models/call.rbi +0 -179
  137. data/rbi/sentdm/models/call_hangup_params.rbi +0 -59
  138. data/rbi/sentdm/models/call_list_params.rbi +0 -112
  139. data/rbi/sentdm/models/call_list_recordings_params.rbi +0 -46
  140. data/rbi/sentdm/models/call_party.rbi +0 -41
  141. data/rbi/sentdm/models/call_record_params.rbi +0 -83
  142. data/rbi/sentdm/models/call_recording.rbi +0 -59
  143. data/rbi/sentdm/models/call_recordings.rbi +0 -39
  144. data/rbi/sentdm/models/call_retrieve_params.rbi +0 -46
  145. data/rbi/sentdm/models/call_timeline_entry.rbi +0 -40
  146. data/rbi/sentdm/models/calls/call_participant.rbi +0 -92
  147. data/rbi/sentdm/models/calls/call_participant_target.rbi +0 -47
  148. data/rbi/sentdm/models/calls/participant_add_params.rbi +0 -98
  149. data/rbi/sentdm/models/calls_list.rbi +0 -47
  150. data/rbi/sentdm/resources/calls/participants.rbi +0 -199
  151. data/rbi/sentdm/resources/calls.rbi +0 -207
  152. data/sig/sentdm/models/api_response_of_call.rbs +0 -39
  153. data/sig/sentdm/models/api_response_of_call_recordings.rbs +0 -39
  154. data/sig/sentdm/models/api_response_of_calls_list.rbs +0 -39
  155. data/sig/sentdm/models/call.rbs +0 -101
  156. data/sig/sentdm/models/call_hangup_params.rbs +0 -38
  157. data/sig/sentdm/models/call_list_params.rbs +0 -67
  158. data/sig/sentdm/models/call_list_recordings_params.rbs +0 -30
  159. data/sig/sentdm/models/call_party.rbs +0 -17
  160. data/sig/sentdm/models/call_record_params.rbs +0 -54
  161. data/sig/sentdm/models/call_recording.rbs +0 -32
  162. data/sig/sentdm/models/call_recordings.rbs +0 -17
  163. data/sig/sentdm/models/call_retrieve_params.rbs +0 -30
  164. data/sig/sentdm/models/call_timeline_entry.rbs +0 -19
  165. data/sig/sentdm/models/calls/call_participant.rbs +0 -52
  166. data/sig/sentdm/models/calls/call_participant_target.rbs +0 -23
  167. data/sig/sentdm/models/calls/participant_add_params.rbs +0 -63
  168. data/sig/sentdm/models/calls_list.rbs +0 -26
  169. data/sig/sentdm/resources/calls.rbs +0 -50
@@ -2,9 +2,9 @@
2
2
 
3
3
  module Sentdm
4
4
  module Models
5
- module Calls
6
- # @see Sentdm::Resources::Calls::Participants#update
7
- class ParticipantUpdateParams < Sentdm::Internal::Type::BaseModel
5
+ module Voice
6
+ # @see Sentdm::Resources::Voice::Calls#record
7
+ class CallRecordParams < Sentdm::Internal::Type::BaseModel
8
8
  extend Sentdm::Internal::Type::RequestParameters::Converter
9
9
  include Sentdm::Internal::Type::RequestParameters
10
10
 
@@ -13,16 +13,11 @@ module Sentdm
13
13
  # @return [String]
14
14
  required :id, String
15
15
 
16
- # @!attribute participant_id
16
+ # @!attribute action
17
+ # start to begin recording, stop to end it
17
18
  #
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
19
+ # @return [String, nil]
20
+ optional :action, String
26
21
 
27
22
  # @!attribute sandbox
28
23
  # Sandbox flag - when true, the operation is simulated without side effects Useful
@@ -41,15 +36,13 @@ module Sentdm
41
36
  # @return [String, nil]
42
37
  optional :x_profile_id, String
43
38
 
44
- # @!method initialize(id:, participant_id:, muted: nil, sandbox: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
39
+ # @!method initialize(id:, action: nil, sandbox: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
45
40
  # Some parameter documentations has been truncated, see
46
- # {Sentdm::Models::Calls::ParticipantUpdateParams} for more details.
41
+ # {Sentdm::Models::Voice::CallRecordParams} for more details.
47
42
  #
48
43
  # @param id [String]
49
44
  #
50
- # @param participant_id [String]
51
- #
52
- # @param muted [Boolean] true to mute the participant, false to unmute them
45
+ # @param action [String] start to begin recording, stop to end it
53
46
  #
54
47
  # @param sandbox [Boolean] Sandbox flag - when true, the operation is simulated without side effects
55
48
  #
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sentdm
4
+ module Models
5
+ module Voice
6
+ class CallRecording < Sentdm::Internal::Type::BaseModel
7
+ # @!attribute download_url
8
+ # A pre-signed link that downloads the recording as an MP3 file. Anyone holding it
9
+ # can download the recording until it expires
10
+ #
11
+ # @return [String, nil]
12
+ optional :download_url, String
13
+
14
+ # @!attribute recording_id
15
+ # The recording's id, the one the call.recording_ready webhook announced it under
16
+ #
17
+ # @return [String, nil]
18
+ optional :recording_id, String
19
+
20
+ # @!attribute url_expires_at
21
+ # When the link stops working (UTC). Request the recordings again for a fresh link
22
+ #
23
+ # @return [Time, nil]
24
+ optional :url_expires_at, Time
25
+
26
+ # @!method initialize(download_url: nil, recording_id: nil, url_expires_at: nil)
27
+ # Some parameter documentations has been truncated, see
28
+ # {Sentdm::Models::Voice::CallRecording} for more details.
29
+ #
30
+ # A short-lived link to a call recording
31
+ #
32
+ # @param download_url [String] A pre-signed link that downloads the recording as an MP3 file. Anyone holding it
33
+ #
34
+ # @param recording_id [String] The recording's id, the one the call.recording_ready webhook announced it under
35
+ #
36
+ # @param url_expires_at [Time] When the link stops working (UTC). Request the recordings again for a fresh link
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sentdm
4
+ module Models
5
+ module Voice
6
+ class CallRecordings < Sentdm::Internal::Type::BaseModel
7
+ # @!attribute recordings
8
+ # Every recording of the call, oldest first. Empty until the first
9
+ # call.recording_ready webhook has been sent, and for a call that was never
10
+ # recorded
11
+ #
12
+ # @return [Array<Sentdm::Models::Voice::CallRecording>, nil]
13
+ optional :recordings, -> { Sentdm::Internal::Type::ArrayOf[Sentdm::Voice::CallRecording] }
14
+
15
+ # @!method initialize(recordings: nil)
16
+ # Some parameter documentations has been truncated, see
17
+ # {Sentdm::Models::Voice::CallRecordings} for more details.
18
+ #
19
+ # The recordings of a call, each as a short-lived download link
20
+ #
21
+ # @param recordings [Array<Sentdm::Models::Voice::CallRecording>] Every recording of the call, oldest first. Empty until the first
22
+ # call.recording\_
23
+ end
24
+ end
25
+ end
26
+ end
@@ -2,9 +2,9 @@
2
2
 
3
3
  module Sentdm
4
4
  module Models
5
- module Calls
6
- # @see Sentdm::Resources::Calls::Participants#list
7
- class ParticipantListParams < Sentdm::Internal::Type::BaseModel
5
+ module Voice
6
+ # @see Sentdm::Resources::Voice::Calls#retrieve
7
+ class CallRetrieveParams < Sentdm::Internal::Type::BaseModel
8
8
  extend Sentdm::Internal::Type::RequestParameters::Converter
9
9
  include Sentdm::Internal::Type::RequestParameters
10
10
 
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sentdm
4
+ module Models
5
+ module Voice
6
+ class CallTimelineEntry < Sentdm::Internal::Type::BaseModel
7
+ # @!attribute status
8
+ # INITIATED, RINGING, ANSWERED, COMPLETED, FAILED, NO_ANSWER or REJECTED
9
+ #
10
+ # @return [String, nil]
11
+ optional :status, String
12
+
13
+ # @!attribute timestamp
14
+ # When the call entered this status (UTC)
15
+ #
16
+ # @return [Time, nil]
17
+ optional :timestamp, Time
18
+
19
+ # @!method initialize(status: nil, timestamp: nil)
20
+ # When a call entered a status
21
+ #
22
+ # @param status [String] INITIATED, RINGING, ANSWERED, COMPLETED, FAILED, NO_ANSWER or REJECTED
23
+ #
24
+ # @param timestamp [Time] When the call entered this status (UTC)
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,51 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sentdm
4
+ module Models
5
+ module Voice
6
+ module Calls
7
+ # @see Sentdm::Resources::Voice::Calls::Participants#list
8
+ class APIResponseOfListOfCallParticipant < Sentdm::Internal::Type::BaseModel
9
+ # @!attribute data
10
+ # The response data (null if error)
11
+ #
12
+ # @return [Array<Sentdm::Models::Voice::Calls::CallParticipant>, nil]
13
+ optional :data,
14
+ -> {
15
+ Sentdm::Internal::Type::ArrayOf[Sentdm::Voice::Calls::CallParticipant]
16
+ },
17
+ nil?: true
18
+
19
+ # @!attribute error
20
+ # Error information
21
+ #
22
+ # @return [Sentdm::Models::ErrorDetail, nil]
23
+ optional :error, -> { Sentdm::ErrorDetail }, nil?: true
24
+
25
+ # @!attribute meta
26
+ # Request and response metadata
27
+ #
28
+ # @return [Sentdm::Models::APIMeta, nil]
29
+ optional :meta, -> { Sentdm::APIMeta }
30
+
31
+ # @!attribute success
32
+ # Indicates whether the request was successful
33
+ #
34
+ # @return [Boolean, nil]
35
+ optional :success, Sentdm::Internal::Type::Boolean
36
+
37
+ # @!method initialize(data: nil, error: nil, meta: nil, success: nil)
38
+ # Standard API response envelope for all v3 endpoints
39
+ #
40
+ # @param data [Array<Sentdm::Models::Voice::Calls::CallParticipant>, nil] The response data (null if error)
41
+ #
42
+ # @param error [Sentdm::Models::ErrorDetail, nil] Error information
43
+ #
44
+ # @param meta [Sentdm::Models::APIMeta] Request and response metadata
45
+ #
46
+ # @param success [Boolean] Indicates whether the request was successful
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,62 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sentdm
4
+ module Models
5
+ module Voice
6
+ module Calls
7
+ class CallParticipant < Sentdm::Internal::Type::BaseModel
8
+ # @!attribute id
9
+ # The participant's own call id: what the mute and remove endpoints take, and what
10
+ # GET /v3/voice/calls/{id} accepts
11
+ #
12
+ # @return [String, nil]
13
+ optional :id, String
14
+
15
+ # @!attribute duration_seconds
16
+ # How long the participant has been connected to the room, in seconds
17
+ #
18
+ # @return [Integer, nil]
19
+ optional :duration_seconds, Integer
20
+
21
+ # @!attribute kind
22
+ # user for one of your app users, number for a phone number, anonymous for a
23
+ # caller who withheld their number
24
+ #
25
+ # @return [String, nil]
26
+ optional :kind, String
27
+
28
+ # @!attribute muted
29
+ # True while the room mutes this participant
30
+ #
31
+ # @return [Boolean, nil]
32
+ optional :muted, Sentdm::Internal::Type::Boolean
33
+
34
+ # @!attribute value
35
+ # The app user's identity or the phone number in E.164 format. Null when the kind
36
+ # is anonymous
37
+ #
38
+ # @return [String, nil]
39
+ optional :value, String, nil?: true
40
+
41
+ # @!method initialize(id: nil, duration_seconds: nil, kind: nil, muted: nil, value: nil)
42
+ # Some parameter documentations has been truncated, see
43
+ # {Sentdm::Models::Voice::Calls::CallParticipant} for more details.
44
+ #
45
+ # A participant of a conference call
46
+ #
47
+ # @param id [String] The participant's own call id: what the mute and remove endpoints take, and what
48
+ #
49
+ # @param duration_seconds [Integer] How long the participant has been connected to the room, in seconds
50
+ #
51
+ # @param kind [String] user for one of your app users, number for a phone number, anonymous for a calle
52
+ #
53
+ # @param muted [Boolean] True while the room mutes this participant
54
+ #
55
+ # @param value [String, nil] The app user's identity or the phone number in E.164 format. Null when the kind
56
+ end
57
+ end
58
+
59
+ CallParticipant = Calls::CallParticipant
60
+ end
61
+ end
62
+ end
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sentdm
4
+ module Models
5
+ module Voice
6
+ module Calls
7
+ class CallParticipantTarget < Sentdm::Internal::Type::BaseModel
8
+ # @!attribute kind
9
+ # user for one of your app users, number for a phone number
10
+ #
11
+ # @return [String, nil]
12
+ optional :kind, String
13
+
14
+ # @!attribute value
15
+ # The app user's identity, or the phone number in E.164 format
16
+ #
17
+ # @return [String, nil]
18
+ optional :value, String
19
+
20
+ # @!method initialize(kind: nil, value: nil)
21
+ # A participant to add to a call
22
+ #
23
+ # @param kind [String] user for one of your app users, number for a phone number
24
+ #
25
+ # @param value [String] The app user's identity, or the phone number in E.164 format
26
+ end
27
+ end
28
+
29
+ CallParticipantTarget = Calls::CallParticipantTarget
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,68 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sentdm
4
+ module Models
5
+ module Voice
6
+ module Calls
7
+ # @see Sentdm::Resources::Voice::Calls::Participants#add
8
+ class ParticipantAddParams < Sentdm::Internal::Type::BaseModel
9
+ extend Sentdm::Internal::Type::RequestParameters::Converter
10
+ include Sentdm::Internal::Type::RequestParameters
11
+
12
+ # @!attribute id
13
+ #
14
+ # @return [String]
15
+ required :id, String
16
+
17
+ # @!attribute caller_id
18
+ # The number shown to a phone participant as the caller, in E.164 format. Must be
19
+ # one of your numbers. The call's owning number when omitted
20
+ #
21
+ # @return [String, nil]
22
+ optional :caller_id, String, nil?: true
23
+
24
+ # @!attribute sandbox
25
+ # Sandbox flag - when true, the operation is simulated without side effects Useful
26
+ # for testing integrations without actual execution
27
+ #
28
+ # @return [Boolean, nil]
29
+ optional :sandbox, Sentdm::Internal::Type::Boolean
30
+
31
+ # @!attribute to
32
+ # A participant to add to a call
33
+ #
34
+ # @return [Sentdm::Models::Voice::Calls::CallParticipantTarget, nil]
35
+ optional :to, -> { Sentdm::Voice::Calls::CallParticipantTarget }
36
+
37
+ # @!attribute idempotency_key
38
+ #
39
+ # @return [String, nil]
40
+ optional :idempotency_key, String
41
+
42
+ # @!attribute x_profile_id
43
+ #
44
+ # @return [String, nil]
45
+ optional :x_profile_id, String
46
+
47
+ # @!method initialize(id:, caller_id: nil, sandbox: nil, to: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
48
+ # Some parameter documentations has been truncated, see
49
+ # {Sentdm::Models::Voice::Calls::ParticipantAddParams} for more details.
50
+ #
51
+ # @param id [String]
52
+ #
53
+ # @param caller_id [String, nil] The number shown to a phone participant as the caller, in E.164 format. Must be
54
+ #
55
+ # @param sandbox [Boolean] Sandbox flag - when true, the operation is simulated without side effects
56
+ #
57
+ # @param to [Sentdm::Models::Voice::Calls::CallParticipantTarget] A participant to add to a call
58
+ #
59
+ # @param idempotency_key [String]
60
+ #
61
+ # @param x_profile_id [String]
62
+ #
63
+ # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}]
64
+ end
65
+ end
66
+ end
67
+ end
68
+ end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sentdm
4
+ module Models
5
+ module Voice
6
+ module Calls
7
+ # @see Sentdm::Resources::Voice::Calls::Participants#list
8
+ class ParticipantListParams < Sentdm::Internal::Type::BaseModel
9
+ extend Sentdm::Internal::Type::RequestParameters::Converter
10
+ include Sentdm::Internal::Type::RequestParameters
11
+
12
+ # @!attribute id
13
+ #
14
+ # @return [String]
15
+ required :id, String
16
+
17
+ # @!attribute x_profile_id
18
+ #
19
+ # @return [String, nil]
20
+ optional :x_profile_id, String
21
+
22
+ # @!method initialize(id:, x_profile_id: nil, request_options: {})
23
+ # @param id [String]
24
+ # @param x_profile_id [String]
25
+ # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}]
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sentdm
4
+ module Models
5
+ module Voice
6
+ module Calls
7
+ # @see Sentdm::Resources::Voice::Calls::Participants#remove_all
8
+ class ParticipantRemoveAllParams < Sentdm::Models::MutationRequest
9
+ extend Sentdm::Internal::Type::RequestParameters::Converter
10
+ include Sentdm::Internal::Type::RequestParameters
11
+
12
+ # @!attribute id
13
+ #
14
+ # @return [String]
15
+ required :id, String
16
+
17
+ # @!attribute x_profile_id
18
+ #
19
+ # @return [String, nil]
20
+ optional :x_profile_id, String
21
+
22
+ # @!method initialize(id:, x_profile_id: nil, request_options: {})
23
+ # @param id [String]
24
+ # @param x_profile_id [String]
25
+ # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}]
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sentdm
4
+ module Models
5
+ module Voice
6
+ module Calls
7
+ # @see Sentdm::Resources::Voice::Calls::Participants#remove
8
+ class ParticipantRemoveParams < Sentdm::Models::MutationRequest
9
+ extend Sentdm::Internal::Type::RequestParameters::Converter
10
+ include Sentdm::Internal::Type::RequestParameters
11
+
12
+ # @!attribute id
13
+ #
14
+ # @return [String]
15
+ required :id, String
16
+
17
+ # @!attribute participant_id
18
+ #
19
+ # @return [String]
20
+ required :participant_id, String
21
+
22
+ # @!attribute x_profile_id
23
+ #
24
+ # @return [String, nil]
25
+ optional :x_profile_id, String
26
+
27
+ # @!method initialize(id:, participant_id:, x_profile_id: nil, request_options: {})
28
+ # @param id [String]
29
+ # @param participant_id [String]
30
+ # @param x_profile_id [String]
31
+ # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}]
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,66 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sentdm
4
+ module Models
5
+ module Voice
6
+ module Calls
7
+ # @see Sentdm::Resources::Voice::Calls::Participants#update
8
+ class ParticipantUpdateParams < Sentdm::Internal::Type::BaseModel
9
+ extend Sentdm::Internal::Type::RequestParameters::Converter
10
+ include Sentdm::Internal::Type::RequestParameters
11
+
12
+ # @!attribute id
13
+ #
14
+ # @return [String]
15
+ required :id, String
16
+
17
+ # @!attribute participant_id
18
+ #
19
+ # @return [String]
20
+ required :participant_id, String
21
+
22
+ # @!attribute muted
23
+ # true to mute the participant, false to unmute them
24
+ #
25
+ # @return [Boolean, nil]
26
+ optional :muted, Sentdm::Internal::Type::Boolean
27
+
28
+ # @!attribute sandbox
29
+ # Sandbox flag - when true, the operation is simulated without side effects Useful
30
+ # for testing integrations without actual execution
31
+ #
32
+ # @return [Boolean, nil]
33
+ optional :sandbox, Sentdm::Internal::Type::Boolean
34
+
35
+ # @!attribute idempotency_key
36
+ #
37
+ # @return [String, nil]
38
+ optional :idempotency_key, String
39
+
40
+ # @!attribute x_profile_id
41
+ #
42
+ # @return [String, nil]
43
+ optional :x_profile_id, String
44
+
45
+ # @!method initialize(id:, participant_id:, muted: nil, sandbox: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
46
+ # Some parameter documentations has been truncated, see
47
+ # {Sentdm::Models::Voice::Calls::ParticipantUpdateParams} for more details.
48
+ #
49
+ # @param id [String]
50
+ #
51
+ # @param participant_id [String]
52
+ #
53
+ # @param muted [Boolean] true to mute the participant, false to unmute them
54
+ #
55
+ # @param sandbox [Boolean] Sandbox flag - when true, the operation is simulated without side effects
56
+ #
57
+ # @param idempotency_key [String]
58
+ #
59
+ # @param x_profile_id [String]
60
+ #
61
+ # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}]
62
+ end
63
+ end
64
+ end
65
+ end
66
+ end
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sentdm
4
+ module Models
5
+ module Voice
6
+ class CallsList < Sentdm::Internal::Type::BaseModel
7
+ # @!attribute calls
8
+ # The calls on this page, most recent first
9
+ #
10
+ # @return [Array<Sentdm::Models::Voice::Call>, nil]
11
+ optional :calls, -> { Sentdm::Internal::Type::ArrayOf[Sentdm::Voice::Call] }
12
+
13
+ # @!attribute pagination
14
+ # Pagination metadata for list responses
15
+ #
16
+ # @return [Sentdm::Models::PaginationMeta, nil]
17
+ optional :pagination, -> { Sentdm::PaginationMeta }
18
+
19
+ # @!method initialize(calls: nil, pagination: nil)
20
+ # Paginated list of calls
21
+ #
22
+ # @param calls [Array<Sentdm::Models::Voice::Call>] The calls on this page, most recent first
23
+ #
24
+ # @param pagination [Sentdm::Models::PaginationMeta] Pagination metadata for list responses
25
+ end
26
+ end
27
+ end
28
+ end
@@ -2,9 +2,9 @@
2
2
 
3
3
  module Sentdm
4
4
  module Models
5
- module Channels
6
- # @see Sentdm::Resources::Channels::Voice#create_token
7
- class VoiceCreateTokenParams < Sentdm::Internal::Type::BaseModel
5
+ module Voice
6
+ # @see Sentdm::Resources::Voice::Tokens#create
7
+ class TokenCreateParams < Sentdm::Internal::Type::BaseModel
8
8
  extend Sentdm::Internal::Type::RequestParameters::Converter
9
9
  include Sentdm::Internal::Type::RequestParameters
10
10
 
@@ -48,7 +48,7 @@ module Sentdm
48
48
 
49
49
  # @!method initialize(identity: nil, number: nil, sandbox: nil, ttl: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
50
50
  # Some parameter documentations has been truncated, see
51
- # {Sentdm::Models::Channels::VoiceCreateTokenParams} for more details.
51
+ # {Sentdm::Models::Voice::TokenCreateParams} for more details.
52
52
  #
53
53
  # @param identity [String] Your identifier for the app user, such as an agent or account id. Letters, digit
54
54
  #
@@ -2,10 +2,11 @@
2
2
 
3
3
  module Sentdm
4
4
  module Models
5
- module Channels
5
+ module Voice
6
6
  class VoiceToken < Sentdm::Internal::Type::BaseModel
7
7
  # @!attribute token
8
- # The signed token. Hand it to the client SDK unchanged.
8
+ # The signed token. Hand it to the client SDK unchanged. Treat it as opaque: read
9
+ # the identity, number, and expiry from this response, not from the token.
9
10
  #
10
11
  # @return [String, nil]
11
12
  optional :token, String
@@ -29,9 +30,12 @@ module Sentdm
29
30
  optional :number, String
30
31
 
31
32
  # @!method initialize(token: nil, expires_at: nil, identity: nil, number: nil)
33
+ # Some parameter documentations has been truncated, see
34
+ # {Sentdm::Models::Voice::VoiceToken} for more details.
35
+ #
32
36
  # A short-lived token your app passes to the voice client SDK to register
33
37
  #
34
- # @param token [String] The signed token. Hand it to the client SDK unchanged.
38
+ # @param token [String] The signed token. Hand it to the client SDK unchanged. Treat it as opaque: read
35
39
  #
36
40
  # @param expires_at [Time] When the token expires (UTC)
37
41
  #
@@ -40,5 +44,7 @@ module Sentdm
40
44
  # @param number [String] The phone number this identity is now bound to, in E.164 format
41
45
  end
42
46
  end
47
+
48
+ VoiceToken = Voice::VoiceToken
43
49
  end
44
50
  end