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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 16dc14ecd9c936e5dd3491d360224828550cd817ca6948685030bba5e446f4bf
4
- data.tar.gz: '091a8f5517a1b38d376bea98bd8790c981a6803741943cf573c3fdbb0dd5b1c3'
3
+ metadata.gz: 7e41c64a8341791db8801e49a4450c5631344d953d37ea8de82e1f734f7cfd06
4
+ data.tar.gz: c71e0a7f614f260ac4f68e410a49049f0a3315bc2823e32af7413b6d5d484e1c
5
5
  SHA512:
6
- metadata.gz: 4aa11719a1c01c114e7a34d1f0b1d925428fb74134d1ebb587dd4c9b6f401c7373b64bfc8aaf42cd2e1f3d6580063e3443fce61bfd01a427885b605df1f41191
7
- data.tar.gz: bc846fa52387c5b28c16c7e17e7efb5a9e6c65fc3816baa6be2df535a98ab9ca6aeba04078e2821c5e51671b37021eb45dec501cfccb9cdd7ca0ebba2f4a3a32
6
+ metadata.gz: '0783884c3912784e4b10961fbaf990d3908c1a95949a76b4cdd559c9e08d1d35cc5d4e614249de86f9906cd9954d5bc0e611273fd4a44cd272ba7a22b8b9f329'
7
+ data.tar.gz: f229587522eb6b177f69ba05866180ab32183d968b52995e51d39e97f77437a457608b720b7e09fbe163d411fac7754c1c40335274e97b6f3c66df98fc0cd9f8
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.39.0](https://github.com/sentdm/sent-dm-ruby/compare/v0.38.1...v0.39.0) (2026-10-23)
4
+
5
+
6
+ ### ⚠ BREAKING CHANGES
7
+
8
+ * **api:** move calls and voice tokens under the voice resource
9
+
10
+ ### Features
11
+
12
+ * **api:** move calls and voice tokens under the voice resource ([a49f63f](https://github.com/sentdm/sent-dm-ruby/commit/a49f63f03c8ab24f342811916cf886f0bf8e85fa))
13
+ * **api:** sync generated SDKs from the committed spec ([8201d6f](https://github.com/sentdm/sent-dm-ruby/commit/8201d6f1770931232a0ca73d1887a7e08df58ba0))
14
+
3
15
  ## [0.38.1](https://github.com/sentdm/sent-dm-ruby/compare/v0.38.0...v0.38.1) (2026-10-20)
4
16
 
5
17
 
data/README.md CHANGED
@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
17
17
  <!-- x-release-please-start-version -->
18
18
 
19
19
  ```ruby
20
- gem "sentdm", "~> 0.38.1"
20
+ gem "sentdm", "~> 0.39.0"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
data/lib/sentdm/client.rb CHANGED
@@ -120,25 +120,8 @@ module Sentdm
120
120
  # @return [Sentdm::Resources::Conversations]
121
121
  attr_reader :conversations
122
122
 
123
- # Phone calls from the numbers you hold, driven by your own callback URL.
124
- #
125
- # `POST /v3/channels/voice` enables a number for calls, with the callback URL Sent
126
- # asks what to do with each call on it, and `POST /v3/channels/voice/tokens` mints
127
- # a short-lived token that lets a user of your app place and receive calls as that
128
- # number. When a call arrives or a caller presses a key, a signed question is
129
- # POSTed to the callback URL and the answer decides the call;
130
- # `POST /v3/channels/voice/{number}/test` checks the URL answers the way we need
131
- # before a real call reaches it, and
132
- # `POST /v3/channels/voice/{number}/rotate-secret` replaces the signing secret.
133
- # The call events themselves (`call.completed` and the rest) arrive through your
134
- # webhooks.
135
- #
136
- # Every call is a record under `/v3/calls`: read it, list its recordings once one
137
- # is ready, hang it up, start or stop recording, and add, mute or remove
138
- # conference participants while it is live. A leg to a phone number runs for at
139
- # most what your balance affords at the destination's rate.
140
- # @return [Sentdm::Resources::Calls]
141
- attr_reader :calls
123
+ # @return [Sentdm::Resources::Voice]
124
+ attr_reader :voice
142
125
 
143
126
  # @return [Sentdm::Resources::Channels]
144
127
  attr_reader :channels
@@ -221,7 +204,7 @@ module Sentdm
221
204
  @messages = Sentdm::Resources::Messages.new(client: self)
222
205
  @contacts = Sentdm::Resources::Contacts.new(client: self)
223
206
  @conversations = Sentdm::Resources::Conversations.new(client: self)
224
- @calls = Sentdm::Resources::Calls.new(client: self)
207
+ @voice = Sentdm::Resources::Voice.new(client: self)
225
208
  @channels = Sentdm::Resources::Channels.new(client: self)
226
209
  @me = Sentdm::Resources::Me.new(client: self)
227
210
  end
@@ -49,8 +49,9 @@ module Sentdm
49
49
  optional :reason, String, nil?: true
50
50
 
51
51
  # @!attribute recording_id
52
- # The recording that became available, the same id GET /v3/calls/{id}/recordings
53
- # lists it under. Only on call.recording_ready, which is sent once per recording.
52
+ # The recording that became available, the same id GET
53
+ # /v3/voice/calls/{id}/recordings lists it under. Only on call.recording_ready,
54
+ # which is sent once per recording.
54
55
  #
55
56
  # @return [String, nil]
56
57
  optional :recording_id, String, nil?: true
@@ -94,7 +95,7 @@ module Sentdm
94
95
  #
95
96
  # @param reason [String, nil] The machine-readable reason the call did not complete. Only on call.failed, and
96
97
  #
97
- # @param recording_id [String, nil] The recording that became available, the same id GET /v3/calls/{id}/recordings l
98
+ # @param recording_id [String, nil] The recording that became available, the same id GET /v3/voice/calls/{id}/record
98
99
  #
99
100
  # @param updated_at [String] When the change happened on the call, as opposed to when the event was emitted.
100
101
  end
@@ -30,6 +30,11 @@ module Sentdm
30
30
  # itself is unchanged: the same rules are scored and ranked the same way, with
31
31
  # routes pinned to numbers you did not list removed from the running.
32
32
  #
33
+ # Each channel's list is independent: an sms list does not restrict MMS. To choose
34
+ # the numbers a message may go out from as MMS, name them under mms. MMS sends
35
+ # from your SMS numbers, so an mms list may name any of your active SMS numbers
36
+ # whose market carries MMS — the ones listed under mms in your channels.
37
+ #
33
38
  # Every number must be an active sender on your account. The request itself is
34
39
  # still accepted (202) if one is not — like every other send-time rule, that is
35
40
  # decided per message, so each affected message is recorded BLOCKED with error
@@ -52,7 +57,9 @@ module Sentdm
52
57
  #
53
58
  # Their presence is also what makes a message eligible for MMS on an auto-detect
54
59
  # send: a message with nothing attached is delivered as SMS, because an MMS with
55
- # no media is a more expensive text message.
60
+ # no media is a more expensive text message. For the same reason a send that names
61
+ # mms in channel with nothing attached, here or on the template, is refused with
62
+ # a 400.
56
63
  #
57
64
  # The recipient's carrier fetches each URL after the send is accepted, so it must
58
65
  # stay publicly reachable — a link that expires, or one behind auth, arrives as a
@@ -42,17 +42,18 @@ module Sentdm
42
42
 
43
43
  # @!attribute channels
44
44
  # The channels this template's definition can render on, in canonical order: sms,
45
- # whatsapp, rcs.
45
+ # whatsapp, rcs, mms.
46
46
  #
47
47
  # Derived from the definition's body, mirroring each channel's send-time fallback
48
48
  # chain, so a channel is listed only when a real body would be produced for it:
49
49
  # SMS reads sms ?? multiChannel, WhatsApp reads whatsapp ?? multiChannel, and RCS
50
- # reads rcs ?? multiChannel ?? sms. A multiChannel body therefore reports all
51
- # three, and the extra SMS fallback on RCS is why an sms/whatsapp pair reports RCS
52
- # too.
50
+ # and MMS read rcs ?? multiChannel ?? sms and mms ?? multiChannel ?? sms. A
51
+ # multiChannel body therefore reports all four, and the extra SMS fallback is why
52
+ # an sms/whatsapp pair reports RCS and MMS too.
53
53
  #
54
54
  # This says what the content can render on, not what may be sent: sending also
55
- # needs the template approved for that channel.
55
+ # needs the template approved for that channel, and MMS needs an attachment, from
56
+ # media_urls or the template's mms body.
56
57
  #
57
58
  # @return [Array<String>, nil]
58
59
  optional :channels, Sentdm::Internal::Type::ArrayOf[String], nil?: true
@@ -7,10 +7,10 @@ module Sentdm
7
7
  # MMS-specific content — subject, text and attachments.
8
8
  #
9
9
  # Like Rcs, an override that cannot stand on its own: a template still needs a
10
- # MultiChannel body or the Sms + Whatsapp pair to be deliverable at all. Unlike
11
- # Rcs, it has no fallback at send time — MMS with no media is a more expensive
12
- # SMS, so a template without this slot is deliberately not MMS-capable and never
13
- # produces an MMS route candidate.
10
+ # MultiChannel body or the Sms + Whatsapp pair to be deliverable at all. Without
11
+ # this slot MMS renders the shared or SMS body, so it is only needed for
12
+ # MMS-specific copy, a subject or attachments. When present it replaces that body
13
+ # on MMS rather than adding to it.
14
14
  #
15
15
  # @return [Sentdm::Models::TemplateBody::Mms, nil]
16
16
  optional :mms, -> { Sentdm::TemplateBody::Mms }, nil?: true
@@ -94,10 +94,10 @@ module Sentdm
94
94
  # MMS-specific content — subject, text and attachments.
95
95
  #
96
96
  # Like Rcs, an override that cannot stand on its own: a template still needs a
97
- # MultiChannel body or the Sms + Whatsapp pair to be deliverable at all. Unlike
98
- # Rcs, it has no fallback at send time — MMS with no media is a more expensive
99
- # SMS, so a template without this slot is deliberately not MMS-capable and never
100
- # produces an MMS route candidate.
97
+ # MultiChannel body or the Sms + Whatsapp pair to be deliverable at all. Without
98
+ # this slot MMS renders the shared or SMS body, so it is only needed for
99
+ # MMS-specific copy, a subject or attachments. When present it replaces that body
100
+ # on MMS rather than adding to it.
101
101
  #
102
102
  # @param media [Array<Sentdm::Models::TemplateBody::Mms::Media>, nil] Attachments carried by every send on this template, in order. A per-send media_u
103
103
  #
@@ -2,14 +2,14 @@
2
2
 
3
3
  module Sentdm
4
4
  module Models
5
- module Calls
6
- # @see Sentdm::Resources::Calls::Participants#list
7
- class APIResponseOfListOfCallParticipant < Sentdm::Internal::Type::BaseModel
5
+ module Voice
6
+ # @see Sentdm::Resources::Voice::Calls#retrieve
7
+ class APIResponseOfCall < Sentdm::Internal::Type::BaseModel
8
8
  # @!attribute data
9
- # The response data (null if error)
9
+ # A call record
10
10
  #
11
- # @return [Array<Sentdm::Models::Calls::CallParticipant>, nil]
12
- optional :data, -> { Sentdm::Internal::Type::ArrayOf[Sentdm::Calls::CallParticipant] }, nil?: true
11
+ # @return [Sentdm::Models::Voice::Call, nil]
12
+ optional :data, -> { Sentdm::Voice::Call }, nil?: true
13
13
 
14
14
  # @!attribute error
15
15
  # Error information
@@ -32,7 +32,7 @@ module Sentdm
32
32
  # @!method initialize(data: nil, error: nil, meta: nil, success: nil)
33
33
  # Standard API response envelope for all v3 endpoints
34
34
  #
35
- # @param data [Array<Sentdm::Models::Calls::CallParticipant>, nil] The response data (null if error)
35
+ # @param data [Sentdm::Models::Voice::Call, nil] A call record
36
36
  #
37
37
  # @param error [Sentdm::Models::ErrorDetail, nil] Error information
38
38
  #
@@ -0,0 +1,45 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sentdm
4
+ module Models
5
+ module Voice
6
+ # @see Sentdm::Resources::Voice::Calls#list_recordings
7
+ class APIResponseOfCallRecordings < Sentdm::Internal::Type::BaseModel
8
+ # @!attribute data
9
+ # The recordings of a call, each as a short-lived download link
10
+ #
11
+ # @return [Sentdm::Models::Voice::CallRecordings, nil]
12
+ optional :data, -> { Sentdm::Voice::CallRecordings }, nil?: true
13
+
14
+ # @!attribute error
15
+ # Error information
16
+ #
17
+ # @return [Sentdm::Models::ErrorDetail, nil]
18
+ optional :error, -> { Sentdm::ErrorDetail }, nil?: true
19
+
20
+ # @!attribute meta
21
+ # Request and response metadata
22
+ #
23
+ # @return [Sentdm::Models::APIMeta, nil]
24
+ optional :meta, -> { Sentdm::APIMeta }
25
+
26
+ # @!attribute success
27
+ # Indicates whether the request was successful
28
+ #
29
+ # @return [Boolean, nil]
30
+ optional :success, Sentdm::Internal::Type::Boolean
31
+
32
+ # @!method initialize(data: nil, error: nil, meta: nil, success: nil)
33
+ # Standard API response envelope for all v3 endpoints
34
+ #
35
+ # @param data [Sentdm::Models::Voice::CallRecordings, nil] The recordings of a call, each as a short-lived download link
36
+ #
37
+ # @param error [Sentdm::Models::ErrorDetail, nil] Error information
38
+ #
39
+ # @param meta [Sentdm::Models::APIMeta] Request and response metadata
40
+ #
41
+ # @param success [Boolean] Indicates whether the request was successful
42
+ end
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,44 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sentdm
4
+ module Models
5
+ module Voice
6
+ class APIResponseOfCallsList < Sentdm::Internal::Type::BaseModel
7
+ # @!attribute data
8
+ # Paginated list of calls
9
+ #
10
+ # @return [Sentdm::Models::Voice::CallsList, nil]
11
+ optional :data, -> { Sentdm::Voice::CallsList }, nil?: true
12
+
13
+ # @!attribute error
14
+ # Error information
15
+ #
16
+ # @return [Sentdm::Models::ErrorDetail, nil]
17
+ optional :error, -> { Sentdm::ErrorDetail }, nil?: true
18
+
19
+ # @!attribute meta
20
+ # Request and response metadata
21
+ #
22
+ # @return [Sentdm::Models::APIMeta, nil]
23
+ optional :meta, -> { Sentdm::APIMeta }
24
+
25
+ # @!attribute success
26
+ # Indicates whether the request was successful
27
+ #
28
+ # @return [Boolean, nil]
29
+ optional :success, Sentdm::Internal::Type::Boolean
30
+
31
+ # @!method initialize(data: nil, error: nil, meta: nil, success: nil)
32
+ # Standard API response envelope for all v3 endpoints
33
+ #
34
+ # @param data [Sentdm::Models::Voice::CallsList, nil] Paginated list of calls
35
+ #
36
+ # @param error [Sentdm::Models::ErrorDetail, nil] Error information
37
+ #
38
+ # @param meta [Sentdm::Models::APIMeta] Request and response metadata
39
+ #
40
+ # @param success [Boolean] Indicates whether the request was successful
41
+ end
42
+ end
43
+ end
44
+ end
@@ -2,14 +2,14 @@
2
2
 
3
3
  module Sentdm
4
4
  module Models
5
- module Channels
6
- # @see Sentdm::Resources::Channels::Voice#create_token
5
+ module Voice
6
+ # @see Sentdm::Resources::Voice::Tokens#create
7
7
  class APIResponseOfVoiceToken < Sentdm::Internal::Type::BaseModel
8
8
  # @!attribute data
9
9
  # A short-lived token your app passes to the voice client SDK to register
10
10
  #
11
- # @return [Sentdm::Models::Channels::VoiceToken, nil]
12
- optional :data, -> { Sentdm::Channels::VoiceToken }, nil?: true
11
+ # @return [Sentdm::Models::Voice::VoiceToken, nil]
12
+ optional :data, -> { Sentdm::Voice::VoiceToken }, nil?: true
13
13
 
14
14
  # @!attribute error
15
15
  # Error information
@@ -32,7 +32,7 @@ module Sentdm
32
32
  # @!method initialize(data: nil, error: nil, meta: nil, success: nil)
33
33
  # Standard API response envelope for all v3 endpoints
34
34
  #
35
- # @param data [Sentdm::Models::Channels::VoiceToken, nil] A short-lived token your app passes to the voice client SDK to register
35
+ # @param data [Sentdm::Models::Voice::VoiceToken, nil] A short-lived token your app passes to the voice client SDK to register
36
36
  #
37
37
  # @param error [Sentdm::Models::ErrorDetail, nil] Error information
38
38
  #
@@ -0,0 +1,149 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sentdm
4
+ module Models
5
+ module Voice
6
+ # @see Sentdm::Resources::Voice::Calls#list
7
+ class Call < Sentdm::Internal::Type::BaseModel
8
+ # @!attribute id
9
+ # The call id, the same one carried by the call.request question and every call
10
+ # webhook
11
+ #
12
+ # @return [String, nil]
13
+ optional :id, String
14
+
15
+ # @!attribute answered_at
16
+ # When the call was answered (UTC). Null until then, and always null for a call
17
+ # between two of your app users
18
+ #
19
+ # @return [Time, nil]
20
+ optional :answered_at, Time, nil?: true
21
+
22
+ # @!attribute direction
23
+ # outbound for a call placed from your app, inbound for a call to one of your
24
+ # numbers
25
+ #
26
+ # @return [String, nil]
27
+ optional :direction, String
28
+
29
+ # @!attribute duration_seconds
30
+ # Billable duration in seconds. Null while the call is live
31
+ #
32
+ # @return [Integer, nil]
33
+ optional :duration_seconds, Integer, nil?: true
34
+
35
+ # @!attribute ended_at
36
+ # When the call ended (UTC). Null while the call is live
37
+ #
38
+ # @return [Time, nil]
39
+ optional :ended_at, Time, nil?: true
40
+
41
+ # @!attribute failure_reason
42
+ # Why the call did not complete: callback_timeout, invalid_answer,
43
+ # insufficient_balance, destination_blocked, callback_not_configured, rejected or
44
+ # no_answer. Null while the call is live, when it completed, and when it failed
45
+ # without a recorded reason
46
+ #
47
+ # @return [String, nil]
48
+ optional :failure_reason, String, nil?: true
49
+
50
+ # @!attribute from
51
+ # One end of a call
52
+ #
53
+ # @return [Sentdm::Models::Voice::CallParty, nil]
54
+ optional :from, -> { Sentdm::Voice::CallParty }
55
+
56
+ # @!attribute mode
57
+ # The calling mode: inapp for a call between people in your app and phone numbers,
58
+ # routed by your number's callback URL
59
+ #
60
+ # @return [String, nil]
61
+ optional :mode, String
62
+
63
+ # @!attribute number
64
+ # Your number that owns the call, in E.164 format: the dialed number for an
65
+ # inbound call, the caller's bound number for a call placed from your app
66
+ #
67
+ # @return [String, nil]
68
+ optional :number, String
69
+
70
+ # @!attribute price
71
+ # What the call cost. Null until it has been priced
72
+ #
73
+ # @return [Float, nil]
74
+ optional :price, Float, nil?: true
75
+
76
+ # @!attribute recording_available
77
+ # True once a recording of the call is available
78
+ #
79
+ # @return [Boolean, nil]
80
+ optional :recording_available, Sentdm::Internal::Type::Boolean
81
+
82
+ # @!attribute started_at
83
+ # When the call was placed (UTC)
84
+ #
85
+ # @return [Time, nil]
86
+ optional :started_at, Time
87
+
88
+ # @!attribute status
89
+ # INITIATED, RINGING, ANSWERED, COMPLETED, FAILED, NO_ANSWER or REJECTED
90
+ #
91
+ # @return [String, nil]
92
+ optional :status, String
93
+
94
+ # @!attribute timeline
95
+ # When the call entered each status, oldest first. Only returned when reading one
96
+ # call
97
+ #
98
+ # @return [Array<Sentdm::Models::Voice::CallTimelineEntry>, nil]
99
+ optional :timeline,
100
+ -> {
101
+ Sentdm::Internal::Type::ArrayOf[Sentdm::Voice::CallTimelineEntry]
102
+ },
103
+ nil?: true
104
+
105
+ # @!attribute to
106
+ # One end of a call
107
+ #
108
+ # @return [Sentdm::Models::Voice::CallParty, nil]
109
+ optional :to, -> { Sentdm::Voice::CallParty }
110
+
111
+ # @!method initialize(id: nil, answered_at: nil, direction: nil, duration_seconds: nil, ended_at: nil, failure_reason: nil, from: nil, mode: nil, number: nil, price: nil, recording_available: nil, started_at: nil, status: nil, timeline: nil, to: nil)
112
+ # Some parameter documentations has been truncated, see
113
+ # {Sentdm::Models::Voice::Call} for more details.
114
+ #
115
+ # A call record
116
+ #
117
+ # @param id [String] The call id, the same one carried by the call.request question and every call we
118
+ #
119
+ # @param answered_at [Time, nil] When the call was answered (UTC). Null until then, and always null for a call be
120
+ #
121
+ # @param direction [String] outbound for a call placed from your app, inbound for a call to one of your numb
122
+ #
123
+ # @param duration_seconds [Integer, nil] Billable duration in seconds. Null while the call is live
124
+ #
125
+ # @param ended_at [Time, nil] When the call ended (UTC). Null while the call is live
126
+ #
127
+ # @param failure_reason [String, nil] Why the call did not complete: callback_timeout, invalid_answer, insufficient_ba
128
+ #
129
+ # @param from [Sentdm::Models::Voice::CallParty] One end of a call
130
+ #
131
+ # @param mode [String] The calling mode: inapp for a call between people in your app and phone numbers,
132
+ #
133
+ # @param number [String] Your number that owns the call, in E.164 format: the dialed number for an inboun
134
+ #
135
+ # @param price [Float, nil] What the call cost. Null until it has been priced
136
+ #
137
+ # @param recording_available [Boolean] True once a recording of the call is available
138
+ #
139
+ # @param started_at [Time] When the call was placed (UTC)
140
+ #
141
+ # @param status [String] INITIATED, RINGING, ANSWERED, COMPLETED, FAILED, NO_ANSWER or REJECTED
142
+ #
143
+ # @param timeline [Array<Sentdm::Models::Voice::CallTimelineEntry>, nil] When the call entered each status, oldest first. Only returned when reading one
144
+ #
145
+ # @param to [Sentdm::Models::Voice::CallParty] One end of a call
146
+ end
147
+ end
148
+ end
149
+ end
@@ -2,9 +2,9 @@
2
2
 
3
3
  module Sentdm
4
4
  module Models
5
- module Calls
6
- # @see Sentdm::Resources::Calls::Participants#remove
7
- class ParticipantRemoveParams < Sentdm::Models::MutationRequest
5
+ module Voice
6
+ # @see Sentdm::Resources::Voice::Calls#hangup
7
+ class CallHangupParams < Sentdm::Models::MutationRequest
8
8
  extend Sentdm::Internal::Type::RequestParameters::Converter
9
9
  include Sentdm::Internal::Type::RequestParameters
10
10
 
@@ -13,19 +13,19 @@ module Sentdm
13
13
  # @return [String]
14
14
  required :id, String
15
15
 
16
- # @!attribute participant_id
16
+ # @!attribute idempotency_key
17
17
  #
18
- # @return [String]
19
- required :participant_id, String
18
+ # @return [String, nil]
19
+ optional :idempotency_key, String
20
20
 
21
21
  # @!attribute x_profile_id
22
22
  #
23
23
  # @return [String, nil]
24
24
  optional :x_profile_id, String
25
25
 
26
- # @!method initialize(id:, participant_id:, x_profile_id: nil, request_options: {})
26
+ # @!method initialize(id:, idempotency_key: nil, x_profile_id: nil, request_options: {})
27
27
  # @param id [String]
28
- # @param participant_id [String]
28
+ # @param idempotency_key [String]
29
29
  # @param x_profile_id [String]
30
30
  # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}]
31
31
  end
@@ -0,0 +1,85 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sentdm
4
+ module Models
5
+ module Voice
6
+ # @see Sentdm::Resources::Voice::Calls#list
7
+ class CallListParams < Sentdm::Internal::Type::BaseModel
8
+ extend Sentdm::Internal::Type::RequestParameters::Converter
9
+ include Sentdm::Internal::Type::RequestParameters
10
+
11
+ # @!attribute direction
12
+ # Optional direction filter: outbound for calls placed from your app, inbound for
13
+ # calls to one of your numbers
14
+ #
15
+ # @return [String, nil]
16
+ optional :direction, String, nil?: true
17
+
18
+ # @!attribute from
19
+ # Only calls started at or after this time (ISO 8601)
20
+ #
21
+ # @return [Time, nil]
22
+ optional :from, Time, nil?: true
23
+
24
+ # @!attribute number
25
+ # Optional filter on the number that owns the call, one of your voice-enabled
26
+ # numbers in E.164 format
27
+ #
28
+ # @return [String, nil]
29
+ optional :number, String, nil?: true
30
+
31
+ # @!attribute page
32
+ # Page number (1-indexed)
33
+ #
34
+ # @return [Integer, nil]
35
+ optional :page, Integer
36
+
37
+ # @!attribute page_size
38
+ # Number of items per page
39
+ #
40
+ # @return [Integer, nil]
41
+ optional :page_size, Integer
42
+
43
+ # @!attribute status
44
+ # Optional status filter: initiated, ringing, answered, completed, failed,
45
+ # no_answer or rejected
46
+ #
47
+ # @return [String, nil]
48
+ optional :status, String, nil?: true
49
+
50
+ # @!attribute to
51
+ # Only calls started at or before this time (ISO 8601)
52
+ #
53
+ # @return [Time, nil]
54
+ optional :to, Time, nil?: true
55
+
56
+ # @!attribute x_profile_id
57
+ #
58
+ # @return [String, nil]
59
+ optional :x_profile_id, String
60
+
61
+ # @!method initialize(direction: nil, from: nil, number: nil, page: nil, page_size: nil, status: nil, to: nil, x_profile_id: nil, request_options: {})
62
+ # Some parameter documentations has been truncated, see
63
+ # {Sentdm::Models::Voice::CallListParams} for more details.
64
+ #
65
+ # @param direction [String, nil] Optional direction filter: outbound for calls placed from your app, inbound for
66
+ #
67
+ # @param from [Time, nil] Only calls started at or after this time (ISO 8601)
68
+ #
69
+ # @param number [String, nil] Optional filter on the number that owns the call, one of your voice-enabled numb
70
+ #
71
+ # @param page [Integer] Page number (1-indexed)
72
+ #
73
+ # @param page_size [Integer] Number of items per page
74
+ #
75
+ # @param status [String, nil] Optional status filter: initiated, ringing, answered, completed, failed, no_answ
76
+ #
77
+ # @param to [Time, nil] Only calls started at or before this time (ISO 8601)
78
+ #
79
+ # @param x_profile_id [String]
80
+ #
81
+ # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}]
82
+ end
83
+ end
84
+ end
85
+ end
@@ -2,9 +2,9 @@
2
2
 
3
3
  module Sentdm
4
4
  module Models
5
- module Calls
6
- # @see Sentdm::Resources::Calls::Participants#remove_all
7
- class ParticipantRemoveAllParams < Sentdm::Models::MutationRequest
5
+ module Voice
6
+ # @see Sentdm::Resources::Voice::Calls#list_recordings
7
+ class CallListRecordingsParams < Sentdm::Internal::Type::BaseModel
8
8
  extend Sentdm::Internal::Type::RequestParameters::Converter
9
9
  include Sentdm::Internal::Type::RequestParameters
10
10
 
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sentdm
4
+ module Models
5
+ module Voice
6
+ class CallParty < Sentdm::Internal::Type::BaseModel
7
+ # @!attribute kind
8
+ # user for one of your app users, number for a phone number, conference for a
9
+ # room, anonymous for a caller who withheld their number
10
+ #
11
+ # @return [String, nil]
12
+ optional :kind, String
13
+
14
+ # @!attribute value
15
+ # The app user's identity, the phone number in E.164 format, or the room name.
16
+ # Null when the kind is anonymous
17
+ #
18
+ # @return [String, nil]
19
+ optional :value, String, nil?: true
20
+
21
+ # @!method initialize(kind: nil, value: nil)
22
+ # Some parameter documentations has been truncated, see
23
+ # {Sentdm::Models::Voice::CallParty} for more details.
24
+ #
25
+ # One end of a call
26
+ #
27
+ # @param kind [String] user for one of your app users, number for a phone number, conference for a room
28
+ #
29
+ # @param value [String, nil] The app user's identity, the phone number in E.164 format, or the room name. Nul
30
+ end
31
+ end
32
+ end
33
+ end