sentdm 0.34.0 → 0.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -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/channels/api_response_of_list_of_voice_number.rb +45 -0
  31. data/lib/sentdm/models/channels/api_response_of_voice_callback_test.rb +45 -0
  32. data/lib/sentdm/models/channels/api_response_of_voice_number.rb +45 -0
  33. data/lib/sentdm/models/channels/api_response_of_voice_number_created.rb +45 -0
  34. data/lib/sentdm/models/channels/api_response_of_voice_secret.rb +45 -0
  35. data/lib/sentdm/models/channels/api_response_of_voice_token.rb +45 -0
  36. data/lib/sentdm/models/channels/voice_callback_test.rb +65 -0
  37. data/lib/sentdm/models/channels/voice_callback_test_error_info.rb +41 -0
  38. data/lib/sentdm/models/channels/voice_callback_test_request_info.rb +40 -0
  39. data/lib/sentdm/models/channels/voice_callback_test_response_info.rb +28 -0
  40. data/lib/sentdm/models/channels/voice_create_params.rb +86 -0
  41. data/lib/sentdm/models/channels/voice_create_token_params.rb +69 -0
  42. data/lib/sentdm/models/channels/voice_list_params.rb +22 -0
  43. data/lib/sentdm/models/channels/voice_number.rb +68 -0
  44. data/lib/sentdm/models/channels/voice_number_created.rb +26 -0
  45. data/lib/sentdm/models/channels/voice_retrieve_params.rb +28 -0
  46. data/lib/sentdm/models/channels/voice_rotate_secret_params.rb +34 -0
  47. data/lib/sentdm/models/channels/voice_secret.rb +25 -0
  48. data/lib/sentdm/models/channels/voice_test_params.rb +34 -0
  49. data/lib/sentdm/models/channels/voice_token.rb +44 -0
  50. data/lib/sentdm/models/channels/voice_update_params.rb +95 -0
  51. data/lib/sentdm/models/webhook_list_events_response.rb +4 -173
  52. data/lib/sentdm/models.rb +36 -0
  53. data/lib/sentdm/resources/calls/participants.rb +231 -0
  54. data/lib/sentdm/resources/calls.rb +235 -0
  55. data/lib/sentdm/resources/channels/voice.rb +381 -0
  56. data/lib/sentdm/resources/channels.rb +45 -0
  57. data/lib/sentdm/version.rb +1 -1
  58. data/lib/sentdm.rb +50 -0
  59. data/rbi/sentdm/client.rbi +23 -0
  60. data/rbi/sentdm/internal/calls_page.rbi +71 -0
  61. data/rbi/sentdm/models/api_response_of_call.rbi +74 -0
  62. data/rbi/sentdm/models/api_response_of_call_recordings.rbi +74 -0
  63. data/rbi/sentdm/models/api_response_of_calls_list.rbi +74 -0
  64. data/rbi/sentdm/models/call.rbi +177 -0
  65. data/rbi/sentdm/models/call_event.rbi +114 -0
  66. data/rbi/sentdm/models/call_event_payload.rbi +135 -0
  67. data/rbi/sentdm/models/call_hangup_params.rbi +59 -0
  68. data/rbi/sentdm/models/call_list_params.rbi +112 -0
  69. data/rbi/sentdm/models/call_list_recordings_params.rbi +46 -0
  70. data/rbi/sentdm/models/call_party.rbi +41 -0
  71. data/rbi/sentdm/models/call_record_params.rbi +83 -0
  72. data/rbi/sentdm/models/call_recording.rbi +59 -0
  73. data/rbi/sentdm/models/call_recordings.rbi +39 -0
  74. data/rbi/sentdm/models/call_retrieve_params.rbi +46 -0
  75. data/rbi/sentdm/models/call_timeline_entry.rbi +40 -0
  76. data/rbi/sentdm/models/calls/api_response_of_list_of_call_participant.rbi +76 -0
  77. data/rbi/sentdm/models/calls/call_participant.rbi +92 -0
  78. data/rbi/sentdm/models/calls/call_participant_target.rbi +47 -0
  79. data/rbi/sentdm/models/calls/participant_add_params.rbi +98 -0
  80. data/rbi/sentdm/models/calls/participant_list_params.rbi +51 -0
  81. data/rbi/sentdm/models/calls/participant_remove_all_params.rbi +51 -0
  82. data/rbi/sentdm/models/calls/participant_remove_params.rbi +61 -0
  83. data/rbi/sentdm/models/calls/participant_update_params.rbi +94 -0
  84. data/rbi/sentdm/models/calls_list.rbi +47 -0
  85. data/rbi/sentdm/models/channels/api_response_of_list_of_voice_number.rbi +76 -0
  86. data/rbi/sentdm/models/channels/api_response_of_voice_callback_test.rbi +83 -0
  87. data/rbi/sentdm/models/channels/api_response_of_voice_number.rbi +81 -0
  88. data/rbi/sentdm/models/channels/api_response_of_voice_number_created.rbi +83 -0
  89. data/rbi/sentdm/models/channels/api_response_of_voice_secret.rbi +81 -0
  90. data/rbi/sentdm/models/channels/api_response_of_voice_token.rbi +81 -0
  91. data/rbi/sentdm/models/channels/voice_callback_test.rbi +126 -0
  92. data/rbi/sentdm/models/channels/voice_callback_test_error_info.rbi +65 -0
  93. data/rbi/sentdm/models/channels/voice_callback_test_request_info.rbi +66 -0
  94. data/rbi/sentdm/models/channels/voice_callback_test_response_info.rbi +48 -0
  95. data/rbi/sentdm/models/channels/voice_create_params.rbi +127 -0
  96. data/rbi/sentdm/models/channels/voice_create_token_params.rbi +104 -0
  97. data/rbi/sentdm/models/channels/voice_list_params.rbi +40 -0
  98. data/rbi/sentdm/models/channels/voice_number.rbi +105 -0
  99. data/rbi/sentdm/models/channels/voice_number_created.rbi +42 -0
  100. data/rbi/sentdm/models/channels/voice_retrieve_params.rbi +51 -0
  101. data/rbi/sentdm/models/channels/voice_rotate_secret_params.rbi +64 -0
  102. data/rbi/sentdm/models/channels/voice_secret.rbi +35 -0
  103. data/rbi/sentdm/models/channels/voice_test_params.rbi +61 -0
  104. data/rbi/sentdm/models/channels/voice_token.rbi +76 -0
  105. data/rbi/sentdm/models/channels/voice_update_params.rbi +158 -0
  106. data/rbi/sentdm/models/webhook_list_events_response.rbi +3 -269
  107. data/rbi/sentdm/models.rbi +36 -0
  108. data/rbi/sentdm/resources/calls/participants.rbi +199 -0
  109. data/rbi/sentdm/resources/calls.rbi +206 -0
  110. data/rbi/sentdm/resources/channels/voice.rbi +371 -0
  111. data/rbi/sentdm/resources/channels.rbi +42 -0
  112. data/sig/sentdm/client.rbs +4 -0
  113. data/sig/sentdm/internal/calls_page.rbs +41 -0
  114. data/sig/sentdm/models/api_response_of_call.rbs +39 -0
  115. data/sig/sentdm/models/api_response_of_call_recordings.rbs +39 -0
  116. data/sig/sentdm/models/api_response_of_calls_list.rbs +39 -0
  117. data/sig/sentdm/models/call.rbs +101 -0
  118. data/sig/sentdm/models/call_event.rbs +44 -0
  119. data/sig/sentdm/models/call_event_payload.rbs +68 -0
  120. data/sig/sentdm/models/call_hangup_params.rbs +38 -0
  121. data/sig/sentdm/models/call_list_params.rbs +67 -0
  122. data/sig/sentdm/models/call_list_recordings_params.rbs +30 -0
  123. data/sig/sentdm/models/call_party.rbs +17 -0
  124. data/sig/sentdm/models/call_record_params.rbs +54 -0
  125. data/sig/sentdm/models/call_recording.rbs +32 -0
  126. data/sig/sentdm/models/call_recordings.rbs +17 -0
  127. data/sig/sentdm/models/call_retrieve_params.rbs +30 -0
  128. data/sig/sentdm/models/call_timeline_entry.rbs +19 -0
  129. data/sig/sentdm/models/calls/api_response_of_list_of_call_participant.rbs +41 -0
  130. data/sig/sentdm/models/calls/call_participant.rbs +52 -0
  131. data/sig/sentdm/models/calls/call_participant_target.rbs +23 -0
  132. data/sig/sentdm/models/calls/participant_add_params.rbs +63 -0
  133. data/sig/sentdm/models/calls/participant_list_params.rbs +32 -0
  134. data/sig/sentdm/models/calls/participant_remove_all_params.rbs +34 -0
  135. data/sig/sentdm/models/calls/participant_remove_params.rbs +40 -0
  136. data/sig/sentdm/models/calls/participant_update_params.rbs +61 -0
  137. data/sig/sentdm/models/calls_list.rbs +26 -0
  138. data/sig/sentdm/models/channels/api_response_of_list_of_voice_number.rbs +41 -0
  139. data/sig/sentdm/models/channels/api_response_of_voice_callback_test.rbs +41 -0
  140. data/sig/sentdm/models/channels/api_response_of_voice_number.rbs +41 -0
  141. data/sig/sentdm/models/channels/api_response_of_voice_number_created.rbs +41 -0
  142. data/sig/sentdm/models/channels/api_response_of_voice_secret.rbs +41 -0
  143. data/sig/sentdm/models/channels/api_response_of_voice_token.rbs +41 -0
  144. data/sig/sentdm/models/channels/voice_callback_test.rbs +51 -0
  145. data/sig/sentdm/models/channels/voice_callback_test_error_info.rbs +28 -0
  146. data/sig/sentdm/models/channels/voice_callback_test_request_info.rbs +34 -0
  147. data/sig/sentdm/models/channels/voice_callback_test_response_info.rbs +20 -0
  148. data/sig/sentdm/models/channels/voice_create_params.rbs +64 -0
  149. data/sig/sentdm/models/channels/voice_create_token_params.rbs +61 -0
  150. data/sig/sentdm/models/channels/voice_list_params.rbs +27 -0
  151. data/sig/sentdm/models/channels/voice_number.rbs +57 -0
  152. data/sig/sentdm/models/channels/voice_number_created.rbs +17 -0
  153. data/sig/sentdm/models/channels/voice_retrieve_params.rbs +32 -0
  154. data/sig/sentdm/models/channels/voice_rotate_secret_params.rbs +40 -0
  155. data/sig/sentdm/models/channels/voice_secret.rbs +17 -0
  156. data/sig/sentdm/models/channels/voice_test_params.rbs +40 -0
  157. data/sig/sentdm/models/channels/voice_token.rbs +40 -0
  158. data/sig/sentdm/models/channels/voice_update_params.rbs +78 -0
  159. data/sig/sentdm/models/webhook_list_events_response.rbs +1 -107
  160. data/sig/sentdm/models.rbs +36 -0
  161. data/sig/sentdm/resources/calls/participants.rbs +50 -0
  162. data/sig/sentdm/resources/calls.rbs +50 -0
  163. data/sig/sentdm/resources/channels/voice.rbs +68 -0
  164. data/sig/sentdm/resources/channels.rbs +9 -0
  165. metadata +152 -2
@@ -0,0 +1,199 @@
1
+ # typed: strong
2
+
3
+ module Sentdm
4
+ module Resources
5
+ class Calls
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/channels/voice/tokens` mints
10
+ # a 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/calls`: read it, list its recordings once one
20
+ # 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 Participants
24
+ # Mutes or unmutes one participant of the conference room a live call is in, named
25
+ # by the participant's own call id from the participants list: send muted true to
26
+ # silence them, muted false to let them be heard again. Muting a participant who
27
+ # is already muted succeeds, as does unmuting one who is not. A participant who is
28
+ # not in this call's room answers 404. A call that has ended answers 409, as does
29
+ # a call that is not in a conference.
30
+ sig do
31
+ params(
32
+ participant_id: String,
33
+ id: String,
34
+ muted: T::Boolean,
35
+ sandbox: T::Boolean,
36
+ idempotency_key: String,
37
+ x_profile_id: String,
38
+ request_options: Sentdm::RequestOptions::OrHash
39
+ ).void
40
+ end
41
+ def update(
42
+ # Path param: The participant's own call id from the route, as listed by the
43
+ # participants endpoint, for example call_9f2ab000-0000-4000-8000-000000000002
44
+ participant_id,
45
+ # Path param: The call id from the route, as carried by call webhooks and the
46
+ # calls list, for example call_9f2ab000-0000-4000-8000-000000000001
47
+ id:,
48
+ # Body param: true to mute the participant, false to unmute them
49
+ muted: nil,
50
+ # Body param: Sandbox flag - when true, the operation is simulated without side
51
+ # effects Useful for testing integrations without actual execution
52
+ sandbox: nil,
53
+ # Header param: Unique key to ensure idempotent request processing. Must be 1-255
54
+ # alphanumeric characters, hyphens, or underscores. Responses are cached for 24
55
+ # hours per key per customer.
56
+ idempotency_key: nil,
57
+ # Header param: Profile UUID to scope the request to a child profile. Only
58
+ # organization API keys can use this header. The profile must belong to the
59
+ # calling organization.
60
+ x_profile_id: nil,
61
+ request_options: {}
62
+ )
63
+ end
64
+
65
+ # Lists who is in the conference room one of your live calls is in: each
66
+ # participant's own call id, who they are, whether the room mutes them, and how
67
+ # long they have been connected. The call itself is one of the participants. Use a
68
+ # participant's id to mute or remove them; it is also a call id, so GET
69
+ # /v3/calls/{id} accepts it. A call that has ended answers 409, as does a call
70
+ # that is not in a conference.
71
+ sig do
72
+ params(
73
+ id: String,
74
+ x_profile_id: String,
75
+ request_options: Sentdm::RequestOptions::OrHash
76
+ ).returns(Sentdm::Calls::APIResponseOfListOfCallParticipant)
77
+ end
78
+ def list(
79
+ # The call id from the route, as carried by call webhooks and the calls list, for
80
+ # example call_9f2ab000-0000-4000-8000-000000000001
81
+ id,
82
+ # Profile UUID to scope the request to a child profile. Only organization API keys
83
+ # can use this header. The profile must belong to the calling organization.
84
+ x_profile_id: nil,
85
+ request_options: {}
86
+ )
87
+ end
88
+
89
+ # Dials one of your app users or a phone number into a call that is in a
90
+ # conference room, and answers with the participant's own call record. The
91
+ # participant is a call of their own: it has its own id, can be looked up and hung
92
+ # up, and is billed and reported through call.completed and call.failed like any
93
+ # other call. A phone participant is called from caller_id, which must be one of
94
+ # your numbers, or from the call's owning number when omitted, and needs a
95
+ # destination you may call and a positive balance. Only a call your answer
96
+ # connected to a conference can take participants: a call connected to a user or a
97
+ # number answers 409.
98
+ sig do
99
+ params(
100
+ id: String,
101
+ caller_id: T.nilable(String),
102
+ sandbox: T::Boolean,
103
+ to: Sentdm::Calls::CallParticipantTarget::OrHash,
104
+ idempotency_key: String,
105
+ x_profile_id: String,
106
+ request_options: Sentdm::RequestOptions::OrHash
107
+ ).returns(Sentdm::APIResponseOfCall)
108
+ end
109
+ def add(
110
+ # Path param: The call id from the route, as carried by call webhooks and the
111
+ # calls list, for example call_9f2ab000-0000-4000-8000-000000000001
112
+ id,
113
+ # Body param: The number shown to a phone participant as the caller, in E.164
114
+ # format. Must be one of your numbers. The call's owning number when omitted
115
+ caller_id: nil,
116
+ # Body param: Sandbox flag - when true, the operation is simulated without side
117
+ # effects Useful for testing integrations without actual execution
118
+ sandbox: nil,
119
+ # Body param: A participant to add to a call
120
+ to: nil,
121
+ # Header param: Unique key to ensure idempotent request processing. Must be 1-255
122
+ # alphanumeric characters, hyphens, or underscores. Responses are cached for 24
123
+ # hours per key per customer.
124
+ idempotency_key: nil,
125
+ # Header param: Profile UUID to scope the request to a child profile. Only
126
+ # organization API keys can use this header. The profile must belong to the
127
+ # calling organization.
128
+ x_profile_id: nil,
129
+ request_options: {}
130
+ )
131
+ end
132
+
133
+ # Removes one participant from the conference room a live call is in, named by the
134
+ # participant's own call id from the participants list. Their leg ends and is
135
+ # reported through call.completed like any other call; everyone else stays
136
+ # connected. A participant who is not in this call's room answers 404. A call that
137
+ # has ended answers 409, as does a call that is not in a conference.
138
+ sig do
139
+ params(
140
+ participant_id: String,
141
+ id: String,
142
+ sandbox: T::Boolean,
143
+ x_profile_id: String,
144
+ request_options: Sentdm::RequestOptions::OrHash
145
+ ).void
146
+ end
147
+ def remove(
148
+ # Path param: The participant's own call id from the route, as listed by the
149
+ # participants endpoint, for example call_9f2ab000-0000-4000-8000-000000000002
150
+ participant_id,
151
+ # Path param: The call id from the route, as carried by call webhooks and the
152
+ # calls list, for example call_9f2ab000-0000-4000-8000-000000000001
153
+ id:,
154
+ # Body param: Sandbox flag - when true, the operation is simulated without side
155
+ # effects Useful for testing integrations without actual execution
156
+ sandbox: nil,
157
+ # Header param: Profile UUID to scope the request to a child profile. Only
158
+ # organization API keys can use this header. The profile must belong to the
159
+ # calling organization.
160
+ x_profile_id: nil,
161
+ request_options: {}
162
+ )
163
+ end
164
+
165
+ # Removes every participant from the conference room a live call is in, the call
166
+ # itself included. Every leg ends and is reported through call.completed like any
167
+ # other call. A room that is already empty answers 204 as well. A call that has
168
+ # ended answers 409, as does a call that is not in a conference.
169
+ sig do
170
+ params(
171
+ id: String,
172
+ sandbox: T::Boolean,
173
+ x_profile_id: String,
174
+ request_options: Sentdm::RequestOptions::OrHash
175
+ ).void
176
+ end
177
+ def remove_all(
178
+ # Path param: The call id from the route, as carried by call webhooks and the
179
+ # calls list, for example call_9f2ab000-0000-4000-8000-000000000001
180
+ id,
181
+ # Body param: Sandbox flag - when true, the operation is simulated without side
182
+ # effects Useful for testing integrations without actual execution
183
+ sandbox: nil,
184
+ # Header param: Profile UUID to scope the request to a child profile. Only
185
+ # organization API keys can use this header. The profile must belong to the
186
+ # calling organization.
187
+ x_profile_id: nil,
188
+ request_options: {}
189
+ )
190
+ end
191
+
192
+ # @api private
193
+ sig { params(client: Sentdm::Client).returns(T.attached_class) }
194
+ def self.new(client:)
195
+ end
196
+ end
197
+ end
198
+ end
199
+ end
@@ -0,0 +1,206 @@
1
+ # typed: strong
2
+
3
+ module Sentdm
4
+ module Resources
5
+ # Phone calls from the numbers you hold, driven by your own callback URL.
6
+ #
7
+ # `POST /v3/channels/voice` enables a number for calls, with the callback URL Sent
8
+ # asks what to do with each call on it, and `POST /v3/channels/voice/tokens` mints
9
+ # a short-lived token that lets a user of your app place and receive calls as that
10
+ # number. When a call arrives or a caller presses a key, a signed question is
11
+ # POSTed to the callback URL and the answer decides the call;
12
+ # `POST /v3/channels/voice/{number}/test` checks the URL answers the way we need
13
+ # before a real call reaches it, and
14
+ # `POST /v3/channels/voice/{number}/rotate-secret` replaces the signing secret.
15
+ # The call events themselves (`call.completed` and the rest) arrive through your
16
+ # webhooks.
17
+ #
18
+ # Every call is a record under `/v3/calls`: read it, list its recordings once one
19
+ # is ready, hang it up, start or stop recording, and add, mute or remove
20
+ # conference participants while it is live. A leg to a phone number runs for at
21
+ # most what your balance affords at the destination's rate.
22
+ class Calls
23
+ # Phone calls from the numbers you hold, driven by your own callback URL.
24
+ #
25
+ # `POST /v3/channels/voice` enables a number for calls, with the callback URL Sent
26
+ # asks what to do with each call on it, and `POST /v3/channels/voice/tokens` mints
27
+ # a short-lived token that lets a user of your app place and receive calls as that
28
+ # number. When a call arrives or a caller presses a key, a signed question is
29
+ # POSTed to the callback URL and the answer decides the call;
30
+ # `POST /v3/channels/voice/{number}/test` checks the URL answers the way we need
31
+ # before a real call reaches it, and
32
+ # `POST /v3/channels/voice/{number}/rotate-secret` replaces the signing secret.
33
+ # The call events themselves (`call.completed` and the rest) arrive through your
34
+ # webhooks.
35
+ #
36
+ # Every call is a record under `/v3/calls`: read it, list its recordings once one
37
+ # is ready, hang it up, start or stop recording, and add, mute or remove
38
+ # conference participants while it is live. A leg to a phone number runs for at
39
+ # most what your balance affords at the destination's rate.
40
+ sig { returns(Sentdm::Resources::Calls::Participants) }
41
+ attr_reader :participants
42
+
43
+ # Retrieves one of your calls by id: the parties, the owning number, the current
44
+ # status with its failure reason, duration, price, recording availability, and a
45
+ # timeline of when the call entered each status.
46
+ sig do
47
+ params(
48
+ id: String,
49
+ x_profile_id: String,
50
+ request_options: Sentdm::RequestOptions::OrHash
51
+ ).returns(Sentdm::APIResponseOfCall)
52
+ end
53
+ def retrieve(
54
+ # The call id from the route, as carried by call webhooks and the calls list, for
55
+ # example call_9f2ab000-0000-4000-8000-000000000001
56
+ id,
57
+ # Profile UUID to scope the request to a child profile. Only organization API keys
58
+ # can use this header. The profile must belong to the calling organization.
59
+ x_profile_id: nil,
60
+ request_options: {}
61
+ )
62
+ end
63
+
64
+ # Retrieves a paginated list of your calls, most recent first. Filter by
65
+ # direction, status, the owning number, and the time the call started (from and to
66
+ # are inclusive). Use the call webhooks for real-time updates; this list is for
67
+ # looking calls up afterwards.
68
+ sig do
69
+ params(
70
+ direction: T.nilable(String),
71
+ from: T.nilable(Time),
72
+ number: T.nilable(String),
73
+ page: Integer,
74
+ page_size: Integer,
75
+ status: T.nilable(String),
76
+ to: T.nilable(Time),
77
+ x_profile_id: String,
78
+ request_options: Sentdm::RequestOptions::OrHash
79
+ ).returns(Sentdm::Internal::CallsPage[Sentdm::Call])
80
+ end
81
+ def list(
82
+ # Query param: Optional direction filter: outbound for calls placed from your app,
83
+ # inbound for calls to one of your numbers
84
+ direction: nil,
85
+ # Query param: Only calls started at or after this time (ISO 8601)
86
+ from: nil,
87
+ # Query param: Optional filter on the number that owns the call, one of your
88
+ # voice-enabled numbers in E.164 format
89
+ number: nil,
90
+ # Query param: Page number (1-indexed)
91
+ page: nil,
92
+ # Query param: Number of items per page
93
+ page_size: nil,
94
+ # Query param: Optional status filter: initiated, ringing, answered, completed,
95
+ # failed, no_answer or rejected
96
+ status: nil,
97
+ # Query param: Only calls started at or before this time (ISO 8601)
98
+ to: nil,
99
+ # Header param: Profile UUID to scope the request to a child profile. Only
100
+ # organization API keys can use this header. The profile must belong to the
101
+ # calling organization.
102
+ x_profile_id: nil,
103
+ request_options: {}
104
+ )
105
+ end
106
+
107
+ # Ends one of your live calls. The call then ends the way any other call does: its
108
+ # status moves to completed and call.completed is sent once the disconnect is
109
+ # reported. A call that has already ended answers 409, and so does a call with no
110
+ # phone leg, such as one between two app users.
111
+ sig do
112
+ params(
113
+ id: String,
114
+ sandbox: T::Boolean,
115
+ idempotency_key: String,
116
+ x_profile_id: String,
117
+ request_options: Sentdm::RequestOptions::OrHash
118
+ ).void
119
+ end
120
+ def hangup(
121
+ # Path param: The call id from the route, as carried by call webhooks and the
122
+ # calls list, for example call_9f2ab000-0000-4000-8000-000000000001
123
+ id,
124
+ # Body param: Sandbox flag - when true, the operation is simulated without side
125
+ # effects Useful for testing integrations without actual execution
126
+ sandbox: nil,
127
+ # Header param: Unique key to ensure idempotent request processing. Must be 1-255
128
+ # alphanumeric characters, hyphens, or underscores. Responses are cached for 24
129
+ # hours per key per customer.
130
+ idempotency_key: nil,
131
+ # Header param: Profile UUID to scope the request to a child profile. Only
132
+ # organization API keys can use this header. The profile must belong to the
133
+ # calling organization.
134
+ x_profile_id: nil,
135
+ request_options: {}
136
+ )
137
+ end
138
+
139
+ # Returns pre-signed links to the recordings of one of your calls, each valid
140
+ # until its url_expires_at. A recording appears once the call was recorded, by a
141
+ # connect answer with record set, a startRecording instruction or the recordings
142
+ # command, and the call.recording_ready webhook has been sent; until then, and for
143
+ # a call that was never recorded, the list is empty. A call recorded more than
144
+ # once lists every recording, oldest first, each under the recording_id its
145
+ # call.recording_ready webhook carried.
146
+ sig do
147
+ params(
148
+ id: String,
149
+ x_profile_id: String,
150
+ request_options: Sentdm::RequestOptions::OrHash
151
+ ).returns(Sentdm::APIResponseOfCallRecordings)
152
+ end
153
+ def list_recordings(
154
+ # The call id from the route, as carried by call webhooks and the calls list, for
155
+ # example call_9f2ab000-0000-4000-8000-000000000001
156
+ id,
157
+ # Profile UUID to scope the request to a child profile. Only organization API keys
158
+ # can use this header. The profile must belong to the calling organization.
159
+ x_profile_id: nil,
160
+ request_options: {}
161
+ )
162
+ end
163
+
164
+ # Starts or stops recording one of your live calls. Use start to begin recording
165
+ # mid-call, or stop to end a recording, whether it was started here or by a
166
+ # connect answer with record set. A call that has already ended answers 409, and
167
+ # so does a call with no phone leg, such as one between two app users, which can't
168
+ # be recorded.
169
+ sig do
170
+ params(
171
+ id: String,
172
+ action: String,
173
+ sandbox: T::Boolean,
174
+ idempotency_key: String,
175
+ x_profile_id: String,
176
+ request_options: Sentdm::RequestOptions::OrHash
177
+ ).void
178
+ end
179
+ def record(
180
+ # Path param: The call id from the route, as carried by call webhooks and the
181
+ # calls list, for example call_9f2ab000-0000-4000-8000-000000000001
182
+ id,
183
+ # Body param: start to begin recording, stop to end it
184
+ action: nil,
185
+ # Body param: Sandbox flag - when true, the operation is simulated without side
186
+ # effects Useful for testing integrations without actual execution
187
+ sandbox: nil,
188
+ # Header param: Unique key to ensure idempotent request processing. Must be 1-255
189
+ # alphanumeric characters, hyphens, or underscores. Responses are cached for 24
190
+ # hours per key per customer.
191
+ idempotency_key: nil,
192
+ # Header param: Profile UUID to scope the request to a child profile. Only
193
+ # organization API keys can use this header. The profile must belong to the
194
+ # calling organization.
195
+ x_profile_id: nil,
196
+ request_options: {}
197
+ )
198
+ end
199
+
200
+ # @api private
201
+ sig { params(client: Sentdm::Client).returns(T.attached_class) }
202
+ def self.new(client:)
203
+ end
204
+ end
205
+ end
206
+ end