sentdm 0.38.1 → 0.40.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 (281) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +21 -0
  3. data/README.md +1 -1
  4. data/lib/sentdm/client.rb +3 -20
  5. data/lib/sentdm/internal/voice_agents_page.rb +115 -0
  6. data/lib/sentdm/models/call_event.rb +8 -6
  7. data/lib/sentdm/models/call_event_payload.rb +29 -9
  8. data/lib/sentdm/models/channels/voice_create_params.rb +23 -11
  9. data/lib/sentdm/models/channels/voice_number.rb +23 -1
  10. data/lib/sentdm/models/channels/voice_update_params.rb +12 -1
  11. data/lib/sentdm/models/message_send_params.rb +8 -1
  12. data/lib/sentdm/models/template.rb +6 -5
  13. data/lib/sentdm/models/template_body.rb +8 -8
  14. data/lib/sentdm/models/voice/agent_create_params.rb +142 -0
  15. data/lib/sentdm/models/{calls/participant_list_params.rb → voice/agent_delete_params.rb} +3 -3
  16. data/lib/sentdm/models/voice/agent_list_params.rb +38 -0
  17. data/lib/sentdm/models/{calls/participant_remove_all_params.rb → voice/agent_retrieve_params.rb} +3 -3
  18. data/lib/sentdm/models/voice/agent_rotate_secret_params.rb +34 -0
  19. data/lib/sentdm/models/voice/agent_update_params.rb +141 -0
  20. data/lib/sentdm/models/{calls/api_response_of_list_of_call_participant.rb → voice/api_response_of_call.rb} +7 -7
  21. data/lib/sentdm/models/voice/api_response_of_call_recordings.rb +45 -0
  22. data/lib/sentdm/models/voice/api_response_of_calls_list.rb +44 -0
  23. data/lib/sentdm/models/voice/api_response_of_voice_agent.rb +51 -0
  24. data/lib/sentdm/models/voice/api_response_of_voice_agent_secret.rb +45 -0
  25. data/lib/sentdm/models/voice/api_response_of_voice_agents_list.rb +48 -0
  26. data/lib/sentdm/models/voice/api_response_of_voice_catalogue.rb +49 -0
  27. data/lib/sentdm/models/{channels → voice}/api_response_of_voice_token.rb +5 -5
  28. data/lib/sentdm/models/voice/call.rb +241 -0
  29. data/lib/sentdm/models/{calls/participant_remove_params.rb → voice/call_hangup_params.rb} +8 -8
  30. data/lib/sentdm/models/voice/call_list_params.rb +103 -0
  31. data/lib/sentdm/models/voice/call_list_recordings_params.rb +28 -0
  32. data/lib/sentdm/models/voice/call_party.rb +33 -0
  33. data/lib/sentdm/models/{calls/participant_update_params.rb → voice/call_record_params.rb} +10 -17
  34. data/lib/sentdm/models/voice/call_recording.rb +40 -0
  35. data/lib/sentdm/models/voice/call_recordings.rb +26 -0
  36. data/lib/sentdm/models/voice/call_retrieve_params.rb +28 -0
  37. data/lib/sentdm/models/voice/call_timeline_entry.rb +28 -0
  38. data/lib/sentdm/models/voice/calls/api_response_of_list_of_call_participant.rb +51 -0
  39. data/lib/sentdm/models/voice/calls/call_participant.rb +62 -0
  40. data/lib/sentdm/models/voice/calls/call_participant_target.rb +32 -0
  41. data/lib/sentdm/models/voice/calls/participant_add_params.rb +68 -0
  42. data/lib/sentdm/models/voice/calls/participant_list_params.rb +30 -0
  43. data/lib/sentdm/models/voice/calls/participant_remove_all_params.rb +30 -0
  44. data/lib/sentdm/models/voice/calls/participant_remove_params.rb +36 -0
  45. data/lib/sentdm/models/voice/calls/participant_update_params.rb +66 -0
  46. data/lib/sentdm/models/voice/calls_list.rb +28 -0
  47. data/lib/sentdm/models/voice/catalogue_list_params.rb +22 -0
  48. data/lib/sentdm/models/{channels/voice_create_token_params.rb → voice/token_create_params.rb} +4 -4
  49. data/lib/sentdm/models/voice/voice_agent.rb +138 -0
  50. data/lib/sentdm/models/voice/voice_agent_audio.rb +19 -0
  51. data/lib/sentdm/models/voice/voice_agent_audio_spec.rb +20 -0
  52. data/lib/sentdm/models/voice/voice_agent_limits.rb +31 -0
  53. data/lib/sentdm/models/voice/voice_agent_limits_spec.rb +40 -0
  54. data/lib/sentdm/models/voice/voice_agent_party.rb +25 -0
  55. data/lib/sentdm/models/voice/voice_agent_party_spec.rb +28 -0
  56. data/lib/sentdm/models/voice/voice_agent_secret.rb +27 -0
  57. data/lib/sentdm/models/voice/voice_agent_speech.rb +31 -0
  58. data/lib/sentdm/models/voice/voice_agent_speech_spec.rb +40 -0
  59. data/lib/sentdm/models/voice/voice_agent_transcripts.rb +25 -0
  60. data/lib/sentdm/models/voice/voice_agent_transcripts_spec.rb +32 -0
  61. data/lib/sentdm/models/voice/voice_agents_list.rb +30 -0
  62. data/lib/sentdm/models/voice/voice_catalogue.rb +30 -0
  63. data/lib/sentdm/models/voice/voice_catalogue_voice.rb +43 -0
  64. data/lib/sentdm/models/{channels → voice}/voice_token.rb +9 -3
  65. data/lib/sentdm/models/webhook_create_params.rb +31 -5
  66. data/lib/sentdm/models/webhook_response.rb +66 -4
  67. data/lib/sentdm/models/webhook_update_params.rb +15 -3
  68. data/lib/sentdm/models.rb +2 -30
  69. data/lib/sentdm/resources/channels/voice.rb +43 -63
  70. data/lib/sentdm/resources/channels.rb +2 -2
  71. data/lib/sentdm/resources/profiles/campaigns.rb +3 -2
  72. data/lib/sentdm/resources/voice/agents.rb +319 -0
  73. data/lib/sentdm/resources/voice/calls/participants.rb +244 -0
  74. data/lib/sentdm/resources/voice/calls.rb +269 -0
  75. data/lib/sentdm/resources/voice/catalogue.rb +71 -0
  76. data/lib/sentdm/resources/voice/tokens.rb +86 -0
  77. data/lib/sentdm/resources/voice.rb +142 -0
  78. data/lib/sentdm/resources/webhooks.rb +43 -15
  79. data/lib/sentdm/version.rb +1 -1
  80. data/lib/sentdm.rb +59 -28
  81. data/rbi/sentdm/client.rbi +2 -19
  82. data/rbi/sentdm/internal/voice_agents_page.rbi +71 -0
  83. data/rbi/sentdm/models/call_event.rbi +14 -10
  84. data/rbi/sentdm/models/call_event_payload.rbi +34 -9
  85. data/rbi/sentdm/models/channels/voice_create_params.rbi +33 -17
  86. data/rbi/sentdm/models/channels/voice_number.rbi +31 -0
  87. data/rbi/sentdm/models/channels/voice_update_params.rbi +14 -0
  88. data/rbi/sentdm/models/message_send_params.rbi +16 -2
  89. data/rbi/sentdm/models/template.rbi +12 -10
  90. data/rbi/sentdm/models/template_body.rbi +12 -12
  91. data/rbi/sentdm/models/voice/agent_create_params.rbi +215 -0
  92. data/rbi/sentdm/models/{calls/participant_remove_all_params.rbi → voice/agent_delete_params.rbi} +3 -6
  93. data/rbi/sentdm/models/voice/agent_list_params.rbi +66 -0
  94. data/rbi/sentdm/models/voice/agent_retrieve_params.rbi +48 -0
  95. data/rbi/sentdm/models/{calls/participant_remove_params.rbi → voice/agent_rotate_secret_params.rbi} +11 -8
  96. data/rbi/sentdm/models/voice/agent_update_params.rbi +211 -0
  97. data/rbi/sentdm/models/voice/api_response_of_call.rbi +76 -0
  98. data/rbi/sentdm/models/voice/api_response_of_call_recordings.rbi +81 -0
  99. data/rbi/sentdm/models/{calls/api_response_of_list_of_call_participant.rbi → voice/api_response_of_calls_list.rbi} +12 -9
  100. data/rbi/sentdm/models/voice/api_response_of_voice_agent.rbi +85 -0
  101. data/rbi/sentdm/models/voice/api_response_of_voice_agent_secret.rbi +81 -0
  102. data/rbi/sentdm/models/voice/api_response_of_voice_agents_list.rbi +83 -0
  103. data/rbi/sentdm/models/voice/api_response_of_voice_catalogue.rbi +83 -0
  104. data/rbi/sentdm/models/{channels → voice}/api_response_of_voice_token.rbi +6 -8
  105. data/rbi/sentdm/models/voice/call.rbi +329 -0
  106. data/rbi/sentdm/models/voice/call_hangup_params.rbi +61 -0
  107. data/rbi/sentdm/models/voice/call_list_params.rbi +134 -0
  108. data/rbi/sentdm/models/{calls/participant_list_params.rbi → voice/call_list_recordings_params.rbi} +3 -3
  109. data/rbi/sentdm/models/voice/call_party.rbi +47 -0
  110. data/rbi/sentdm/models/{calls/participant_update_params.rbi → voice/call_record_params.rbi} +12 -21
  111. data/rbi/sentdm/models/voice/call_recording.rbi +63 -0
  112. data/rbi/sentdm/models/voice/call_recordings.rbi +49 -0
  113. data/rbi/sentdm/models/voice/call_retrieve_params.rbi +48 -0
  114. data/rbi/sentdm/models/voice/call_timeline_entry.rbi +44 -0
  115. data/rbi/sentdm/models/voice/calls/api_response_of_list_of_call_participant.rbi +84 -0
  116. data/rbi/sentdm/models/voice/calls/call_participant.rbi +97 -0
  117. data/rbi/sentdm/models/voice/calls/call_participant_target.rbi +49 -0
  118. data/rbi/sentdm/models/voice/calls/participant_add_params.rbi +104 -0
  119. data/rbi/sentdm/models/voice/calls/participant_list_params.rbi +53 -0
  120. data/rbi/sentdm/models/voice/calls/participant_remove_all_params.rbi +53 -0
  121. data/rbi/sentdm/models/voice/calls/participant_remove_params.rbi +63 -0
  122. data/rbi/sentdm/models/voice/calls/participant_update_params.rbi +96 -0
  123. data/rbi/sentdm/models/voice/calls_list.rbi +54 -0
  124. data/rbi/sentdm/models/voice/catalogue_list_params.rbi +40 -0
  125. data/rbi/sentdm/models/{channels/voice_create_token_params.rbi → voice/token_create_params.rbi} +3 -6
  126. data/rbi/sentdm/models/voice/voice_agent.rbi +196 -0
  127. data/rbi/sentdm/models/voice/voice_agent_audio.rbi +30 -0
  128. data/rbi/sentdm/models/voice/voice_agent_audio_spec.rbi +33 -0
  129. data/rbi/sentdm/models/voice/voice_agent_limits.rbi +57 -0
  130. data/rbi/sentdm/models/voice/voice_agent_limits_spec.rbi +62 -0
  131. data/rbi/sentdm/models/voice/voice_agent_party.rbi +36 -0
  132. data/rbi/sentdm/models/voice/voice_agent_party_spec.rbi +45 -0
  133. data/rbi/sentdm/models/voice/voice_agent_secret.rbi +37 -0
  134. data/rbi/sentdm/models/voice/voice_agent_speech.rbi +48 -0
  135. data/rbi/sentdm/models/voice/voice_agent_speech_spec.rbi +62 -0
  136. data/rbi/sentdm/models/voice/voice_agent_transcripts.rbi +43 -0
  137. data/rbi/sentdm/models/voice/voice_agent_transcripts_spec.rbi +51 -0
  138. data/rbi/sentdm/models/voice/voice_agents_list.rbi +55 -0
  139. data/rbi/sentdm/models/voice/voice_catalogue.rbi +59 -0
  140. data/rbi/sentdm/models/voice/voice_catalogue_voice.rbi +75 -0
  141. data/rbi/sentdm/models/{channels → voice}/voice_token.rbi +8 -4
  142. data/rbi/sentdm/models/webhook_create_params.rbi +41 -3
  143. data/rbi/sentdm/models/webhook_response.rbi +112 -3
  144. data/rbi/sentdm/models/webhook_update_params.rbi +18 -3
  145. data/rbi/sentdm/models.rbi +2 -30
  146. data/rbi/sentdm/resources/channels/voice.rbi +57 -67
  147. data/rbi/sentdm/resources/channels.rbi +2 -2
  148. data/rbi/sentdm/resources/messages.rbi +8 -1
  149. data/rbi/sentdm/resources/profiles/campaigns.rbi +3 -2
  150. data/rbi/sentdm/resources/voice/agents.rbi +316 -0
  151. data/rbi/sentdm/resources/voice/calls/participants.rbi +212 -0
  152. data/rbi/sentdm/resources/voice/calls.rbi +244 -0
  153. data/rbi/sentdm/resources/voice/catalogue.rbi +59 -0
  154. data/rbi/sentdm/resources/voice/tokens.rbi +84 -0
  155. data/rbi/sentdm/resources/voice.rbi +136 -0
  156. data/rbi/sentdm/resources/webhooks.rbi +56 -16
  157. data/sig/sentdm/client.rbs +1 -1
  158. data/sig/sentdm/internal/voice_agents_page.rbs +41 -0
  159. data/sig/sentdm/models/call_event_payload.rbs +12 -0
  160. data/sig/sentdm/models/channels/voice_create_params.rbs +9 -4
  161. data/sig/sentdm/models/channels/voice_number.rbs +12 -0
  162. data/sig/sentdm/models/channels/voice_update_params.rbs +5 -0
  163. data/sig/sentdm/models/voice/agent_create_params.rbs +99 -0
  164. data/sig/sentdm/models/{calls/participant_remove_all_params.rbs → voice/agent_delete_params.rbs} +3 -3
  165. data/sig/sentdm/models/voice/agent_list_params.rbs +40 -0
  166. data/sig/sentdm/models/{calls/participant_list_params.rbs → voice/agent_retrieve_params.rbs} +3 -3
  167. data/sig/sentdm/models/{calls/participant_remove_params.rbs → voice/agent_rotate_secret_params.rbs} +8 -8
  168. data/sig/sentdm/models/voice/agent_update_params.rbs +108 -0
  169. data/sig/sentdm/models/{calls/api_response_of_list_of_call_participant.rbs → voice/api_response_of_call.rbs} +7 -7
  170. data/sig/sentdm/models/voice/api_response_of_call_recordings.rbs +41 -0
  171. data/sig/sentdm/models/voice/api_response_of_calls_list.rbs +41 -0
  172. data/sig/sentdm/models/voice/api_response_of_voice_agent.rbs +41 -0
  173. data/sig/sentdm/models/voice/api_response_of_voice_agent_secret.rbs +41 -0
  174. data/sig/sentdm/models/voice/api_response_of_voice_agents_list.rbs +41 -0
  175. data/sig/sentdm/models/voice/api_response_of_voice_catalogue.rbs +41 -0
  176. data/sig/sentdm/models/{channels → voice}/api_response_of_voice_token.rbs +5 -5
  177. data/sig/sentdm/models/voice/call.rbs +175 -0
  178. data/sig/sentdm/models/voice/call_hangup_params.rbs +40 -0
  179. data/sig/sentdm/models/voice/call_list_params.rbs +79 -0
  180. data/sig/sentdm/models/voice/call_list_recordings_params.rbs +32 -0
  181. data/sig/sentdm/models/voice/call_party.rbs +19 -0
  182. data/sig/sentdm/models/{calls/participant_update_params.rbs → voice/call_record_params.rbs} +8 -13
  183. data/sig/sentdm/models/voice/call_recording.rbs +34 -0
  184. data/sig/sentdm/models/voice/call_recordings.rbs +22 -0
  185. data/sig/sentdm/models/voice/call_retrieve_params.rbs +32 -0
  186. data/sig/sentdm/models/voice/call_timeline_entry.rbs +21 -0
  187. data/sig/sentdm/models/voice/calls/api_response_of_list_of_call_participant.rbs +43 -0
  188. data/sig/sentdm/models/voice/calls/call_participant.rbs +54 -0
  189. data/sig/sentdm/models/voice/calls/call_participant_target.rbs +25 -0
  190. data/sig/sentdm/models/voice/calls/participant_add_params.rbs +65 -0
  191. data/sig/sentdm/models/voice/calls/participant_list_params.rbs +34 -0
  192. data/sig/sentdm/models/voice/calls/participant_remove_all_params.rbs +36 -0
  193. data/sig/sentdm/models/voice/calls/participant_remove_params.rbs +42 -0
  194. data/sig/sentdm/models/voice/calls/participant_update_params.rbs +63 -0
  195. data/sig/sentdm/models/voice/calls_list.rbs +33 -0
  196. data/sig/sentdm/models/voice/catalogue_list_params.rbs +27 -0
  197. data/sig/sentdm/models/{channels/voice_create_token_params.rbs → voice/token_create_params.rbs} +3 -3
  198. data/sig/sentdm/models/voice/voice_agent.rbs +116 -0
  199. data/sig/sentdm/models/voice/voice_agent_audio.rbs +19 -0
  200. data/sig/sentdm/models/voice/voice_agent_audio_spec.rbs +17 -0
  201. data/sig/sentdm/models/voice/voice_agent_limits.rbs +38 -0
  202. data/sig/sentdm/models/voice/voice_agent_limits_spec.rbs +34 -0
  203. data/sig/sentdm/models/{calls/call_participant_target.rbs → voice/voice_agent_party.rbs} +4 -4
  204. data/sig/sentdm/models/voice/voice_agent_party_spec.rbs +19 -0
  205. data/sig/sentdm/models/voice/voice_agent_secret.rbs +19 -0
  206. data/sig/sentdm/models/voice/voice_agent_speech.rbs +32 -0
  207. data/sig/sentdm/models/voice/voice_agent_speech_spec.rbs +26 -0
  208. data/sig/sentdm/models/voice/voice_agent_transcripts.rbs +23 -0
  209. data/sig/sentdm/models/voice/voice_agent_transcripts_spec.rbs +20 -0
  210. data/sig/sentdm/models/voice/voice_agents_list.rbs +35 -0
  211. data/sig/sentdm/models/voice/voice_catalogue.rbs +35 -0
  212. data/sig/sentdm/models/voice/voice_catalogue_voice.rbs +42 -0
  213. data/sig/sentdm/models/{channels → voice}/voice_token.rbs +3 -1
  214. data/sig/sentdm/models/webhook_create_params.rbs +12 -0
  215. data/sig/sentdm/models/webhook_response.rbs +46 -3
  216. data/sig/sentdm/models/webhook_update_params.rbs +5 -0
  217. data/sig/sentdm/models.rbs +2 -30
  218. data/sig/sentdm/resources/channels/voice.rbs +3 -11
  219. data/sig/sentdm/resources/voice/agents.rbs +74 -0
  220. data/sig/sentdm/resources/voice/calls/participants.rbs +52 -0
  221. data/sig/sentdm/resources/{calls/participants.rbs → voice/calls.rbs} +25 -21
  222. data/sig/sentdm/resources/voice/catalogue.rbs +14 -0
  223. data/sig/sentdm/resources/voice/tokens.rbs +19 -0
  224. data/sig/sentdm/resources/voice.rbs +15 -0
  225. data/sig/sentdm/resources/webhooks.rbs +3 -0
  226. metadata +176 -83
  227. data/lib/sentdm/models/api_response_of_call.rb +0 -43
  228. data/lib/sentdm/models/api_response_of_call_recordings.rb +0 -43
  229. data/lib/sentdm/models/api_response_of_calls_list.rb +0 -42
  230. data/lib/sentdm/models/call.rb +0 -134
  231. data/lib/sentdm/models/call_hangup_params.rb +0 -32
  232. data/lib/sentdm/models/call_list_params.rb +0 -83
  233. data/lib/sentdm/models/call_list_recordings_params.rb +0 -26
  234. data/lib/sentdm/models/call_party.rb +0 -31
  235. data/lib/sentdm/models/call_record_params.rb +0 -55
  236. data/lib/sentdm/models/call_recording.rb +0 -38
  237. data/lib/sentdm/models/call_recordings.rb +0 -24
  238. data/lib/sentdm/models/call_retrieve_params.rb +0 -26
  239. data/lib/sentdm/models/call_timeline_entry.rb +0 -26
  240. data/lib/sentdm/models/calls/call_participant.rb +0 -60
  241. data/lib/sentdm/models/calls/call_participant_target.rb +0 -30
  242. data/lib/sentdm/models/calls/participant_add_params.rb +0 -66
  243. data/lib/sentdm/models/calls_list.rb +0 -26
  244. data/lib/sentdm/resources/calls/participants.rb +0 -231
  245. data/lib/sentdm/resources/calls.rb +0 -236
  246. data/rbi/sentdm/models/api_response_of_call.rbi +0 -74
  247. data/rbi/sentdm/models/api_response_of_call_recordings.rbi +0 -74
  248. data/rbi/sentdm/models/api_response_of_calls_list.rbi +0 -74
  249. data/rbi/sentdm/models/call.rbi +0 -179
  250. data/rbi/sentdm/models/call_hangup_params.rbi +0 -59
  251. data/rbi/sentdm/models/call_list_params.rbi +0 -112
  252. data/rbi/sentdm/models/call_list_recordings_params.rbi +0 -46
  253. data/rbi/sentdm/models/call_party.rbi +0 -41
  254. data/rbi/sentdm/models/call_record_params.rbi +0 -83
  255. data/rbi/sentdm/models/call_recording.rbi +0 -59
  256. data/rbi/sentdm/models/call_recordings.rbi +0 -39
  257. data/rbi/sentdm/models/call_retrieve_params.rbi +0 -46
  258. data/rbi/sentdm/models/call_timeline_entry.rbi +0 -40
  259. data/rbi/sentdm/models/calls/call_participant.rbi +0 -92
  260. data/rbi/sentdm/models/calls/call_participant_target.rbi +0 -47
  261. data/rbi/sentdm/models/calls/participant_add_params.rbi +0 -98
  262. data/rbi/sentdm/models/calls_list.rbi +0 -47
  263. data/rbi/sentdm/resources/calls/participants.rbi +0 -199
  264. data/rbi/sentdm/resources/calls.rbi +0 -207
  265. data/sig/sentdm/models/api_response_of_call.rbs +0 -39
  266. data/sig/sentdm/models/api_response_of_call_recordings.rbs +0 -39
  267. data/sig/sentdm/models/api_response_of_calls_list.rbs +0 -39
  268. data/sig/sentdm/models/call.rbs +0 -101
  269. data/sig/sentdm/models/call_hangup_params.rbs +0 -38
  270. data/sig/sentdm/models/call_list_params.rbs +0 -67
  271. data/sig/sentdm/models/call_list_recordings_params.rbs +0 -30
  272. data/sig/sentdm/models/call_party.rbs +0 -17
  273. data/sig/sentdm/models/call_record_params.rbs +0 -54
  274. data/sig/sentdm/models/call_recording.rbs +0 -32
  275. data/sig/sentdm/models/call_recordings.rbs +0 -17
  276. data/sig/sentdm/models/call_retrieve_params.rbs +0 -30
  277. data/sig/sentdm/models/call_timeline_entry.rbs +0 -19
  278. data/sig/sentdm/models/calls/call_participant.rbs +0 -52
  279. data/sig/sentdm/models/calls/participant_add_params.rbs +0 -63
  280. data/sig/sentdm/models/calls_list.rbs +0 -26
  281. 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: b0fe2b102d0383035abaeca878cfc21c6ca248654c43cd778b525ebc7c3f2ad5
4
+ data.tar.gz: f581f11fa8a55d391fcc1ee01958b359fec4562bc58702060db9c598d4d6f1a4
5
5
  SHA512:
6
- metadata.gz: 4aa11719a1c01c114e7a34d1f0b1d925428fb74134d1ebb587dd4c9b6f401c7373b64bfc8aaf42cd2e1f3d6580063e3443fce61bfd01a427885b605df1f41191
7
- data.tar.gz: bc846fa52387c5b28c16c7e17e7efb5a9e6c65fc3816baa6be2df535a98ab9ca6aeba04078e2821c5e51671b37021eb45dec501cfccb9cdd7ca0ebba2f4a3a32
6
+ metadata.gz: f337dcafa200de5fb45bc924339b2a0b07179a2bf531fee5535ac38ffcea924e35612892a4a9a9c96fc31ebbd2e398a630aa7ef41c67d67179b83c58fa456fc3
7
+ data.tar.gz: '0878a20b5965654dfcd33ef5a39d34e1631d9d7591b073bf2c75a3ac0a69c49f4868eb169f8fe5d75bce928111c9a0ee4af1f3e14fd2ec0dcc2d6bd7c728c4d5'
data/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.40.0](https://github.com/sentdm/sent-dm-ruby/compare/v0.39.0...v0.40.0) (2026-10-28)
4
+
5
+
6
+ ### Features
7
+
8
+ * **api:** add voice agents, the voice catalogue and agent_id ([abd31b9](https://github.com/sentdm/sent-dm-ruby/commit/abd31b96b520c10bd3ac67bb1c2b243c3a75b5fd))
9
+ * **api:** sync generated SDKs from the committed spec ([30477ca](https://github.com/sentdm/sent-dm-ruby/commit/30477cacd760dccdf6ce8c5112267d75197746a6))
10
+ * **api:** sync OpenAPI spec from production ([fa5b9f1](https://github.com/sentdm/sent-dm-ruby/commit/fa5b9f12f44e770a7aa6f2382585755fd9935acf))
11
+
12
+ ## [0.39.0](https://github.com/sentdm/sent-dm-ruby/compare/v0.38.1...v0.39.0) (2026-10-23)
13
+
14
+
15
+ ### ⚠ BREAKING CHANGES
16
+
17
+ * **api:** move calls and voice tokens under the voice resource
18
+
19
+ ### Features
20
+
21
+ * **api:** move calls and voice tokens under the voice resource ([a49f63f](https://github.com/sentdm/sent-dm-ruby/commit/a49f63f03c8ab24f342811916cf886f0bf8e85fa))
22
+ * **api:** sync generated SDKs from the committed spec ([8201d6f](https://github.com/sentdm/sent-dm-ruby/commit/8201d6f1770931232a0ca73d1887a7e08df58ba0))
23
+
3
24
  ## [0.38.1](https://github.com/sentdm/sent-dm-ruby/compare/v0.38.0...v0.38.1) (2026-10-20)
4
25
 
5
26
 
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.40.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
@@ -0,0 +1,115 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sentdm
4
+ module Internal
5
+ # @generic Elem
6
+ #
7
+ # @example
8
+ # if voice_agents_page.has_next?
9
+ # voice_agents_page = voice_agents_page.next_page
10
+ # end
11
+ #
12
+ # @example
13
+ # voice_agents_page.auto_paging_each do |agent|
14
+ # puts(agent)
15
+ # end
16
+ class VoiceAgentsPage
17
+ include Sentdm::Internal::Type::BasePage
18
+
19
+ # @return [Data]
20
+ attr_accessor :data
21
+
22
+ # @return [Boolean]
23
+ def next_page?
24
+ data&.pagination&.has_more
25
+ end
26
+
27
+ # @raise [Sentdm::HTTP::Error]
28
+ # @return [self]
29
+ def next_page
30
+ unless next_page?
31
+ message = "No more pages available. Please check #next_page? before calling ##{__method__}"
32
+ raise RuntimeError.new(message)
33
+ end
34
+
35
+ req = Sentdm::Internal::Util.deep_merge(
36
+ @req,
37
+ {query: {page: @req.fetch(:query).fetch(:page, 1).to_i.succ}}
38
+ )
39
+ @client.request(req)
40
+ end
41
+
42
+ # @param blk [Proc]
43
+ #
44
+ # @yieldparam [generic<Elem>]
45
+ def auto_paging_each(&blk)
46
+ unless block_given?
47
+ raise ArgumentError.new("A block must be given to ##{__method__}")
48
+ end
49
+
50
+ page = self
51
+ loop do
52
+ page.data&.agents&.each(&blk)
53
+
54
+ break unless page.next_page?
55
+ page = page.next_page
56
+ end
57
+ end
58
+
59
+ # @api private
60
+ #
61
+ # @param client [Sentdm::Internal::Transport::BaseClient]
62
+ # @param req [Hash{Symbol=>Object}]
63
+ # @param headers [Hash{String=>String}]
64
+ # @param page_data [Hash{Symbol=>Object}]
65
+ def initialize(client:, req:, headers:, page_data:)
66
+ super
67
+
68
+ case page_data
69
+ in {data: Hash | nil => data}
70
+ if (agents = data[:agents]).is_a?(Array)
71
+ data = {**data, agents: agents.map { Sentdm::Internal::Type::Converter.coerce(@model, _1) }}
72
+ end
73
+ @data = Sentdm::Internal::Type::Converter.coerce(Sentdm::Internal::VoiceAgentsPage::Data, data)
74
+ else
75
+ end
76
+ end
77
+
78
+ # @api private
79
+ #
80
+ # @return [String]
81
+ def inspect
82
+ model = Sentdm::Internal::Type::Converter.inspect(@model, depth: 1)
83
+
84
+ "#<#{self.class}[#{model}]:0x#{object_id.to_s(16)}>"
85
+ end
86
+
87
+ class Data < Sentdm::Internal::Type::BaseModel
88
+ # @!attribute agents
89
+ #
90
+ # @return [Array<Object>, nil]
91
+ optional :agents, Sentdm::Internal::Type::ArrayOf[Sentdm::Internal::Type::Unknown]
92
+
93
+ # @!attribute pagination
94
+ #
95
+ # @return [Data::Pagination, nil]
96
+ optional :pagination, -> { Data::Pagination }
97
+
98
+ # @!method initialize(agents: nil, pagination: nil)
99
+ # @param agents [Array<Object>]
100
+ # @param pagination [Data::Pagination]
101
+
102
+ # @see Data#pagination
103
+ class Pagination < Sentdm::Internal::Type::BaseModel
104
+ # @!attribute has_more
105
+ #
106
+ # @return [Boolean, nil]
107
+ optional :has_more, Sentdm::Internal::Type::Boolean
108
+
109
+ # @!method initialize(has_more: nil)
110
+ # @param has_more [Boolean]
111
+ end
112
+ end
113
+ end
114
+ end
115
+ end
@@ -19,15 +19,17 @@ module Sentdm
19
19
  optional :field, String
20
20
 
21
21
  # @!attribute payload
22
- # Body of a call.initiated, call.answered, call.completed, call.failed or
23
- # call.recording_ready event. Which of them occurred is the envelope's event.
22
+ # Body of a call.initiated, call.answered, call.agent_connected, call.completed,
23
+ # call.failed or call.recording_ready event. Which of them occurred is the
24
+ # envelope's event.
24
25
  #
25
26
  # Shaped like the message, inbound, template and channel payloads: account_id
26
27
  # names the account the event is about, channel names the channel, and updated_at
27
28
  # is when the change happened on the call, in the same yyyy-MM-ddTHH:mm:ssZ form.
28
- # duration_seconds and price are added on call.completed, reason on call.failed
29
- # and recording_id on call.recording_ready; each is omitted rather than sent as
30
- # null when it does not apply.
29
+ # Every event says how the call is handled in mode, and an agent call names its
30
+ # agent in agent_id. duration_seconds and price are added on call.completed,
31
+ # reason on call.failed and recording_id on call.recording_ready; each is omitted
32
+ # rather than sent as null when it does not apply.
31
33
  #
32
34
  # Casing is snake_case because these ride the same webhook stream customers
33
35
  # already parse message_id from; the question/answer contract is a separate
@@ -62,7 +64,7 @@ module Sentdm
62
64
  #
63
65
  # @param field [String] The event family, for example message, templates or contact. Route on
64
66
  #
65
- # @param payload [Sentdm::Models::CallEventPayload, nil] Body of a call.initiated, call.answered, call.completed, call.failed
67
+ # @param payload [Sentdm::Models::CallEventPayload, nil] Body of a call.initiated, call.answered, call.agent_connected, call.completed,
66
68
  #
67
69
  # @param request_id [String, nil] The event-specific body.
68
70
  #
@@ -16,6 +16,12 @@ module Sentdm
16
16
  # @return [String, nil]
17
17
  optional :account_id, String
18
18
 
19
+ # @!attribute agent_id
20
+ # The voice agent that answers the call, agent\_…. Only on an agent call.
21
+ #
22
+ # @return [String, nil]
23
+ optional :agent_id, String, nil?: true
24
+
19
25
  # @!attribute channel
20
26
  # Always voice.
21
27
  #
@@ -28,6 +34,13 @@ module Sentdm
28
34
  # @return [Integer, nil]
29
35
  optional :duration_seconds, Integer, nil?: true
30
36
 
37
+ # @!attribute mode
38
+ # inapp, a call routed by the number's callback URL, or agent, a call one of the
39
+ # account's voice agents answers. The same value GET /v3/voice/calls returns.
40
+ #
41
+ # @return [String, nil]
42
+ optional :mode, String
43
+
31
44
  # @!attribute number
32
45
  # The customer number that owns the call, in E.164 format.
33
46
  #
@@ -49,8 +62,9 @@ module Sentdm
49
62
  optional :reason, String, nil?: true
50
63
 
51
64
  # @!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.
65
+ # The recording that became available, the same id GET
66
+ # /v3/voice/calls/{id}/recordings lists it under. Only on call.recording_ready,
67
+ # which is sent once per recording.
54
68
  #
55
69
  # @return [String, nil]
56
70
  optional :recording_id, String, nil?: true
@@ -61,19 +75,21 @@ module Sentdm
61
75
  # @return [String, nil]
62
76
  optional :updated_at, String
63
77
 
64
- # @!method initialize(call_id:, account_id: nil, channel: nil, duration_seconds: nil, number: nil, price: nil, reason: nil, recording_id: nil, updated_at: nil)
78
+ # @!method initialize(call_id:, account_id: nil, agent_id: nil, channel: nil, duration_seconds: nil, mode: nil, number: nil, price: nil, reason: nil, recording_id: nil, updated_at: nil)
65
79
  # Some parameter documentations has been truncated, see
66
80
  # {Sentdm::Models::CallEventPayload} for more details.
67
81
  #
68
- # Body of a call.initiated, call.answered, call.completed, call.failed or
69
- # call.recording_ready event. Which of them occurred is the envelope's event.
82
+ # Body of a call.initiated, call.answered, call.agent_connected, call.completed,
83
+ # call.failed or call.recording_ready event. Which of them occurred is the
84
+ # envelope's event.
70
85
  #
71
86
  # Shaped like the message, inbound, template and channel payloads: account_id
72
87
  # names the account the event is about, channel names the channel, and updated_at
73
88
  # is when the change happened on the call, in the same yyyy-MM-ddTHH:mm:ssZ form.
74
- # duration_seconds and price are added on call.completed, reason on call.failed
75
- # and recording_id on call.recording_ready; each is omitted rather than sent as
76
- # null when it does not apply.
89
+ # Every event says how the call is handled in mode, and an agent call names its
90
+ # agent in agent_id. duration_seconds and price are added on call.completed,
91
+ # reason on call.failed and recording_id on call.recording_ready; each is omitted
92
+ # rather than sent as null when it does not apply.
77
93
  #
78
94
  # Casing is snake_case because these ride the same webhook stream customers
79
95
  # already parse message_id from; the question/answer contract is a separate
@@ -84,17 +100,21 @@ module Sentdm
84
100
  #
85
101
  # @param account_id [String] The account the call belongs to: the key's own customer, or the sender profile i
86
102
  #
103
+ # @param agent_id [String, nil] The voice agent that answers the call, agent\_…. Only on an agent call.
104
+ #
87
105
  # @param channel [String] Always voice.
88
106
  #
89
107
  # @param duration_seconds [Integer, nil] How long the call lasted. Only on call.completed.
90
108
  #
109
+ # @param mode [String] inapp, a call routed by the number's callback URL, or agent, a call one of the a
110
+ #
91
111
  # @param number [String] The customer number that owns the call, in E.164 format.
92
112
  #
93
113
  # @param price [Float, nil] What the call was charged. Only on call.completed, and omitted there until billi
94
114
  #
95
115
  # @param reason [String, nil] The machine-readable reason the call did not complete. Only on call.failed, and
96
116
  #
97
- # @param recording_id [String, nil] The recording that became available, the same id GET /v3/calls/{id}/recordings l
117
+ # @param recording_id [String, nil] The recording that became available, the same id GET /v3/voice/calls/{id}/record
98
118
  #
99
119
  # @param updated_at [String] When the change happened on the call, as opposed to when the event was emitted.
100
120
  end
@@ -8,16 +8,15 @@ module Sentdm
8
8
  extend Sentdm::Internal::Type::RequestParameters::Converter
9
9
  include Sentdm::Internal::Type::RequestParameters
10
10
 
11
- # @!attribute callback_url
12
- # Where Sent asks what to do with each call on this number: an absolute HTTP or
13
- # HTTPS URL on a public host. A signed question is POSTed here when a call arrives
14
- # or a caller presses a key, and the answer decides the call. Every question is
15
- # signed with the callback_secret the response returns, the same way your webhooks
16
- # are signed. Turning the number on again with a different URL replaces it and
17
- # keeps the secret.
11
+ # @!attribute agent_id
12
+ # One of your voice agents (GET /v3/voice/agents), such as
13
+ # agent_9f2ab000-0000-4000-8000-000000000001, to answer calls to this number. It
14
+ # wins over callback_url for calls to the number, and both may be sent; calls your
15
+ # app places from the number still follow your app. Send it instead of
16
+ # callback_url for a number only an agent answers.
18
17
  #
19
- # @return [String]
20
- required :callback_url, String
18
+ # @return [String, nil]
19
+ optional :agent_id, String, nil?: true
21
20
 
22
21
  # @!attribute area_code
23
22
  # The US area code a new number should be in, as 212. Only for a request that
@@ -28,6 +27,17 @@ module Sentdm
28
27
  # @return [String, nil]
29
28
  optional :area_code, String, nil?: true
30
29
 
30
+ # @!attribute callback_url
31
+ # Where Sent asks what to do with each call on this number: an absolute HTTP or
32
+ # HTTPS URL on a public host. A signed question is POSTed here when a call arrives
33
+ # or a caller presses a key, and the answer decides the call. Every question is
34
+ # signed with the callback_secret the response returns, the same way your webhooks
35
+ # are signed. Turning the number on again with a different URL replaces it and
36
+ # keeps the secret. Required unless agent_id is sent.
37
+ #
38
+ # @return [String, nil]
39
+ optional :callback_url, String, nil?: true
40
+
31
41
  # @!attribute default_for_app_calls
32
42
  # Make this the line app-originated calls are placed from when a voice token names
33
43
  # no number. Omit it and your first voice number takes that role; a later one
@@ -61,14 +71,16 @@ module Sentdm
61
71
  # @return [String, nil]
62
72
  optional :x_profile_id, String
63
73
 
64
- # @!method initialize(callback_url:, area_code: nil, default_for_app_calls: nil, number: nil, sandbox: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
74
+ # @!method initialize(agent_id: nil, area_code: nil, callback_url: nil, default_for_app_calls: nil, number: nil, sandbox: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
65
75
  # Some parameter documentations has been truncated, see
66
76
  # {Sentdm::Models::Channels::VoiceCreateParams} for more details.
67
77
  #
68
- # @param callback_url [String] Where Sent asks what to do with each call on this number: an absolute HTTP or HT
78
+ # @param agent_id [String, nil] One of your voice agents (GET /v3/voice/agents), such as
69
79
  #
70
80
  # @param area_code [String, nil] The US area code a new number should be in, as 212. Only for a request that leav
71
81
  #
82
+ # @param callback_url [String, nil] Where Sent asks what to do with each call on this number: an absolute HTTP or HT
83
+ #
72
84
  # @param default_for_app_calls [Boolean, nil] Make this the line app-originated calls are placed from when a voice token names
73
85
  #
74
86
  # @param number [String, nil] One of your phone numbers, in E.164 format. Leave the field out entirely to be g
@@ -4,6 +4,15 @@ module Sentdm
4
4
  module Models
5
5
  module Channels
6
6
  class VoiceNumber < Sentdm::Internal::Type::BaseModel
7
+ # @!attribute agent_id
8
+ # The voice agent calls to this number go to, such as
9
+ # agent_9f2ab000-0000-4000-8000-000000000001. It wins over callback_url for calls
10
+ # to the number; calls your app places from the number still follow your app. Null
11
+ # when no agent answers the number.
12
+ #
13
+ # @return [String, nil]
14
+ optional :agent_id, String, nil?: true
15
+
7
16
  # @!attribute callback_url
8
17
  # Where Sent asks what to do with each call on this number: a signed question is
9
18
  # POSTed here when a call arrives or a caller presses a key, and the answer
@@ -32,6 +41,15 @@ module Sentdm
32
41
  # @return [String, nil]
33
42
  optional :number, String
34
43
 
44
+ # @!attribute routes_to
45
+ # Who answers calls to this number: agent, the voice agent in agent_id;
46
+ # agent_pending, that agent once the number has finished moving to it, with calls
47
+ # possibly unanswered until then; callback, your callback_url; or none, in which
48
+ # case calls to it are declined.
49
+ #
50
+ # @return [String, nil]
51
+ optional :routes_to, String
52
+
35
53
  # @!attribute status
36
54
  # ACTIVE while the number carries calls, INACTIVE once it was turned off. Nothing
37
55
  # provisions: a number the customer holds can carry calls the moment voice is
@@ -45,12 +63,14 @@ module Sentdm
45
63
  # @return [Time, nil]
46
64
  optional :updated_at, Time
47
65
 
48
- # @!method initialize(callback_url: nil, created_at: nil, default_for_app_calls: nil, number: nil, status: nil, updated_at: nil)
66
+ # @!method initialize(agent_id: nil, callback_url: nil, created_at: nil, default_for_app_calls: nil, number: nil, routes_to: nil, status: nil, updated_at: nil)
49
67
  # Some parameter documentations has been truncated, see
50
68
  # {Sentdm::Models::Channels::VoiceNumber} for more details.
51
69
  #
52
70
  # One number the profile carries phone calls on.
53
71
  #
72
+ # @param agent_id [String, nil] The voice agent calls to this number go to, such as agent_9f2ab000-0000-4000-800
73
+ #
54
74
  # @param callback_url [String, nil] Where Sent asks what to do with each call on this number: a signed question is P
55
75
  #
56
76
  # @param created_at [Time]
@@ -59,6 +79,8 @@ module Sentdm
59
79
  #
60
80
  # @param number [String] The number, in E.164.
61
81
  #
82
+ # @param routes_to [String] Who answers calls to this number: agent, the voice agent in agent_id;
83
+ #
62
84
  # @param status [String] ACTIVE while the number carries calls, INACTIVE once it was turned off. Nothing
63
85
  #
64
86
  # @param updated_at [Time]
@@ -13,6 +13,15 @@ module Sentdm
13
13
  # @return [String]
14
14
  required :number, String
15
15
 
16
+ # @!attribute agent_id
17
+ # One of your voice agents, such as agent_9f2ab000-0000-4000-8000-000000000001, to
18
+ # answer calls to the number, or null to unbind it so the callback URL answers
19
+ # them again. The agent wins over callback_url for calls to the number; calls your
20
+ # app places from it still follow your app.
21
+ #
22
+ # @return [String, nil]
23
+ optional :agent_id, String, nil?: true
24
+
16
25
  # @!attribute callback_url
17
26
  # A new callback URL for the number, active or not: an absolute HTTP or HTTPS URL
18
27
  # on a public host, where Sent asks what to do with each call. The signing secret
@@ -54,12 +63,14 @@ module Sentdm
54
63
  # @return [String, nil]
55
64
  optional :x_profile_id, String
56
65
 
57
- # @!method initialize(number:, callback_url: nil, default_for_app_calls: nil, sandbox: nil, status: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
66
+ # @!method initialize(number:, agent_id: nil, callback_url: nil, default_for_app_calls: nil, sandbox: nil, status: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
58
67
  # Some parameter documentations has been truncated, see
59
68
  # {Sentdm::Models::Channels::VoiceUpdateParams} for more details.
60
69
  #
61
70
  # @param number [String]
62
71
  #
72
+ # @param agent_id [String, nil] One of your voice agents, such as agent_9f2ab000-0000-4000-8000-000000000001, to
73
+ #
63
74
  # @param callback_url [String, nil] A new callback URL for the number, active or not: an absolute HTTP or HTTPS URL
64
75
  #
65
76
  # @param default_for_app_calls [Boolean, nil] true makes this the line app-originated calls are placed from when a voice token
@@ -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
  #