sentdm 0.33.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.
Files changed (203) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +15 -0
  3. data/README.md +11 -9
  4. data/lib/sentdm/client.rb +25 -0
  5. data/lib/sentdm/internal/calls_page.rb +115 -0
  6. data/lib/sentdm/models/api_response_of_call.rb +43 -0
  7. data/lib/sentdm/models/api_response_of_call_recordings.rb +43 -0
  8. data/lib/sentdm/models/api_response_of_calls_list.rb +42 -0
  9. data/lib/sentdm/models/call.rb +133 -0
  10. data/lib/sentdm/models/call_event.rb +72 -0
  11. data/lib/sentdm/models/call_event_payload.rb +102 -0
  12. data/lib/sentdm/models/call_hangup_params.rb +32 -0
  13. data/lib/sentdm/models/call_list_params.rb +83 -0
  14. data/lib/sentdm/models/call_list_recordings_params.rb +26 -0
  15. data/lib/sentdm/models/call_party.rb +31 -0
  16. data/lib/sentdm/models/call_record_params.rb +55 -0
  17. data/lib/sentdm/models/call_recording.rb +38 -0
  18. data/lib/sentdm/models/call_recordings.rb +24 -0
  19. data/lib/sentdm/models/call_retrieve_params.rb +26 -0
  20. data/lib/sentdm/models/call_timeline_entry.rb +26 -0
  21. data/lib/sentdm/models/calls/api_response_of_list_of_call_participant.rb +45 -0
  22. data/lib/sentdm/models/calls/call_participant.rb +60 -0
  23. data/lib/sentdm/models/calls/call_participant_target.rb +30 -0
  24. data/lib/sentdm/models/calls/participant_add_params.rb +66 -0
  25. data/lib/sentdm/models/calls/participant_list_params.rb +28 -0
  26. data/lib/sentdm/models/calls/participant_remove_all_params.rb +28 -0
  27. data/lib/sentdm/models/calls/participant_remove_params.rb +34 -0
  28. data/lib/sentdm/models/calls/participant_update_params.rb +64 -0
  29. data/lib/sentdm/models/calls_list.rb +26 -0
  30. data/lib/sentdm/models/channel_event_payload.rb +16 -6
  31. data/lib/sentdm/models/channels/api_response_of_list_of_voice_number.rb +45 -0
  32. data/lib/sentdm/models/channels/api_response_of_voice_callback_test.rb +45 -0
  33. data/lib/sentdm/models/channels/api_response_of_voice_number.rb +45 -0
  34. data/lib/sentdm/models/channels/api_response_of_voice_number_created.rb +45 -0
  35. data/lib/sentdm/models/channels/api_response_of_voice_secret.rb +45 -0
  36. data/lib/sentdm/models/channels/api_response_of_voice_token.rb +45 -0
  37. data/lib/sentdm/models/channels/voice_callback_test.rb +65 -0
  38. data/lib/sentdm/models/channels/voice_callback_test_error_info.rb +41 -0
  39. data/lib/sentdm/models/channels/voice_callback_test_request_info.rb +40 -0
  40. data/lib/sentdm/models/channels/voice_callback_test_response_info.rb +28 -0
  41. data/lib/sentdm/models/channels/voice_create_params.rb +86 -0
  42. data/lib/sentdm/models/channels/voice_create_token_params.rb +69 -0
  43. data/lib/sentdm/models/channels/voice_list_params.rb +22 -0
  44. data/lib/sentdm/models/channels/voice_number.rb +68 -0
  45. data/lib/sentdm/models/channels/voice_number_created.rb +26 -0
  46. data/lib/sentdm/models/channels/voice_retrieve_params.rb +28 -0
  47. data/lib/sentdm/models/channels/voice_rotate_secret_params.rb +34 -0
  48. data/lib/sentdm/models/channels/voice_secret.rb +25 -0
  49. data/lib/sentdm/models/channels/voice_test_params.rb +34 -0
  50. data/lib/sentdm/models/channels/voice_token.rb +44 -0
  51. data/lib/sentdm/models/channels/voice_update_params.rb +95 -0
  52. data/lib/sentdm/models/conversation_messages_list.rb +100 -13
  53. data/lib/sentdm/models/inbound_message_event_payload.rb +70 -3
  54. data/lib/sentdm/models/me_retrieve_response.rb +21 -1
  55. data/lib/sentdm/models/message_event_payload.rb +23 -1
  56. data/lib/sentdm/models/message_retrieve_activities_response.rb +23 -1
  57. data/lib/sentdm/models/message_retrieve_status_response.rb +100 -13
  58. data/lib/sentdm/models/template_create_params.rb +11 -1
  59. data/lib/sentdm/models/webhook_create_params.rb +31 -1
  60. data/lib/sentdm/models/webhook_list_events_response.rb +7 -3
  61. data/lib/sentdm/models/webhook_update_params.rb +31 -1
  62. data/lib/sentdm/models.rb +36 -0
  63. data/lib/sentdm/resources/calls/participants.rb +231 -0
  64. data/lib/sentdm/resources/calls.rb +235 -0
  65. data/lib/sentdm/resources/channels/voice.rb +381 -0
  66. data/lib/sentdm/resources/channels.rb +45 -0
  67. data/lib/sentdm/resources/me.rb +5 -0
  68. data/lib/sentdm/resources/templates.rb +3 -1
  69. data/lib/sentdm/resources/webhooks.rb +9 -3
  70. data/lib/sentdm/version.rb +1 -1
  71. data/lib/sentdm.rb +50 -0
  72. data/rbi/sentdm/client.rbi +23 -0
  73. data/rbi/sentdm/internal/calls_page.rbi +71 -0
  74. data/rbi/sentdm/models/api_response_of_call.rbi +74 -0
  75. data/rbi/sentdm/models/api_response_of_call_recordings.rbi +74 -0
  76. data/rbi/sentdm/models/api_response_of_calls_list.rbi +74 -0
  77. data/rbi/sentdm/models/call.rbi +177 -0
  78. data/rbi/sentdm/models/call_event.rbi +114 -0
  79. data/rbi/sentdm/models/call_event_payload.rbi +135 -0
  80. data/rbi/sentdm/models/call_hangup_params.rbi +59 -0
  81. data/rbi/sentdm/models/call_list_params.rbi +112 -0
  82. data/rbi/sentdm/models/call_list_recordings_params.rbi +46 -0
  83. data/rbi/sentdm/models/call_party.rbi +41 -0
  84. data/rbi/sentdm/models/call_record_params.rbi +83 -0
  85. data/rbi/sentdm/models/call_recording.rbi +59 -0
  86. data/rbi/sentdm/models/call_recordings.rbi +39 -0
  87. data/rbi/sentdm/models/call_retrieve_params.rbi +46 -0
  88. data/rbi/sentdm/models/call_timeline_entry.rbi +40 -0
  89. data/rbi/sentdm/models/calls/api_response_of_list_of_call_participant.rbi +76 -0
  90. data/rbi/sentdm/models/calls/call_participant.rbi +92 -0
  91. data/rbi/sentdm/models/calls/call_participant_target.rbi +47 -0
  92. data/rbi/sentdm/models/calls/participant_add_params.rbi +98 -0
  93. data/rbi/sentdm/models/calls/participant_list_params.rbi +51 -0
  94. data/rbi/sentdm/models/calls/participant_remove_all_params.rbi +51 -0
  95. data/rbi/sentdm/models/calls/participant_remove_params.rbi +61 -0
  96. data/rbi/sentdm/models/calls/participant_update_params.rbi +94 -0
  97. data/rbi/sentdm/models/calls_list.rbi +47 -0
  98. data/rbi/sentdm/models/channel_event_payload.rbi +20 -8
  99. data/rbi/sentdm/models/channels/api_response_of_list_of_voice_number.rbi +76 -0
  100. data/rbi/sentdm/models/channels/api_response_of_voice_callback_test.rbi +83 -0
  101. data/rbi/sentdm/models/channels/api_response_of_voice_number.rbi +81 -0
  102. data/rbi/sentdm/models/channels/api_response_of_voice_number_created.rbi +83 -0
  103. data/rbi/sentdm/models/channels/api_response_of_voice_secret.rbi +81 -0
  104. data/rbi/sentdm/models/channels/api_response_of_voice_token.rbi +81 -0
  105. data/rbi/sentdm/models/channels/voice_callback_test.rbi +126 -0
  106. data/rbi/sentdm/models/channels/voice_callback_test_error_info.rbi +65 -0
  107. data/rbi/sentdm/models/channels/voice_callback_test_request_info.rbi +66 -0
  108. data/rbi/sentdm/models/channels/voice_callback_test_response_info.rbi +48 -0
  109. data/rbi/sentdm/models/channels/voice_create_params.rbi +127 -0
  110. data/rbi/sentdm/models/channels/voice_create_token_params.rbi +104 -0
  111. data/rbi/sentdm/models/channels/voice_list_params.rbi +40 -0
  112. data/rbi/sentdm/models/channels/voice_number.rbi +105 -0
  113. data/rbi/sentdm/models/channels/voice_number_created.rbi +42 -0
  114. data/rbi/sentdm/models/channels/voice_retrieve_params.rbi +51 -0
  115. data/rbi/sentdm/models/channels/voice_rotate_secret_params.rbi +64 -0
  116. data/rbi/sentdm/models/channels/voice_secret.rbi +35 -0
  117. data/rbi/sentdm/models/channels/voice_test_params.rbi +61 -0
  118. data/rbi/sentdm/models/channels/voice_token.rbi +76 -0
  119. data/rbi/sentdm/models/channels/voice_update_params.rbi +158 -0
  120. data/rbi/sentdm/models/conversation_messages_list.rbi +122 -19
  121. data/rbi/sentdm/models/inbound_message_event_payload.rbi +110 -2
  122. data/rbi/sentdm/models/me_retrieve_response.rbi +35 -0
  123. data/rbi/sentdm/models/message_event_payload.rbi +28 -0
  124. data/rbi/sentdm/models/message_retrieve_activities_response.rbi +26 -0
  125. data/rbi/sentdm/models/message_retrieve_status_response.rbi +122 -19
  126. data/rbi/sentdm/models/template_create_params.rbi +15 -0
  127. data/rbi/sentdm/models/webhook_create_params.rbi +61 -0
  128. data/rbi/sentdm/models/webhook_list_events_response.rbi +6 -3
  129. data/rbi/sentdm/models/webhook_update_params.rbi +61 -0
  130. data/rbi/sentdm/models.rbi +36 -0
  131. data/rbi/sentdm/resources/calls/participants.rbi +199 -0
  132. data/rbi/sentdm/resources/calls.rbi +206 -0
  133. data/rbi/sentdm/resources/channels/voice.rbi +371 -0
  134. data/rbi/sentdm/resources/channels.rbi +42 -0
  135. data/rbi/sentdm/resources/me.rbi +5 -0
  136. data/rbi/sentdm/resources/templates.rbi +6 -0
  137. data/rbi/sentdm/resources/webhooks.rbi +15 -1
  138. data/sig/sentdm/client.rbs +4 -0
  139. data/sig/sentdm/internal/calls_page.rbs +41 -0
  140. data/sig/sentdm/models/api_response_of_call.rbs +39 -0
  141. data/sig/sentdm/models/api_response_of_call_recordings.rbs +39 -0
  142. data/sig/sentdm/models/api_response_of_calls_list.rbs +39 -0
  143. data/sig/sentdm/models/call.rbs +101 -0
  144. data/sig/sentdm/models/call_event.rbs +44 -0
  145. data/sig/sentdm/models/call_event_payload.rbs +68 -0
  146. data/sig/sentdm/models/call_hangup_params.rbs +38 -0
  147. data/sig/sentdm/models/call_list_params.rbs +67 -0
  148. data/sig/sentdm/models/call_list_recordings_params.rbs +30 -0
  149. data/sig/sentdm/models/call_party.rbs +17 -0
  150. data/sig/sentdm/models/call_record_params.rbs +54 -0
  151. data/sig/sentdm/models/call_recording.rbs +32 -0
  152. data/sig/sentdm/models/call_recordings.rbs +17 -0
  153. data/sig/sentdm/models/call_retrieve_params.rbs +30 -0
  154. data/sig/sentdm/models/call_timeline_entry.rbs +19 -0
  155. data/sig/sentdm/models/calls/api_response_of_list_of_call_participant.rbs +41 -0
  156. data/sig/sentdm/models/calls/call_participant.rbs +52 -0
  157. data/sig/sentdm/models/calls/call_participant_target.rbs +23 -0
  158. data/sig/sentdm/models/calls/participant_add_params.rbs +63 -0
  159. data/sig/sentdm/models/calls/participant_list_params.rbs +32 -0
  160. data/sig/sentdm/models/calls/participant_remove_all_params.rbs +34 -0
  161. data/sig/sentdm/models/calls/participant_remove_params.rbs +40 -0
  162. data/sig/sentdm/models/calls/participant_update_params.rbs +61 -0
  163. data/sig/sentdm/models/calls_list.rbs +26 -0
  164. data/sig/sentdm/models/channel_event_payload.rbs +5 -0
  165. data/sig/sentdm/models/channels/api_response_of_list_of_voice_number.rbs +41 -0
  166. data/sig/sentdm/models/channels/api_response_of_voice_callback_test.rbs +41 -0
  167. data/sig/sentdm/models/channels/api_response_of_voice_number.rbs +41 -0
  168. data/sig/sentdm/models/channels/api_response_of_voice_number_created.rbs +41 -0
  169. data/sig/sentdm/models/channels/api_response_of_voice_secret.rbs +41 -0
  170. data/sig/sentdm/models/channels/api_response_of_voice_token.rbs +41 -0
  171. data/sig/sentdm/models/channels/voice_callback_test.rbs +51 -0
  172. data/sig/sentdm/models/channels/voice_callback_test_error_info.rbs +28 -0
  173. data/sig/sentdm/models/channels/voice_callback_test_request_info.rbs +34 -0
  174. data/sig/sentdm/models/channels/voice_callback_test_response_info.rbs +20 -0
  175. data/sig/sentdm/models/channels/voice_create_params.rbs +64 -0
  176. data/sig/sentdm/models/channels/voice_create_token_params.rbs +61 -0
  177. data/sig/sentdm/models/channels/voice_list_params.rbs +27 -0
  178. data/sig/sentdm/models/channels/voice_number.rbs +57 -0
  179. data/sig/sentdm/models/channels/voice_number_created.rbs +17 -0
  180. data/sig/sentdm/models/channels/voice_retrieve_params.rbs +32 -0
  181. data/sig/sentdm/models/channels/voice_rotate_secret_params.rbs +40 -0
  182. data/sig/sentdm/models/channels/voice_secret.rbs +17 -0
  183. data/sig/sentdm/models/channels/voice_test_params.rbs +40 -0
  184. data/sig/sentdm/models/channels/voice_token.rbs +40 -0
  185. data/sig/sentdm/models/channels/voice_update_params.rbs +78 -0
  186. data/sig/sentdm/models/conversation_messages_list.rbs +56 -8
  187. data/sig/sentdm/models/inbound_message_event_payload.rbs +37 -0
  188. data/sig/sentdm/models/me_retrieve_response.rbs +7 -0
  189. data/sig/sentdm/models/message_event_payload.rbs +10 -0
  190. data/sig/sentdm/models/message_retrieve_activities_response.rbs +10 -0
  191. data/sig/sentdm/models/message_retrieve_status_response.rbs +56 -8
  192. data/sig/sentdm/models/template_create_params.rbs +7 -0
  193. data/sig/sentdm/models/webhook_create_params.rbs +29 -0
  194. data/sig/sentdm/models/webhook_list_events_response.rbs +1 -0
  195. data/sig/sentdm/models/webhook_update_params.rbs +29 -0
  196. data/sig/sentdm/models.rbs +36 -0
  197. data/sig/sentdm/resources/calls/participants.rbs +50 -0
  198. data/sig/sentdm/resources/calls.rbs +50 -0
  199. data/sig/sentdm/resources/channels/voice.rbs +68 -0
  200. data/sig/sentdm/resources/channels.rbs +9 -0
  201. data/sig/sentdm/resources/templates.rbs +1 -0
  202. data/sig/sentdm/resources/webhooks.rbs +2 -0
  203. metadata +152 -2
@@ -0,0 +1,76 @@
1
+ # typed: strong
2
+
3
+ module Sentdm
4
+ module Models
5
+ module Calls
6
+ class APIResponseOfListOfCallParticipant < Sentdm::Internal::Type::BaseModel
7
+ OrHash =
8
+ T.type_alias do
9
+ T.any(
10
+ Sentdm::Calls::APIResponseOfListOfCallParticipant,
11
+ Sentdm::Internal::AnyHash
12
+ )
13
+ end
14
+
15
+ # The response data (null if error)
16
+ sig { returns(T.nilable(T::Array[Sentdm::Calls::CallParticipant])) }
17
+ attr_accessor :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(T::Array[Sentdm::Calls::CallParticipant::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
+ # The response data (null if error)
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(T::Array[Sentdm::Calls::CallParticipant]),
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,92 @@
1
+ # typed: strong
2
+
3
+ module Sentdm
4
+ module Models
5
+ CallParticipant = Calls::CallParticipant
6
+
7
+ module Calls
8
+ class CallParticipant < Sentdm::Internal::Type::BaseModel
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(Sentdm::Calls::CallParticipant, Sentdm::Internal::AnyHash)
12
+ end
13
+
14
+ # The participant's own call id: what the mute and remove endpoints take, and what
15
+ # GET /v3/calls/{id} accepts
16
+ sig { returns(T.nilable(String)) }
17
+ attr_reader :id
18
+
19
+ sig { params(id: String).void }
20
+ attr_writer :id
21
+
22
+ # How long the participant has been connected to the room, in seconds
23
+ sig { returns(T.nilable(Integer)) }
24
+ attr_reader :duration_seconds
25
+
26
+ sig { params(duration_seconds: Integer).void }
27
+ attr_writer :duration_seconds
28
+
29
+ # user for one of your app users, number for a phone number, anonymous for a
30
+ # caller who withheld their number
31
+ sig { returns(T.nilable(String)) }
32
+ attr_reader :kind
33
+
34
+ sig { params(kind: String).void }
35
+ attr_writer :kind
36
+
37
+ # True while the room mutes this participant
38
+ sig { returns(T.nilable(T::Boolean)) }
39
+ attr_reader :muted
40
+
41
+ sig { params(muted: T::Boolean).void }
42
+ attr_writer :muted
43
+
44
+ # The app user's identity or the phone number in E.164 format. Null when the kind
45
+ # is anonymous
46
+ sig { returns(T.nilable(String)) }
47
+ attr_accessor :value
48
+
49
+ # A participant of a conference call
50
+ sig do
51
+ params(
52
+ id: String,
53
+ duration_seconds: Integer,
54
+ kind: String,
55
+ muted: T::Boolean,
56
+ value: T.nilable(String)
57
+ ).returns(T.attached_class)
58
+ end
59
+ def self.new(
60
+ # The participant's own call id: what the mute and remove endpoints take, and what
61
+ # GET /v3/calls/{id} accepts
62
+ id: nil,
63
+ # How long the participant has been connected to the room, in seconds
64
+ duration_seconds: nil,
65
+ # user for one of your app users, number for a phone number, anonymous for a
66
+ # caller who withheld their number
67
+ kind: nil,
68
+ # True while the room mutes this participant
69
+ muted: nil,
70
+ # The app user's identity or the phone number in E.164 format. Null when the kind
71
+ # is anonymous
72
+ value: nil
73
+ )
74
+ end
75
+
76
+ sig do
77
+ override.returns(
78
+ {
79
+ id: String,
80
+ duration_seconds: Integer,
81
+ kind: String,
82
+ muted: T::Boolean,
83
+ value: T.nilable(String)
84
+ }
85
+ )
86
+ end
87
+ def to_hash
88
+ end
89
+ end
90
+ end
91
+ end
92
+ end
@@ -0,0 +1,47 @@
1
+ # typed: strong
2
+
3
+ module Sentdm
4
+ module Models
5
+ CallParticipantTarget = Calls::CallParticipantTarget
6
+
7
+ module Calls
8
+ class CallParticipantTarget < Sentdm::Internal::Type::BaseModel
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(
12
+ Sentdm::Calls::CallParticipantTarget,
13
+ Sentdm::Internal::AnyHash
14
+ )
15
+ end
16
+
17
+ # user for one of your app users, number for a phone number
18
+ sig { returns(T.nilable(String)) }
19
+ attr_reader :kind
20
+
21
+ sig { params(kind: String).void }
22
+ attr_writer :kind
23
+
24
+ # The app user's identity, or the phone number in E.164 format
25
+ sig { returns(T.nilable(String)) }
26
+ attr_reader :value
27
+
28
+ sig { params(value: String).void }
29
+ attr_writer :value
30
+
31
+ # A participant to add to a call
32
+ sig { params(kind: String, value: String).returns(T.attached_class) }
33
+ def self.new(
34
+ # user for one of your app users, number for a phone number
35
+ kind: nil,
36
+ # The app user's identity, or the phone number in E.164 format
37
+ value: nil
38
+ )
39
+ end
40
+
41
+ sig { override.returns({ kind: String, value: String }) }
42
+ def to_hash
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,98 @@
1
+ # typed: strong
2
+
3
+ module Sentdm
4
+ module Models
5
+ module Calls
6
+ class ParticipantAddParams < Sentdm::Internal::Type::BaseModel
7
+ extend Sentdm::Internal::Type::RequestParameters::Converter
8
+ include Sentdm::Internal::Type::RequestParameters
9
+
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(
13
+ Sentdm::Calls::ParticipantAddParams,
14
+ Sentdm::Internal::AnyHash
15
+ )
16
+ end
17
+
18
+ sig { returns(String) }
19
+ attr_accessor :id
20
+
21
+ # The number shown to a phone participant as the caller, in E.164 format. Must be
22
+ # one of your numbers. The call's owning number when omitted
23
+ sig { returns(T.nilable(String)) }
24
+ attr_accessor :caller_id
25
+
26
+ # Sandbox flag - when true, the operation is simulated without side effects Useful
27
+ # for testing integrations without actual execution
28
+ sig { returns(T.nilable(T::Boolean)) }
29
+ attr_reader :sandbox
30
+
31
+ sig { params(sandbox: T::Boolean).void }
32
+ attr_writer :sandbox
33
+
34
+ # A participant to add to a call
35
+ sig { returns(T.nilable(Sentdm::Calls::CallParticipantTarget)) }
36
+ attr_reader :to
37
+
38
+ sig { params(to: Sentdm::Calls::CallParticipantTarget::OrHash).void }
39
+ attr_writer :to
40
+
41
+ sig { returns(T.nilable(String)) }
42
+ attr_reader :idempotency_key
43
+
44
+ sig { params(idempotency_key: String).void }
45
+ attr_writer :idempotency_key
46
+
47
+ sig { returns(T.nilable(String)) }
48
+ attr_reader :x_profile_id
49
+
50
+ sig { params(x_profile_id: String).void }
51
+ attr_writer :x_profile_id
52
+
53
+ sig do
54
+ params(
55
+ id: String,
56
+ caller_id: T.nilable(String),
57
+ sandbox: T::Boolean,
58
+ to: Sentdm::Calls::CallParticipantTarget::OrHash,
59
+ idempotency_key: String,
60
+ x_profile_id: String,
61
+ request_options: Sentdm::RequestOptions::OrHash
62
+ ).returns(T.attached_class)
63
+ end
64
+ def self.new(
65
+ id:,
66
+ # The number shown to a phone participant as the caller, in E.164 format. Must be
67
+ # one of your numbers. The call's owning number when omitted
68
+ caller_id: nil,
69
+ # Sandbox flag - when true, the operation is simulated without side effects Useful
70
+ # for testing integrations without actual execution
71
+ sandbox: nil,
72
+ # A participant to add to a call
73
+ to: nil,
74
+ idempotency_key: nil,
75
+ x_profile_id: nil,
76
+ request_options: {}
77
+ )
78
+ end
79
+
80
+ sig do
81
+ override.returns(
82
+ {
83
+ id: String,
84
+ caller_id: T.nilable(String),
85
+ sandbox: T::Boolean,
86
+ to: Sentdm::Calls::CallParticipantTarget,
87
+ idempotency_key: String,
88
+ x_profile_id: String,
89
+ request_options: Sentdm::RequestOptions
90
+ }
91
+ )
92
+ end
93
+ def to_hash
94
+ end
95
+ end
96
+ end
97
+ end
98
+ end
@@ -0,0 +1,51 @@
1
+ # typed: strong
2
+
3
+ module Sentdm
4
+ module Models
5
+ module Calls
6
+ class ParticipantListParams < Sentdm::Internal::Type::BaseModel
7
+ extend Sentdm::Internal::Type::RequestParameters::Converter
8
+ include Sentdm::Internal::Type::RequestParameters
9
+
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(
13
+ Sentdm::Calls::ParticipantListParams,
14
+ Sentdm::Internal::AnyHash
15
+ )
16
+ end
17
+
18
+ sig { returns(String) }
19
+ attr_accessor :id
20
+
21
+ sig { returns(T.nilable(String)) }
22
+ attr_reader :x_profile_id
23
+
24
+ sig { params(x_profile_id: String).void }
25
+ attr_writer :x_profile_id
26
+
27
+ sig do
28
+ params(
29
+ id: String,
30
+ x_profile_id: String,
31
+ request_options: Sentdm::RequestOptions::OrHash
32
+ ).returns(T.attached_class)
33
+ end
34
+ def self.new(id:, x_profile_id: nil, request_options: {})
35
+ end
36
+
37
+ sig do
38
+ override.returns(
39
+ {
40
+ id: String,
41
+ x_profile_id: String,
42
+ request_options: Sentdm::RequestOptions
43
+ }
44
+ )
45
+ end
46
+ def to_hash
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,51 @@
1
+ # typed: strong
2
+
3
+ module Sentdm
4
+ module Models
5
+ module Calls
6
+ class ParticipantRemoveAllParams < Sentdm::Models::MutationRequest
7
+ extend Sentdm::Internal::Type::RequestParameters::Converter
8
+ include Sentdm::Internal::Type::RequestParameters
9
+
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(
13
+ Sentdm::Calls::ParticipantRemoveAllParams,
14
+ Sentdm::Internal::AnyHash
15
+ )
16
+ end
17
+
18
+ sig { returns(String) }
19
+ attr_accessor :id
20
+
21
+ sig { returns(T.nilable(String)) }
22
+ attr_reader :x_profile_id
23
+
24
+ sig { params(x_profile_id: String).void }
25
+ attr_writer :x_profile_id
26
+
27
+ sig do
28
+ params(
29
+ id: String,
30
+ x_profile_id: String,
31
+ request_options: Sentdm::RequestOptions::OrHash
32
+ ).returns(T.attached_class)
33
+ end
34
+ def self.new(id:, x_profile_id: nil, request_options: {})
35
+ end
36
+
37
+ sig do
38
+ override.returns(
39
+ {
40
+ id: String,
41
+ x_profile_id: String,
42
+ request_options: Sentdm::RequestOptions
43
+ }
44
+ )
45
+ end
46
+ def to_hash
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,61 @@
1
+ # typed: strong
2
+
3
+ module Sentdm
4
+ module Models
5
+ module Calls
6
+ class ParticipantRemoveParams < Sentdm::Models::MutationRequest
7
+ extend Sentdm::Internal::Type::RequestParameters::Converter
8
+ include Sentdm::Internal::Type::RequestParameters
9
+
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(
13
+ Sentdm::Calls::ParticipantRemoveParams,
14
+ Sentdm::Internal::AnyHash
15
+ )
16
+ end
17
+
18
+ sig { returns(String) }
19
+ attr_accessor :id
20
+
21
+ sig { returns(String) }
22
+ attr_accessor :participant_id
23
+
24
+ sig { returns(T.nilable(String)) }
25
+ attr_reader :x_profile_id
26
+
27
+ sig { params(x_profile_id: String).void }
28
+ attr_writer :x_profile_id
29
+
30
+ sig do
31
+ params(
32
+ id: String,
33
+ participant_id: String,
34
+ x_profile_id: String,
35
+ request_options: Sentdm::RequestOptions::OrHash
36
+ ).returns(T.attached_class)
37
+ end
38
+ def self.new(
39
+ id:,
40
+ participant_id:,
41
+ x_profile_id: nil,
42
+ request_options: {}
43
+ )
44
+ end
45
+
46
+ sig do
47
+ override.returns(
48
+ {
49
+ id: String,
50
+ participant_id: String,
51
+ x_profile_id: String,
52
+ request_options: Sentdm::RequestOptions
53
+ }
54
+ )
55
+ end
56
+ def to_hash
57
+ end
58
+ end
59
+ end
60
+ end
61
+ end
@@ -0,0 +1,94 @@
1
+ # typed: strong
2
+
3
+ module Sentdm
4
+ module Models
5
+ module Calls
6
+ class ParticipantUpdateParams < Sentdm::Internal::Type::BaseModel
7
+ extend Sentdm::Internal::Type::RequestParameters::Converter
8
+ include Sentdm::Internal::Type::RequestParameters
9
+
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(
13
+ Sentdm::Calls::ParticipantUpdateParams,
14
+ Sentdm::Internal::AnyHash
15
+ )
16
+ end
17
+
18
+ sig { returns(String) }
19
+ attr_accessor :id
20
+
21
+ sig { returns(String) }
22
+ attr_accessor :participant_id
23
+
24
+ # true to mute the participant, false to unmute them
25
+ sig { returns(T.nilable(T::Boolean)) }
26
+ attr_reader :muted
27
+
28
+ sig { params(muted: T::Boolean).void }
29
+ attr_writer :muted
30
+
31
+ # Sandbox flag - when true, the operation is simulated without side effects Useful
32
+ # for testing integrations without actual execution
33
+ sig { returns(T.nilable(T::Boolean)) }
34
+ attr_reader :sandbox
35
+
36
+ sig { params(sandbox: T::Boolean).void }
37
+ attr_writer :sandbox
38
+
39
+ sig { returns(T.nilable(String)) }
40
+ attr_reader :idempotency_key
41
+
42
+ sig { params(idempotency_key: String).void }
43
+ attr_writer :idempotency_key
44
+
45
+ sig { returns(T.nilable(String)) }
46
+ attr_reader :x_profile_id
47
+
48
+ sig { params(x_profile_id: String).void }
49
+ attr_writer :x_profile_id
50
+
51
+ sig do
52
+ params(
53
+ id: String,
54
+ participant_id: String,
55
+ muted: T::Boolean,
56
+ sandbox: T::Boolean,
57
+ idempotency_key: String,
58
+ x_profile_id: String,
59
+ request_options: Sentdm::RequestOptions::OrHash
60
+ ).returns(T.attached_class)
61
+ end
62
+ def self.new(
63
+ id:,
64
+ participant_id:,
65
+ # true to mute the participant, false to unmute them
66
+ muted: nil,
67
+ # Sandbox flag - when true, the operation is simulated without side effects Useful
68
+ # for testing integrations without actual execution
69
+ sandbox: nil,
70
+ idempotency_key: nil,
71
+ x_profile_id: nil,
72
+ request_options: {}
73
+ )
74
+ end
75
+
76
+ sig do
77
+ override.returns(
78
+ {
79
+ id: String,
80
+ participant_id: String,
81
+ muted: T::Boolean,
82
+ sandbox: T::Boolean,
83
+ idempotency_key: String,
84
+ x_profile_id: String,
85
+ request_options: Sentdm::RequestOptions
86
+ }
87
+ )
88
+ end
89
+ def to_hash
90
+ end
91
+ end
92
+ end
93
+ end
94
+ end
@@ -0,0 +1,47 @@
1
+ # typed: strong
2
+
3
+ module Sentdm
4
+ module Models
5
+ class CallsList < Sentdm::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias { T.any(Sentdm::CallsList, Sentdm::Internal::AnyHash) }
8
+
9
+ # The calls on this page, most recent first
10
+ sig { returns(T.nilable(T::Array[Sentdm::Call])) }
11
+ attr_reader :calls
12
+
13
+ sig { params(calls: T::Array[Sentdm::Call::OrHash]).void }
14
+ attr_writer :calls
15
+
16
+ # Pagination metadata for list responses
17
+ sig { returns(T.nilable(Sentdm::PaginationMeta)) }
18
+ attr_reader :pagination
19
+
20
+ sig { params(pagination: Sentdm::PaginationMeta::OrHash).void }
21
+ attr_writer :pagination
22
+
23
+ # Paginated list of calls
24
+ sig do
25
+ params(
26
+ calls: T::Array[Sentdm::Call::OrHash],
27
+ pagination: Sentdm::PaginationMeta::OrHash
28
+ ).returns(T.attached_class)
29
+ end
30
+ def self.new(
31
+ # The calls on this page, most recent first
32
+ calls: nil,
33
+ # Pagination metadata for list responses
34
+ pagination: nil
35
+ )
36
+ end
37
+
38
+ sig do
39
+ override.returns(
40
+ { calls: T::Array[Sentdm::Call], pagination: Sentdm::PaginationMeta }
41
+ )
42
+ end
43
+ def to_hash
44
+ end
45
+ end
46
+ end
47
+ end
@@ -68,13 +68,19 @@ module Sentdm
68
68
  sig { returns(T.nilable(String)) }
69
69
  attr_accessor :number_type
70
70
 
71
- # Why the market reached this state, when a reason was given — a correction
72
- # explained, or a campaign lapse. Free text, passed through from the registry or
73
- # carrier that wrote it, so treat it as a message to show a human rather than a
74
- # value to branch on.
71
+ # Why the market reached this state, as a sentence to show a person: the specific
72
+ # explanation when one was given (a correction explained, a campaign lapse),
73
+ # otherwise what reason_code means for this market. Not a value to branch on.
75
74
  sig { returns(T.nilable(String)) }
76
75
  attr_accessor :reason
77
76
 
77
+ # Why the market is not ACTIVE, as a stable code: an ErrorCodes CHANNEL_xxx value
78
+ # such as CHANNEL_001 (something you owe) or CHANNEL_002 (a correction was
79
+ # requested). The same code the channels resource reports for the market. Switch
80
+ # on this rather than on reason. Omitted while ACTIVE.
81
+ sig { returns(T.nilable(String)) }
82
+ attr_accessor :reason_code
83
+
78
84
  # The sender itself — a number in E.164, or an alphanumeric sender ID.
79
85
  #
80
86
  # Always present, and null until a sender exists. The key is on every delivery so
@@ -142,6 +148,7 @@ module Sentdm
142
148
  T.nilable(Sentdm::ChannelEventPayload::Compliance::OrHash),
143
149
  number_type: T.nilable(String),
144
150
  reason: T.nilable(String),
151
+ reason_code: T.nilable(String),
145
152
  sender_value: T.nilable(String),
146
153
  status: String,
147
154
  updated_at: String
@@ -185,11 +192,15 @@ module Sentdm
185
192
  # The kind of sender the market uses, for example TEN_DLC, LOCAL, or ALPHANUMERIC.
186
193
  # Omitted when the subject has no sender type of its own.
187
194
  number_type: nil,
188
- # Why the market reached this state, when a reason was given — a correction
189
- # explained, or a campaign lapse. Free text, passed through from the registry or
190
- # carrier that wrote it, so treat it as a message to show a human rather than a
191
- # value to branch on.
195
+ # Why the market reached this state, as a sentence to show a person: the specific
196
+ # explanation when one was given (a correction explained, a campaign lapse),
197
+ # otherwise what reason_code means for this market. Not a value to branch on.
192
198
  reason: nil,
199
+ # Why the market is not ACTIVE, as a stable code: an ErrorCodes CHANNEL_xxx value
200
+ # such as CHANNEL_001 (something you owe) or CHANNEL_002 (a correction was
201
+ # requested). The same code the channels resource reports for the market. Switch
202
+ # on this rather than on reason. Omitted while ACTIVE.
203
+ reason_code: nil,
193
204
  # The sender itself — a number in E.164, or an alphanumeric sender ID.
194
205
  #
195
206
  # Always present, and null until a sender exists. The key is on every delivery so
@@ -228,6 +239,7 @@ module Sentdm
228
239
  compliance: T.nilable(Sentdm::ChannelEventPayload::Compliance),
229
240
  number_type: T.nilable(String),
230
241
  reason: T.nilable(String),
242
+ reason_code: T.nilable(String),
231
243
  sender_value: T.nilable(String),
232
244
  status: String,
233
245
  updated_at: String