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
@@ -0,0 +1,329 @@
1
+ # typed: strong
2
+
3
+ module Sentdm
4
+ module Models
5
+ module Voice
6
+ class Call < Sentdm::Internal::Type::BaseModel
7
+ OrHash =
8
+ T.type_alias { T.any(Sentdm::Voice::Call, Sentdm::Internal::AnyHash) }
9
+
10
+ # The call id, the same one carried by the call.request question and every call
11
+ # webhook
12
+ sig { returns(T.nilable(String)) }
13
+ attr_reader :id
14
+
15
+ sig { params(id: String).void }
16
+ attr_writer :id
17
+
18
+ # The voice agent that answered the call, such as
19
+ # agent_9f2ab000-0000-4000-8000-000000000001. Null for an inapp call
20
+ sig { returns(T.nilable(String)) }
21
+ attr_accessor :agent_id
22
+
23
+ # When the call was answered (UTC). Null until then, and always null for a call
24
+ # between two of your app users
25
+ sig { returns(T.nilable(Time)) }
26
+ attr_accessor :answered_at
27
+
28
+ # The caller id shown on the phone leg, in E.164 format: the one your answer
29
+ # chose, or the owning number when it chose none. Null for a call with no phone
30
+ # leg
31
+ sig { returns(T.nilable(String)) }
32
+ attr_accessor :caller_id_used
33
+
34
+ # The phone number the call was connected to, in E.164 format: the number your
35
+ # answer dialed, or the fallback number a call to one of your voice agents
36
+ # reached. Null when the call was not connected to a phone number
37
+ sig { returns(T.nilable(String)) }
38
+ attr_accessor :connected_number
39
+
40
+ # outbound for a call placed from your app, inbound for a call to one of your
41
+ # numbers
42
+ sig { returns(T.nilable(String)) }
43
+ attr_reader :direction
44
+
45
+ sig { params(direction: String).void }
46
+ attr_writer :direction
47
+
48
+ # Billable duration in seconds. Null while the call is live
49
+ sig { returns(T.nilable(Integer)) }
50
+ attr_accessor :duration_seconds
51
+
52
+ # When the call ended (UTC). Null while the call is live
53
+ sig { returns(T.nilable(Time)) }
54
+ attr_accessor :ended_at
55
+
56
+ # Why the call did not complete: callback_timeout, invalid_answer,
57
+ # insufficient_balance, destination_blocked, callback_not_configured, rejected,
58
+ # no_answer, or for an agent call agent_busy or agent_unreachable. Null while the
59
+ # call is live, when it completed, and when it failed without a recorded reason
60
+ sig { returns(T.nilable(String)) }
61
+ attr_accessor :failure_reason
62
+
63
+ # One end of a call
64
+ sig { returns(T.nilable(Sentdm::Voice::CallParty)) }
65
+ attr_reader :from
66
+
67
+ sig { params(from: Sentdm::Voice::CallParty::OrHash).void }
68
+ attr_writer :from
69
+
70
+ # The legs the price covers, one entry per billed leg, each with its own cost: a
71
+ # call your answer connected to a phone number ran the caller's leg to your number
72
+ # and the leg to the connected number at once, and both are billed. Null until the
73
+ # call has been priced
74
+ sig { returns(T.nilable(T::Array[Sentdm::Voice::Call::Leg])) }
75
+ attr_accessor :legs
76
+
77
+ # The calling mode: inapp for a call between people in your app and phone numbers,
78
+ # routed by your number's callback URL; agent for a call one of your voice agents
79
+ # answered
80
+ sig { returns(T.nilable(String)) }
81
+ attr_reader :mode
82
+
83
+ sig { params(mode: String).void }
84
+ attr_writer :mode
85
+
86
+ # Your number that owns the call, in E.164 format: the dialed number for an
87
+ # inbound call, the caller's bound number for a call placed from your app
88
+ sig { returns(T.nilable(String)) }
89
+ attr_reader :number
90
+
91
+ sig { params(number: String).void }
92
+ attr_writer :number
93
+
94
+ # What the call cost. Null until it has been priced
95
+ sig { returns(T.nilable(Float)) }
96
+ attr_accessor :price
97
+
98
+ # True once a recording of the call is available
99
+ sig { returns(T.nilable(T::Boolean)) }
100
+ attr_reader :recording_available
101
+
102
+ sig { params(recording_available: T::Boolean).void }
103
+ attr_writer :recording_available
104
+
105
+ # When the call was placed (UTC)
106
+ sig { returns(T.nilable(Time)) }
107
+ attr_reader :started_at
108
+
109
+ sig { params(started_at: Time).void }
110
+ attr_writer :started_at
111
+
112
+ # INITIATED, RINGING, ANSWERED, COMPLETED, FAILED, NO_ANSWER or REJECTED
113
+ sig { returns(T.nilable(String)) }
114
+ attr_reader :status
115
+
116
+ sig { params(status: String).void }
117
+ attr_writer :status
118
+
119
+ # When the call entered each status, oldest first. Only returned when reading one
120
+ # call
121
+ sig { returns(T.nilable(T::Array[Sentdm::Voice::CallTimelineEntry])) }
122
+ attr_accessor :timeline
123
+
124
+ # One end of a call
125
+ sig { returns(T.nilable(Sentdm::Voice::CallParty)) }
126
+ attr_reader :to
127
+
128
+ sig { params(to: Sentdm::Voice::CallParty::OrHash).void }
129
+ attr_writer :to
130
+
131
+ # A call record
132
+ sig do
133
+ params(
134
+ id: String,
135
+ agent_id: T.nilable(String),
136
+ answered_at: T.nilable(Time),
137
+ caller_id_used: T.nilable(String),
138
+ connected_number: T.nilable(String),
139
+ direction: String,
140
+ duration_seconds: T.nilable(Integer),
141
+ ended_at: T.nilable(Time),
142
+ failure_reason: T.nilable(String),
143
+ from: Sentdm::Voice::CallParty::OrHash,
144
+ legs: T.nilable(T::Array[Sentdm::Voice::Call::Leg::OrHash]),
145
+ mode: String,
146
+ number: String,
147
+ price: T.nilable(Float),
148
+ recording_available: T::Boolean,
149
+ started_at: Time,
150
+ status: String,
151
+ timeline:
152
+ T.nilable(T::Array[Sentdm::Voice::CallTimelineEntry::OrHash]),
153
+ to: Sentdm::Voice::CallParty::OrHash
154
+ ).returns(T.attached_class)
155
+ end
156
+ def self.new(
157
+ # The call id, the same one carried by the call.request question and every call
158
+ # webhook
159
+ id: nil,
160
+ # The voice agent that answered the call, such as
161
+ # agent_9f2ab000-0000-4000-8000-000000000001. Null for an inapp call
162
+ agent_id: nil,
163
+ # When the call was answered (UTC). Null until then, and always null for a call
164
+ # between two of your app users
165
+ answered_at: nil,
166
+ # The caller id shown on the phone leg, in E.164 format: the one your answer
167
+ # chose, or the owning number when it chose none. Null for a call with no phone
168
+ # leg
169
+ caller_id_used: nil,
170
+ # The phone number the call was connected to, in E.164 format: the number your
171
+ # answer dialed, or the fallback number a call to one of your voice agents
172
+ # reached. Null when the call was not connected to a phone number
173
+ connected_number: nil,
174
+ # outbound for a call placed from your app, inbound for a call to one of your
175
+ # numbers
176
+ direction: nil,
177
+ # Billable duration in seconds. Null while the call is live
178
+ duration_seconds: nil,
179
+ # When the call ended (UTC). Null while the call is live
180
+ ended_at: nil,
181
+ # Why the call did not complete: callback_timeout, invalid_answer,
182
+ # insufficient_balance, destination_blocked, callback_not_configured, rejected,
183
+ # no_answer, or for an agent call agent_busy or agent_unreachable. Null while the
184
+ # call is live, when it completed, and when it failed without a recorded reason
185
+ failure_reason: nil,
186
+ # One end of a call
187
+ from: nil,
188
+ # The legs the price covers, one entry per billed leg, each with its own cost: a
189
+ # call your answer connected to a phone number ran the caller's leg to your number
190
+ # and the leg to the connected number at once, and both are billed. Null until the
191
+ # call has been priced
192
+ legs: nil,
193
+ # The calling mode: inapp for a call between people in your app and phone numbers,
194
+ # routed by your number's callback URL; agent for a call one of your voice agents
195
+ # answered
196
+ mode: nil,
197
+ # Your number that owns the call, in E.164 format: the dialed number for an
198
+ # inbound call, the caller's bound number for a call placed from your app
199
+ number: nil,
200
+ # What the call cost. Null until it has been priced
201
+ price: nil,
202
+ # True once a recording of the call is available
203
+ recording_available: nil,
204
+ # When the call was placed (UTC)
205
+ started_at: nil,
206
+ # INITIATED, RINGING, ANSWERED, COMPLETED, FAILED, NO_ANSWER or REJECTED
207
+ status: nil,
208
+ # When the call entered each status, oldest first. Only returned when reading one
209
+ # call
210
+ timeline: nil,
211
+ # One end of a call
212
+ to: nil
213
+ )
214
+ end
215
+
216
+ sig do
217
+ override.returns(
218
+ {
219
+ id: String,
220
+ agent_id: T.nilable(String),
221
+ answered_at: T.nilable(Time),
222
+ caller_id_used: T.nilable(String),
223
+ connected_number: T.nilable(String),
224
+ direction: String,
225
+ duration_seconds: T.nilable(Integer),
226
+ ended_at: T.nilable(Time),
227
+ failure_reason: T.nilable(String),
228
+ from: Sentdm::Voice::CallParty,
229
+ legs: T.nilable(T::Array[Sentdm::Voice::Call::Leg]),
230
+ mode: String,
231
+ number: String,
232
+ price: T.nilable(Float),
233
+ recording_available: T::Boolean,
234
+ started_at: Time,
235
+ status: String,
236
+ timeline: T.nilable(T::Array[Sentdm::Voice::CallTimelineEntry]),
237
+ to: Sentdm::Voice::CallParty
238
+ }
239
+ )
240
+ end
241
+ def to_hash
242
+ end
243
+
244
+ class Leg < Sentdm::Internal::Type::BaseModel
245
+ OrHash =
246
+ T.type_alias do
247
+ T.any(Sentdm::Voice::Call::Leg, Sentdm::Internal::AnyHash)
248
+ end
249
+
250
+ # The whole minutes the leg was billed for
251
+ sig { returns(T.nilable(Integer)) }
252
+ attr_reader :billed_minutes
253
+
254
+ sig { params(billed_minutes: Integer).void }
255
+ attr_writer :billed_minutes
256
+
257
+ # What the leg cost, in the same unit as the call's price
258
+ sig { returns(T.nilable(Float)) }
259
+ attr_reader :cost
260
+
261
+ sig { params(cost: Float).void }
262
+ attr_writer :cost
263
+
264
+ # The currency of the cost: USD
265
+ sig { returns(T.nilable(String)) }
266
+ attr_reader :currency
267
+
268
+ sig { params(currency: String).void }
269
+ attr_writer :currency
270
+
271
+ # inbound for the caller's leg to your number, outbound for a leg placed on your
272
+ # behalf
273
+ sig { returns(T.nilable(String)) }
274
+ attr_reader :direction
275
+
276
+ sig { params(direction: String).void }
277
+ attr_writer :direction
278
+
279
+ # The phone number the leg reached, in E.164 format: your number for the inbound
280
+ # leg, the number dialed for an outbound one. Null for a leg to one of your app
281
+ # users or a room
282
+ sig { returns(T.nilable(String)) }
283
+ attr_accessor :number
284
+
285
+ # One leg of a call the price covers
286
+ sig do
287
+ params(
288
+ billed_minutes: Integer,
289
+ cost: Float,
290
+ currency: String,
291
+ direction: String,
292
+ number: T.nilable(String)
293
+ ).returns(T.attached_class)
294
+ end
295
+ def self.new(
296
+ # The whole minutes the leg was billed for
297
+ billed_minutes: nil,
298
+ # What the leg cost, in the same unit as the call's price
299
+ cost: nil,
300
+ # The currency of the cost: USD
301
+ currency: nil,
302
+ # inbound for the caller's leg to your number, outbound for a leg placed on your
303
+ # behalf
304
+ direction: nil,
305
+ # The phone number the leg reached, in E.164 format: your number for the inbound
306
+ # leg, the number dialed for an outbound one. Null for a leg to one of your app
307
+ # users or a room
308
+ number: nil
309
+ )
310
+ end
311
+
312
+ sig do
313
+ override.returns(
314
+ {
315
+ billed_minutes: Integer,
316
+ cost: Float,
317
+ currency: String,
318
+ direction: String,
319
+ number: T.nilable(String)
320
+ }
321
+ )
322
+ end
323
+ def to_hash
324
+ end
325
+ end
326
+ end
327
+ end
328
+ end
329
+ end
@@ -0,0 +1,61 @@
1
+ # typed: strong
2
+
3
+ module Sentdm
4
+ module Models
5
+ module Voice
6
+ class CallHangupParams < Sentdm::Models::MutationRequest
7
+ extend Sentdm::Internal::Type::RequestParameters::Converter
8
+ include Sentdm::Internal::Type::RequestParameters
9
+
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(Sentdm::Voice::CallHangupParams, Sentdm::Internal::AnyHash)
13
+ end
14
+
15
+ sig { returns(String) }
16
+ attr_accessor :id
17
+
18
+ sig { returns(T.nilable(String)) }
19
+ attr_reader :idempotency_key
20
+
21
+ sig { params(idempotency_key: String).void }
22
+ attr_writer :idempotency_key
23
+
24
+ sig { returns(T.nilable(String)) }
25
+ attr_reader :x_profile_id
26
+
27
+ sig { params(x_profile_id: String).void }
28
+ attr_writer :x_profile_id
29
+
30
+ sig do
31
+ params(
32
+ id: String,
33
+ idempotency_key: String,
34
+ x_profile_id: String,
35
+ request_options: Sentdm::RequestOptions::OrHash
36
+ ).returns(T.attached_class)
37
+ end
38
+ def self.new(
39
+ id:,
40
+ idempotency_key: nil,
41
+ x_profile_id: nil,
42
+ request_options: {}
43
+ )
44
+ end
45
+
46
+ sig do
47
+ override.returns(
48
+ {
49
+ id: String,
50
+ idempotency_key: String,
51
+ x_profile_id: String,
52
+ request_options: Sentdm::RequestOptions
53
+ }
54
+ )
55
+ end
56
+ def to_hash
57
+ end
58
+ end
59
+ end
60
+ end
61
+ end
@@ -0,0 +1,134 @@
1
+ # typed: strong
2
+
3
+ module Sentdm
4
+ module Models
5
+ module Voice
6
+ class CallListParams < Sentdm::Internal::Type::BaseModel
7
+ extend Sentdm::Internal::Type::RequestParameters::Converter
8
+ include Sentdm::Internal::Type::RequestParameters
9
+
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(Sentdm::Voice::CallListParams, Sentdm::Internal::AnyHash)
13
+ end
14
+
15
+ # Optional filter on the voice agent that answered the call, such as
16
+ # agent_9f2ab000-0000-4000-8000-000000000001
17
+ sig { returns(T.nilable(String)) }
18
+ attr_accessor :agent_id
19
+
20
+ # Optional direction filter: outbound for calls placed from your app, inbound for
21
+ # calls to one of your numbers
22
+ sig { returns(T.nilable(String)) }
23
+ attr_accessor :direction
24
+
25
+ # Only calls started at or after this time (ISO 8601)
26
+ sig { returns(T.nilable(Time)) }
27
+ attr_accessor :from
28
+
29
+ # Optional mode filter: inapp for calls routed by your number's callback URL,
30
+ # agent for calls one of your voice agents answered
31
+ sig { returns(T.nilable(String)) }
32
+ attr_accessor :mode
33
+
34
+ # Optional filter on the number that owns the call, one of your voice-enabled
35
+ # numbers in E.164 format
36
+ sig { returns(T.nilable(String)) }
37
+ attr_accessor :number
38
+
39
+ # Page number (1-indexed)
40
+ sig { returns(T.nilable(Integer)) }
41
+ attr_reader :page
42
+
43
+ sig { params(page: Integer).void }
44
+ attr_writer :page
45
+
46
+ # Number of items per page
47
+ sig { returns(T.nilable(Integer)) }
48
+ attr_reader :page_size
49
+
50
+ sig { params(page_size: Integer).void }
51
+ attr_writer :page_size
52
+
53
+ # Optional status filter: initiated, ringing, answered, completed, failed,
54
+ # no_answer or rejected
55
+ sig { returns(T.nilable(String)) }
56
+ attr_accessor :status
57
+
58
+ # Only calls started at or before this time (ISO 8601)
59
+ sig { returns(T.nilable(Time)) }
60
+ attr_accessor :to
61
+
62
+ sig { returns(T.nilable(String)) }
63
+ attr_reader :x_profile_id
64
+
65
+ sig { params(x_profile_id: String).void }
66
+ attr_writer :x_profile_id
67
+
68
+ sig do
69
+ params(
70
+ agent_id: T.nilable(String),
71
+ direction: T.nilable(String),
72
+ from: T.nilable(Time),
73
+ mode: T.nilable(String),
74
+ number: T.nilable(String),
75
+ page: Integer,
76
+ page_size: Integer,
77
+ status: T.nilable(String),
78
+ to: T.nilable(Time),
79
+ x_profile_id: String,
80
+ request_options: Sentdm::RequestOptions::OrHash
81
+ ).returns(T.attached_class)
82
+ end
83
+ def self.new(
84
+ # Optional filter on the voice agent that answered the call, such as
85
+ # agent_9f2ab000-0000-4000-8000-000000000001
86
+ agent_id: nil,
87
+ # Optional direction filter: outbound for calls placed from your app, inbound for
88
+ # calls to one of your numbers
89
+ direction: nil,
90
+ # Only calls started at or after this time (ISO 8601)
91
+ from: nil,
92
+ # Optional mode filter: inapp for calls routed by your number's callback URL,
93
+ # agent for calls one of your voice agents answered
94
+ mode: nil,
95
+ # Optional filter on the number that owns the call, one of your voice-enabled
96
+ # numbers in E.164 format
97
+ number: nil,
98
+ # Page number (1-indexed)
99
+ page: nil,
100
+ # Number of items per page
101
+ page_size: nil,
102
+ # Optional status filter: initiated, ringing, answered, completed, failed,
103
+ # no_answer or rejected
104
+ status: nil,
105
+ # Only calls started at or before this time (ISO 8601)
106
+ to: nil,
107
+ x_profile_id: nil,
108
+ request_options: {}
109
+ )
110
+ end
111
+
112
+ sig do
113
+ override.returns(
114
+ {
115
+ agent_id: T.nilable(String),
116
+ direction: T.nilable(String),
117
+ from: T.nilable(Time),
118
+ mode: T.nilable(String),
119
+ number: T.nilable(String),
120
+ page: Integer,
121
+ page_size: Integer,
122
+ status: T.nilable(String),
123
+ to: T.nilable(Time),
124
+ x_profile_id: String,
125
+ request_options: Sentdm::RequestOptions
126
+ }
127
+ )
128
+ end
129
+ def to_hash
130
+ end
131
+ end
132
+ end
133
+ end
134
+ end
@@ -2,15 +2,15 @@
2
2
 
3
3
  module Sentdm
4
4
  module Models
5
- module Calls
6
- class ParticipantListParams < Sentdm::Internal::Type::BaseModel
5
+ module Voice
6
+ class CallListRecordingsParams < Sentdm::Internal::Type::BaseModel
7
7
  extend Sentdm::Internal::Type::RequestParameters::Converter
8
8
  include Sentdm::Internal::Type::RequestParameters
9
9
 
10
10
  OrHash =
11
11
  T.type_alias do
12
12
  T.any(
13
- Sentdm::Calls::ParticipantListParams,
13
+ Sentdm::Voice::CallListRecordingsParams,
14
14
  Sentdm::Internal::AnyHash
15
15
  )
16
16
  end
@@ -0,0 +1,47 @@
1
+ # typed: strong
2
+
3
+ module Sentdm
4
+ module Models
5
+ module Voice
6
+ class CallParty < Sentdm::Internal::Type::BaseModel
7
+ OrHash =
8
+ T.type_alias do
9
+ T.any(Sentdm::Voice::CallParty, Sentdm::Internal::AnyHash)
10
+ end
11
+
12
+ # user for one of your app users, number for a phone number, conference for a
13
+ # room, anonymous for a caller who withheld their number
14
+ sig { returns(T.nilable(String)) }
15
+ attr_reader :kind
16
+
17
+ sig { params(kind: String).void }
18
+ attr_writer :kind
19
+
20
+ # The app user's identity, the phone number in E.164 format, or the room name.
21
+ # Null when the kind is anonymous
22
+ sig { returns(T.nilable(String)) }
23
+ attr_accessor :value
24
+
25
+ # One end of a call
26
+ sig do
27
+ params(kind: String, value: T.nilable(String)).returns(
28
+ T.attached_class
29
+ )
30
+ end
31
+ def self.new(
32
+ # user for one of your app users, number for a phone number, conference for a
33
+ # room, anonymous for a caller who withheld their number
34
+ kind: nil,
35
+ # The app user's identity, the phone number in E.164 format, or the room name.
36
+ # Null when the kind is anonymous
37
+ value: nil
38
+ )
39
+ end
40
+
41
+ sig { override.returns({ kind: String, value: T.nilable(String) }) }
42
+ def to_hash
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
@@ -2,31 +2,25 @@
2
2
 
3
3
  module Sentdm
4
4
  module Models
5
- module Calls
6
- class ParticipantUpdateParams < Sentdm::Internal::Type::BaseModel
5
+ module Voice
6
+ class CallRecordParams < Sentdm::Internal::Type::BaseModel
7
7
  extend Sentdm::Internal::Type::RequestParameters::Converter
8
8
  include Sentdm::Internal::Type::RequestParameters
9
9
 
10
10
  OrHash =
11
11
  T.type_alias do
12
- T.any(
13
- Sentdm::Calls::ParticipantUpdateParams,
14
- Sentdm::Internal::AnyHash
15
- )
12
+ T.any(Sentdm::Voice::CallRecordParams, Sentdm::Internal::AnyHash)
16
13
  end
17
14
 
18
15
  sig { returns(String) }
19
16
  attr_accessor :id
20
17
 
21
- sig { returns(String) }
22
- attr_accessor :participant_id
23
-
24
- # true to mute the participant, false to unmute them
25
- sig { returns(T.nilable(T::Boolean)) }
26
- attr_reader :muted
18
+ # start to begin recording, stop to end it
19
+ sig { returns(T.nilable(String)) }
20
+ attr_reader :action
27
21
 
28
- sig { params(muted: T::Boolean).void }
29
- attr_writer :muted
22
+ sig { params(action: String).void }
23
+ attr_writer :action
30
24
 
31
25
  # Sandbox flag - when true, the operation is simulated without side effects Useful
32
26
  # for testing integrations without actual execution
@@ -51,8 +45,7 @@ module Sentdm
51
45
  sig do
52
46
  params(
53
47
  id: String,
54
- participant_id: String,
55
- muted: T::Boolean,
48
+ action: String,
56
49
  sandbox: T::Boolean,
57
50
  idempotency_key: String,
58
51
  x_profile_id: String,
@@ -61,9 +54,8 @@ module Sentdm
61
54
  end
62
55
  def self.new(
63
56
  id:,
64
- participant_id:,
65
- # true to mute the participant, false to unmute them
66
- muted: nil,
57
+ # start to begin recording, stop to end it
58
+ action: nil,
67
59
  # Sandbox flag - when true, the operation is simulated without side effects Useful
68
60
  # for testing integrations without actual execution
69
61
  sandbox: nil,
@@ -77,8 +69,7 @@ module Sentdm
77
69
  override.returns(
78
70
  {
79
71
  id: String,
80
- participant_id: String,
81
- muted: T::Boolean,
72
+ action: String,
82
73
  sandbox: T::Boolean,
83
74
  idempotency_key: String,
84
75
  x_profile_id: String,