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
@@ -123,6 +123,25 @@ module Sentdm
123
123
  sig { returns(T.nilable(String)) }
124
124
  attr_accessor :email
125
125
 
126
+ # Whether this account may mark a template for automatic creation on its sender
127
+ # profiles. Granted by Sent per account and off by default, so it is what a
128
+ # template-create form reads to decide whether to offer the option at all —
129
+ # marking a template without it does nothing.
130
+ #
131
+ # Top-level rather than inside settings, which is written for type: "profile" only
132
+ # and so would never carry it to the account type that can act on it.
133
+ #
134
+ # This is the capability, not the stored flag: a profile reports false whatever
135
+ # its own row holds. A sender profile owns no sender profiles, so a template it
136
+ # marked would have nothing to be created on and the fan-out would never read the
137
+ # flag. The admin GET /customers/{id} reports the stored value instead, because
138
+ # that is the one an operator granted.
139
+ sig { returns(T.nilable(T::Boolean)) }
140
+ attr_reader :enable_template_auto_creation_for_sp
141
+
142
+ sig { params(enable_template_auto_creation_for_sp: T::Boolean).void }
143
+ attr_writer :enable_template_auto_creation_for_sp
144
+
126
145
  # Account icon URL
127
146
  sig { returns(T.nilable(String)) }
128
147
  attr_accessor :icon
@@ -218,6 +237,7 @@ module Sentdm
218
237
  created_at: Time,
219
238
  description: T.nilable(String),
220
239
  email: T.nilable(String),
240
+ enable_template_auto_creation_for_sp: T::Boolean,
221
241
  icon: T.nilable(String),
222
242
  name: String,
223
243
  organization_id: T.nilable(String),
@@ -245,6 +265,20 @@ module Sentdm
245
265
  description: nil,
246
266
  # Contact email address
247
267
  email: nil,
268
+ # Whether this account may mark a template for automatic creation on its sender
269
+ # profiles. Granted by Sent per account and off by default, so it is what a
270
+ # template-create form reads to decide whether to offer the option at all —
271
+ # marking a template without it does nothing.
272
+ #
273
+ # Top-level rather than inside settings, which is written for type: "profile" only
274
+ # and so would never carry it to the account type that can act on it.
275
+ #
276
+ # This is the capability, not the stored flag: a profile reports false whatever
277
+ # its own row holds. A sender profile owns no sender profiles, so a template it
278
+ # marked would have nothing to be created on and the fan-out would never read the
279
+ # flag. The admin GET /customers/{id} reports the stored value instead, because
280
+ # that is the one an operator granted.
281
+ enable_template_auto_creation_for_sp: nil,
248
282
  # Account icon URL
249
283
  icon: nil,
250
284
  # Account name
@@ -293,6 +327,7 @@ module Sentdm
293
327
  created_at: Time,
294
328
  description: T.nilable(String),
295
329
  email: T.nilable(String),
330
+ enable_template_auto_creation_for_sp: T::Boolean,
296
331
  icon: T.nilable(String),
297
332
  name: String,
298
333
  organization_id: T.nilable(String),
@@ -54,6 +54,20 @@ module Sentdm
54
54
  sig { params(outbound_number: String).void }
55
55
  attr_writer :outbound_number
56
56
 
57
+ # A human-readable sentence for ReasonCode, for example "The recipient is not
58
+ # registered on this channel". Omitted whenever reason_code is.
59
+ sig { returns(T.nilable(String)) }
60
+ attr_accessor :reason
61
+
62
+ # Why the message reached this status, as a stable platform code such as
63
+ # DELIVERY_007 or BUSINESS_003. Present on message.failed, message.filtered and
64
+ # message.blocked; omitted on every status that needs no explanation. Switch on
65
+ # this rather than on Reason: the code is stable, the wording may be improved. It
66
+ # is the platform's classification of the outcome and never a carrier or vendor
67
+ # code.
68
+ sig { returns(T.nilable(String)) }
69
+ attr_accessor :reason_code
70
+
57
71
  # message.scheduled only: why the message is held, either because you scheduled it
58
72
  # or because the recipient is inside a protected quiet-hours window. Omitted on
59
73
  # every other event.
@@ -93,6 +107,8 @@ module Sentdm
93
107
  channel: String,
94
108
  message_id: String,
95
109
  outbound_number: String,
110
+ reason: T.nilable(String),
111
+ reason_code: T.nilable(String),
96
112
  schedule_reason: T.nilable(String),
97
113
  scheduled_at: T.nilable(String),
98
114
  template_id: T.nilable(String),
@@ -121,6 +137,16 @@ module Sentdm
121
137
  message_id: nil,
122
138
  # The recipient's number in E.164 format.
123
139
  outbound_number: nil,
140
+ # A human-readable sentence for ReasonCode, for example "The recipient is not
141
+ # registered on this channel". Omitted whenever reason_code is.
142
+ reason: nil,
143
+ # Why the message reached this status, as a stable platform code such as
144
+ # DELIVERY_007 or BUSINESS_003. Present on message.failed, message.filtered and
145
+ # message.blocked; omitted on every status that needs no explanation. Switch on
146
+ # this rather than on Reason: the code is stable, the wording may be improved. It
147
+ # is the platform's classification of the outcome and never a carrier or vendor
148
+ # code.
149
+ reason_code: nil,
124
150
  # message.scheduled only: why the message is held, either because you scheduled it
125
151
  # or because the recipient is inside a protected quiet-hours window. Omitted on
126
152
  # every other event.
@@ -148,6 +174,8 @@ module Sentdm
148
174
  channel: String,
149
175
  message_id: String,
150
176
  outbound_number: String,
177
+ reason: T.nilable(String),
178
+ reason_code: T.nilable(String),
151
179
  schedule_reason: T.nilable(String),
152
180
  scheduled_at: T.nilable(String),
153
181
  template_id: T.nilable(String),
@@ -203,6 +203,19 @@ module Sentdm
203
203
  sig { returns(T.nilable(String)) }
204
204
  attr_accessor :price
205
205
 
206
+ # A human-readable sentence for reason_code, for example "The recipient is not
207
+ # registered on this channel" Omitted whenever reason_code is.
208
+ sig { returns(T.nilable(String)) }
209
+ attr_accessor :reason
210
+
211
+ # Why the message reached this status, as a stable platform code such as
212
+ # DELIVERY_007 or BUSINESS_003. Present on FAILED, FILTERED and BLOCKED
213
+ # activities; omitted on every status that needs no explanation. Switch on this
214
+ # rather than on reason: the code is stable, the wording may be improved. Same
215
+ # wire name and vocabulary as on the message and the webhook.
216
+ sig { returns(T.nilable(String)) }
217
+ attr_accessor :reason_code
218
+
206
219
  # SCHEDULED activities only: when the held message will be released for delivery,
207
220
  # in UTC. Same wire name as on the send response, the message and the webhook.
208
221
  # Omitted on every other activity. A message that quiet hours moved at release has
@@ -236,6 +249,8 @@ module Sentdm
236
249
  description: String,
237
250
  from: T.nilable(String),
238
251
  price: T.nilable(String),
252
+ reason: T.nilable(String),
253
+ reason_code: T.nilable(String),
239
254
  scheduled_at: T.nilable(Time),
240
255
  status: String,
241
256
  timestamp: Time
@@ -254,6 +269,15 @@ module Sentdm
254
269
  # Channel cost for this activity (e.g., SMS/WhatsApp provider cost), formatted to
255
270
  # 4 decimal places.
256
271
  price: nil,
272
+ # A human-readable sentence for reason_code, for example "The recipient is not
273
+ # registered on this channel" Omitted whenever reason_code is.
274
+ reason: nil,
275
+ # Why the message reached this status, as a stable platform code such as
276
+ # DELIVERY_007 or BUSINESS_003. Present on FAILED, FILTERED and BLOCKED
277
+ # activities; omitted on every status that needs no explanation. Switch on this
278
+ # rather than on reason: the code is stable, the wording may be improved. Same
279
+ # wire name and vocabulary as on the message and the webhook.
280
+ reason_code: nil,
257
281
  # SCHEDULED activities only: when the held message will be released for delivery,
258
282
  # in UTC. Same wire name as on the send response, the message and the webhook.
259
283
  # Omitted on every other activity. A message that quiet hours moved at release has
@@ -274,6 +298,8 @@ module Sentdm
274
298
  description: String,
275
299
  from: T.nilable(String),
276
300
  price: T.nilable(String),
301
+ reason: T.nilable(String),
302
+ reason_code: T.nilable(String),
277
303
  scheduled_at: T.nilable(Time),
278
304
  status: String,
279
305
  timestamp: Time
@@ -198,6 +198,20 @@ module Sentdm
198
198
  sig { returns(T.nilable(Float)) }
199
199
  attr_accessor :price
200
200
 
201
+ # A human-readable sentence for reason_code, for example "Insufficient balance".
202
+ # Omitted whenever reason_code is.
203
+ sig { returns(T.nilable(String)) }
204
+ attr_accessor :reason
205
+
206
+ # Why the message is at its current status, as a stable platform code such as
207
+ # DELIVERY_007, BUSINESS_003 or DELIVERY_003. Present when the current status is
208
+ # FAILED, FILTERED or BLOCKED and the lifecycle was loaded; omitted otherwise.
209
+ # Switch on this rather than on reason: the code is stable, the wording may be
210
+ # improved. It is the platform's classification of the outcome, never a carrier or
211
+ # vendor code.
212
+ sig { returns(T.nilable(String)) }
213
+ attr_accessor :reason_code
214
+
201
215
  sig { returns(T.nilable(String)) }
202
216
  attr_reader :region_code
203
217
 
@@ -247,6 +261,8 @@ module Sentdm
247
261
  phone: String,
248
262
  phone_international: String,
249
263
  price: T.nilable(Float),
264
+ reason: T.nilable(String),
265
+ reason_code: T.nilable(String),
250
266
  region_code: String,
251
267
  status: String,
252
268
  template_category: T.nilable(String),
@@ -276,6 +292,16 @@ module Sentdm
276
292
  phone: nil,
277
293
  phone_international: nil,
278
294
  price: nil,
295
+ # A human-readable sentence for reason_code, for example "Insufficient balance".
296
+ # Omitted whenever reason_code is.
297
+ reason: nil,
298
+ # Why the message is at its current status, as a stable platform code such as
299
+ # DELIVERY_007, BUSINESS_003 or DELIVERY_003. Present when the current status is
300
+ # FAILED, FILTERED or BLOCKED and the lifecycle was loaded; omitted otherwise.
301
+ # Switch on this rather than on reason: the code is stable, the wording may be
302
+ # improved. It is the platform's classification of the outcome, never a carrier or
303
+ # vendor code.
304
+ reason_code: nil,
279
305
  region_code: nil,
280
306
  status: nil,
281
307
  template_category: nil,
@@ -307,6 +333,8 @@ module Sentdm
307
333
  phone: String,
308
334
  phone_international: String,
309
335
  price: T.nilable(Float),
336
+ reason: T.nilable(String),
337
+ reason_code: T.nilable(String),
310
338
  region_code: String,
311
339
  status: String,
312
340
  template_category: T.nilable(String),
@@ -336,15 +364,39 @@ module Sentdm
336
364
  sig { returns(T.nilable(String)) }
337
365
  attr_accessor :description
338
366
 
367
+ # A human-readable sentence for reason_code. Omitted whenever reason_code is.
368
+ sig { returns(T.nilable(String)) }
369
+ attr_accessor :reason
370
+
371
+ # Why the message reached this status, as a stable platform code such as
372
+ # DELIVERY_007. Present on FAILED, FILTERED and BLOCKED events; omitted on every
373
+ # status that needs no explanation. Same wire name and vocabulary as on the
374
+ # activities list and the webhook.
375
+ sig { returns(T.nilable(String)) }
376
+ attr_accessor :reason_code
377
+
339
378
  # Represents a status change event in a message's lifecycle (v3)
340
379
  sig do
341
380
  params(
342
381
  status: String,
343
382
  timestamp: Time,
344
- description: T.nilable(String)
383
+ description: T.nilable(String),
384
+ reason: T.nilable(String),
385
+ reason_code: T.nilable(String)
345
386
  ).returns(T.attached_class)
346
387
  end
347
- def self.new(status:, timestamp:, description: nil)
388
+ def self.new(
389
+ status:,
390
+ timestamp:,
391
+ description: nil,
392
+ # A human-readable sentence for reason_code. Omitted whenever reason_code is.
393
+ reason: nil,
394
+ # Why the message reached this status, as a stable platform code such as
395
+ # DELIVERY_007. Present on FAILED, FILTERED and BLOCKED events; omitted on every
396
+ # status that needs no explanation. Same wire name and vocabulary as on the
397
+ # activities list and the webhook.
398
+ reason_code: nil
399
+ )
348
400
  end
349
401
 
350
402
  sig do
@@ -352,7 +404,9 @@ module Sentdm
352
404
  {
353
405
  status: String,
354
406
  timestamp: Time,
355
- description: T.nilable(String)
407
+ description: T.nilable(String),
408
+ reason: T.nilable(String),
409
+ reason_code: T.nilable(String)
356
410
  }
357
411
  )
358
412
  end
@@ -619,38 +673,87 @@ module Sentdm
619
673
  )
620
674
  end
621
675
 
622
- # One of Constants.MmsMediaTypes when known. Advisory — the carrier reads the
623
- # fetched object's Content-Type, not this.
676
+ # One of MmsMediaTypes when the content type is known. Advisory — a reader should
677
+ # trust the fetched object's own Content-Type.
624
678
  sig { returns(T.nilable(String)) }
625
679
  attr_accessor :media_type
626
680
 
681
+ # Content type as the provider declared it. Null when it declared none.
627
682
  sig { returns(T.nilable(String)) }
628
- attr_reader :url
683
+ attr_accessor :mime_type
629
684
 
630
- sig { params(url: String).void }
631
- attr_writer :url
685
+ # Size as the provider declared it. Never measured here — nothing downloads the
686
+ # file.
687
+ sig { returns(T.nilable(Integer)) }
688
+ attr_accessor :size_bytes
632
689
 
633
- # One attachment on a message: a customer-supplied public URL handed to the
634
- # carrier as-is.
690
+ # Inbound only: the SHA-256 the provider declared alongside the attachment, when
691
+ # it declared one. Relayed to the customer so they can verify what they fetch
692
+ # matches what the carrier said it sent. It is the only integrity signal available
693
+ # on an attachment nobody here has read.
694
+ sig { returns(T.nilable(String)) }
695
+ attr_accessor :source_hash_sha256
696
+
697
+ # Where the file lives. Outbound: the URL the customer gave us and the carrier
698
+ # fetched. Inbound: the URL the carrier hosts it at, relayed unchanged.
699
+ sig { returns(T.nilable(String)) }
700
+ attr_accessor :url
701
+
702
+ # One attachment on a message, in either direction — and in both, a URL somebody
703
+ # else hosts.
635
704
  #
636
- # A URL and nothing else. sent.dm never takes custody of MMS media — the customer hosts it and we
637
- # pass the link through at send time — so there is no storage key, size or expiry to record. If we ever
638
- # do host attachments, that belongs with the change that introduces the hosting, not here.
705
+ # Outbound: the customer supplied a public URL and we handed it to the carrier.
706
+ # Inbound: the carrier hosts the file and we record where. sent.dm never holds the
707
+ # bytes, so there is no key, no expiry bookkeeping and nothing minted per read —
708
+ # what is stored is what is served.
709
+ #
710
+ # An inbound link expires on the carrier's own schedule and is unauthenticated.
711
+ # That is the customer's to manage, and it is documented where they will see it
712
+ # rather than only here — a recipient who needs an attachment to outlive that
713
+ # window copies it on receipt.
714
+ #
715
+ # Storing a presigned URL is the specific mistake this shape still avoids:
716
+ # M260826130000 and M260826140000 exist because RCS assets were stored as signed
717
+ # URLs and went stale. Nothing here is signed.
639
718
  sig do
640
- params(media_type: T.nilable(String), url: String).returns(
641
- T.attached_class
642
- )
719
+ params(
720
+ media_type: T.nilable(String),
721
+ mime_type: T.nilable(String),
722
+ size_bytes: T.nilable(Integer),
723
+ source_hash_sha256: T.nilable(String),
724
+ url: T.nilable(String)
725
+ ).returns(T.attached_class)
643
726
  end
644
727
  def self.new(
645
- # One of Constants.MmsMediaTypes when known. Advisory — the carrier reads the
646
- # fetched object's Content-Type, not this.
728
+ # One of MmsMediaTypes when the content type is known. Advisory — a reader should
729
+ # trust the fetched object's own Content-Type.
647
730
  media_type: nil,
731
+ # Content type as the provider declared it. Null when it declared none.
732
+ mime_type: nil,
733
+ # Size as the provider declared it. Never measured here — nothing downloads the
734
+ # file.
735
+ size_bytes: nil,
736
+ # Inbound only: the SHA-256 the provider declared alongside the attachment, when
737
+ # it declared one. Relayed to the customer so they can verify what they fetch
738
+ # matches what the carrier said it sent. It is the only integrity signal available
739
+ # on an attachment nobody here has read.
740
+ source_hash_sha256: nil,
741
+ # Where the file lives. Outbound: the URL the customer gave us and the carrier
742
+ # fetched. Inbound: the URL the carrier hosts it at, relayed unchanged.
648
743
  url: nil
649
744
  )
650
745
  end
651
746
 
652
747
  sig do
653
- override.returns({ media_type: T.nilable(String), url: String })
748
+ override.returns(
749
+ {
750
+ media_type: T.nilable(String),
751
+ mime_type: T.nilable(String),
752
+ size_bytes: T.nilable(Integer),
753
+ source_hash_sha256: T.nilable(String),
754
+ url: T.nilable(String)
755
+ }
756
+ )
654
757
  end
655
758
  def to_hash
656
759
  end
@@ -11,6 +11,15 @@ module Sentdm
11
11
  T.any(Sentdm::TemplateCreateParams, Sentdm::Internal::AnyHash)
12
12
  end
13
13
 
14
+ # Create this template automatically on every sender profile of the organization,
15
+ # now and in future (default: false). Accepted only from an organization that has
16
+ # been enabled for it, and only at creation — it cannot be changed afterwards.
17
+ sig { returns(T.nilable(T::Boolean)) }
18
+ attr_reader :auto_create_for_sp
19
+
20
+ sig { params(auto_create_for_sp: T::Boolean).void }
21
+ attr_writer :auto_create_for_sp
22
+
14
23
  # Template category: MARKETING, UTILITY, AUTHENTICATION (optional, auto-detected
15
24
  # if not provided)
16
25
  sig { returns(T.nilable(String)) }
@@ -61,6 +70,7 @@ module Sentdm
61
70
 
62
71
  sig do
63
72
  params(
73
+ auto_create_for_sp: T::Boolean,
64
74
  category: T.nilable(String),
65
75
  creation_source: T.nilable(String),
66
76
  definition: Sentdm::TemplateDefinition::OrHash,
@@ -73,6 +83,10 @@ module Sentdm
73
83
  ).returns(T.attached_class)
74
84
  end
75
85
  def self.new(
86
+ # Create this template automatically on every sender profile of the organization,
87
+ # now and in future (default: false). Accepted only from an organization that has
88
+ # been enabled for it, and only at creation — it cannot be changed afterwards.
89
+ auto_create_for_sp: nil,
76
90
  # Template category: MARKETING, UTILITY, AUTHENTICATION (optional, auto-detected
77
91
  # if not provided)
78
92
  category: nil,
@@ -97,6 +111,7 @@ module Sentdm
97
111
  sig do
98
112
  override.returns(
99
113
  {
114
+ auto_create_for_sp: T::Boolean,
100
115
  category: T.nilable(String),
101
116
  creation_source: T.nilable(String),
102
117
  definition: Sentdm::TemplateDefinition,
@@ -46,6 +46,19 @@ module Sentdm
46
46
  sig { params(sandbox: T::Boolean).void }
47
47
  attr_writer :sandbox
48
48
 
49
+ # Request-only: the events an organization webhook's sender profile clones
50
+ # receive, one clone per existing and future profile. Responses never return it.
51
+ sig { returns(T.nilable(Sentdm::WebhookCreateParams::SenderProfile)) }
52
+ attr_reader :sender_profile
53
+
54
+ sig do
55
+ params(
56
+ sender_profile:
57
+ T.nilable(Sentdm::WebhookCreateParams::SenderProfile::OrHash)
58
+ ).void
59
+ end
60
+ attr_writer :sender_profile
61
+
49
62
  sig { returns(T.nilable(Integer)) }
50
63
  attr_reader :timeout_seconds
51
64
 
@@ -72,6 +85,8 @@ module Sentdm
72
85
  event_types: T::Array[String],
73
86
  retry_count: Integer,
74
87
  sandbox: T::Boolean,
88
+ sender_profile:
89
+ T.nilable(Sentdm::WebhookCreateParams::SenderProfile::OrHash),
75
90
  timeout_seconds: Integer,
76
91
  idempotency_key: String,
77
92
  x_profile_id: String,
@@ -87,6 +102,9 @@ module Sentdm
87
102
  # Sandbox flag - when true, the operation is simulated without side effects Useful
88
103
  # for testing integrations without actual execution
89
104
  sandbox: nil,
105
+ # Request-only: the events an organization webhook's sender profile clones
106
+ # receive, one clone per existing and future profile. Responses never return it.
107
+ sender_profile: nil,
90
108
  timeout_seconds: nil,
91
109
  idempotency_key: nil,
92
110
  x_profile_id: nil,
@@ -103,6 +121,8 @@ module Sentdm
103
121
  event_types: T::Array[String],
104
122
  retry_count: Integer,
105
123
  sandbox: T::Boolean,
124
+ sender_profile:
125
+ T.nilable(Sentdm::WebhookCreateParams::SenderProfile),
106
126
  timeout_seconds: Integer,
107
127
  idempotency_key: String,
108
128
  x_profile_id: String,
@@ -112,6 +132,47 @@ module Sentdm
112
132
  end
113
133
  def to_hash
114
134
  end
135
+
136
+ class SenderProfile < Sentdm::Internal::Type::BaseModel
137
+ OrHash =
138
+ T.type_alias do
139
+ T.any(
140
+ Sentdm::WebhookCreateParams::SenderProfile,
141
+ Sentdm::Internal::AnyHash
142
+ )
143
+ end
144
+
145
+ sig { returns(T.nilable(T::Hash[Symbol, T::Array[String]])) }
146
+ attr_accessor :event_filters
147
+
148
+ sig { returns(T.nilable(T::Array[String])) }
149
+ attr_reader :event_types
150
+
151
+ sig { params(event_types: T::Array[String]).void }
152
+ attr_writer :event_types
153
+
154
+ # Request-only: the events an organization webhook's sender profile clones
155
+ # receive, one clone per existing and future profile. Responses never return it.
156
+ sig do
157
+ params(
158
+ event_filters: T.nilable(T::Hash[Symbol, T::Array[String]]),
159
+ event_types: T::Array[String]
160
+ ).returns(T.attached_class)
161
+ end
162
+ def self.new(event_filters: nil, event_types: nil)
163
+ end
164
+
165
+ sig do
166
+ override.returns(
167
+ {
168
+ event_filters: T.nilable(T::Hash[Symbol, T::Array[String]]),
169
+ event_types: T::Array[String]
170
+ }
171
+ )
172
+ end
173
+ def to_hash
174
+ end
175
+ end
115
176
  end
116
177
  end
117
178
  end
@@ -73,7 +73,8 @@ module Sentdm
73
73
  Sentdm::TemplateEvent::OrHash,
74
74
  Sentdm::ChannelEvent::OrHash,
75
75
  Sentdm::ContactEvent::OrHash,
76
- Sentdm::Models::WebhookListEventsResponse::EventData::SentDmServicesCommonServicesWebhooksContractsWebhookEventOfLinkWebhookPayload::OrHash
76
+ Sentdm::Models::WebhookListEventsResponse::EventData::SentDmServicesCommonServicesWebhooksContractsWebhookEventOfLinkWebhookPayload::OrHash,
77
+ Sentdm::CallEvent::OrHash
77
78
  )
78
79
  ).void
79
80
  end
@@ -111,7 +112,8 @@ module Sentdm
111
112
  Sentdm::TemplateEvent::OrHash,
112
113
  Sentdm::ChannelEvent::OrHash,
113
114
  Sentdm::ContactEvent::OrHash,
114
- Sentdm::Models::WebhookListEventsResponse::EventData::SentDmServicesCommonServicesWebhooksContractsWebhookEventOfLinkWebhookPayload::OrHash
115
+ Sentdm::Models::WebhookListEventsResponse::EventData::SentDmServicesCommonServicesWebhooksContractsWebhookEventOfLinkWebhookPayload::OrHash,
116
+ Sentdm::CallEvent::OrHash
115
117
  ),
116
118
  event_type: String,
117
119
  http_status_code: T.nilable(Integer),
@@ -201,7 +203,8 @@ module Sentdm
201
203
  Sentdm::TemplateEvent,
202
204
  Sentdm::ChannelEvent,
203
205
  Sentdm::ContactEvent,
204
- Sentdm::Models::WebhookListEventsResponse::EventData::SentDmServicesCommonServicesWebhooksContractsWebhookEventOfLinkWebhookPayload
206
+ Sentdm::Models::WebhookListEventsResponse::EventData::SentDmServicesCommonServicesWebhooksContractsWebhookEventOfLinkWebhookPayload,
207
+ Sentdm::CallEvent
205
208
  )
206
209
  end
207
210
 
@@ -49,6 +49,19 @@ module Sentdm
49
49
  sig { params(sandbox: T::Boolean).void }
50
50
  attr_writer :sandbox
51
51
 
52
+ # Request-only: the events an organization webhook's sender profile clones
53
+ # receive, one clone per existing and future profile. Responses never return it.
54
+ sig { returns(T.nilable(Sentdm::WebhookUpdateParams::SenderProfile)) }
55
+ attr_reader :sender_profile
56
+
57
+ sig do
58
+ params(
59
+ sender_profile:
60
+ T.nilable(Sentdm::WebhookUpdateParams::SenderProfile::OrHash)
61
+ ).void
62
+ end
63
+ attr_writer :sender_profile
64
+
52
65
  sig { returns(T.nilable(Integer)) }
53
66
  attr_reader :timeout_seconds
54
67
 
@@ -76,6 +89,8 @@ module Sentdm
76
89
  event_types: T::Array[String],
77
90
  retry_count: Integer,
78
91
  sandbox: T::Boolean,
92
+ sender_profile:
93
+ T.nilable(Sentdm::WebhookUpdateParams::SenderProfile::OrHash),
79
94
  timeout_seconds: Integer,
80
95
  idempotency_key: String,
81
96
  x_profile_id: String,
@@ -92,6 +107,9 @@ module Sentdm
92
107
  # Sandbox flag - when true, the operation is simulated without side effects Useful
93
108
  # for testing integrations without actual execution
94
109
  sandbox: nil,
110
+ # Request-only: the events an organization webhook's sender profile clones
111
+ # receive, one clone per existing and future profile. Responses never return it.
112
+ sender_profile: nil,
95
113
  timeout_seconds: nil,
96
114
  idempotency_key: nil,
97
115
  x_profile_id: nil,
@@ -109,6 +127,8 @@ module Sentdm
109
127
  event_types: T::Array[String],
110
128
  retry_count: Integer,
111
129
  sandbox: T::Boolean,
130
+ sender_profile:
131
+ T.nilable(Sentdm::WebhookUpdateParams::SenderProfile),
112
132
  timeout_seconds: Integer,
113
133
  idempotency_key: String,
114
134
  x_profile_id: String,
@@ -118,6 +138,47 @@ module Sentdm
118
138
  end
119
139
  def to_hash
120
140
  end
141
+
142
+ class SenderProfile < Sentdm::Internal::Type::BaseModel
143
+ OrHash =
144
+ T.type_alias do
145
+ T.any(
146
+ Sentdm::WebhookUpdateParams::SenderProfile,
147
+ Sentdm::Internal::AnyHash
148
+ )
149
+ end
150
+
151
+ sig { returns(T.nilable(T::Hash[Symbol, T::Array[String]])) }
152
+ attr_accessor :event_filters
153
+
154
+ sig { returns(T.nilable(T::Array[String])) }
155
+ attr_reader :event_types
156
+
157
+ sig { params(event_types: T::Array[String]).void }
158
+ attr_writer :event_types
159
+
160
+ # Request-only: the events an organization webhook's sender profile clones
161
+ # receive, one clone per existing and future profile. Responses never return it.
162
+ sig do
163
+ params(
164
+ event_filters: T.nilable(T::Hash[Symbol, T::Array[String]]),
165
+ event_types: T::Array[String]
166
+ ).returns(T.attached_class)
167
+ end
168
+ def self.new(event_filters: nil, event_types: nil)
169
+ end
170
+
171
+ sig do
172
+ override.returns(
173
+ {
174
+ event_filters: T.nilable(T::Hash[Symbol, T::Array[String]]),
175
+ event_types: T::Array[String]
176
+ }
177
+ )
178
+ end
179
+ def to_hash
180
+ end
181
+ end
121
182
  end
122
183
  end
123
184
  end