sentdm 0.33.0 → 0.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (203) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +15 -0
  3. data/README.md +11 -9
  4. data/lib/sentdm/client.rb +25 -0
  5. data/lib/sentdm/internal/calls_page.rb +115 -0
  6. data/lib/sentdm/models/api_response_of_call.rb +43 -0
  7. data/lib/sentdm/models/api_response_of_call_recordings.rb +43 -0
  8. data/lib/sentdm/models/api_response_of_calls_list.rb +42 -0
  9. data/lib/sentdm/models/call.rb +133 -0
  10. data/lib/sentdm/models/call_event.rb +72 -0
  11. data/lib/sentdm/models/call_event_payload.rb +102 -0
  12. data/lib/sentdm/models/call_hangup_params.rb +32 -0
  13. data/lib/sentdm/models/call_list_params.rb +83 -0
  14. data/lib/sentdm/models/call_list_recordings_params.rb +26 -0
  15. data/lib/sentdm/models/call_party.rb +31 -0
  16. data/lib/sentdm/models/call_record_params.rb +55 -0
  17. data/lib/sentdm/models/call_recording.rb +38 -0
  18. data/lib/sentdm/models/call_recordings.rb +24 -0
  19. data/lib/sentdm/models/call_retrieve_params.rb +26 -0
  20. data/lib/sentdm/models/call_timeline_entry.rb +26 -0
  21. data/lib/sentdm/models/calls/api_response_of_list_of_call_participant.rb +45 -0
  22. data/lib/sentdm/models/calls/call_participant.rb +60 -0
  23. data/lib/sentdm/models/calls/call_participant_target.rb +30 -0
  24. data/lib/sentdm/models/calls/participant_add_params.rb +66 -0
  25. data/lib/sentdm/models/calls/participant_list_params.rb +28 -0
  26. data/lib/sentdm/models/calls/participant_remove_all_params.rb +28 -0
  27. data/lib/sentdm/models/calls/participant_remove_params.rb +34 -0
  28. data/lib/sentdm/models/calls/participant_update_params.rb +64 -0
  29. data/lib/sentdm/models/calls_list.rb +26 -0
  30. data/lib/sentdm/models/channel_event_payload.rb +16 -6
  31. data/lib/sentdm/models/channels/api_response_of_list_of_voice_number.rb +45 -0
  32. data/lib/sentdm/models/channels/api_response_of_voice_callback_test.rb +45 -0
  33. data/lib/sentdm/models/channels/api_response_of_voice_number.rb +45 -0
  34. data/lib/sentdm/models/channels/api_response_of_voice_number_created.rb +45 -0
  35. data/lib/sentdm/models/channels/api_response_of_voice_secret.rb +45 -0
  36. data/lib/sentdm/models/channels/api_response_of_voice_token.rb +45 -0
  37. data/lib/sentdm/models/channels/voice_callback_test.rb +65 -0
  38. data/lib/sentdm/models/channels/voice_callback_test_error_info.rb +41 -0
  39. data/lib/sentdm/models/channels/voice_callback_test_request_info.rb +40 -0
  40. data/lib/sentdm/models/channels/voice_callback_test_response_info.rb +28 -0
  41. data/lib/sentdm/models/channels/voice_create_params.rb +86 -0
  42. data/lib/sentdm/models/channels/voice_create_token_params.rb +69 -0
  43. data/lib/sentdm/models/channels/voice_list_params.rb +22 -0
  44. data/lib/sentdm/models/channels/voice_number.rb +68 -0
  45. data/lib/sentdm/models/channels/voice_number_created.rb +26 -0
  46. data/lib/sentdm/models/channels/voice_retrieve_params.rb +28 -0
  47. data/lib/sentdm/models/channels/voice_rotate_secret_params.rb +34 -0
  48. data/lib/sentdm/models/channels/voice_secret.rb +25 -0
  49. data/lib/sentdm/models/channels/voice_test_params.rb +34 -0
  50. data/lib/sentdm/models/channels/voice_token.rb +44 -0
  51. data/lib/sentdm/models/channels/voice_update_params.rb +95 -0
  52. data/lib/sentdm/models/conversation_messages_list.rb +100 -13
  53. data/lib/sentdm/models/inbound_message_event_payload.rb +70 -3
  54. data/lib/sentdm/models/me_retrieve_response.rb +21 -1
  55. data/lib/sentdm/models/message_event_payload.rb +23 -1
  56. data/lib/sentdm/models/message_retrieve_activities_response.rb +23 -1
  57. data/lib/sentdm/models/message_retrieve_status_response.rb +100 -13
  58. data/lib/sentdm/models/template_create_params.rb +11 -1
  59. data/lib/sentdm/models/webhook_create_params.rb +31 -1
  60. data/lib/sentdm/models/webhook_list_events_response.rb +7 -3
  61. data/lib/sentdm/models/webhook_update_params.rb +31 -1
  62. data/lib/sentdm/models.rb +36 -0
  63. data/lib/sentdm/resources/calls/participants.rb +231 -0
  64. data/lib/sentdm/resources/calls.rb +235 -0
  65. data/lib/sentdm/resources/channels/voice.rb +381 -0
  66. data/lib/sentdm/resources/channels.rb +45 -0
  67. data/lib/sentdm/resources/me.rb +5 -0
  68. data/lib/sentdm/resources/templates.rb +3 -1
  69. data/lib/sentdm/resources/webhooks.rb +9 -3
  70. data/lib/sentdm/version.rb +1 -1
  71. data/lib/sentdm.rb +50 -0
  72. data/rbi/sentdm/client.rbi +23 -0
  73. data/rbi/sentdm/internal/calls_page.rbi +71 -0
  74. data/rbi/sentdm/models/api_response_of_call.rbi +74 -0
  75. data/rbi/sentdm/models/api_response_of_call_recordings.rbi +74 -0
  76. data/rbi/sentdm/models/api_response_of_calls_list.rbi +74 -0
  77. data/rbi/sentdm/models/call.rbi +177 -0
  78. data/rbi/sentdm/models/call_event.rbi +114 -0
  79. data/rbi/sentdm/models/call_event_payload.rbi +135 -0
  80. data/rbi/sentdm/models/call_hangup_params.rbi +59 -0
  81. data/rbi/sentdm/models/call_list_params.rbi +112 -0
  82. data/rbi/sentdm/models/call_list_recordings_params.rbi +46 -0
  83. data/rbi/sentdm/models/call_party.rbi +41 -0
  84. data/rbi/sentdm/models/call_record_params.rbi +83 -0
  85. data/rbi/sentdm/models/call_recording.rbi +59 -0
  86. data/rbi/sentdm/models/call_recordings.rbi +39 -0
  87. data/rbi/sentdm/models/call_retrieve_params.rbi +46 -0
  88. data/rbi/sentdm/models/call_timeline_entry.rbi +40 -0
  89. data/rbi/sentdm/models/calls/api_response_of_list_of_call_participant.rbi +76 -0
  90. data/rbi/sentdm/models/calls/call_participant.rbi +92 -0
  91. data/rbi/sentdm/models/calls/call_participant_target.rbi +47 -0
  92. data/rbi/sentdm/models/calls/participant_add_params.rbi +98 -0
  93. data/rbi/sentdm/models/calls/participant_list_params.rbi +51 -0
  94. data/rbi/sentdm/models/calls/participant_remove_all_params.rbi +51 -0
  95. data/rbi/sentdm/models/calls/participant_remove_params.rbi +61 -0
  96. data/rbi/sentdm/models/calls/participant_update_params.rbi +94 -0
  97. data/rbi/sentdm/models/calls_list.rbi +47 -0
  98. data/rbi/sentdm/models/channel_event_payload.rbi +20 -8
  99. data/rbi/sentdm/models/channels/api_response_of_list_of_voice_number.rbi +76 -0
  100. data/rbi/sentdm/models/channels/api_response_of_voice_callback_test.rbi +83 -0
  101. data/rbi/sentdm/models/channels/api_response_of_voice_number.rbi +81 -0
  102. data/rbi/sentdm/models/channels/api_response_of_voice_number_created.rbi +83 -0
  103. data/rbi/sentdm/models/channels/api_response_of_voice_secret.rbi +81 -0
  104. data/rbi/sentdm/models/channels/api_response_of_voice_token.rbi +81 -0
  105. data/rbi/sentdm/models/channels/voice_callback_test.rbi +126 -0
  106. data/rbi/sentdm/models/channels/voice_callback_test_error_info.rbi +65 -0
  107. data/rbi/sentdm/models/channels/voice_callback_test_request_info.rbi +66 -0
  108. data/rbi/sentdm/models/channels/voice_callback_test_response_info.rbi +48 -0
  109. data/rbi/sentdm/models/channels/voice_create_params.rbi +127 -0
  110. data/rbi/sentdm/models/channels/voice_create_token_params.rbi +104 -0
  111. data/rbi/sentdm/models/channels/voice_list_params.rbi +40 -0
  112. data/rbi/sentdm/models/channels/voice_number.rbi +105 -0
  113. data/rbi/sentdm/models/channels/voice_number_created.rbi +42 -0
  114. data/rbi/sentdm/models/channels/voice_retrieve_params.rbi +51 -0
  115. data/rbi/sentdm/models/channels/voice_rotate_secret_params.rbi +64 -0
  116. data/rbi/sentdm/models/channels/voice_secret.rbi +35 -0
  117. data/rbi/sentdm/models/channels/voice_test_params.rbi +61 -0
  118. data/rbi/sentdm/models/channels/voice_token.rbi +76 -0
  119. data/rbi/sentdm/models/channels/voice_update_params.rbi +158 -0
  120. data/rbi/sentdm/models/conversation_messages_list.rbi +122 -19
  121. data/rbi/sentdm/models/inbound_message_event_payload.rbi +110 -2
  122. data/rbi/sentdm/models/me_retrieve_response.rbi +35 -0
  123. data/rbi/sentdm/models/message_event_payload.rbi +28 -0
  124. data/rbi/sentdm/models/message_retrieve_activities_response.rbi +26 -0
  125. data/rbi/sentdm/models/message_retrieve_status_response.rbi +122 -19
  126. data/rbi/sentdm/models/template_create_params.rbi +15 -0
  127. data/rbi/sentdm/models/webhook_create_params.rbi +61 -0
  128. data/rbi/sentdm/models/webhook_list_events_response.rbi +6 -3
  129. data/rbi/sentdm/models/webhook_update_params.rbi +61 -0
  130. data/rbi/sentdm/models.rbi +36 -0
  131. data/rbi/sentdm/resources/calls/participants.rbi +199 -0
  132. data/rbi/sentdm/resources/calls.rbi +206 -0
  133. data/rbi/sentdm/resources/channels/voice.rbi +371 -0
  134. data/rbi/sentdm/resources/channels.rbi +42 -0
  135. data/rbi/sentdm/resources/me.rbi +5 -0
  136. data/rbi/sentdm/resources/templates.rbi +6 -0
  137. data/rbi/sentdm/resources/webhooks.rbi +15 -1
  138. data/sig/sentdm/client.rbs +4 -0
  139. data/sig/sentdm/internal/calls_page.rbs +41 -0
  140. data/sig/sentdm/models/api_response_of_call.rbs +39 -0
  141. data/sig/sentdm/models/api_response_of_call_recordings.rbs +39 -0
  142. data/sig/sentdm/models/api_response_of_calls_list.rbs +39 -0
  143. data/sig/sentdm/models/call.rbs +101 -0
  144. data/sig/sentdm/models/call_event.rbs +44 -0
  145. data/sig/sentdm/models/call_event_payload.rbs +68 -0
  146. data/sig/sentdm/models/call_hangup_params.rbs +38 -0
  147. data/sig/sentdm/models/call_list_params.rbs +67 -0
  148. data/sig/sentdm/models/call_list_recordings_params.rbs +30 -0
  149. data/sig/sentdm/models/call_party.rbs +17 -0
  150. data/sig/sentdm/models/call_record_params.rbs +54 -0
  151. data/sig/sentdm/models/call_recording.rbs +32 -0
  152. data/sig/sentdm/models/call_recordings.rbs +17 -0
  153. data/sig/sentdm/models/call_retrieve_params.rbs +30 -0
  154. data/sig/sentdm/models/call_timeline_entry.rbs +19 -0
  155. data/sig/sentdm/models/calls/api_response_of_list_of_call_participant.rbs +41 -0
  156. data/sig/sentdm/models/calls/call_participant.rbs +52 -0
  157. data/sig/sentdm/models/calls/call_participant_target.rbs +23 -0
  158. data/sig/sentdm/models/calls/participant_add_params.rbs +63 -0
  159. data/sig/sentdm/models/calls/participant_list_params.rbs +32 -0
  160. data/sig/sentdm/models/calls/participant_remove_all_params.rbs +34 -0
  161. data/sig/sentdm/models/calls/participant_remove_params.rbs +40 -0
  162. data/sig/sentdm/models/calls/participant_update_params.rbs +61 -0
  163. data/sig/sentdm/models/calls_list.rbs +26 -0
  164. data/sig/sentdm/models/channel_event_payload.rbs +5 -0
  165. data/sig/sentdm/models/channels/api_response_of_list_of_voice_number.rbs +41 -0
  166. data/sig/sentdm/models/channels/api_response_of_voice_callback_test.rbs +41 -0
  167. data/sig/sentdm/models/channels/api_response_of_voice_number.rbs +41 -0
  168. data/sig/sentdm/models/channels/api_response_of_voice_number_created.rbs +41 -0
  169. data/sig/sentdm/models/channels/api_response_of_voice_secret.rbs +41 -0
  170. data/sig/sentdm/models/channels/api_response_of_voice_token.rbs +41 -0
  171. data/sig/sentdm/models/channels/voice_callback_test.rbs +51 -0
  172. data/sig/sentdm/models/channels/voice_callback_test_error_info.rbs +28 -0
  173. data/sig/sentdm/models/channels/voice_callback_test_request_info.rbs +34 -0
  174. data/sig/sentdm/models/channels/voice_callback_test_response_info.rbs +20 -0
  175. data/sig/sentdm/models/channels/voice_create_params.rbs +64 -0
  176. data/sig/sentdm/models/channels/voice_create_token_params.rbs +61 -0
  177. data/sig/sentdm/models/channels/voice_list_params.rbs +27 -0
  178. data/sig/sentdm/models/channels/voice_number.rbs +57 -0
  179. data/sig/sentdm/models/channels/voice_number_created.rbs +17 -0
  180. data/sig/sentdm/models/channels/voice_retrieve_params.rbs +32 -0
  181. data/sig/sentdm/models/channels/voice_rotate_secret_params.rbs +40 -0
  182. data/sig/sentdm/models/channels/voice_secret.rbs +17 -0
  183. data/sig/sentdm/models/channels/voice_test_params.rbs +40 -0
  184. data/sig/sentdm/models/channels/voice_token.rbs +40 -0
  185. data/sig/sentdm/models/channels/voice_update_params.rbs +78 -0
  186. data/sig/sentdm/models/conversation_messages_list.rbs +56 -8
  187. data/sig/sentdm/models/inbound_message_event_payload.rbs +37 -0
  188. data/sig/sentdm/models/me_retrieve_response.rbs +7 -0
  189. data/sig/sentdm/models/message_event_payload.rbs +10 -0
  190. data/sig/sentdm/models/message_retrieve_activities_response.rbs +10 -0
  191. data/sig/sentdm/models/message_retrieve_status_response.rbs +56 -8
  192. data/sig/sentdm/models/template_create_params.rbs +7 -0
  193. data/sig/sentdm/models/webhook_create_params.rbs +29 -0
  194. data/sig/sentdm/models/webhook_list_events_response.rbs +1 -0
  195. data/sig/sentdm/models/webhook_update_params.rbs +29 -0
  196. data/sig/sentdm/models.rbs +36 -0
  197. data/sig/sentdm/resources/calls/participants.rbs +50 -0
  198. data/sig/sentdm/resources/calls.rbs +50 -0
  199. data/sig/sentdm/resources/channels/voice.rbs +68 -0
  200. data/sig/sentdm/resources/channels.rbs +9 -0
  201. data/sig/sentdm/resources/templates.rbs +1 -0
  202. data/sig/sentdm/resources/webhooks.rbs +2 -0
  203. metadata +152 -2
@@ -0,0 +1,69 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sentdm
4
+ module Models
5
+ module Channels
6
+ # @see Sentdm::Resources::Channels::Voice#create_token
7
+ class VoiceCreateTokenParams < Sentdm::Internal::Type::BaseModel
8
+ extend Sentdm::Internal::Type::RequestParameters::Converter
9
+ include Sentdm::Internal::Type::RequestParameters
10
+
11
+ # @!attribute identity
12
+ # Your identifier for the app user, such as an agent or account id. Letters,
13
+ # digits, hyphens and underscores only, up to 200 characters.
14
+ #
15
+ # @return [String, nil]
16
+ optional :identity, String
17
+
18
+ # @!attribute number
19
+ # One of your voice-enabled phone numbers in E.164 format. Calls placed by this
20
+ # identity are routed through that number. Omit to use your default app-call
21
+ # number.
22
+ #
23
+ # @return [String, nil]
24
+ optional :number, String, nil?: true
25
+
26
+ # @!attribute sandbox
27
+ # Sandbox flag - when true, the operation is simulated without side effects Useful
28
+ # for testing integrations without actual execution
29
+ #
30
+ # @return [Boolean, nil]
31
+ optional :sandbox, Sentdm::Internal::Type::Boolean
32
+
33
+ # @!attribute ttl
34
+ # Token lifetime in seconds. Defaults to 600 and cannot exceed 3600.
35
+ #
36
+ # @return [Integer, nil]
37
+ optional :ttl, Integer, nil?: true
38
+
39
+ # @!attribute idempotency_key
40
+ #
41
+ # @return [String, nil]
42
+ optional :idempotency_key, String
43
+
44
+ # @!attribute x_profile_id
45
+ #
46
+ # @return [String, nil]
47
+ optional :x_profile_id, String
48
+
49
+ # @!method initialize(identity: nil, number: nil, sandbox: nil, ttl: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
50
+ # Some parameter documentations has been truncated, see
51
+ # {Sentdm::Models::Channels::VoiceCreateTokenParams} for more details.
52
+ #
53
+ # @param identity [String] Your identifier for the app user, such as an agent or account id. Letters, digit
54
+ #
55
+ # @param number [String, nil] One of your voice-enabled phone numbers in E.164 format. Calls placed by this id
56
+ #
57
+ # @param sandbox [Boolean] Sandbox flag - when true, the operation is simulated without side effects
58
+ #
59
+ # @param ttl [Integer, nil] Token lifetime in seconds. Defaults to 600 and cannot exceed 3600.
60
+ #
61
+ # @param idempotency_key [String]
62
+ #
63
+ # @param x_profile_id [String]
64
+ #
65
+ # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}]
66
+ end
67
+ end
68
+ end
69
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sentdm
4
+ module Models
5
+ module Channels
6
+ # @see Sentdm::Resources::Channels::Voice#list
7
+ class VoiceListParams < Sentdm::Internal::Type::BaseModel
8
+ extend Sentdm::Internal::Type::RequestParameters::Converter
9
+ include Sentdm::Internal::Type::RequestParameters
10
+
11
+ # @!attribute x_profile_id
12
+ #
13
+ # @return [String, nil]
14
+ optional :x_profile_id, String
15
+
16
+ # @!method initialize(x_profile_id: nil, request_options: {})
17
+ # @param x_profile_id [String]
18
+ # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}]
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,68 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sentdm
4
+ module Models
5
+ module Channels
6
+ class VoiceNumber < Sentdm::Internal::Type::BaseModel
7
+ # @!attribute callback_url
8
+ # Where Sent asks what to do with each call on this number: a signed question is
9
+ # POSTed here when a call arrives or a caller presses a key, and the answer
10
+ # decides the call. The signing secret is not on this read; it is shown when voice
11
+ # is turned on and by the rotate endpoint.
12
+ #
13
+ # @return [String, nil]
14
+ optional :callback_url, String, nil?: true
15
+
16
+ # @!attribute created_at
17
+ #
18
+ # @return [Time, nil]
19
+ optional :created_at, Time
20
+
21
+ # @!attribute default_for_app_calls
22
+ # Whether this is the line app-originated calls are placed from when a voice token
23
+ # names no number. Exactly one active voice number carries it while the profile
24
+ # has any.
25
+ #
26
+ # @return [Boolean, nil]
27
+ optional :default_for_app_calls, Sentdm::Internal::Type::Boolean
28
+
29
+ # @!attribute number
30
+ # The number, in E.164.
31
+ #
32
+ # @return [String, nil]
33
+ optional :number, String
34
+
35
+ # @!attribute status
36
+ # ACTIVE while the number carries calls, INACTIVE once it was turned off. Nothing
37
+ # provisions: a number the customer holds can carry calls the moment voice is
38
+ # turned on for it.
39
+ #
40
+ # @return [String, nil]
41
+ optional :status, String
42
+
43
+ # @!attribute updated_at
44
+ #
45
+ # @return [Time, nil]
46
+ optional :updated_at, Time
47
+
48
+ # @!method initialize(callback_url: nil, created_at: nil, default_for_app_calls: nil, number: nil, status: nil, updated_at: nil)
49
+ # Some parameter documentations has been truncated, see
50
+ # {Sentdm::Models::Channels::VoiceNumber} for more details.
51
+ #
52
+ # One number the profile carries phone calls on.
53
+ #
54
+ # @param callback_url [String, nil] Where Sent asks what to do with each call on this number: a signed question is P
55
+ #
56
+ # @param created_at [Time]
57
+ #
58
+ # @param default_for_app_calls [Boolean] Whether this is the line app-originated calls are placed from when a voice token
59
+ #
60
+ # @param number [String] The number, in E.164.
61
+ #
62
+ # @param status [String] ACTIVE while the number carries calls, INACTIVE once it was turned off. Nothing
63
+ #
64
+ # @param updated_at [Time]
65
+ end
66
+ end
67
+ end
68
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sentdm
4
+ module Models
5
+ module Channels
6
+ class VoiceNumberCreated < Sentdm::Models::Channels::VoiceNumber
7
+ # @!attribute callback_secret
8
+ # The whsec\_ secret every question to callback_url is signed with. Shown here and
9
+ # by POST /v3/channels/voice/{number}/rotate-secret, nowhere else: store it now.
10
+ # Verify a question exactly as you verify a webhook, with X-Webhook-ID,
11
+ # X-Webhook-Timestamp and the body.
12
+ #
13
+ # @return [String, nil]
14
+ optional :callback_secret, String
15
+
16
+ # @!method initialize(callback_secret: nil)
17
+ # Some parameter documentations has been truncated, see
18
+ # {Sentdm::Models::Channels::VoiceNumberCreated} for more details.
19
+ #
20
+ # One number the profile carries phone calls on.
21
+ #
22
+ # @param callback_secret [String] The whsec\_ secret every question to callback_url is signed with. Shown here and
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sentdm
4
+ module Models
5
+ module Channels
6
+ # @see Sentdm::Resources::Channels::Voice#retrieve
7
+ class VoiceRetrieveParams < Sentdm::Internal::Type::BaseModel
8
+ extend Sentdm::Internal::Type::RequestParameters::Converter
9
+ include Sentdm::Internal::Type::RequestParameters
10
+
11
+ # @!attribute number
12
+ #
13
+ # @return [String]
14
+ required :number, String
15
+
16
+ # @!attribute x_profile_id
17
+ #
18
+ # @return [String, nil]
19
+ optional :x_profile_id, String
20
+
21
+ # @!method initialize(number:, x_profile_id: nil, request_options: {})
22
+ # @param number [String]
23
+ # @param x_profile_id [String]
24
+ # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}]
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sentdm
4
+ module Models
5
+ module Channels
6
+ # @see Sentdm::Resources::Channels::Voice#rotate_secret
7
+ class VoiceRotateSecretParams < Sentdm::Models::MutationRequest
8
+ extend Sentdm::Internal::Type::RequestParameters::Converter
9
+ include Sentdm::Internal::Type::RequestParameters
10
+
11
+ # @!attribute number
12
+ #
13
+ # @return [String]
14
+ required :number, String
15
+
16
+ # @!attribute idempotency_key
17
+ #
18
+ # @return [String, nil]
19
+ optional :idempotency_key, String
20
+
21
+ # @!attribute x_profile_id
22
+ #
23
+ # @return [String, nil]
24
+ optional :x_profile_id, String
25
+
26
+ # @!method initialize(number:, idempotency_key: nil, x_profile_id: nil, request_options: {})
27
+ # @param number [String]
28
+ # @param idempotency_key [String]
29
+ # @param x_profile_id [String]
30
+ # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}]
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sentdm
4
+ module Models
5
+ module Channels
6
+ class VoiceSecret < Sentdm::Internal::Type::BaseModel
7
+ # @!attribute callback_secret
8
+ # The new whsec\_ secret. The previous one stopped signing the moment this was
9
+ # returned, so update your backend before the next call reaches it. Shown once.
10
+ #
11
+ # @return [String, nil]
12
+ optional :callback_secret, String
13
+
14
+ # @!method initialize(callback_secret: nil)
15
+ # Some parameter documentations has been truncated, see
16
+ # {Sentdm::Models::Channels::VoiceSecret} for more details.
17
+ #
18
+ # A freshly rotated callback signing secret
19
+ #
20
+ # @param callback_secret [String] The new whsec\_ secret. The previous one stopped signing the moment this was
21
+ # retu
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sentdm
4
+ module Models
5
+ module Channels
6
+ # @see Sentdm::Resources::Channels::Voice#test_
7
+ class VoiceTestParams < Sentdm::Models::MutationRequest
8
+ extend Sentdm::Internal::Type::RequestParameters::Converter
9
+ include Sentdm::Internal::Type::RequestParameters
10
+
11
+ # @!attribute number
12
+ #
13
+ # @return [String]
14
+ required :number, String
15
+
16
+ # @!attribute idempotency_key
17
+ #
18
+ # @return [String, nil]
19
+ optional :idempotency_key, String
20
+
21
+ # @!attribute x_profile_id
22
+ #
23
+ # @return [String, nil]
24
+ optional :x_profile_id, String
25
+
26
+ # @!method initialize(number:, idempotency_key: nil, x_profile_id: nil, request_options: {})
27
+ # @param number [String]
28
+ # @param idempotency_key [String]
29
+ # @param x_profile_id [String]
30
+ # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}]
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,44 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sentdm
4
+ module Models
5
+ module Channels
6
+ class VoiceToken < Sentdm::Internal::Type::BaseModel
7
+ # @!attribute token
8
+ # The signed token. Hand it to the client SDK unchanged.
9
+ #
10
+ # @return [String, nil]
11
+ optional :token, String
12
+
13
+ # @!attribute expires_at
14
+ # When the token expires (UTC)
15
+ #
16
+ # @return [Time, nil]
17
+ optional :expires_at, Time
18
+
19
+ # @!attribute identity
20
+ # The identity the token was minted for
21
+ #
22
+ # @return [String, nil]
23
+ optional :identity, String
24
+
25
+ # @!attribute number
26
+ # The phone number this identity is now bound to, in E.164 format
27
+ #
28
+ # @return [String, nil]
29
+ optional :number, String
30
+
31
+ # @!method initialize(token: nil, expires_at: nil, identity: nil, number: nil)
32
+ # A short-lived token your app passes to the voice client SDK to register
33
+ #
34
+ # @param token [String] The signed token. Hand it to the client SDK unchanged.
35
+ #
36
+ # @param expires_at [Time] When the token expires (UTC)
37
+ #
38
+ # @param identity [String] The identity the token was minted for
39
+ #
40
+ # @param number [String] The phone number this identity is now bound to, in E.164 format
41
+ end
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,95 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sentdm
4
+ module Models
5
+ module Channels
6
+ # @see Sentdm::Resources::Channels::Voice#update
7
+ class VoiceUpdateParams < Sentdm::Internal::Type::BaseModel
8
+ extend Sentdm::Internal::Type::RequestParameters::Converter
9
+ include Sentdm::Internal::Type::RequestParameters
10
+
11
+ # @!attribute number
12
+ #
13
+ # @return [String]
14
+ required :number, String
15
+
16
+ # @!attribute callback_url
17
+ # A new callback URL for the number, active or not: an absolute HTTP or HTTPS URL
18
+ # on a public host, where Sent asks what to do with each call. The signing secret
19
+ # is kept.
20
+ #
21
+ # @return [String, nil]
22
+ optional :callback_url, String, nil?: true
23
+
24
+ # @!attribute default_for_app_calls
25
+ # true makes this the line app-originated calls are placed from when a voice token
26
+ # names no number. false is refused: an account with active voice numbers always
27
+ # has exactly one default, so the default moves by giving it to another number.
28
+ #
29
+ # @return [Boolean, nil]
30
+ optional :default_for_app_calls, Sentdm::Internal::Type::Boolean, nil?: true
31
+
32
+ # @!attribute sandbox
33
+ # Sandbox flag - when true, the operation is simulated without side effects Useful
34
+ # for testing integrations without actual execution
35
+ #
36
+ # @return [Boolean, nil]
37
+ optional :sandbox, Sentdm::Internal::Type::Boolean
38
+
39
+ # @!attribute status
40
+ # ACTIVE turns calls on for the number again, INACTIVE turns them off. Matched
41
+ # ignoring case. Turning the default line off is refused while other active voice
42
+ # numbers remain.
43
+ #
44
+ # @return [Symbol, Sentdm::Models::Channels::VoiceUpdateParams::Status, nil]
45
+ optional :status, enum: -> { Sentdm::Channels::VoiceUpdateParams::Status }, nil?: true
46
+
47
+ # @!attribute idempotency_key
48
+ #
49
+ # @return [String, nil]
50
+ optional :idempotency_key, String
51
+
52
+ # @!attribute x_profile_id
53
+ #
54
+ # @return [String, nil]
55
+ optional :x_profile_id, String
56
+
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: {})
58
+ # Some parameter documentations has been truncated, see
59
+ # {Sentdm::Models::Channels::VoiceUpdateParams} for more details.
60
+ #
61
+ # @param number [String]
62
+ #
63
+ # @param callback_url [String, nil] A new callback URL for the number, active or not: an absolute HTTP or HTTPS URL
64
+ #
65
+ # @param default_for_app_calls [Boolean, nil] true makes this the line app-originated calls are placed from when a voice token
66
+ #
67
+ # @param sandbox [Boolean] Sandbox flag - when true, the operation is simulated without side effects
68
+ #
69
+ # @param status [Symbol, Sentdm::Models::Channels::VoiceUpdateParams::Status, nil] ACTIVE turns calls on for the number again, INACTIVE turns them off. Matched
70
+ #
71
+ # @param idempotency_key [String]
72
+ #
73
+ # @param x_profile_id [String]
74
+ #
75
+ # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}]
76
+
77
+ # ACTIVE turns calls on for the number again, INACTIVE turns them off. Matched
78
+ # ignoring case. Turning the default line off is refused while other active voice
79
+ # numbers remain.
80
+ module Status
81
+ extend Sentdm::Internal::Type::Enum
82
+
83
+ # Turns calls on for the number again. The callback URL and the signing secret it had are kept; send `callback_url` in the same call to replace the URL.
84
+ ACTIVE = :ACTIVE
85
+
86
+ # Turns calls off for the number. Refused while the number is the default line for app calls and other active voice numbers remain; move the default first. The callback URL and the secret stay on the number.
87
+ INACTIVE = :INACTIVE
88
+
89
+ # @!method self.values
90
+ # @return [Array<Symbol>]
91
+ end
92
+ end
93
+ end
94
+ end
95
+ end
@@ -94,6 +94,24 @@ module Sentdm
94
94
  # @return [Float, nil]
95
95
  optional :price, Float, nil?: true
96
96
 
97
+ # @!attribute reason
98
+ # A human-readable sentence for reason_code, for example "Insufficient balance".
99
+ # Omitted whenever reason_code is.
100
+ #
101
+ # @return [String, nil]
102
+ optional :reason, String, nil?: true
103
+
104
+ # @!attribute reason_code
105
+ # Why the message is at its current status, as a stable platform code such as
106
+ # DELIVERY_007, BUSINESS_003 or DELIVERY_003. Present when the current status is
107
+ # FAILED, FILTERED or BLOCKED and the lifecycle was loaded; omitted otherwise.
108
+ # Switch on this rather than on reason: the code is stable, the wording may be
109
+ # improved. It is the platform's classification of the outcome, never a carrier or
110
+ # vendor code.
111
+ #
112
+ # @return [String, nil]
113
+ optional :reason_code, String, nil?: true
114
+
97
115
  # @!attribute region_code
98
116
  #
99
117
  # @return [String, nil]
@@ -119,7 +137,7 @@ module Sentdm
119
137
  # @return [String, nil]
120
138
  optional :template_name, String, nil?: true
121
139
 
122
- # @!method initialize(id: nil, active_contact_price: nil, channel: nil, contact_id: nil, created_at: nil, customer_id: nil, direction: nil, events: nil, message_body: nil, phone: nil, phone_international: nil, price: nil, region_code: nil, status: nil, template_category: nil, template_id: nil, template_name: nil)
140
+ # @!method initialize(id: nil, active_contact_price: nil, channel: nil, contact_id: nil, created_at: nil, customer_id: nil, direction: nil, events: nil, message_body: nil, phone: nil, phone_international: nil, price: nil, reason: nil, reason_code: nil, region_code: nil, status: nil, template_category: nil, template_id: nil, template_name: nil)
123
141
  # Some parameter documentations has been truncated, see
124
142
  # {Sentdm::Models::ConversationMessagesList::Message} for more details.
125
143
  #
@@ -154,6 +172,10 @@ module Sentdm
154
172
  #
155
173
  # @param price [Float, nil]
156
174
  #
175
+ # @param reason [String, nil] A human-readable sentence for reason_code, for example "Insufficient balance". O
176
+ #
177
+ # @param reason_code [String, nil] Why the message is at its current status, as a stable platform code such as
178
+ #
157
179
  # @param region_code [String]
158
180
  #
159
181
  # @param status [String]
@@ -180,12 +202,37 @@ module Sentdm
180
202
  # @return [String, nil]
181
203
  optional :description, String, nil?: true
182
204
 
183
- # @!method initialize(status:, timestamp:, description: nil)
205
+ # @!attribute reason
206
+ # A human-readable sentence for reason_code. Omitted whenever reason_code is.
207
+ #
208
+ # @return [String, nil]
209
+ optional :reason, String, nil?: true
210
+
211
+ # @!attribute reason_code
212
+ # Why the message reached this status, as a stable platform code such as
213
+ # DELIVERY_007. Present on FAILED, FILTERED and BLOCKED events; omitted on every
214
+ # status that needs no explanation. Same wire name and vocabulary as on the
215
+ # activities list and the webhook.
216
+ #
217
+ # @return [String, nil]
218
+ optional :reason_code, String, nil?: true
219
+
220
+ # @!method initialize(status:, timestamp:, description: nil, reason: nil, reason_code: nil)
221
+ # Some parameter documentations has been truncated, see
222
+ # {Sentdm::Models::ConversationMessagesList::Message::Event} for more details.
223
+ #
184
224
  # Represents a status change event in a message's lifecycle (v3)
185
225
  #
186
226
  # @param status [String]
227
+ #
187
228
  # @param timestamp [Time]
229
+ #
188
230
  # @param description [String, nil]
231
+ #
232
+ # @param reason [String, nil] A human-readable sentence for reason_code. Omitted whenever reason_code is.
233
+ #
234
+ # @param reason_code [String, nil] Why the message reached this status, as a stable platform code such as
235
+ # DELIVERY\_
189
236
  end
190
237
 
191
238
  # @see Sentdm::Models::ConversationMessagesList::Message#message_body
@@ -332,32 +379,72 @@ module Sentdm
332
379
 
333
380
  class Media < Sentdm::Internal::Type::BaseModel
334
381
  # @!attribute media_type
335
- # One of Constants.MmsMediaTypes when known. Advisory — the carrier reads the
336
- # fetched object's Content-Type, not this.
382
+ # One of MmsMediaTypes when the content type is known. Advisory — a reader should
383
+ # trust the fetched object's own Content-Type.
337
384
  #
338
385
  # @return [String, nil]
339
386
  optional :media_type, String, api_name: :mediaType, nil?: true
340
387
 
388
+ # @!attribute mime_type
389
+ # Content type as the provider declared it. Null when it declared none.
390
+ #
391
+ # @return [String, nil]
392
+ optional :mime_type, String, api_name: :mimeType, nil?: true
393
+
394
+ # @!attribute size_bytes
395
+ # Size as the provider declared it. Never measured here — nothing downloads the
396
+ # file.
397
+ #
398
+ # @return [Integer, nil]
399
+ optional :size_bytes, Integer, api_name: :sizeBytes, nil?: true
400
+
401
+ # @!attribute source_hash_sha256
402
+ # Inbound only: the SHA-256 the provider declared alongside the attachment, when
403
+ # it declared one. Relayed to the customer so they can verify what they fetch
404
+ # matches what the carrier said it sent. It is the only integrity signal available
405
+ # on an attachment nobody here has read.
406
+ #
407
+ # @return [String, nil]
408
+ optional :source_hash_sha256, String, api_name: :sourceHashSha256, nil?: true
409
+
341
410
  # @!attribute url
411
+ # Where the file lives. Outbound: the URL the customer gave us and the carrier
412
+ # fetched. Inbound: the URL the carrier hosts it at, relayed unchanged.
342
413
  #
343
414
  # @return [String, nil]
344
- optional :url, String
415
+ optional :url, String, nil?: true
345
416
 
346
- # @!method initialize(media_type: nil, url: nil)
417
+ # @!method initialize(media_type: nil, mime_type: nil, size_bytes: nil, source_hash_sha256: nil, url: nil)
347
418
  # Some parameter documentations has been truncated, see
348
419
  # {Sentdm::Models::ConversationMessagesList::Message::MessageBody::Media} for more
349
420
  # details.
350
421
  #
351
- # One attachment on a message: a customer-supplied public URL handed to the
352
- # carrier as-is.
422
+ # One attachment on a message, in either direction — and in both, a URL somebody
423
+ # else hosts.
424
+ #
425
+ # Outbound: the customer supplied a public URL and we handed it to the carrier.
426
+ # Inbound: the carrier hosts the file and we record where. sent.dm never holds the
427
+ # bytes, so there is no key, no expiry bookkeeping and nothing minted per read —
428
+ # what is stored is what is served.
429
+ #
430
+ # An inbound link expires on the carrier's own schedule and is unauthenticated.
431
+ # That is the customer's to manage, and it is documented where they will see it
432
+ # rather than only here — a recipient who needs an attachment to outlive that
433
+ # window copies it on receipt.
434
+ #
435
+ # Storing a presigned URL is the specific mistake this shape still avoids:
436
+ # M260826130000 and M260826140000 exist because RCS assets were stored as signed
437
+ # URLs and went stale. Nothing here is signed.
438
+ #
439
+ # @param media_type [String, nil] One of MmsMediaTypes when the content type is known. Advisory — a reader should
440
+ #
441
+ # @param mime_type [String, nil] Content type as the provider declared it. Null when it declared none.
353
442
  #
354
- # A URL and nothing else. sent.dm never takes custody of MMS media — the customer hosts it and we
355
- # pass the link through at send time — so there is no storage key, size or expiry to record. If we ever
356
- # do host attachments, that belongs with the change that introduces the hosting, not here.
443
+ # @param size_bytes [Integer, nil] Size as the provider declared it. Never measured here — nothing downloads the fi
357
444
  #
358
- # @param media_type [String, nil] One of Constants.MmsMediaTypes when known. Advisory — the carrier reads the
445
+ # @param source_hash_sha256 [String, nil] Inbound only: the SHA-256 the provider declared alongside the attachment, when i
359
446
  #
360
- # @param url [String]
447
+ # @param url [String, nil] Where the file lives. Outbound: the URL the customer gave us and the carrier fet
361
448
  end
362
449
  end
363
450
  end