sentdm 0.45.0 → 0.47.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 (483) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +22 -0
  3. data/README.md +11 -11
  4. data/lib/sentdm/client.rb +66 -0
  5. data/lib/sentdm/internal/sender_profiles_page.rb +140 -0
  6. data/lib/sentdm/internal/type/enum.rb +11 -11
  7. data/lib/sentdm/models/account.rb +173 -0
  8. data/lib/sentdm/models/account_channels.rb +39 -0
  9. data/lib/sentdm/models/account_profile.rb +86 -0
  10. data/lib/sentdm/models/account_rcs_channel.rb +26 -0
  11. data/lib/sentdm/models/account_sms_channel.rb +26 -0
  12. data/lib/sentdm/models/account_whatsapp_channel.rb +35 -0
  13. data/lib/sentdm/models/api_response_of_account.rb +48 -0
  14. data/lib/sentdm/models/api_response_of_cancelled_message.rb +43 -0
  15. data/lib/sentdm/models/api_response_of_channels_state.rb +48 -0
  16. data/lib/sentdm/models/api_response_of_compliance_requirements.rb +47 -0
  17. data/lib/sentdm/models/api_response_of_contacts_list.rb +42 -0
  18. data/lib/sentdm/models/api_response_of_message.rb +51 -0
  19. data/lib/sentdm/models/api_response_of_message_activities.rb +43 -0
  20. data/lib/sentdm/models/api_response_of_number_lookup_result.rb +43 -0
  21. data/lib/sentdm/models/api_response_of_profile_completion_accepted.rb +47 -0
  22. data/lib/sentdm/models/api_response_of_profile_completion_result.rb +47 -0
  23. data/lib/sentdm/models/api_response_of_profiles_list.rb +43 -0
  24. data/lib/sentdm/models/api_response_of_sender_profile.rb +54 -0
  25. data/lib/sentdm/models/api_response_of_sender_profiles_list.rb +42 -0
  26. data/lib/sentdm/models/api_response_of_templates_list.rb +42 -0
  27. data/lib/sentdm/models/api_response_of_users_list.rb +43 -0
  28. data/lib/sentdm/models/api_response_of_webhook_event_types_list.rb +43 -0
  29. data/lib/sentdm/models/api_response_of_webhook_events_list.rb +42 -0
  30. data/lib/sentdm/models/{webhook_rotate_secret_response.rb → api_response_of_webhook_secret.rb} +4 -17
  31. data/lib/sentdm/models/{webhook_test_response.rb → api_response_of_webhook_test.rb} +4 -23
  32. data/lib/sentdm/models/api_response_of_webhooks_list.rb +42 -0
  33. data/lib/sentdm/models/billing_contact.rb +35 -0
  34. data/lib/sentdm/models/brand_business.rb +96 -0
  35. data/lib/sentdm/models/brand_business_info.rb +3 -20
  36. data/lib/sentdm/models/brand_compliance.rb +75 -0
  37. data/lib/sentdm/models/brand_contact.rb +56 -0
  38. data/lib/sentdm/models/brand_with_kyc.rb +129 -0
  39. data/lib/sentdm/models/cancelled_message.rb +28 -0
  40. data/lib/sentdm/models/channel_event_payload.rb +3 -114
  41. data/lib/sentdm/models/channel_list_params.rb +20 -0
  42. data/lib/sentdm/models/channel_score.rb +35 -0
  43. data/lib/sentdm/models/channels/api_response_of_list_of_sms_market.rb +45 -0
  44. data/lib/sentdm/models/channels/api_response_of_rcs_agent.rb +60 -0
  45. data/lib/sentdm/models/channels/api_response_of_sms_market.rb +54 -0
  46. data/lib/sentdm/models/channels/api_response_of_whatsapp_channel.rb +47 -0
  47. data/lib/sentdm/models/channels/market_compliance.rb +409 -0
  48. data/lib/sentdm/models/channels/rc_create_params.rb +260 -0
  49. data/lib/sentdm/models/channels/rcs_address.rb +43 -0
  50. data/lib/sentdm/models/channels/rcs_agent.rb +278 -0
  51. data/lib/sentdm/models/channels/sms_create_params.rb +173 -0
  52. data/lib/sentdm/models/channels/sms_list_params.rb +22 -0
  53. data/lib/sentdm/models/channels/sms_market.rb +148 -0
  54. data/lib/sentdm/models/channels/sms_number.rb +52 -0
  55. data/lib/sentdm/models/channels/sms_number_request.rb +33 -0
  56. data/lib/sentdm/models/channels/sms_retrieve_params.rb +34 -0
  57. data/lib/sentdm/models/channels/sms_update_params.rb +64 -0
  58. data/lib/sentdm/models/channels/supplied_campaign.rb +10 -0
  59. data/lib/sentdm/models/channels/supplied_compliance.rb +115 -0
  60. data/lib/sentdm/models/channels/supplied_document.rb +35 -0
  61. data/lib/sentdm/models/channels/whatsapp_channel.rb +109 -0
  62. data/lib/sentdm/models/channels/whatsapp_create_params.rb +65 -0
  63. data/lib/sentdm/models/channels_state.rb +89 -0
  64. data/lib/sentdm/models/compliance_attachment_template.rb +36 -0
  65. data/lib/sentdm/models/compliance_requirement.rb +112 -0
  66. data/lib/sentdm/models/compliance_requirements.rb +98 -0
  67. data/lib/sentdm/models/compliance_retrieve_requirements_params.rb +52 -0
  68. data/lib/sentdm/models/compliance_setup_step.rb +78 -0
  69. data/lib/sentdm/models/contact_message_summary.rb +3 -34
  70. data/lib/sentdm/models/contacts_list.rb +26 -0
  71. data/lib/sentdm/models/conversation_messages_list.rb +3 -430
  72. data/lib/sentdm/models/entity_type.rb +18 -0
  73. data/lib/sentdm/models/inbound_media.rb +53 -0
  74. data/lib/sentdm/models/inbound_message_event_payload.rb +3 -53
  75. data/lib/sentdm/models/link_event.rb +79 -0
  76. data/lib/sentdm/models/link_event_payload.rb +211 -0
  77. data/lib/sentdm/models/message.rb +168 -0
  78. data/lib/sentdm/models/message_activities.rb +34 -0
  79. data/lib/sentdm/models/message_activity.rb +105 -0
  80. data/lib/sentdm/models/message_body.rb +79 -0
  81. data/lib/sentdm/models/message_button.rb +33 -0
  82. data/lib/sentdm/models/message_cancel_params.rb +32 -0
  83. data/lib/sentdm/models/message_channel_options.rb +43 -0
  84. data/lib/sentdm/models/message_header_media.rb +31 -0
  85. data/lib/sentdm/models/message_media.rb +74 -0
  86. data/lib/sentdm/models/message_recipient.rb +46 -0
  87. data/lib/sentdm/models/message_send_params.rb +6 -90
  88. data/lib/sentdm/models/message_send_response.rb +3 -95
  89. data/lib/sentdm/models/message_send_result.rb +55 -0
  90. data/lib/sentdm/models/message_status_event.rb +54 -0
  91. data/lib/sentdm/models/mms_market.rb +48 -0
  92. data/lib/sentdm/models/number_lookup_result.rb +63 -0
  93. data/lib/sentdm/models/pagination_cursors.rb +27 -0
  94. data/lib/sentdm/models/pagination_meta.rb +3 -27
  95. data/lib/sentdm/models/profile_completion_accepted.rb +20 -0
  96. data/lib/sentdm/models/profile_completion_result.rb +31 -0
  97. data/lib/sentdm/models/profile_detail.rb +6 -408
  98. data/lib/sentdm/models/profiles/brand_campaign.rb +14 -16
  99. data/lib/sentdm/models/profiles_list.rb +26 -0
  100. data/lib/sentdm/models/sender_profile.rb +138 -0
  101. data/lib/sentdm/models/sender_profile_billing.rb +21 -0
  102. data/lib/sentdm/models/sender_profile_billing_request.rb +33 -0
  103. data/lib/sentdm/models/sender_profile_channels.rb +90 -0
  104. data/lib/sentdm/models/sender_profile_create_params.rb +116 -0
  105. data/lib/sentdm/models/sender_profile_delete_params.rb +20 -0
  106. data/lib/sentdm/models/sender_profile_list_params.rb +30 -0
  107. data/lib/sentdm/models/sender_profile_rcs.rb +209 -0
  108. data/lib/sentdm/models/sender_profile_retrieve_params.rb +20 -0
  109. data/lib/sentdm/models/sender_profile_sms.rb +106 -0
  110. data/lib/sentdm/models/sender_profile_update_params.rb +71 -0
  111. data/lib/sentdm/models/sender_profile_whatsapp.rb +61 -0
  112. data/lib/sentdm/models/sender_profiles_list.rb +26 -0
  113. data/lib/sentdm/models/tcr_brand_identity_status.rb +17 -0
  114. data/lib/sentdm/models/tcr_brand_status.rb +16 -0
  115. data/lib/sentdm/models/tcr_campaign_status.rb +16 -0
  116. data/lib/sentdm/models/template_body.rb +3 -70
  117. data/lib/sentdm/models/template_header.rb +3 -37
  118. data/lib/sentdm/models/template_header_location.rb +38 -0
  119. data/lib/sentdm/models/template_media_item.rb +34 -0
  120. data/lib/sentdm/models/template_mms_body_content.rb +49 -0
  121. data/lib/sentdm/models/template_ref.rb +51 -0
  122. data/lib/sentdm/models/template_variable.rb +3 -64
  123. data/lib/sentdm/models/template_variable_props.rb +65 -0
  124. data/lib/sentdm/models/templates_list.rb +26 -0
  125. data/lib/sentdm/models/users_list.rb +26 -0
  126. data/lib/sentdm/models/voice/call.rb +7 -57
  127. data/lib/sentdm/models/voice/call_leg.rb +58 -0
  128. data/lib/sentdm/models/webhook_create_params.rb +3 -25
  129. data/lib/sentdm/models/webhook_delivery.rb +160 -0
  130. data/lib/sentdm/models/webhook_event_types_list.rb +26 -0
  131. data/lib/sentdm/models/webhook_events_list.rb +26 -0
  132. data/lib/sentdm/models/webhook_response.rb +3 -28
  133. data/lib/sentdm/models/webhook_secret.rb +15 -0
  134. data/lib/sentdm/models/webhook_sender_profile.rb +29 -0
  135. data/lib/sentdm/models/webhook_sender_profile_config.rb +27 -0
  136. data/lib/sentdm/models/webhook_test.rb +21 -0
  137. data/lib/sentdm/models/webhook_update_params.rb +3 -25
  138. data/lib/sentdm/models/webhooks_list.rb +26 -0
  139. data/lib/sentdm/models.rb +188 -0
  140. data/lib/sentdm/resources/channels/rcs.rb +177 -0
  141. data/lib/sentdm/resources/channels/sms.rb +420 -0
  142. data/lib/sentdm/resources/channels/whatsapp.rb +106 -0
  143. data/lib/sentdm/resources/channels.rb +162 -0
  144. data/lib/sentdm/resources/compliance.rb +127 -0
  145. data/lib/sentdm/resources/conversations.rb +4 -4
  146. data/lib/sentdm/resources/me.rb +2 -2
  147. data/lib/sentdm/resources/messages.rb +71 -6
  148. data/lib/sentdm/resources/numbers.rb +2 -2
  149. data/lib/sentdm/resources/profiles/campaigns.rb +4 -1
  150. data/lib/sentdm/resources/profiles.rb +4 -4
  151. data/lib/sentdm/resources/sender_profiles.rb +465 -0
  152. data/lib/sentdm/resources/users.rb +2 -2
  153. data/lib/sentdm/resources/voice/calls/participants.rb +5 -5
  154. data/lib/sentdm/resources/webhooks.rb +10 -10
  155. data/lib/sentdm/version.rb +1 -1
  156. data/lib/sentdm.rb +121 -11
  157. data/rbi/sentdm/client.rbi +64 -0
  158. data/rbi/sentdm/internal/sender_profiles_page.rbi +122 -0
  159. data/rbi/sentdm/models/account.rbi +242 -0
  160. data/rbi/sentdm/models/account_channels.rbi +66 -0
  161. data/rbi/sentdm/models/account_profile.rbi +116 -0
  162. data/rbi/sentdm/models/account_rcs_channel.rbi +45 -0
  163. data/rbi/sentdm/models/account_sms_channel.rbi +45 -0
  164. data/rbi/sentdm/models/account_whatsapp_channel.rbi +58 -0
  165. data/rbi/sentdm/models/api_response_of_account.rbi +78 -0
  166. data/rbi/sentdm/models/{webhook_rotate_secret_response.rbi → api_response_of_cancelled_message.rbi} +6 -41
  167. data/rbi/sentdm/models/api_response_of_channels_state.rbi +78 -0
  168. data/rbi/sentdm/models/api_response_of_compliance_requirements.rbi +81 -0
  169. data/rbi/sentdm/models/api_response_of_contacts_list.rbi +74 -0
  170. data/rbi/sentdm/models/api_response_of_message.rbi +84 -0
  171. data/rbi/sentdm/models/api_response_of_message_activities.rbi +77 -0
  172. data/rbi/sentdm/models/{webhook_test_response.rbi → api_response_of_number_lookup_result.rbi} +9 -43
  173. data/rbi/sentdm/models/api_response_of_profile_completion_accepted.rbi +83 -0
  174. data/rbi/sentdm/models/{profile_complete_response.rbi → api_response_of_profile_completion_result.rbi} +6 -52
  175. data/rbi/sentdm/models/api_response_of_profiles_list.rbi +74 -0
  176. data/rbi/sentdm/models/api_response_of_sender_profile.rbi +90 -0
  177. data/rbi/sentdm/models/api_response_of_sender_profiles_list.rbi +77 -0
  178. data/rbi/sentdm/models/api_response_of_templates_list.rbi +74 -0
  179. data/rbi/sentdm/models/api_response_of_users_list.rbi +74 -0
  180. data/rbi/sentdm/models/api_response_of_webhook_event_types_list.rbi +79 -0
  181. data/rbi/sentdm/models/api_response_of_webhook_events_list.rbi +77 -0
  182. data/rbi/sentdm/models/api_response_of_webhook_secret.rbi +74 -0
  183. data/rbi/sentdm/models/api_response_of_webhook_test.rbi +74 -0
  184. data/rbi/sentdm/models/api_response_of_webhooks_list.rbi +74 -0
  185. data/rbi/sentdm/models/billing_contact.rbi +49 -0
  186. data/rbi/sentdm/models/brand_business.rbi +115 -0
  187. data/rbi/sentdm/models/brand_business_info.rbi +3 -49
  188. data/rbi/sentdm/models/brand_compliance.rbi +108 -0
  189. data/rbi/sentdm/models/brand_contact.rbi +78 -0
  190. data/rbi/sentdm/models/brand_with_kyc.rbi +167 -0
  191. data/rbi/sentdm/models/cancelled_message.rbi +37 -0
  192. data/rbi/sentdm/models/channel_event_payload.rbi +4 -204
  193. data/rbi/sentdm/models/channel_list_params.rbi +38 -0
  194. data/rbi/sentdm/models/channel_score.rbi +56 -0
  195. data/rbi/sentdm/models/channels/api_response_of_list_of_sms_market.rbi +76 -0
  196. data/rbi/sentdm/models/channels/api_response_of_rcs_agent.rbi +103 -0
  197. data/rbi/sentdm/models/channels/api_response_of_sms_market.rbi +93 -0
  198. data/rbi/sentdm/models/channels/api_response_of_whatsapp_channel.rbi +85 -0
  199. data/rbi/sentdm/models/channels/market_compliance.rbi +770 -0
  200. data/rbi/sentdm/models/channels/rc_create_params.rbi +397 -0
  201. data/rbi/sentdm/models/channels/rcs_address.rbi +62 -0
  202. data/rbi/sentdm/models/channels/rcs_agent.rbi +320 -0
  203. data/rbi/sentdm/models/channels/sms_create_params.rbi +291 -0
  204. data/rbi/sentdm/models/channels/sms_list_params.rbi +40 -0
  205. data/rbi/sentdm/models/channels/sms_market.rbi +235 -0
  206. data/rbi/sentdm/models/channels/sms_number.rbi +74 -0
  207. data/rbi/sentdm/models/channels/sms_number_request.rbi +48 -0
  208. data/rbi/sentdm/models/channels/sms_retrieve_params.rbi +56 -0
  209. data/rbi/sentdm/models/channels/sms_update_params.rbi +93 -0
  210. data/rbi/sentdm/models/channels/supplied_campaign.rbi +13 -0
  211. data/rbi/sentdm/models/channels/supplied_compliance.rbi +180 -0
  212. data/rbi/sentdm/models/channels/supplied_document.rbi +57 -0
  213. data/rbi/sentdm/models/channels/whatsapp_channel.rbi +172 -0
  214. data/rbi/sentdm/models/channels/whatsapp_create_params.rbi +104 -0
  215. data/rbi/sentdm/models/channels_state.rbi +151 -0
  216. data/rbi/sentdm/models/compliance_attachment_template.rbi +56 -0
  217. data/rbi/sentdm/models/compliance_requirement.rbi +149 -0
  218. data/rbi/sentdm/models/compliance_requirements.rbi +165 -0
  219. data/rbi/sentdm/models/compliance_retrieve_requirements_params.rbi +79 -0
  220. data/rbi/sentdm/models/compliance_setup_step.rbi +115 -0
  221. data/rbi/sentdm/models/contact_message_summary.rbi +4 -69
  222. data/rbi/sentdm/models/contacts_list.rbi +50 -0
  223. data/rbi/sentdm/models/conversation_messages_list.rbi +4 -669
  224. data/rbi/sentdm/models/entity_type.rbi +23 -0
  225. data/rbi/sentdm/models/inbound_media.rbi +76 -0
  226. data/rbi/sentdm/models/inbound_message_event_payload.rbi +3 -85
  227. data/rbi/sentdm/models/link_event.rbi +128 -0
  228. data/rbi/sentdm/models/link_event_payload.rbi +279 -0
  229. data/rbi/sentdm/models/message.rbi +214 -0
  230. data/rbi/sentdm/models/message_activities.rbi +63 -0
  231. data/rbi/sentdm/models/message_activity.rbi +145 -0
  232. data/rbi/sentdm/models/message_body.rbi +104 -0
  233. data/rbi/sentdm/models/message_button.rbi +52 -0
  234. data/rbi/sentdm/models/message_cancel_params.rbi +59 -0
  235. data/rbi/sentdm/models/message_channel_options.rbi +65 -0
  236. data/rbi/sentdm/models/message_header_media.rbi +44 -0
  237. data/rbi/sentdm/models/message_media.rbi +95 -0
  238. data/rbi/sentdm/models/message_recipient.rbi +70 -0
  239. data/rbi/sentdm/models/message_send_params.rbi +7 -155
  240. data/rbi/sentdm/models/message_send_response.rbi +4 -163
  241. data/rbi/sentdm/models/message_send_result.rbi +85 -0
  242. data/rbi/sentdm/models/message_status_event.rbi +70 -0
  243. data/rbi/sentdm/models/mms_market.rbi +66 -0
  244. data/rbi/sentdm/models/number_lookup_result.rbi +89 -0
  245. data/rbi/sentdm/models/pagination_cursors.rbi +42 -0
  246. data/rbi/sentdm/models/pagination_meta.rbi +4 -43
  247. data/rbi/sentdm/models/profile_completion_accepted.rbi +33 -0
  248. data/rbi/sentdm/models/profile_completion_result.rbi +43 -0
  249. data/rbi/sentdm/models/profile_detail.rbi +8 -621
  250. data/rbi/sentdm/models/profiles/brand_campaign.rbi +18 -45
  251. data/rbi/sentdm/models/profiles_list.rbi +50 -0
  252. data/rbi/sentdm/models/sender_profile.rbi +204 -0
  253. data/rbi/sentdm/models/sender_profile_billing.rbi +34 -0
  254. data/rbi/sentdm/models/sender_profile_billing_request.rbi +46 -0
  255. data/rbi/sentdm/models/sender_profile_channels.rbi +163 -0
  256. data/rbi/sentdm/models/sender_profile_create_params.rbi +190 -0
  257. data/rbi/sentdm/models/sender_profile_delete_params.rbi +35 -0
  258. data/rbi/sentdm/models/sender_profile_list_params.rbi +57 -0
  259. data/rbi/sentdm/models/sender_profile_rcs.rbi +211 -0
  260. data/rbi/sentdm/models/sender_profile_retrieve_params.rbi +35 -0
  261. data/rbi/sentdm/models/sender_profile_sms.rbi +156 -0
  262. data/rbi/sentdm/models/sender_profile_update_params.rbi +96 -0
  263. data/rbi/sentdm/models/sender_profile_whatsapp.rbi +83 -0
  264. data/rbi/sentdm/models/sender_profiles_list.rbi +54 -0
  265. data/rbi/sentdm/models/tcr_brand_identity_status.rbi +27 -0
  266. data/rbi/sentdm/models/tcr_brand_status.rbi +20 -0
  267. data/rbi/sentdm/models/tcr_campaign_status.rbi +23 -0
  268. data/rbi/sentdm/models/template_body.rbi +6 -114
  269. data/rbi/sentdm/models/template_header.rbi +4 -53
  270. data/rbi/sentdm/models/template_header_location.rbi +47 -0
  271. data/rbi/sentdm/models/template_media_item.rbi +51 -0
  272. data/rbi/sentdm/models/template_mms_body_content.rbi +73 -0
  273. data/rbi/sentdm/models/template_ref.rbi +79 -0
  274. data/rbi/sentdm/models/template_variable.rbi +4 -80
  275. data/rbi/sentdm/models/template_variable_props.rbi +81 -0
  276. data/rbi/sentdm/models/templates_list.rbi +50 -0
  277. data/rbi/sentdm/models/users_list.rbi +50 -0
  278. data/rbi/sentdm/models/voice/call.rbi +11 -92
  279. data/rbi/sentdm/models/voice/call_leg.rbi +90 -0
  280. data/rbi/sentdm/models/webhook_create_params.rbi +4 -49
  281. data/rbi/sentdm/models/webhook_delivery.rbi +211 -0
  282. data/rbi/sentdm/models/webhook_event_types_list.rbi +54 -0
  283. data/rbi/sentdm/models/webhook_events_list.rbi +52 -0
  284. data/rbi/sentdm/models/webhook_response.rbi +4 -50
  285. data/rbi/sentdm/models/webhook_secret.rbi +24 -0
  286. data/rbi/sentdm/models/webhook_sender_profile.rbi +46 -0
  287. data/rbi/sentdm/models/webhook_sender_profile_config.rbi +44 -0
  288. data/rbi/sentdm/models/webhook_test.rbi +32 -0
  289. data/rbi/sentdm/models/webhook_update_params.rbi +4 -49
  290. data/rbi/sentdm/models/webhooks_list.rbi +50 -0
  291. data/rbi/sentdm/models.rbi +197 -0
  292. data/rbi/sentdm/resources/channels/rcs.rbi +208 -0
  293. data/rbi/sentdm/resources/channels/sms.rbi +440 -0
  294. data/rbi/sentdm/resources/channels/whatsapp.rbi +108 -0
  295. data/rbi/sentdm/resources/channels.rbi +149 -0
  296. data/rbi/sentdm/resources/compliance.rbi +121 -0
  297. data/rbi/sentdm/resources/conversations.rbi +2 -10
  298. data/rbi/sentdm/resources/me.rbi +1 -1
  299. data/rbi/sentdm/resources/messages.rbi +64 -7
  300. data/rbi/sentdm/resources/numbers.rbi +1 -1
  301. data/rbi/sentdm/resources/profiles/campaigns.rbi +4 -1
  302. data/rbi/sentdm/resources/profiles.rbi +2 -2
  303. data/rbi/sentdm/resources/sender_profiles.rbi +463 -0
  304. data/rbi/sentdm/resources/users.rbi +1 -1
  305. data/rbi/sentdm/resources/voice/calls/participants.rbi +5 -5
  306. data/rbi/sentdm/resources/webhooks.rbi +6 -12
  307. data/sig/sentdm/client.rbs +4 -0
  308. data/sig/sentdm/internal/sender_profiles_page.rbs +80 -0
  309. data/sig/sentdm/models/account.rbs +111 -0
  310. data/sig/sentdm/models/account_channels.rbs +38 -0
  311. data/sig/sentdm/models/account_profile.rbs +68 -0
  312. data/sig/sentdm/models/account_rcs_channel.rbs +17 -0
  313. data/sig/sentdm/models/account_sms_channel.rbs +17 -0
  314. data/sig/sentdm/models/account_whatsapp_channel.rbs +28 -0
  315. data/sig/sentdm/models/api_response_of_account.rbs +39 -0
  316. data/sig/sentdm/models/api_response_of_cancelled_message.rbs +39 -0
  317. data/sig/sentdm/models/api_response_of_channels_state.rbs +39 -0
  318. data/sig/sentdm/models/api_response_of_compliance_requirements.rbs +39 -0
  319. data/sig/sentdm/models/api_response_of_contacts_list.rbs +39 -0
  320. data/sig/sentdm/models/api_response_of_message.rbs +39 -0
  321. data/sig/sentdm/models/api_response_of_message_activities.rbs +39 -0
  322. data/sig/sentdm/models/api_response_of_number_lookup_result.rbs +39 -0
  323. data/sig/sentdm/models/api_response_of_profile_completion_accepted.rbs +39 -0
  324. data/sig/sentdm/models/api_response_of_profile_completion_result.rbs +39 -0
  325. data/sig/sentdm/models/api_response_of_profiles_list.rbs +39 -0
  326. data/sig/sentdm/models/api_response_of_sender_profile.rbs +39 -0
  327. data/sig/sentdm/models/api_response_of_sender_profiles_list.rbs +39 -0
  328. data/sig/sentdm/models/api_response_of_templates_list.rbs +39 -0
  329. data/sig/sentdm/models/api_response_of_users_list.rbs +39 -0
  330. data/sig/sentdm/models/api_response_of_webhook_event_types_list.rbs +39 -0
  331. data/sig/sentdm/models/api_response_of_webhook_events_list.rbs +39 -0
  332. data/sig/sentdm/models/api_response_of_webhook_secret.rbs +39 -0
  333. data/sig/sentdm/models/api_response_of_webhook_test.rbs +39 -0
  334. data/sig/sentdm/models/api_response_of_webhooks_list.rbs +39 -0
  335. data/sig/sentdm/models/billing_contact.rbs +30 -0
  336. data/sig/sentdm/models/brand_business.rbs +70 -0
  337. data/sig/sentdm/models/brand_business_info.rbs +4 -23
  338. data/sig/sentdm/models/brand_compliance.rbs +56 -0
  339. data/sig/sentdm/models/brand_contact.rbs +47 -0
  340. data/sig/sentdm/models/brand_with_kyc.rbs +93 -0
  341. data/sig/sentdm/models/cancelled_message.rbs +15 -0
  342. data/sig/sentdm/models/channel_event_payload.rbs +4 -56
  343. data/sig/sentdm/models/channel_list_params.rbs +25 -0
  344. data/sig/sentdm/models/channel_score.rbs +32 -0
  345. data/sig/sentdm/models/channels/api_response_of_list_of_sms_market.rbs +41 -0
  346. data/sig/sentdm/models/channels/api_response_of_rcs_agent.rbs +41 -0
  347. data/sig/sentdm/models/channels/api_response_of_sms_market.rbs +41 -0
  348. data/sig/sentdm/models/channels/api_response_of_whatsapp_channel.rbs +43 -0
  349. data/sig/sentdm/models/channels/market_compliance.rbs +338 -0
  350. data/sig/sentdm/models/channels/rc_create_params.rbs +242 -0
  351. data/sig/sentdm/models/channels/rcs_address.rbs +42 -0
  352. data/sig/sentdm/models/channels/rcs_agent.rbs +181 -0
  353. data/sig/sentdm/models/channels/sms_create_params.rbs +116 -0
  354. data/sig/sentdm/models/channels/sms_list_params.rbs +27 -0
  355. data/sig/sentdm/models/channels/sms_market.rbs +80 -0
  356. data/sig/sentdm/models/channels/sms_number.rbs +37 -0
  357. data/sig/sentdm/models/channels/sms_number_request.rbs +17 -0
  358. data/sig/sentdm/models/channels/sms_retrieve_params.rbs +36 -0
  359. data/sig/sentdm/models/channels/sms_update_params.rbs +63 -0
  360. data/sig/sentdm/models/channels/supplied_campaign.rbs +9 -0
  361. data/sig/sentdm/models/channels/supplied_compliance.rbs +37 -0
  362. data/sig/sentdm/models/channels/supplied_document.rbs +30 -0
  363. data/sig/sentdm/models/channels/whatsapp_channel.rbs +78 -0
  364. data/sig/sentdm/models/channels/whatsapp_create_params.rbs +56 -0
  365. data/sig/sentdm/models/channels_state.rbs +55 -0
  366. data/sig/sentdm/models/compliance_attachment_template.rbs +26 -0
  367. data/sig/sentdm/models/compliance_requirement.rbs +76 -0
  368. data/sig/sentdm/models/compliance_requirements.rbs +66 -0
  369. data/sig/sentdm/models/compliance_retrieve_requirements_params.rbs +43 -0
  370. data/sig/sentdm/models/compliance_setup_step.rbs +62 -0
  371. data/sig/sentdm/models/contact_message_summary.rbs +6 -35
  372. data/sig/sentdm/models/contacts_list.rbs +31 -0
  373. data/sig/sentdm/models/conversation_messages_list.rbs +5 -312
  374. data/sig/sentdm/models/entity_type.rbs +22 -0
  375. data/sig/sentdm/models/inbound_media.rbs +35 -0
  376. data/sig/sentdm/models/inbound_message_event_payload.rbs +4 -36
  377. data/sig/sentdm/models/link_event.rbs +44 -0
  378. data/sig/sentdm/models/link_event_payload.rbs +106 -0
  379. data/sig/sentdm/models/message.rbs +130 -0
  380. data/sig/sentdm/models/message_activities.rbs +38 -0
  381. data/sig/sentdm/models/message_activity.rbs +66 -0
  382. data/sig/sentdm/models/message_body.rbs +52 -0
  383. data/sig/sentdm/models/message_button.rbs +34 -0
  384. data/sig/sentdm/models/message_cancel_params.rbs +38 -0
  385. data/sig/sentdm/models/message_channel_options.rbs +26 -0
  386. data/sig/sentdm/models/message_header_media.rbs +19 -0
  387. data/sig/sentdm/models/message_media.rbs +40 -0
  388. data/sig/sentdm/models/message_recipient.rbs +34 -0
  389. data/sig/sentdm/models/message_send_params.rbs +8 -54
  390. data/sig/sentdm/models/message_send_response.rbs +4 -77
  391. data/sig/sentdm/models/message_send_result.rbs +45 -0
  392. data/sig/sentdm/models/message_status_event.rbs +40 -0
  393. data/sig/sentdm/models/mms_market.rbs +35 -0
  394. data/sig/sentdm/models/number_lookup_result.rbs +64 -0
  395. data/sig/sentdm/models/pagination_cursors.rbs +15 -0
  396. data/sig/sentdm/models/pagination_meta.rbs +4 -16
  397. data/sig/sentdm/models/profile_completion_accepted.rbs +15 -0
  398. data/sig/sentdm/models/profile_completion_result.rbs +19 -0
  399. data/sig/sentdm/models/profile_detail.rbs +8 -315
  400. data/sig/sentdm/models/profiles/brand_campaign.rbs +11 -16
  401. data/sig/sentdm/models/profiles_list.rbs +31 -0
  402. data/sig/sentdm/models/sender_profile.rbs +76 -0
  403. data/sig/sentdm/models/sender_profile_billing.rbs +15 -0
  404. data/sig/sentdm/models/sender_profile_billing_request.rbs +15 -0
  405. data/sig/sentdm/models/sender_profile_channels.rbs +30 -0
  406. data/sig/sentdm/models/sender_profile_create_params.rbs +78 -0
  407. data/sig/sentdm/models/sender_profile_delete_params.rbs +20 -0
  408. data/sig/sentdm/models/sender_profile_list_params.rbs +32 -0
  409. data/sig/sentdm/models/sender_profile_rcs.rbs +150 -0
  410. data/sig/sentdm/models/sender_profile_retrieve_params.rbs +20 -0
  411. data/sig/sentdm/models/sender_profile_sms.rbs +40 -0
  412. data/sig/sentdm/models/sender_profile_update_params.rbs +62 -0
  413. data/sig/sentdm/models/sender_profile_whatsapp.rbs +16 -0
  414. data/sig/sentdm/models/sender_profiles_list.rbs +31 -0
  415. data/sig/sentdm/models/tcr_brand_identity_status.rbs +17 -0
  416. data/sig/sentdm/models/tcr_brand_status.rbs +15 -0
  417. data/sig/sentdm/models/tcr_campaign_status.rbs +15 -0
  418. data/sig/sentdm/models/template_body.rbs +4 -43
  419. data/sig/sentdm/models/template_header.rbs +4 -31
  420. data/sig/sentdm/models/template_header_location.rbs +30 -0
  421. data/sig/sentdm/models/template_media_item.rbs +17 -0
  422. data/sig/sentdm/models/template_mms_body_content.rbs +28 -0
  423. data/sig/sentdm/models/template_ref.rbs +26 -0
  424. data/sig/sentdm/models/template_variable.rbs +4 -51
  425. data/sig/sentdm/models/template_variable_props.rbs +50 -0
  426. data/sig/sentdm/models/templates_list.rbs +29 -0
  427. data/sig/sentdm/models/users_list.rbs +31 -0
  428. data/sig/sentdm/models/voice/call.rbs +4 -49
  429. data/sig/sentdm/models/voice/call_leg.rbs +50 -0
  430. data/sig/sentdm/models/webhook_create_params.rbs +4 -28
  431. data/sig/sentdm/models/webhook_delivery.rbs +99 -0
  432. data/sig/sentdm/models/webhook_event_types_list.rbs +31 -0
  433. data/sig/sentdm/models/webhook_events_list.rbs +31 -0
  434. data/sig/sentdm/models/webhook_response.rbs +4 -28
  435. data/sig/sentdm/models/webhook_secret.rbs +15 -0
  436. data/sig/sentdm/models/webhook_sender_profile.rbs +27 -0
  437. data/sig/sentdm/models/webhook_sender_profile_config.rbs +27 -0
  438. data/sig/sentdm/models/webhook_test.rbs +19 -0
  439. data/sig/sentdm/models/webhook_update_params.rbs +4 -28
  440. data/sig/sentdm/models/webhooks_list.rbs +31 -0
  441. data/sig/sentdm/models.rbs +188 -0
  442. data/sig/sentdm/resources/channels/rcs.rbs +41 -0
  443. data/sig/sentdm/resources/channels/sms.rbs +44 -0
  444. data/sig/sentdm/resources/channels/whatsapp.rbs +18 -0
  445. data/sig/sentdm/resources/channels.rbs +11 -0
  446. data/sig/sentdm/resources/compliance.rbs +15 -0
  447. data/sig/sentdm/resources/conversations.rbs +2 -2
  448. data/sig/sentdm/resources/me.rbs +1 -1
  449. data/sig/sentdm/resources/messages.rbs +12 -4
  450. data/sig/sentdm/resources/numbers.rbs +1 -1
  451. data/sig/sentdm/resources/profiles.rbs +2 -2
  452. data/sig/sentdm/resources/sender_profiles.rbs +44 -0
  453. data/sig/sentdm/resources/users.rbs +1 -1
  454. data/sig/sentdm/resources/webhooks.rbs +6 -6
  455. metadata +365 -35
  456. data/lib/sentdm/models/me_retrieve_response.rb +0 -409
  457. data/lib/sentdm/models/message_retrieve_activities_response.rb +0 -175
  458. data/lib/sentdm/models/message_retrieve_status_response.rb +0 -477
  459. data/lib/sentdm/models/number_lookup_response.rb +0 -104
  460. data/lib/sentdm/models/profile_complete_response.rb +0 -74
  461. data/lib/sentdm/models/profile_list_response.rb +0 -65
  462. data/lib/sentdm/models/user_list_response.rb +0 -65
  463. data/lib/sentdm/models/webhook_list_event_types_response.rb +0 -65
  464. data/lib/sentdm/models/webhook_list_events_response.rb +0 -445
  465. data/rbi/sentdm/models/me_retrieve_response.rbi +0 -705
  466. data/rbi/sentdm/models/message_retrieve_activities_response.rbi +0 -319
  467. data/rbi/sentdm/models/message_retrieve_status_response.rbi +0 -765
  468. data/rbi/sentdm/models/number_lookup_response.rbi +0 -166
  469. data/rbi/sentdm/models/profile_list_response.rbi +0 -128
  470. data/rbi/sentdm/models/user_list_response.rbi +0 -128
  471. data/rbi/sentdm/models/webhook_list_event_types_response.rbi +0 -142
  472. data/rbi/sentdm/models/webhook_list_events_response.rbi +0 -647
  473. data/sig/sentdm/models/me_retrieve_response.rbs +0 -306
  474. data/sig/sentdm/models/message_retrieve_activities_response.rbs +0 -137
  475. data/sig/sentdm/models/message_retrieve_status_response.rbs +0 -341
  476. data/sig/sentdm/models/number_lookup_response.rbs +0 -100
  477. data/sig/sentdm/models/profile_complete_response.rbs +0 -55
  478. data/sig/sentdm/models/profile_list_response.rbs +0 -67
  479. data/sig/sentdm/models/user_list_response.rbs +0 -67
  480. data/sig/sentdm/models/webhook_list_event_types_response.rbs +0 -67
  481. data/sig/sentdm/models/webhook_list_events_response.rbs +0 -243
  482. data/sig/sentdm/models/webhook_rotate_secret_response.rbs +0 -51
  483. data/sig/sentdm/models/webhook_test_response.rbs +0 -55
@@ -0,0 +1,440 @@
1
+ # typed: strong
2
+
3
+ module Sentdm
4
+ module Resources
5
+ class Channels
6
+ # The senders you send from, one per channel.
7
+ #
8
+ # **SMS is a list of markets**, each keyed by `(country, number_type)` — a
9
+ # customer can hold `us/10dlc` and `gb/alphanumeric` at once, so a market is
10
+ # addressed by the pair rather than by country alone. **WhatsApp and RCS are
11
+ # single**: a customer has one business account and one agent. **Voice is per
12
+ # number**: each number you hold can carry phone calls on its own
13
+ # (`POST /v3/channels/voice`), each with the callback URL Sent asks what to do
14
+ # with its calls, one of them is the default line for calls placed from your app,
15
+ # and voice tokens are minted with `POST /v3/voice/tokens`. Read your voice
16
+ # numbers with `GET /v3/channels/voice` and change one with
17
+ # `PATCH /v3/channels/voice/{number}`.
18
+ #
19
+ # ## Compliance lives on the market
20
+ #
21
+ # Adding a market records everything that market registers with, in its
22
+ # `compliance` object. Only **US `TEN_DLC`** registers with a regime — The
23
+ # Campaign Registry — and it is the only market whose compliance carries `brand`
24
+ # and `campaign`. Everywhere else compliance is documents, and many markets ask
25
+ # for none at all.
26
+ #
27
+ # `GET` and `PATCH` on a market return and accept the same shape, so what comes
28
+ # back can be sent back: an omitted key is left alone, and a key reported in
29
+ # `requirements` is the path into the body that clears it.
30
+ #
31
+ # Call `GET /v3/compliance/requirements` first — it answers what a market demands
32
+ # before you hold it, with a body you can fill in and post.
33
+ class SMS
34
+ # Gives the customer a sender in one country — the first market it sends in, and
35
+ # the fifth.
36
+ #
37
+ # ## What to have in place first
38
+ #
39
+ # **Call `GET /v3/compliance/requirements?country=US&type=TEN_DLC` first.** It
40
+ # returns this request's body ready to fill in, plus the brand and campaign calls
41
+ # to make before it, in order. You never have to track forty countries' rules
42
+ # yourself.
43
+ #
44
+ # **A market that registers with a compliance regime needs an identity, and this
45
+ # call takes one.** US `TEN_DLC` registers with The Campaign Registry and files
46
+ # that registration against a business identity. Send it in `compliance.brand` and
47
+ # it is recorded here, before the registration that attaches to it — so a customer
48
+ # with no identity reaches a first 10DLC market in one call.
49
+ #
50
+ # `{ "inherit": true }` runs on your organization's instead. A market with neither
51
+ # — none stored, none sent — is `400`, because accepting it would write a channel
52
+ # that could never register and leave it provisioning for ever with nothing saying
53
+ # why.
54
+ #
55
+ # **Everything the regime wants arrives in this request's `compliance`**, as two
56
+ # declared objects: `brand` — the identity the registration is filed against — and
57
+ # `campaign`, with the use case, the consent narrative, the volume, the sample
58
+ # messages and the keywords. There is nothing to set up first. Nothing is
59
+ # submitted here either: the rows are what a submission is later assembled from,
60
+ # and filing is externally rejectable so it happens on its own path.
61
+ #
62
+ # **A half you run yourself has to be complete here.** Whichever of `brand` and
63
+ # `campaign` is your own rather than your organization's must carry every field
64
+ # the regime asks of it, counting what you already hold — send the rest in this
65
+ # request. A missing one is `400` naming each field, rather than a `202` for a
66
+ # market that could never be filed. A half you inherit is asked for nothing.
67
+ #
68
+ # A market that registers with nobody — an alphanumeric sender in most countries —
69
+ # needs neither, and may need documents instead.
70
+ #
71
+ # ## Sending it
72
+ #
73
+ # Takes the same fields `channels.sms` takes on `POST /v3/sender-profiles`,
74
+ # because it is the same work, and both run one provisioning path. `compliance` is
75
+ # top-level and answers for the market in this request, carrying `brand` and
76
+ # `campaign` where the market registers.
77
+ #
78
+ # **Accepts multipart as well as JSON**, with each file named after the compliance
79
+ # key it satisfies — a market that pre-registers its sender needs its documents at
80
+ # the same moment it needs the sender. Every required document must be attached to
81
+ # this request; a missing or invalid file is rejected before the market is added.
82
+ #
83
+ # **`area_codes` puts the sender somewhere specific**, in your order of
84
+ # preference, for a `LOCAL` sender in any country or a US `TEN_DLC` sender — a
85
+ # 10DLC number is an ordinary local long code bound to a registered campaign, so
86
+ # both take the same codes out of the same inventory. It is honoured exactly: you
87
+ # get a number in one of the codes you named or you get none, never one in a code
88
+ # you left out.
89
+ #
90
+ # ## Several numbers
91
+ #
92
+ # **`numbers` lists the numbers you want, one entry per area code**, e.g.
93
+ # `[{"area_code": "212", "quantity": 2}, {"quantity": 1}]` for two numbers in 212
94
+ # and one in any area code. `quantity` defaults to 1, and an entry without
95
+ # `area_code` means any area code. Omit `numbers` for one number. It is for
96
+ # `LOCAL` and `TEN_DLC` only and cannot be combined with `area_codes`. A market
97
+ # holds at most 49 numbers, counting the ones it already has.
98
+ #
99
+ # **On a `LOCAL` market you already hold, `numbers` adds those numbers to it**
100
+ # instead of `409`. US `TEN_DLC` numbers belong to the market's campaign and are
101
+ # assigned when the campaign is approved, not at request time. Until then they
102
+ # read as `PROVISIONING` in the response's `numbers`, each with the area code it
103
+ # was asked for. A profile inheriting your organization's campaign cannot request
104
+ # `numbers` (`400`). `numbers` on a `TEN_DLC` market you already hold is `409`:
105
+ # change its campaign's numbers with `PATCH /v3/channels/sms/{country}/{type}`,
106
+ # add numbers to one of its campaigns with
107
+ # `POST /v3/channels/sms/numbers/US/TEN_DLC`, or add a new campaign with
108
+ # `POST /v3/channels/sms/compliances/US/TEN_DLC/campaigns`.
109
+ #
110
+ # **A market you already send in is `409`**: adding what is already there is a
111
+ # mistake worth reporting rather than a silent no-op. A market is a
112
+ # `(country, sender_type)` pair, so a **second sender type in a country you
113
+ # already send in is fine** — `US TOLL_FREE` alongside `US TEN_DLC` is the
114
+ # ordinary case. Two of the same type is not.
115
+ #
116
+ # **A market you hold that has no sender yet is not a duplicate**, and re-sending
117
+ # it re-asks for a sender rather than being refused. That is the way out of an
118
+ # area-code request nothing could fill: send the call again to name different
119
+ # codes, or no codes at all to take a number anywhere in the country. It answers
120
+ # `201` with the sender when the pool has one, otherwise `202` with the codes
121
+ # recorded — and changes nothing else; compliance on a market you hold is
122
+ # `PATCH /v3/channels/sms/{country}/{type}`.
123
+ #
124
+ # One exception: while a market's sender type is still unassigned, adding any type
125
+ # to that country is `409` once it has a sender, because the market you have may
126
+ # be about to become the one you asked for.
127
+ #
128
+ # Returns **the market**, in the shape `GET` and `PATCH` on
129
+ # `/v3/channels/sms/{country}/{type}` use — so what this answers can be read back
130
+ # and written back without reshaping. Not every channel you have: adding a market
131
+ # cannot change an RCS agent or a WhatsApp account, and `GET /v3/channels` is the
132
+ # whole picture. `201` when the market is ready; `202` while a sender or a
133
+ # registration is still outstanding.
134
+ #
135
+ # Send `x-profile-id` with an organization key to add a market to one of your
136
+ # profiles.
137
+ sig do
138
+ params(
139
+ number_type:
140
+ Sentdm::Channels::SMSCreateParams::NumberType::OrSymbol,
141
+ area_codes: T.nilable(T::Array[String]),
142
+ compliance: Sentdm::Channels::MarketCompliance::OrHash,
143
+ country: String,
144
+ numbers:
145
+ T.nilable(T::Array[Sentdm::Channels::SMSNumberRequest::OrHash]),
146
+ sandbox: T::Boolean,
147
+ sender_value: T.nilable(String),
148
+ idempotency_key: String,
149
+ x_profile_id: String,
150
+ request_options: Sentdm::RequestOptions::OrHash
151
+ ).returns(Sentdm::Channels::APIResponseOfSMSMarket)
152
+ end
153
+ def create(
154
+ # Body param: Sender type. Decides the provisioning flow and what compliance is
155
+ # asked for.
156
+ #
157
+ # [Required] so the published document says so. The validator has always demanded
158
+ # it, but requiredness reached the schema by matching a rule to a property name —
159
+ # which works for country, whose wire name is its camel-cased C# name, and
160
+ # silently does not for number_type. A client generating a request from our
161
+ # OpenAPI therefore sent what the document called sufficient and was answered 400.
162
+ number_type:,
163
+ # Body param: The area codes to put this sender in, in your own order of
164
+ # preference, e.g. ["415", "628"] for the US or ["20"] for London. Omit it and a
165
+ # number is claimed anywhere in the country.
166
+ #
167
+ # Ordered, and the order is the request. The claim tries each code in turn and
168
+ # stops at the first that yields a number. Nothing sorts the list and a code
169
+ # listed twice is refused.
170
+ #
171
+ # One to fifty entries, each the area code as digits: 415, with the trunk prefix
172
+ # as 020, or with the country's dialing prefix as +1415 (all are stored as the
173
+ # bare code). A dialing prefix from a different country than country is refused.
174
+ # Each code is checked against the country's numbering plan: it must start real
175
+ # local or mobile numbers there, so toll-free and premium ranges, service codes
176
+ # and another country's codes are refused with a reason.
177
+ #
178
+ # LOCAL senders in any country, and US TEN_DLC senders. No other sender type has a
179
+ # geographic area code, and the list is refused with one rather than accepted and
180
+ # dropped.
181
+ #
182
+ # Honoured exactly or not at all. Ask for 415 and you get a 415 number or you get
183
+ # none, never a neighbouring code you did not name. A miss leaves the market with
184
+ # no sender yet and the codes recorded on it, so it is filled when stock appears
185
+ # rather than filled now from somewhere else. Many countries outside North America
186
+ # require address or business documents before a local number can be bought, which
187
+ # can delay or prevent the fill.
188
+ area_codes: nil,
189
+ # Body param: The compliance values a market registers with. `brand` and
190
+ # `campaign` apply to US `TEN_DLC`; other markets fill this map with the document
191
+ # keys their own requirements name.
192
+ compliance: nil,
193
+ # Body param: ISO 3166-1 alpha-2 country the sender operates in.
194
+ country: nil,
195
+ # Body param: The numbers to assign, one entry per area code, e.g. [{"area_code":
196
+ # "212", "quantity": 2}, {"area_code": "415"}, {"quantity": 1}]: two numbers in
197
+ # 212, one in 415 and one in any area code. quantity defaults to 1, and an entry
198
+ # without area_code means any area code. Omit numbers for one number.
199
+ #
200
+ # Only with LOCAL or TEN_DLC, and not together with area_codes. Each area code is
201
+ # validated against country the same way area_codes is and may appear once, and at
202
+ # most one entry may leave area_code out. On a LOCAL market you already hold, this
203
+ # adds the numbers to it. US TEN_DLC numbers are assigned when the campaign is
204
+ # approved, not at request time. Not available when the profile inherits the
205
+ # organization's campaign.
206
+ numbers: nil,
207
+ # Body param: Sandbox flag - when true, the operation is simulated without side
208
+ # effects Useful for testing integrations without actual execution
209
+ sandbox: nil,
210
+ # Body param: The sender's identity where the caller chooses it. Required when
211
+ # number_type is ALPHANUMERIC; optional for carrier-assigned types, which are
212
+ # procured afterwards.
213
+ sender_value: nil,
214
+ # Header param: Unique key to ensure idempotent request processing. Must be 1-255
215
+ # alphanumeric characters, hyphens, or underscores. Responses are cached for 24
216
+ # hours per key per customer.
217
+ idempotency_key: nil,
218
+ # Header param: Profile UUID to scope the request to a child profile. Only
219
+ # organization API keys can use this header. The profile must belong to the
220
+ # calling organization.
221
+ x_profile_id: nil,
222
+ request_options: {}
223
+ )
224
+ end
225
+
226
+ # Reads one market you send in — its sender, where that sender stands, and
227
+ # everything its compliance holds.
228
+ #
229
+ # ## What `compliance` carries
230
+ #
231
+ # A market that registers with a compliance regime reports `brand` — the identity
232
+ # the registration is filed against — and `campaign`, the programme filed against
233
+ # it. Each carries `inherit`, saying whether it is yours or your organization's.
234
+ #
235
+ # A market that registers with nobody has neither, so **both keys are absent**
236
+ # rather than null: absent says this market does not ask, where null would say it
237
+ # asks and you supplied nothing. It reports `documents` instead.
238
+ #
239
+ # `GET /v3/compliance/requirements` says what a market demands of any new
240
+ # customer; this says what you gave it.
241
+ #
242
+ # ## Writing it back
243
+ #
244
+ # **`PATCH` this same path**, with the `compliance` object from this response:
245
+ #
246
+ # ```json
247
+ # { "compliance": { "brand": { "tax_id": "12-3456789" } } }
248
+ # ```
249
+ #
250
+ # Nothing else to learn — what comes back can be sent back, an omitted key is left
251
+ # alone. There is no sub-resource for either half: both are singletons of the
252
+ # market, so both are written here.
253
+ #
254
+ # `GET /v3/compliance/requirements` says what a market demands of anybody; this
255
+ # says what you gave it.
256
+ #
257
+ # Send `x-profile-id` with an organization key to read one of your profiles'
258
+ # markets.
259
+ sig do
260
+ params(
261
+ type: String,
262
+ country: String,
263
+ x_profile_id: String,
264
+ request_options: Sentdm::RequestOptions::OrHash
265
+ ).returns(Sentdm::Channels::APIResponseOfSMSMarket)
266
+ end
267
+ def retrieve(
268
+ # Path param: Sender type: local, mobile, 10dlc (or ten_dlc), toll_free,
269
+ # short_code, alphanumeric. Matched ignoring case.
270
+ type,
271
+ # Path param: ISO 3166-1 alpha-2 country code, e.g. us
272
+ country:,
273
+ # Header param: Profile UUID to scope the request to a child profile. Only
274
+ # organization API keys can use this header. The profile must belong to the
275
+ # calling organization.
276
+ x_profile_id: nil,
277
+ request_options: {}
278
+ )
279
+ end
280
+
281
+ # Supplies whatever this market is waiting on, and answers with the market as
282
+ # stored — the same shape `GET` on this path returns, so **what comes back can be
283
+ # sent back**.
284
+ #
285
+ # **A market reporting `ACTION_NEEDED` is fixed here**, whatever it is waiting on:
286
+ #
287
+ # | Outstanding | Send |
288
+ # | -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
289
+ # | a `brand` or `campaign` value (US `TEN_DLC`) | `compliance`, as below |
290
+ # | a document, in any market | a multipart file named after the document's key |
291
+ # | a registration sent back for correction | `compliance.brand` and/or `compliance.campaign` — the identity is accepted even once filed, and the registration goes back for review |
292
+ # | different numbers | `numbers`, the list the market asks for from now on |
293
+ #
294
+ # ## Partial, at every level
295
+ #
296
+ # **An omitted key is left alone. An explicit `null` clears it.** Those are
297
+ # different requests, so `{}` changes nothing and is refused rather than silently
298
+ # accepted, and correcting one field does not blank the others.
299
+ #
300
+ # ```json
301
+ # { "compliance": { "brand": { "contact_phone": "+12125550123" } } }
302
+ # ```
303
+ #
304
+ # That leaves the campaign untouched, along with every other field of the
305
+ # identity.
306
+ #
307
+ # ## What a US `TEN_DLC` market holds
308
+ #
309
+ # Two halves, both singular: `brand`, the identity the registration is filed
310
+ # against, and `campaign`, the programme filed against it. Each carries `inherit`.
311
+ #
312
+ # | Body | Effect |
313
+ # | --------------------------------- | ------------------------------------------------------------- |
314
+ # | `"brand": { … }` | supplies or corrects the identity, and takes one of your own |
315
+ # | `"brand": { "inherit": true }` | runs on your organization's, giving up your own |
316
+ # | `"brand": null` | the same thing, said the short way |
317
+ # | `"campaign": { … }` | supplies or corrects the programme, and takes one of your own |
318
+ # | `"campaign": { "inherit": true }` | runs on your organization's |
319
+ # | key omitted | left exactly as it is |
320
+ #
321
+ # **Nothing here creates a second anything.** One identity and one campaign per
322
+ # market, so a write is an upsert and a replayed request lands on the row it
323
+ # already wrote. Sending the campaign twice does not file two registrations.
324
+ #
325
+ # ## Every other market
326
+ #
327
+ # Markets that register with no regime have neither half, so `compliance` is `400`
328
+ # there. Their compliance is documents, sent here as multipart.
329
+ #
330
+ # ## Documents
331
+ #
332
+ # Send `multipart/form-data` with **each file named after the compliance key it
333
+ # satisfies** — the key the market's `requirements` names. A file that matches no
334
+ # document the market asks for is `400` naming the keys that would, and a file the
335
+ # upload rules refuse (empty, too large, an unsupported type) is `422`.
336
+ # `compliance` and `numbers` may ride in the same form as text parts holding their
337
+ # JSON.
338
+ #
339
+ # ## Numbers
340
+ #
341
+ # `numbers` takes the list `POST /v3/channels/sms` takes, for a `LOCAL` or
342
+ # `TEN_DLC` market, and **replaces** what the market asks for — send the list you
343
+ # want, not a difference. Numbers already assigned stay; a list that leaves one of
344
+ # them out is `400`, because nothing here releases a number.
345
+ #
346
+ # ```json
347
+ # { "numbers": [{ "area_code": "415", "quantity": 2 }, { "quantity": 1 }] }
348
+ # ```
349
+ #
350
+ # A `LOCAL` market is claimed from inventory at once, and whatever inventory
351
+ # cannot cover stays pending. A `TEN_DLC` market's numbers are recorded on its
352
+ # campaign and assigned once the carriers elect it — on the next acquisition cycle
353
+ # when it already has been. They need a campaign of the profile's own: one
354
+ # inherited from the organization is `400`.
355
+ #
356
+ # ## What it will refuse
357
+ #
358
+ # **A filed identity is `409`.** Once the registration has gone to The Campaign
359
+ # Registry they hold a copy, and a local change would diverge from it silently.
360
+ # The campaign is not frozen — omit `brand` and the same body is accepted. The
361
+ # exception is a registration sent back for correction: the identity is accepted,
362
+ # and a correction to either half sends the registration back for review. Refiling
363
+ # it with The Campaign Registry stays with Sent.
364
+ #
365
+ # **More than one campaign is `409`.** The schema permits several and an account
366
+ # built on the admin side may hold them; this surface writes one, and editing
367
+ # whichever sorted first would leave the others unmentioned and unedited.
368
+ #
369
+ # Nothing is submitted to a regime here. These are the rows a submission is later
370
+ # assembled from, which is what lets them be corrected without waiting on
371
+ # something externally rejectable.
372
+ #
373
+ # Send `x-profile-id` with an organization key to write one of your profiles'
374
+ # markets.
375
+ sig do
376
+ params(
377
+ type: String,
378
+ country: String,
379
+ compliance: Sentdm::Channels::MarketCompliance::OrHash,
380
+ sandbox: T::Boolean,
381
+ idempotency_key: String,
382
+ x_profile_id: String,
383
+ request_options: Sentdm::RequestOptions::OrHash
384
+ ).returns(Sentdm::Channels::APIResponseOfSMSMarket)
385
+ end
386
+ def update(
387
+ # Path param: Sender type, e.g. 10dlc (or ten_dlc), local or alphanumeric. Only
388
+ # 10dlc in us declares compliance values.
389
+ type,
390
+ # Path param: ISO 3166-1 alpha-2 country code, e.g. us
391
+ country:,
392
+ # Body param: The compliance values a market registers with. `brand` and
393
+ # `campaign` apply to US `TEN_DLC`; other markets fill this map with the document
394
+ # keys their own requirements name.
395
+ compliance: nil,
396
+ # Body param
397
+ sandbox: nil,
398
+ # Header param: Unique key to ensure idempotent request processing. Must be 1-255
399
+ # alphanumeric characters, hyphens, or underscores. Responses are cached for 24
400
+ # hours per key per customer.
401
+ idempotency_key: nil,
402
+ # Header param: Profile UUID to scope the request to a child profile. Only
403
+ # organization API keys can use this header. The profile must belong to the
404
+ # calling organization.
405
+ x_profile_id: nil,
406
+ request_options: {}
407
+ )
408
+ end
409
+
410
+ # Every market you send SMS in, each with its sender, where that sender stands,
411
+ # and what its compliance holds.
412
+ #
413
+ # The same entries `GET /v3/channels` reports under `sms`, and the same shape
414
+ # `GET /v3/channels/sms/{country}/{type}` returns for one of them — so a list, a
415
+ # member read and the all-channels read cannot describe a market differently.
416
+ #
417
+ # Send `x-profile-id` with an organization key to list one of your profiles'
418
+ # markets.
419
+ sig do
420
+ params(
421
+ x_profile_id: String,
422
+ request_options: Sentdm::RequestOptions::OrHash
423
+ ).returns(Sentdm::Channels::APIResponseOfListOfSMSMarket)
424
+ end
425
+ def list(
426
+ # Profile UUID to scope the request to a child profile. Only organization API keys
427
+ # can use this header. The profile must belong to the calling organization.
428
+ x_profile_id: nil,
429
+ request_options: {}
430
+ )
431
+ end
432
+
433
+ # @api private
434
+ sig { params(client: Sentdm::Client).returns(T.attached_class) }
435
+ def self.new(client:)
436
+ end
437
+ end
438
+ end
439
+ end
440
+ end
@@ -0,0 +1,108 @@
1
+ # typed: strong
2
+
3
+ module Sentdm
4
+ module Resources
5
+ class Channels
6
+ # The senders you send from, one per channel.
7
+ #
8
+ # **SMS is a list of markets**, each keyed by `(country, number_type)` — a
9
+ # customer can hold `us/10dlc` and `gb/alphanumeric` at once, so a market is
10
+ # addressed by the pair rather than by country alone. **WhatsApp and RCS are
11
+ # single**: a customer has one business account and one agent. **Voice is per
12
+ # number**: each number you hold can carry phone calls on its own
13
+ # (`POST /v3/channels/voice`), each with the callback URL Sent asks what to do
14
+ # with its calls, one of them is the default line for calls placed from your app,
15
+ # and voice tokens are minted with `POST /v3/voice/tokens`. Read your voice
16
+ # numbers with `GET /v3/channels/voice` and change one with
17
+ # `PATCH /v3/channels/voice/{number}`.
18
+ #
19
+ # ## Compliance lives on the market
20
+ #
21
+ # Adding a market records everything that market registers with, in its
22
+ # `compliance` object. Only **US `TEN_DLC`** registers with a regime — The
23
+ # Campaign Registry — and it is the only market whose compliance carries `brand`
24
+ # and `campaign`. Everywhere else compliance is documents, and many markets ask
25
+ # for none at all.
26
+ #
27
+ # `GET` and `PATCH` on a market return and accept the same shape, so what comes
28
+ # back can be sent back: an omitted key is left alone, and a key reported in
29
+ # `requirements` is the path into the body that clears it.
30
+ #
31
+ # Call `GET /v3/compliance/requirements` first — it answers what a market demands
32
+ # before you hold it, with a body you can fill in and post.
33
+ class Whatsapp
34
+ # Connects a WhatsApp Business Account shared with us through a Multi-Partner
35
+ # Solution to the calling sender profile. Send `x-profile-id` for the profile the
36
+ # account belongs to.
37
+ #
38
+ # **Two fields, because everything else is derived.** `waba_id` says which of your
39
+ # organization's shared accounts this is — you hold one per client, and nothing
40
+ # else can say which. `phone_number_id` names the account's number, which is what
41
+ # assigns it to the profile as the number it sends from.
42
+ #
43
+ # The solution the account arrived through, the client business portfolio that
44
+ # owns it, the access token and its expiry are all resolved from your
45
+ # organization. They are not accepted here: the first two are Meta's answer about
46
+ # provenance, and the token is minted per client business and rotates roughly
47
+ # every sixty days, so a value you sent would be stale before it was useful.
48
+ #
49
+ # `phone_number_id` is optional. Omit it to connect the account now and settle the
50
+ # number later — the channel reads as `ACTION_NEEDED` with `reason_code`
51
+ # `CHANNEL_007`, and the profile's WhatsApp messages fail until a number is named.
52
+ # They do not fall back to your organization's account. Call this endpoint again
53
+ # with `phone_number_id` to name one.
54
+ #
55
+ # The same resolution runs behind `channels.whatsapp` on
56
+ # `POST /v3/sender-profiles`, so connecting at create and connecting afterwards
57
+ # fill the same fields.
58
+ #
59
+ # Returns **the account**, not every channel you have — adding one cannot change a
60
+ # market or an RCS agent, and `GET /v3/channels` is the whole picture. Giving an
61
+ # account up is not self-service: ask support, because deregistering a number
62
+ # lands in your own Meta business.
63
+ sig do
64
+ params(
65
+ phone_number_id: T.nilable(String),
66
+ sandbox: T::Boolean,
67
+ waba_id: String,
68
+ idempotency_key: String,
69
+ x_profile_id: String,
70
+ request_options: Sentdm::RequestOptions::OrHash
71
+ ).returns(Sentdm::Channels::APIResponseOfWhatsappChannel)
72
+ end
73
+ def create(
74
+ # Body param: The Meta phone-number id of the number on WabaId, which assigns it
75
+ # to this profile as the number it sends from. It is not checked against the
76
+ # account here, so name the account's number; it is refused if another profile
77
+ # already uses it.
78
+ #
79
+ # Optional: omit it to connect the account and settle the number later. Nothing
80
+ # picks one on your behalf.
81
+ phone_number_id: nil,
82
+ # Body param: Sandbox flag - when true, the operation is simulated without side
83
+ # effects Useful for testing integrations without actual execution
84
+ sandbox: nil,
85
+ # Body param: WhatsApp Business Account id — one of the accounts shared into your
86
+ # organization. Required: the organization holds one per client, and nothing but
87
+ # the caller says which is meant here.
88
+ waba_id: nil,
89
+ # Header param: Unique key to ensure idempotent request processing. Must be 1-255
90
+ # alphanumeric characters, hyphens, or underscores. Responses are cached for 24
91
+ # hours per key per customer.
92
+ idempotency_key: nil,
93
+ # Header param: Profile UUID to scope the request to a child profile. Only
94
+ # organization API keys can use this header. The profile must belong to the
95
+ # calling organization.
96
+ x_profile_id: nil,
97
+ request_options: {}
98
+ )
99
+ end
100
+
101
+ # @api private
102
+ sig { params(client: Sentdm::Client).returns(T.attached_class) }
103
+ def self.new(client:)
104
+ end
105
+ end
106
+ end
107
+ end
108
+ end