one_msg_sdk 2.0.2 → 2.0.3

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 (284) hide show
  1. checksums.yaml +4 -4
  2. data/AGENTS.md +62 -16
  3. data/README.md +97 -29
  4. data/docs/AddTemplate200Response.md +18 -0
  5. data/docs/AddTemplateRequest.md +7 -7
  6. data/docs/CallingApi.md +1 -1
  7. data/docs/CatalogApi.md +1 -1
  8. data/docs/ChannelApi.md +151 -5
  9. data/docs/CreateFlowsRequest.md +26 -0
  10. data/docs/CreateGroupsGroupIdRequest.md +22 -0
  11. data/docs/CreateGroupsRequest.md +20 -0
  12. data/docs/CreateSettingsRequest.md +28 -0
  13. data/docs/CreateSettingsRequestWebhookUrl.md +49 -0
  14. data/docs/CreateUploadMedia200Response.md +18 -0
  15. data/docs/CreateUploadMediaRequest.md +20 -0
  16. data/docs/FlowsApi.md +32 -16
  17. data/docs/GetStatus200Response.md +26 -0
  18. data/docs/GetWebhook200Response.md +24 -2
  19. data/docs/GetWebhook200ResponseWebhookUrl.md +49 -0
  20. data/docs/GroupsApi.md +38 -18
  21. data/docs/ListSettings200Response.md +52 -0
  22. data/docs/ListSettings200ResponseWebhookUrl.md +49 -0
  23. data/docs/MessagingApi.md +140 -35
  24. data/docs/PatchFlowsFlowIdAssetsRequest.md +18 -0
  25. data/docs/PatchFlowsFlowIdMetadataRequest.md +22 -0
  26. data/docs/ProfileApi.md +9 -11
  27. data/docs/RemoveTemplateRequest.md +18 -0
  28. data/docs/SendButtonRequest.md +9 -1
  29. data/docs/SendCarouselRequest1.md +4 -2
  30. data/docs/SendContactInfoRequest.md +26 -0
  31. data/docs/SendContactRequest.md +7 -1
  32. data/docs/SendContactRequestContact.md +26 -0
  33. data/docs/SendContactRequestContactName.md +49 -0
  34. data/docs/SendContactRequestContactsInner.md +3 -3
  35. data/docs/SendContactRequestContactsInnerPhonesInner.md +1 -1
  36. data/docs/SendListRequest.md +5 -1
  37. data/docs/SendLocationRequestRequest.md +5 -1
  38. data/docs/SendMessageRequest.md +6 -2
  39. data/docs/SendMessageRequestDirectSend.md +20 -0
  40. data/docs/SendProductRequest.md +30 -0
  41. data/docs/SendReactionRequest.md +3 -1
  42. data/docs/SendTemplateRequest.md +9 -5
  43. data/docs/SendTemplateRequestLanguage.md +3 -3
  44. data/docs/SetWebhook200Response.md +20 -0
  45. data/docs/SetWebhook200ResponseWebhookUrl.md +49 -0
  46. data/docs/SetWebhookRequest.md +18 -0
  47. data/docs/SetWebhookRequestWebhookUrl.md +49 -0
  48. data/docs/TemplatesApi.md +29 -17
  49. data/docs/UpdateMe200Response.md +18 -0
  50. data/docs/UpdateMeRequest.md +6 -6
  51. data/docs/WebhookUrlStatus.md +34 -0
  52. data/docs/WebhooksApi.md +10 -12
  53. data/lib/one_msg_sdk/api/calling_api.rb +4 -4
  54. data/lib/one_msg_sdk/api/catalog_api.rb +4 -4
  55. data/lib/one_msg_sdk/api/channel_api.rb +146 -7
  56. data/lib/one_msg_sdk/api/flows_api.rb +58 -14
  57. data/lib/one_msg_sdk/api/groups_api.rb +48 -10
  58. data/lib/one_msg_sdk/api/messaging_api.rb +163 -38
  59. data/lib/one_msg_sdk/api/profile_api.rb +17 -13
  60. data/lib/one_msg_sdk/api/templates_api.rb +36 -13
  61. data/lib/one_msg_sdk/api/users_api.rb +2 -2
  62. data/lib/one_msg_sdk/api/webhooks_api.rb +19 -15
  63. data/lib/one_msg_sdk/api_client.rb +2 -2
  64. data/lib/one_msg_sdk/api_error.rb +2 -2
  65. data/lib/one_msg_sdk/api_model_base.rb +2 -2
  66. data/lib/one_msg_sdk/configuration.rb +2 -2
  67. data/lib/one_msg_sdk/models/add_template200_response.rb +150 -0
  68. data/lib/one_msg_sdk/models/add_template_request.rb +6 -2
  69. data/lib/one_msg_sdk/models/block_user_request.rb +2 -2
  70. data/lib/one_msg_sdk/models/calling_settings.rb +2 -2
  71. data/lib/one_msg_sdk/models/calling_settings_calling.rb +2 -2
  72. data/lib/one_msg_sdk/models/calling_settings_calling_audio.rb +2 -2
  73. data/lib/one_msg_sdk/models/calling_settings_calling_call_hours.rb +2 -2
  74. data/lib/one_msg_sdk/models/calling_settings_calling_sip.rb +2 -2
  75. data/lib/one_msg_sdk/models/calling_settings_calling_sip_servers_inner.rb +2 -2
  76. data/lib/one_msg_sdk/models/calling_settings_calling_video.rb +2 -2
  77. data/lib/one_msg_sdk/models/conversational_automation.rb +2 -2
  78. data/lib/one_msg_sdk/models/conversational_automation_commands_inner.rb +2 -2
  79. data/lib/one_msg_sdk/models/create_commerce200_response.rb +2 -2
  80. data/lib/one_msg_sdk/models/create_commerce_request.rb +2 -2
  81. data/lib/one_msg_sdk/models/create_commerce_request_params.rb +2 -2
  82. data/lib/one_msg_sdk/models/create_flows_request.rb +238 -0
  83. data/lib/one_msg_sdk/models/create_groups200_response.rb +2 -2
  84. data/lib/one_msg_sdk/models/create_groups_group_id_request.rb +168 -0
  85. data/lib/one_msg_sdk/models/create_groups_request.rb +175 -0
  86. data/lib/one_msg_sdk/models/create_read_message200_response.rb +2 -2
  87. data/lib/one_msg_sdk/models/create_read_message401_response.rb +2 -2
  88. data/lib/one_msg_sdk/models/create_read_message_request.rb +2 -2
  89. data/lib/one_msg_sdk/models/create_settings_request.rb +192 -0
  90. data/lib/one_msg_sdk/models/create_settings_request_webhook_url.rb +105 -0
  91. data/lib/one_msg_sdk/models/create_upload_media200_response.rb +147 -0
  92. data/lib/one_msg_sdk/models/create_upload_media_request.rb +158 -0
  93. data/lib/one_msg_sdk/models/delete_flows_flow_id200_response.rb +2 -2
  94. data/lib/one_msg_sdk/models/delete_groups_group_id200_response.rb +2 -2
  95. data/lib/one_msg_sdk/models/delete_media_legacy_request.rb +2 -2
  96. data/lib/one_msg_sdk/models/error_response.rb +2 -2
  97. data/lib/one_msg_sdk/models/get_commerce200_response_inner.rb +2 -2
  98. data/lib/one_msg_sdk/models/get_mm_lite_status200_response.rb +2 -2
  99. data/lib/one_msg_sdk/models/get_status200_response.rb +185 -0
  100. data/lib/one_msg_sdk/models/get_webhook200_response.rb +155 -6
  101. data/lib/one_msg_sdk/models/get_webhook200_response_webhook_url.rb +105 -0
  102. data/lib/one_msg_sdk/models/get_whatsapp_business_encryption200_response.rb +2 -2
  103. data/lib/one_msg_sdk/models/initiate_call_request.rb +2 -2
  104. data/lib/one_msg_sdk/models/initiate_call_request_session.rb +2 -2
  105. data/lib/one_msg_sdk/models/initiate_call_response.rb +2 -2
  106. data/lib/one_msg_sdk/models/initiate_call_response_calls_inner.rb +2 -2
  107. data/lib/one_msg_sdk/models/initiate_call_response_response.rb +2 -2
  108. data/lib/one_msg_sdk/models/list_blocked_users200_response.rb +2 -2
  109. data/lib/one_msg_sdk/models/list_flows200_response.rb +2 -2
  110. data/lib/one_msg_sdk/models/list_messages200_response.rb +2 -2
  111. data/lib/one_msg_sdk/models/list_settings200_response.rb +352 -0
  112. data/lib/one_msg_sdk/models/list_settings200_response_webhook_url.rb +105 -0
  113. data/lib/one_msg_sdk/models/list_templates200_response.rb +2 -2
  114. data/lib/one_msg_sdk/models/message_sent_response.rb +2 -2
  115. data/lib/one_msg_sdk/models/patch_flows_flow_id_assets200_response.rb +2 -2
  116. data/lib/one_msg_sdk/models/patch_flows_flow_id_assets_request.rb +167 -0
  117. data/lib/one_msg_sdk/models/patch_flows_flow_id_metadata_request.rb +190 -0
  118. data/lib/one_msg_sdk/models/profile_info.rb +2 -2
  119. data/lib/one_msg_sdk/models/remove_template_request.rb +165 -0
  120. data/lib/one_msg_sdk/models/retrieve_media200_response.rb +2 -2
  121. data/lib/one_msg_sdk/models/send_address_message_request.rb +2 -2
  122. data/lib/one_msg_sdk/models/send_button_request.rb +48 -3
  123. data/lib/one_msg_sdk/models/send_button_request_sections_inner.rb +2 -2
  124. data/lib/one_msg_sdk/models/send_button_request_sections_inner_reply.rb +2 -2
  125. data/lib/one_msg_sdk/models/send_carousel_request1.rb +38 -13
  126. data/lib/one_msg_sdk/models/send_contact_info_request.rb +222 -0
  127. data/lib/one_msg_sdk/models/send_contact_request.rb +32 -3
  128. data/lib/one_msg_sdk/models/send_contact_request_contact.rb +221 -0
  129. data/lib/one_msg_sdk/models/send_contact_request_contact_name.rb +105 -0
  130. data/lib/one_msg_sdk/models/send_contact_request_contacts_inner.rb +5 -5
  131. data/lib/one_msg_sdk/models/send_contact_request_contacts_inner_name.rb +2 -2
  132. data/lib/one_msg_sdk/models/send_contact_request_contacts_inner_org.rb +2 -2
  133. data/lib/one_msg_sdk/models/send_contact_request_contacts_inner_phones_inner.rb +3 -2
  134. data/lib/one_msg_sdk/models/send_cta_url_request.rb +2 -2
  135. data/lib/one_msg_sdk/models/send_file_request.rb +2 -2
  136. data/lib/one_msg_sdk/models/send_flow_request1.rb +2 -2
  137. data/lib/one_msg_sdk/models/send_flow_request1_header.rb +2 -2
  138. data/lib/one_msg_sdk/models/send_flow_request_header.rb +2 -2
  139. data/lib/one_msg_sdk/models/send_list_request.rb +23 -3
  140. data/lib/one_msg_sdk/models/send_list_request_sections_inner.rb +2 -2
  141. data/lib/one_msg_sdk/models/send_list_request_sections_inner_rows_inner.rb +2 -2
  142. data/lib/one_msg_sdk/models/send_location_request1.rb +2 -2
  143. data/lib/one_msg_sdk/models/send_location_request_request.rb +23 -3
  144. data/lib/one_msg_sdk/models/send_message_request.rb +60 -28
  145. data/lib/one_msg_sdk/models/send_message_request_direct_send.rb +189 -0
  146. data/lib/one_msg_sdk/models/send_order_details_request.rb +2 -2
  147. data/lib/one_msg_sdk/models/send_order_details_request_language.rb +2 -2
  148. data/lib/one_msg_sdk/models/send_order_details_request_order.rb +2 -2
  149. data/lib/one_msg_sdk/models/send_order_details_request_order_items_inner.rb +2 -2
  150. data/lib/one_msg_sdk/models/send_order_details_request_order_items_inner_amount.rb +2 -2
  151. data/lib/one_msg_sdk/models/send_payment_request_request.rb +2 -2
  152. data/lib/one_msg_sdk/models/send_product_request.rb +225 -0
  153. data/lib/one_msg_sdk/models/send_reaction_request.rb +14 -3
  154. data/lib/one_msg_sdk/models/send_sticker_request.rb +2 -2
  155. data/lib/one_msg_sdk/models/send_template_request.rb +29 -5
  156. data/lib/one_msg_sdk/models/send_template_request_language.rb +6 -2
  157. data/lib/one_msg_sdk/models/set_webhook200_response.rb +157 -0
  158. data/lib/one_msg_sdk/models/set_webhook200_response_webhook_url.rb +105 -0
  159. data/lib/one_msg_sdk/models/set_webhook_request.rb +164 -0
  160. data/lib/one_msg_sdk/models/set_webhook_request_webhook_url.rb +105 -0
  161. data/lib/one_msg_sdk/models/set_whatsapp_business_encryption_request.rb +2 -2
  162. data/lib/one_msg_sdk/models/success_response.rb +2 -2
  163. data/lib/one_msg_sdk/models/update_calling_settings200_response.rb +2 -2
  164. data/lib/one_msg_sdk/models/update_calling_settings200_response_response.rb +2 -2
  165. data/lib/one_msg_sdk/models/update_me200_response.rb +147 -0
  166. data/lib/one_msg_sdk/models/update_me_request.rb +6 -3
  167. data/lib/one_msg_sdk/models/webhook_url_status.rb +287 -0
  168. data/lib/one_msg_sdk/platform_client.rb +182 -0
  169. data/lib/one_msg_sdk/version.rb +3 -3
  170. data/lib/one_msg_sdk.rb +30 -2
  171. data/one_msg_sdk.gemspec +2 -2
  172. data/spec/api/calling_api_spec.rb +3 -3
  173. data/spec/api/catalog_api_spec.rb +3 -3
  174. data/spec/api/channel_api_spec.rb +29 -4
  175. data/spec/api/flows_api_spec.rb +10 -2
  176. data/spec/api/groups_api_spec.rb +10 -2
  177. data/spec/api/messaging_api_spec.rb +37 -9
  178. data/spec/api/profile_api_spec.rb +5 -5
  179. data/spec/api/templates_api_spec.rb +11 -5
  180. data/spec/api/users_api_spec.rb +2 -2
  181. data/spec/api/webhooks_api_spec.rb +6 -6
  182. data/spec/models/add_template200_response_spec.rb +36 -0
  183. data/spec/models/add_template_request_spec.rb +2 -2
  184. data/spec/models/block_user_request_spec.rb +2 -2
  185. data/spec/models/calling_settings_calling_audio_spec.rb +2 -2
  186. data/spec/models/calling_settings_calling_call_hours_spec.rb +2 -2
  187. data/spec/models/calling_settings_calling_sip_servers_inner_spec.rb +2 -2
  188. data/spec/models/calling_settings_calling_sip_spec.rb +2 -2
  189. data/spec/models/calling_settings_calling_spec.rb +2 -2
  190. data/spec/models/calling_settings_calling_video_spec.rb +2 -2
  191. data/spec/models/calling_settings_spec.rb +2 -2
  192. data/spec/models/conversational_automation_commands_inner_spec.rb +2 -2
  193. data/spec/models/conversational_automation_spec.rb +2 -2
  194. data/spec/models/create_commerce200_response_spec.rb +2 -2
  195. data/spec/models/create_commerce_request_params_spec.rb +2 -2
  196. data/spec/models/create_commerce_request_spec.rb +2 -2
  197. data/spec/models/create_flows_request_spec.rb +64 -0
  198. data/spec/models/create_groups200_response_spec.rb +2 -2
  199. data/spec/models/create_groups_group_id_request_spec.rb +48 -0
  200. data/spec/models/create_groups_request_spec.rb +42 -0
  201. data/spec/models/create_read_message200_response_spec.rb +2 -2
  202. data/spec/models/create_read_message401_response_spec.rb +2 -2
  203. data/spec/models/create_read_message_request_spec.rb +2 -2
  204. data/spec/models/create_settings_request_spec.rb +66 -0
  205. data/spec/models/create_settings_request_webhook_url_spec.rb +32 -0
  206. data/spec/models/create_upload_media200_response_spec.rb +36 -0
  207. data/spec/models/create_upload_media_request_spec.rb +42 -0
  208. data/spec/models/delete_flows_flow_id200_response_spec.rb +2 -2
  209. data/spec/models/delete_groups_group_id200_response_spec.rb +2 -2
  210. data/spec/models/delete_media_legacy_request_spec.rb +2 -2
  211. data/spec/models/error_response_spec.rb +2 -2
  212. data/spec/models/get_commerce200_response_inner_spec.rb +2 -2
  213. data/spec/models/get_mm_lite_status200_response_spec.rb +2 -2
  214. data/spec/models/get_status200_response_spec.rb +60 -0
  215. data/spec/models/get_webhook200_response_spec.rb +72 -2
  216. data/spec/models/get_webhook200_response_webhook_url_spec.rb +32 -0
  217. data/spec/models/get_whatsapp_business_encryption200_response_spec.rb +2 -2
  218. data/spec/models/initiate_call_request_session_spec.rb +2 -2
  219. data/spec/models/initiate_call_request_spec.rb +2 -2
  220. data/spec/models/initiate_call_response_calls_inner_spec.rb +2 -2
  221. data/spec/models/initiate_call_response_response_spec.rb +2 -2
  222. data/spec/models/initiate_call_response_spec.rb +2 -2
  223. data/spec/models/list_blocked_users200_response_spec.rb +2 -2
  224. data/spec/models/list_flows200_response_spec.rb +2 -2
  225. data/spec/models/list_messages200_response_spec.rb +2 -2
  226. data/spec/models/list_settings200_response_spec.rb +142 -0
  227. data/spec/models/list_settings200_response_webhook_url_spec.rb +32 -0
  228. data/spec/models/list_templates200_response_spec.rb +2 -2
  229. data/spec/models/message_sent_response_spec.rb +2 -2
  230. data/spec/models/patch_flows_flow_id_assets200_response_spec.rb +2 -2
  231. data/spec/models/patch_flows_flow_id_assets_request_spec.rb +36 -0
  232. data/spec/models/patch_flows_flow_id_metadata_request_spec.rb +52 -0
  233. data/spec/models/profile_info_spec.rb +2 -2
  234. data/spec/models/remove_template_request_spec.rb +36 -0
  235. data/spec/models/retrieve_media200_response_spec.rb +2 -2
  236. data/spec/models/send_address_message_request_spec.rb +2 -2
  237. data/spec/models/send_button_request_sections_inner_reply_spec.rb +2 -2
  238. data/spec/models/send_button_request_sections_inner_spec.rb +2 -2
  239. data/spec/models/send_button_request_spec.rb +26 -2
  240. data/spec/models/send_carousel_request1_spec.rb +8 -2
  241. data/spec/models/send_contact_info_request_spec.rb +60 -0
  242. data/spec/models/send_contact_request_contact_name_spec.rb +32 -0
  243. data/spec/models/send_contact_request_contact_spec.rb +60 -0
  244. data/spec/models/send_contact_request_contacts_inner_name_spec.rb +2 -2
  245. data/spec/models/send_contact_request_contacts_inner_org_spec.rb +2 -2
  246. data/spec/models/send_contact_request_contacts_inner_phones_inner_spec.rb +2 -2
  247. data/spec/models/send_contact_request_contacts_inner_spec.rb +2 -2
  248. data/spec/models/send_contact_request_spec.rb +20 -2
  249. data/spec/models/send_cta_url_request_spec.rb +2 -2
  250. data/spec/models/send_file_request_spec.rb +2 -2
  251. data/spec/models/send_flow_request1_header_spec.rb +2 -2
  252. data/spec/models/send_flow_request1_spec.rb +2 -2
  253. data/spec/models/send_flow_request_header_spec.rb +2 -2
  254. data/spec/models/send_list_request_sections_inner_rows_inner_spec.rb +2 -2
  255. data/spec/models/send_list_request_sections_inner_spec.rb +2 -2
  256. data/spec/models/send_list_request_spec.rb +14 -2
  257. data/spec/models/send_location_request1_spec.rb +2 -2
  258. data/spec/models/send_location_request_request_spec.rb +14 -2
  259. data/spec/models/send_message_request_direct_send_spec.rb +42 -0
  260. data/spec/models/send_message_request_spec.rb +18 -2
  261. data/spec/models/send_order_details_request_language_spec.rb +2 -2
  262. data/spec/models/send_order_details_request_order_items_inner_amount_spec.rb +2 -2
  263. data/spec/models/send_order_details_request_order_items_inner_spec.rb +2 -2
  264. data/spec/models/send_order_details_request_order_spec.rb +2 -2
  265. data/spec/models/send_order_details_request_spec.rb +2 -2
  266. data/spec/models/send_payment_request_request_spec.rb +2 -2
  267. data/spec/models/send_product_request_spec.rb +72 -0
  268. data/spec/models/send_reaction_request_spec.rb +8 -2
  269. data/spec/models/send_sticker_request_spec.rb +2 -2
  270. data/spec/models/send_template_request_language_spec.rb +2 -2
  271. data/spec/models/send_template_request_spec.rb +14 -2
  272. data/spec/models/set_webhook200_response_spec.rb +42 -0
  273. data/spec/models/set_webhook200_response_webhook_url_spec.rb +32 -0
  274. data/spec/models/set_webhook_request_spec.rb +36 -0
  275. data/spec/models/set_webhook_request_webhook_url_spec.rb +32 -0
  276. data/spec/models/set_whatsapp_business_encryption_request_spec.rb +2 -2
  277. data/spec/models/success_response_spec.rb +2 -2
  278. data/spec/models/update_calling_settings200_response_response_spec.rb +2 -2
  279. data/spec/models/update_calling_settings200_response_spec.rb +2 -2
  280. data/spec/models/update_me200_response_spec.rb +36 -0
  281. data/spec/models/update_me_request_spec.rb +2 -2
  282. data/spec/models/webhook_url_status_spec.rb +88 -0
  283. data/spec/spec_helper.rb +2 -2
  284. metadata +204 -31
data/docs/WebhooksApi.md CHANGED
@@ -14,7 +14,7 @@ All URIs are relative to *https://api.1msg.io*
14
14
 
15
15
  Get webhook URL
16
16
 
17
- Returns the configured client webhook URL for this channel.
17
+ Return the webhook URL(s) currently configured for this channel, plus delivery status for each URL. `webhookUrl` is a string when a single URL is set, an array of strings when multiple URLs are configured, or `null` if none is set. **Prefer `webhookStatuses`.** The circuit breaker is per URL, not per channel. If 1 of 4 URLs is sticky-disabled, that URL is skipped; the other three still receive events. Send/receive are not affected. Channel-level `haveDisabledWebhooks`, `circuitState`, `reason`, `fails`, `trips`, and timestamps are a compatibility summary of **one** URL (the first sticky-disabled URL, else the first configured URL). They are not \"the channel is dead\". - `haveDisabledWebhooks` — `true` when **at least one** URL in `webhookUrl` is sticky auto-disabled. Live URLs still get events. - `circuitState` — compressed scalar for that same primary URL: `ok` | `degraded` | `open` | `half_open` | `disabled`. - `disabledWebhooks` — currently configured URLs that are sticky-disabled (subset of `webhookUrl`). - `webhookStatuses` — one row per currently configured URL. Use this array to see which endpoints are live vs skipped. - `fails` / `trips` / `firstFailAt` — **diagnostics for support**, not product UI. `fails` = failures in a rolling ~10 minute window (not lifetime). `trips` = failed recovery probes on the 15 min → 1 h → 6 h schedule (sticky disable after 3). Clients can ignore these and use `webhookStatuses` + `disabledWebhooks` only. Sticky disable skips delivery; it does not unconfigure the URL (it stays in `webhookUrl`). Re-enable with `POST /webhook` or `POST /settings`. Those endpoints **replace** the whole list — with multiple URLs, send the full array.
18
18
 
19
19
  ### Examples
20
20
 
@@ -81,11 +81,11 @@ end
81
81
 
82
82
  ## set_webhook
83
83
 
84
- > Hash<String, Object> set_webhook(token, opts)
84
+ > <SetWebhook200Response> set_webhook(token, set_webhook_request)
85
85
 
86
86
  Set webhook URL
87
87
 
88
- Configure the client webhook URL for inbound events. WhatsApp **Calling** events (`field=calls`) are forwarded as passthrough payloads with `type: \"calls\"` and `instanceId` (connect / status / terminate). Call permission replies arrive on the normal messages path (`call_permission_reply`). Details: **Calling** tag.
88
+ Set the client webhook URL that receives inbound events for this channel. **Replaces** the stored webhook list (it does not append). To deliver the same events to several endpoints, pass an array in `webhookUrl` (max 5) or use `POST /settings`. With several URLs already configured, posting only the disabled URL **drops the others** — send the complete array to re-enable one of many. Incoming payloads include messages, delivery ACKs, group updates, coexistence echoes, and calling events. WhatsApp Calling payloads (`type: \"calls\"`) are documented under the **Calling** tag. Call permission replies arrive on the normal messages path (`call_permission_reply`). Repeating `POST /webhook` with the same URL(s) clears an auto-disable (self-serve re-enable). Send/receive are not affected by webhook auto-disable.
89
89
 
90
90
  ### Examples
91
91
 
@@ -102,13 +102,11 @@ end
102
102
 
103
103
  api_instance = OneMsgSdk::WebhooksApi.new
104
104
  token = 'token_example' # String | JWT token or API key for authorization
105
- opts = {
106
- get_webhook200_response: OneMsgSdk::GetWebhook200Response.new # GetWebhook200Response |
107
- }
105
+ set_webhook_request = OneMsgSdk::SetWebhookRequest.new({webhook_url: nil}) # SetWebhookRequest |
108
106
 
109
107
  begin
110
108
  # Set webhook URL
111
- result = api_instance.set_webhook(token, opts)
109
+ result = api_instance.set_webhook(token, set_webhook_request)
112
110
  p result
113
111
  rescue OneMsgSdk::ApiError => e
114
112
  puts "Error when calling WebhooksApi->set_webhook: #{e}"
@@ -119,15 +117,15 @@ end
119
117
 
120
118
  This returns an Array which contains the response data, status code and headers.
121
119
 
122
- > <Array(Hash&lt;String, Object&gt;, Integer, Hash)> set_webhook_with_http_info(token, opts)
120
+ > <Array(<SetWebhook200Response>, Integer, Hash)> set_webhook_with_http_info(token, set_webhook_request)
123
121
 
124
122
  ```ruby
125
123
  begin
126
124
  # Set webhook URL
127
- data, status_code, headers = api_instance.set_webhook_with_http_info(token, opts)
125
+ data, status_code, headers = api_instance.set_webhook_with_http_info(token, set_webhook_request)
128
126
  p status_code # => 2xx
129
127
  p headers # => { ... }
130
- p data # => Hash&lt;String, Object&gt;
128
+ p data # => <SetWebhook200Response>
131
129
  rescue OneMsgSdk::ApiError => e
132
130
  puts "Error when calling WebhooksApi->set_webhook_with_http_info: #{e}"
133
131
  end
@@ -138,11 +136,11 @@ end
138
136
  | Name | Type | Description | Notes |
139
137
  | ---- | ---- | ----------- | ----- |
140
138
  | **token** | **String** | JWT token or API key for authorization | |
141
- | **get_webhook200_response** | [**GetWebhook200Response**](GetWebhook200Response.md) | | [optional] |
139
+ | **set_webhook_request** | [**SetWebhookRequest**](SetWebhookRequest.md) | | |
142
140
 
143
141
  ### Return type
144
142
 
145
- **Hash&lt;String, Object&gt;**
143
+ [**SetWebhook200Response**](SetWebhook200Response.md)
146
144
 
147
145
  ### Authorization
148
146
 
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #1MSG WhatsApp Business API (Public)
3
3
 
4
- #Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/
4
+ #Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** Pass the channel token in **one** place. The API checks JSON body (`token`), then query string (`?token=`), then `Authorization: Bearer` header (preferred in production). **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/
5
5
 
6
- The version of the OpenAPI document: 1.0.0
6
+ The version of the OpenAPI document: 2.0.0
7
7
  Contact: support@1msg.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -84,7 +84,7 @@ module OneMsgSdk
84
84
  end
85
85
 
86
86
  # Call action (connect / pre_accept / accept / reject / terminate)
87
- # Perform a WhatsApp Calling action (beta). Proxies upstream `POST /calling/calls`. Despite the historical path name `/initiateCall`, this endpoint handles **all** call actions: | action | Use | Required | |--------|-----|----------| | `connect` | Outbound business → user | `to` + `session` (`sdp_type: offer`) | | `pre_accept` | Inbound (optional, reduces audio clipping) | `call_id` + `session` (`sdp_type: answer`) | | `accept` | Inbound answer | `call_id` + `session` (`sdp_type: answer`) | | `reject` | Decline inbound | `call_id` | | `terminate` | Hang up | `call_id` | **SDP / media (critical)** - `accept` / `pre_accept` require a **WebRTC-generated SDP answer**. - Do **not** send Meta's offer SDP back as the answer. - Postman (or curl) alone **cannot** establish real media — you need a WebRTC or SIP stack. 1msg only proxies signaling. Answer within ~**30–60 seconds** of an inbound `connect` webhook or Meta terminates as unanswered. Common Meta errors include Calling not enabled (`138000`), no permission (`138006`), SDP validation failures. **Outbound** requires a prior Call Permission Request (CPR) acceptance. See the **Calling** tag overview for the full outbound flow and CPR limits. Trial / `subscriptionBlocked` → **403** plain text. Upstream failures often return HTTP 200 with `{ \"response\": { \"error\": \"...\" } }`.
87
+ # Perform a WhatsApp Calling action (beta). Proxies upstream `POST /calling/calls`. Despite the historical path name `/initiateCall`, this endpoint handles **all** call actions: | action | Use | Required | |--------|-----|----------| | `connect` | Outbound business → user | `to` + `session` (`sdp_type: offer`) | | `pre_accept` | Inbound (optional, reduces audio clipping) | `call_id` + `session` (`sdp_type: answer`) | | `accept` | Inbound answer | `call_id` + `session` (`sdp_type: answer`) | | `reject` | Decline inbound | `call_id` | | `terminate` | Hang up | `call_id` | **SDP / media (critical)** - `accept` / `pre_accept` require a **WebRTC-generated SDP answer**. - Do **not** send Meta's offer SDP back as the answer. - Postman (or curl) alone **cannot** establish real media — you need a WebRTC or SIP stack. 1msg only proxies signaling. Answer within ~**30–60 seconds** of an inbound `connect` webhook or Meta terminates as unanswered. Common Meta errors include Calling not enabled (`138000`), no permission (`138006`), SDP validation failures. **Outbound** requires a prior Call Permission Request (CPR) acceptance. See the **Calling** tag overview for the full outbound flow and CPR limits. Trial / `subscriptionBlocked` → **403** plain text. Upstream failures often return HTTP 200 with `{ \"response\": { \"error\": \"<upstream message>\" } }`. `Invalid API KEY` is used only when Meta/360 body actually indicates an invalid API key or token. Other upstream 401s (notably call permission `138006`) pass through `error.message` / `error_user_msg`.
88
88
  # @param token [String] JWT token or API key for authorization
89
89
  # @param initiate_call_request [InitiateCallRequest]
90
90
  # @param [Hash] opts the optional parameters
@@ -95,7 +95,7 @@ module OneMsgSdk
95
95
  end
96
96
 
97
97
  # Call action (connect / pre_accept / accept / reject / terminate)
98
- # Perform a WhatsApp Calling action (beta). Proxies upstream &#x60;POST /calling/calls&#x60;. Despite the historical path name &#x60;/initiateCall&#x60;, this endpoint handles **all** call actions: | action | Use | Required | |--------|-----|----------| | &#x60;connect&#x60; | Outbound business → user | &#x60;to&#x60; + &#x60;session&#x60; (&#x60;sdp_type: offer&#x60;) | | &#x60;pre_accept&#x60; | Inbound (optional, reduces audio clipping) | &#x60;call_id&#x60; + &#x60;session&#x60; (&#x60;sdp_type: answer&#x60;) | | &#x60;accept&#x60; | Inbound answer | &#x60;call_id&#x60; + &#x60;session&#x60; (&#x60;sdp_type: answer&#x60;) | | &#x60;reject&#x60; | Decline inbound | &#x60;call_id&#x60; | | &#x60;terminate&#x60; | Hang up | &#x60;call_id&#x60; | **SDP / media (critical)** - &#x60;accept&#x60; / &#x60;pre_accept&#x60; require a **WebRTC-generated SDP answer**. - Do **not** send Meta&#39;s offer SDP back as the answer. - Postman (or curl) alone **cannot** establish real media — you need a WebRTC or SIP stack. 1msg only proxies signaling. Answer within ~**30–60 seconds** of an inbound &#x60;connect&#x60; webhook or Meta terminates as unanswered. Common Meta errors include Calling not enabled (&#x60;138000&#x60;), no permission (&#x60;138006&#x60;), SDP validation failures. **Outbound** requires a prior Call Permission Request (CPR) acceptance. See the **Calling** tag overview for the full outbound flow and CPR limits. Trial / &#x60;subscriptionBlocked&#x60; → **403** plain text. Upstream failures often return HTTP 200 with &#x60;{ \&quot;response\&quot;: { \&quot;error\&quot;: \&quot;...\&quot; } }&#x60;.
98
+ # Perform a WhatsApp Calling action (beta). Proxies upstream &#x60;POST /calling/calls&#x60;. Despite the historical path name &#x60;/initiateCall&#x60;, this endpoint handles **all** call actions: | action | Use | Required | |--------|-----|----------| | &#x60;connect&#x60; | Outbound business → user | &#x60;to&#x60; + &#x60;session&#x60; (&#x60;sdp_type: offer&#x60;) | | &#x60;pre_accept&#x60; | Inbound (optional, reduces audio clipping) | &#x60;call_id&#x60; + &#x60;session&#x60; (&#x60;sdp_type: answer&#x60;) | | &#x60;accept&#x60; | Inbound answer | &#x60;call_id&#x60; + &#x60;session&#x60; (&#x60;sdp_type: answer&#x60;) | | &#x60;reject&#x60; | Decline inbound | &#x60;call_id&#x60; | | &#x60;terminate&#x60; | Hang up | &#x60;call_id&#x60; | **SDP / media (critical)** - &#x60;accept&#x60; / &#x60;pre_accept&#x60; require a **WebRTC-generated SDP answer**. - Do **not** send Meta&#39;s offer SDP back as the answer. - Postman (or curl) alone **cannot** establish real media — you need a WebRTC or SIP stack. 1msg only proxies signaling. Answer within ~**30–60 seconds** of an inbound &#x60;connect&#x60; webhook or Meta terminates as unanswered. Common Meta errors include Calling not enabled (&#x60;138000&#x60;), no permission (&#x60;138006&#x60;), SDP validation failures. **Outbound** requires a prior Call Permission Request (CPR) acceptance. See the **Calling** tag overview for the full outbound flow and CPR limits. Trial / &#x60;subscriptionBlocked&#x60; → **403** plain text. Upstream failures often return HTTP 200 with &#x60;{ \&quot;response\&quot;: { \&quot;error\&quot;: \&quot;&lt;upstream message&gt;\&quot; } }&#x60;. &#x60;Invalid API KEY&#x60; is used only when Meta/360 body actually indicates an invalid API key or token. Other upstream 401s (notably call permission &#x60;138006&#x60;) pass through &#x60;error.message&#x60; / &#x60;error_user_msg&#x60;.
99
99
  # @param token [String] JWT token or API key for authorization
100
100
  # @param initiate_call_request [InitiateCallRequest]
101
101
  # @param [Hash] opts the optional parameters
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #1MSG WhatsApp Business API (Public)
3
3
 
4
- #Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/
4
+ #Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** Pass the channel token in **one** place. The API checks JSON body (`token`), then query string (`?token=`), then `Authorization: Bearer` header (preferred in production). **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/
5
5
 
6
- The version of the OpenAPI document: 1.0.0
6
+ The version of the OpenAPI document: 2.0.0
7
7
  Contact: support@1msg.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -95,7 +95,7 @@ module OneMsgSdk
95
95
  end
96
96
 
97
97
  # Get Commerce Settings
98
- # Returns catalog/cart commerce settings for the channel. - `is_catalog_visible` — show catalog storefront icon (`true`) or hide it (`false`). - `is_cart_enabled` — enable cart (`true`) or disable it (`false`).
98
+ # Returns catalog/cart commerce settings for the channel. Fails with a provider error when the WABA has no catalog linked — that is an API/account limitation, not an MCP schema bug. - `is_catalog_visible` — show catalog storefront icon (`true`) or hide it (`false`). - `is_cart_enabled` — enable cart (`true`) or disable it (`false`).
99
99
  # @param token [String] JWT token or API key for authorization
100
100
  # @param [Hash] opts the optional parameters
101
101
  # @return [Array<GetCommerce200ResponseInner>]
@@ -105,7 +105,7 @@ module OneMsgSdk
105
105
  end
106
106
 
107
107
  # Get Commerce Settings
108
- # Returns catalog/cart commerce settings for the channel. - &#x60;is_catalog_visible&#x60; — show catalog storefront icon (&#x60;true&#x60;) or hide it (&#x60;false&#x60;). - &#x60;is_cart_enabled&#x60; — enable cart (&#x60;true&#x60;) or disable it (&#x60;false&#x60;).
108
+ # Returns catalog/cart commerce settings for the channel. Fails with a provider error when the WABA has no catalog linked — that is an API/account limitation, not an MCP schema bug. - &#x60;is_catalog_visible&#x60; — show catalog storefront icon (&#x60;true&#x60;) or hide it (&#x60;false&#x60;). - &#x60;is_cart_enabled&#x60; — enable cart (&#x60;true&#x60;) or disable it (&#x60;false&#x60;).
109
109
  # @param token [String] JWT token or API key for authorization
110
110
  # @param [Hash] opts the optional parameters
111
111
  # @return [Array<(Array<GetCommerce200ResponseInner>, Integer, Hash)>] Array<GetCommerce200ResponseInner> data, response status code and response headers
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #1MSG WhatsApp Business API (Public)
3
3
 
4
- #Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/
4
+ #Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** Pass the channel token in **one** place. The API checks JSON body (`token`), then query string (`?token=`), then `Authorization: Bearer` header (preferred in production). **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/
5
5
 
6
- The version of the OpenAPI document: 1.0.0
6
+ The version of the OpenAPI document: 2.0.0
7
7
  Contact: support@1msg.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -19,6 +19,81 @@ module OneMsgSdk
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
+ # Update channel settings
23
+ # Update channel settings. Only send fields you want to change. `webhookUrl` **replaces** the stored list (one URL string, or up to 5 URLs as an array). Passing an empty value clears webhooks. Repeating the same URL(s) also clears a sticky auto-disable. With several URLs, send the complete array to re-enable one of them — omitting a URL removes it from the channel.
24
+ # @param token [String] JWT token or API key for authorization
25
+ # @param create_settings_request [CreateSettingsRequest]
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [Hash<String, Object>]
28
+ def create_settings(token, create_settings_request, opts = {})
29
+ data, _status_code, _headers = create_settings_with_http_info(token, create_settings_request, opts)
30
+ data
31
+ end
32
+
33
+ # Update channel settings
34
+ # Update channel settings. Only send fields you want to change. &#x60;webhookUrl&#x60; **replaces** the stored list (one URL string, or up to 5 URLs as an array). Passing an empty value clears webhooks. Repeating the same URL(s) also clears a sticky auto-disable. With several URLs, send the complete array to re-enable one of them — omitting a URL removes it from the channel.
35
+ # @param token [String] JWT token or API key for authorization
36
+ # @param create_settings_request [CreateSettingsRequest]
37
+ # @param [Hash] opts the optional parameters
38
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
39
+ def create_settings_with_http_info(token, create_settings_request, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: ChannelApi.create_settings ...'
42
+ end
43
+ # verify the required parameter 'token' is set
44
+ if @api_client.config.client_side_validation && token.nil?
45
+ fail ArgumentError, "Missing the required parameter 'token' when calling ChannelApi.create_settings"
46
+ end
47
+ # verify the required parameter 'create_settings_request' is set
48
+ if @api_client.config.client_side_validation && create_settings_request.nil?
49
+ fail ArgumentError, "Missing the required parameter 'create_settings_request' when calling ChannelApi.create_settings"
50
+ end
51
+ # resource path
52
+ local_var_path = '/settings'
53
+
54
+ # query parameters
55
+ query_params = opts[:query_params] || {}
56
+ query_params[:'token'] = token
57
+
58
+ # header parameters
59
+ header_params = opts[:header_params] || {}
60
+ # HTTP header 'Accept' (if needed)
61
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
62
+ # HTTP header 'Content-Type'
63
+ content_type = @api_client.select_header_content_type(['application/json'])
64
+ if !content_type.nil?
65
+ header_params['Content-Type'] = content_type
66
+ end
67
+
68
+ # form parameters
69
+ form_params = opts[:form_params] || {}
70
+
71
+ # http body (model)
72
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_settings_request)
73
+
74
+ # return_type
75
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
76
+
77
+ # auth_names
78
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
79
+
80
+ new_options = opts.merge(
81
+ :operation => :"ChannelApi.create_settings",
82
+ :header_params => header_params,
83
+ :query_params => query_params,
84
+ :form_params => form_params,
85
+ :body => post_body,
86
+ :auth_names => auth_names,
87
+ :return_type => return_type
88
+ )
89
+
90
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
91
+ if @api_client.config.debugging
92
+ @api_client.config.logger.debug "API called: ChannelApi#create_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
93
+ end
94
+ return data, status_code, headers
95
+ end
96
+
22
97
  # Get conversational automation settings
23
98
  # Get WhatsApp conversational components for the channel (welcome message, ice-breaker prompts, and slash commands). Proxies Meta/360dialog `GET /conversational_automation`. When `enable_welcome_message` is true and a user opens chat for the first time, Meta delivers a webhook message with `type: request_welcome`. The inbound formatter exposes that as `type: \"request_welcome\"` and `meta.request_welcome: true` so your webhook can send a custom welcome reply.
24
99
  # @param token [String] JWT token or API key for authorization
@@ -84,20 +159,20 @@ module OneMsgSdk
84
159
  end
85
160
 
86
161
  # Get channel status
87
- # Returns WhatsApp Business API client connection status.
162
+ # Return WhatsApp Cloud API connection status for this channel (`connected` when the number can send). May include `accountStatus`, messaging limit, and MM Lite availability. Optional `health_status_warning` appears only when Meta Graph health could not be loaded and a soft `connected` response is returned. Omitted on the normal path and when health details are not applicable for the channel — never an internal provider/transport name.
88
163
  # @param token [String] JWT token or API key for authorization
89
164
  # @param [Hash] opts the optional parameters
90
- # @return [Hash<String, Object>]
165
+ # @return [GetStatus200Response]
91
166
  def get_status(token, opts = {})
92
167
  data, _status_code, _headers = get_status_with_http_info(token, opts)
93
168
  data
94
169
  end
95
170
 
96
171
  # Get channel status
97
- # Returns WhatsApp Business API client connection status.
172
+ # Return WhatsApp Cloud API connection status for this channel (&#x60;connected&#x60; when the number can send). May include &#x60;accountStatus&#x60;, messaging limit, and MM Lite availability. Optional &#x60;health_status_warning&#x60; appears only when Meta Graph health could not be loaded and a soft &#x60;connected&#x60; response is returned. Omitted on the normal path and when health details are not applicable for the channel — never an internal provider/transport name.
98
173
  # @param token [String] JWT token or API key for authorization
99
174
  # @param [Hash] opts the optional parameters
100
- # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
175
+ # @return [Array<(GetStatus200Response, Integer, Hash)>] GetStatus200Response data, response status code and response headers
101
176
  def get_status_with_http_info(token, opts = {})
102
177
  if @api_client.config.debugging
103
178
  @api_client.config.logger.debug 'Calling API: ChannelApi.get_status ...'
@@ -125,7 +200,7 @@ module OneMsgSdk
125
200
  post_body = opts[:debug_body]
126
201
 
127
202
  # return_type
128
- return_type = opts[:debug_return_type] || 'Hash<String, Object>'
203
+ return_type = opts[:debug_return_type] || 'GetStatus200Response'
129
204
 
130
205
  # auth_names
131
206
  auth_names = opts[:debug_auth_names] || ['tokenAuth']
@@ -147,6 +222,70 @@ module OneMsgSdk
147
222
  return data, status_code, headers
148
223
  end
149
224
 
225
+ # Get channel settings
226
+ # Return channel settings: webhook URL(s), delivery flags, and analytics toggles. Auto-disable / circuit state matches `GET /webhook`. **Prefer `webhookStatuses`** (one row per configured URL). The breaker is per URL, not per channel. Channel-level `haveDisabledWebhooks` is `true` when **at least one** URL in `webhookUrl` is sticky auto-disabled — not \"the channel is dead\". Live URLs still receive events. Top-level `circuitState` / `reason` / `fails` / `trips` are a compatibility summary of one URL (first sticky-disabled, else first configured). This is the same `GET /settings` endpoint as the REST API (previously missing from MCP).
227
+ # @param token [String] JWT token or API key for authorization
228
+ # @param [Hash] opts the optional parameters
229
+ # @return [ListSettings200Response]
230
+ def list_settings(token, opts = {})
231
+ data, _status_code, _headers = list_settings_with_http_info(token, opts)
232
+ data
233
+ end
234
+
235
+ # Get channel settings
236
+ # Return channel settings: webhook URL(s), delivery flags, and analytics toggles. Auto-disable / circuit state matches &#x60;GET /webhook&#x60;. **Prefer &#x60;webhookStatuses&#x60;** (one row per configured URL). The breaker is per URL, not per channel. Channel-level &#x60;haveDisabledWebhooks&#x60; is &#x60;true&#x60; when **at least one** URL in &#x60;webhookUrl&#x60; is sticky auto-disabled — not \&quot;the channel is dead\&quot;. Live URLs still receive events. Top-level &#x60;circuitState&#x60; / &#x60;reason&#x60; / &#x60;fails&#x60; / &#x60;trips&#x60; are a compatibility summary of one URL (first sticky-disabled, else first configured). This is the same &#x60;GET /settings&#x60; endpoint as the REST API (previously missing from MCP).
237
+ # @param token [String] JWT token or API key for authorization
238
+ # @param [Hash] opts the optional parameters
239
+ # @return [Array<(ListSettings200Response, Integer, Hash)>] ListSettings200Response data, response status code and response headers
240
+ def list_settings_with_http_info(token, opts = {})
241
+ if @api_client.config.debugging
242
+ @api_client.config.logger.debug 'Calling API: ChannelApi.list_settings ...'
243
+ end
244
+ # verify the required parameter 'token' is set
245
+ if @api_client.config.client_side_validation && token.nil?
246
+ fail ArgumentError, "Missing the required parameter 'token' when calling ChannelApi.list_settings"
247
+ end
248
+ # resource path
249
+ local_var_path = '/settings'
250
+
251
+ # query parameters
252
+ query_params = opts[:query_params] || {}
253
+ query_params[:'token'] = token
254
+
255
+ # header parameters
256
+ header_params = opts[:header_params] || {}
257
+ # HTTP header 'Accept' (if needed)
258
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
259
+
260
+ # form parameters
261
+ form_params = opts[:form_params] || {}
262
+
263
+ # http body (model)
264
+ post_body = opts[:debug_body]
265
+
266
+ # return_type
267
+ return_type = opts[:debug_return_type] || 'ListSettings200Response'
268
+
269
+ # auth_names
270
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
271
+
272
+ new_options = opts.merge(
273
+ :operation => :"ChannelApi.list_settings",
274
+ :header_params => header_params,
275
+ :query_params => query_params,
276
+ :form_params => form_params,
277
+ :body => post_body,
278
+ :auth_names => auth_names,
279
+ :return_type => return_type
280
+ )
281
+
282
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
283
+ if @api_client.config.debugging
284
+ @api_client.config.logger.debug "API called: ChannelApi#list_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
285
+ end
286
+ return data, status_code, headers
287
+ end
288
+
150
289
  # Set conversational automation settings
151
290
  # Update WhatsApp conversational components. Allowed body fields (others are ignored): - `enable_welcome_message` (boolean) - `prompts` (string[], max 4, each ≤ 80 chars) - `commands` (`{ command_name, command_description }[]`) Proxies Meta/360dialog `POST /conversational_automation`.
152
291
  # @param token [String] JWT token or API key for authorization
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #1MSG WhatsApp Business API (Public)
3
3
 
4
- #Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/
4
+ #Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** Pass the channel token in **one** place. The API checks JSON body (`token`), then query string (`?token=`), then `Authorization: Bearer` header (preferred in production). **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/
5
5
 
6
- The version of the OpenAPI document: 1.0.0
6
+ The version of the OpenAPI document: 2.0.0
7
7
  Contact: support@1msg.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -20,21 +20,25 @@ module OneMsgSdk
20
20
  @api_client = api_client
21
21
  end
22
22
  # Create Flow
23
+ # Create a WhatsApp Flow (`name` + `categories` required). Currently returns HTTP 501 until the Meta Graph Flows rewrite is available.
23
24
  # @param token [String] JWT token or API key for authorization
25
+ # @param create_flows_request [CreateFlowsRequest]
24
26
  # @param [Hash] opts the optional parameters
25
27
  # @option opts [String] :waba_account_id
26
28
  # @return [CreateGroups200Response]
27
- def create_flows(token, opts = {})
28
- data, _status_code, _headers = create_flows_with_http_info(token, opts)
29
+ def create_flows(token, create_flows_request, opts = {})
30
+ data, _status_code, _headers = create_flows_with_http_info(token, create_flows_request, opts)
29
31
  data
30
32
  end
31
33
 
32
34
  # Create Flow
35
+ # Create a WhatsApp Flow (&#x60;name&#x60; + &#x60;categories&#x60; required). Currently returns HTTP 501 until the Meta Graph Flows rewrite is available.
33
36
  # @param token [String] JWT token or API key for authorization
37
+ # @param create_flows_request [CreateFlowsRequest]
34
38
  # @param [Hash] opts the optional parameters
35
39
  # @option opts [String] :waba_account_id
36
40
  # @return [Array<(CreateGroups200Response, Integer, Hash)>] CreateGroups200Response data, response status code and response headers
37
- def create_flows_with_http_info(token, opts = {})
41
+ def create_flows_with_http_info(token, create_flows_request, opts = {})
38
42
  if @api_client.config.debugging
39
43
  @api_client.config.logger.debug 'Calling API: FlowsApi.create_flows ...'
40
44
  end
@@ -42,6 +46,10 @@ module OneMsgSdk
42
46
  if @api_client.config.client_side_validation && token.nil?
43
47
  fail ArgumentError, "Missing the required parameter 'token' when calling FlowsApi.create_flows"
44
48
  end
49
+ # verify the required parameter 'create_flows_request' is set
50
+ if @api_client.config.client_side_validation && create_flows_request.nil?
51
+ fail ArgumentError, "Missing the required parameter 'create_flows_request' when calling FlowsApi.create_flows"
52
+ end
45
53
  # resource path
46
54
  local_var_path = '/flows'
47
55
 
@@ -54,12 +62,17 @@ module OneMsgSdk
54
62
  header_params = opts[:header_params] || {}
55
63
  # HTTP header 'Accept' (if needed)
56
64
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
65
+ # HTTP header 'Content-Type'
66
+ content_type = @api_client.select_header_content_type(['application/json'])
67
+ if !content_type.nil?
68
+ header_params['Content-Type'] = content_type
69
+ end
57
70
 
58
71
  # form parameters
59
72
  form_params = opts[:form_params] || {}
60
73
 
61
74
  # http body (model)
62
- post_body = opts[:debug_body]
75
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_flows_request)
63
76
 
64
77
  # return_type
65
78
  return_type = opts[:debug_return_type] || 'CreateGroups200Response'
@@ -504,9 +517,11 @@ module OneMsgSdk
504
517
  end
505
518
 
506
519
  # List Flows
520
+ # List WhatsApp Flows for the WABA. Currently returns HTTP 501 until the Meta Graph Flows rewrite is available.
507
521
  # @param token [String] JWT token or API key for authorization
508
522
  # @param [Hash] opts the optional parameters
509
523
  # @option opts [String] :waba_account_id
524
+ # @option opts [String] :fields Comma-separated Flow fields to return
510
525
  # @return [ListFlows200Response]
511
526
  def list_flows(token, opts = {})
512
527
  data, _status_code, _headers = list_flows_with_http_info(token, opts)
@@ -514,9 +529,11 @@ module OneMsgSdk
514
529
  end
515
530
 
516
531
  # List Flows
532
+ # List WhatsApp Flows for the WABA. Currently returns HTTP 501 until the Meta Graph Flows rewrite is available.
517
533
  # @param token [String] JWT token or API key for authorization
518
534
  # @param [Hash] opts the optional parameters
519
535
  # @option opts [String] :waba_account_id
536
+ # @option opts [String] :fields Comma-separated Flow fields to return
520
537
  # @return [Array<(ListFlows200Response, Integer, Hash)>] ListFlows200Response data, response status code and response headers
521
538
  def list_flows_with_http_info(token, opts = {})
522
539
  if @api_client.config.debugging
@@ -533,6 +550,7 @@ module OneMsgSdk
533
550
  query_params = opts[:query_params] || {}
534
551
  query_params[:'token'] = token
535
552
  query_params[:'wabaAccountId'] = opts[:'waba_account_id'] if !opts[:'waba_account_id'].nil?
553
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
536
554
 
537
555
  # header parameters
538
556
  header_params = opts[:header_params] || {}
@@ -569,23 +587,27 @@ module OneMsgSdk
569
587
  end
570
588
 
571
589
  # Update Flow Structure
590
+ # Replace the Flow JSON document (`flowJson`). Currently returns HTTP 501 until the Meta Graph Flows rewrite is available.
572
591
  # @param flow_id [String] Flow ID
573
592
  # @param token [String] JWT token or API key for authorization
593
+ # @param patch_flows_flow_id_assets_request [PatchFlowsFlowIdAssetsRequest]
574
594
  # @param [Hash] opts the optional parameters
575
595
  # @option opts [String] :waba_account_id
576
596
  # @return [PatchFlowsFlowIdAssets200Response]
577
- def patch_flows_flow_id_assets(flow_id, token, opts = {})
578
- data, _status_code, _headers = patch_flows_flow_id_assets_with_http_info(flow_id, token, opts)
597
+ def patch_flows_flow_id_assets(flow_id, token, patch_flows_flow_id_assets_request, opts = {})
598
+ data, _status_code, _headers = patch_flows_flow_id_assets_with_http_info(flow_id, token, patch_flows_flow_id_assets_request, opts)
579
599
  data
580
600
  end
581
601
 
582
602
  # Update Flow Structure
603
+ # Replace the Flow JSON document (&#x60;flowJson&#x60;). Currently returns HTTP 501 until the Meta Graph Flows rewrite is available.
583
604
  # @param flow_id [String] Flow ID
584
605
  # @param token [String] JWT token or API key for authorization
606
+ # @param patch_flows_flow_id_assets_request [PatchFlowsFlowIdAssetsRequest]
585
607
  # @param [Hash] opts the optional parameters
586
608
  # @option opts [String] :waba_account_id
587
609
  # @return [Array<(PatchFlowsFlowIdAssets200Response, Integer, Hash)>] PatchFlowsFlowIdAssets200Response data, response status code and response headers
588
- def patch_flows_flow_id_assets_with_http_info(flow_id, token, opts = {})
610
+ def patch_flows_flow_id_assets_with_http_info(flow_id, token, patch_flows_flow_id_assets_request, opts = {})
589
611
  if @api_client.config.debugging
590
612
  @api_client.config.logger.debug 'Calling API: FlowsApi.patch_flows_flow_id_assets ...'
591
613
  end
@@ -597,6 +619,10 @@ module OneMsgSdk
597
619
  if @api_client.config.client_side_validation && token.nil?
598
620
  fail ArgumentError, "Missing the required parameter 'token' when calling FlowsApi.patch_flows_flow_id_assets"
599
621
  end
622
+ # verify the required parameter 'patch_flows_flow_id_assets_request' is set
623
+ if @api_client.config.client_side_validation && patch_flows_flow_id_assets_request.nil?
624
+ fail ArgumentError, "Missing the required parameter 'patch_flows_flow_id_assets_request' when calling FlowsApi.patch_flows_flow_id_assets"
625
+ end
600
626
  # resource path
601
627
  local_var_path = '/flows/{flowId}/assets'.sub('{flowId}', CGI.escape(flow_id.to_s))
602
628
 
@@ -609,12 +635,17 @@ module OneMsgSdk
609
635
  header_params = opts[:header_params] || {}
610
636
  # HTTP header 'Accept' (if needed)
611
637
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
638
+ # HTTP header 'Content-Type'
639
+ content_type = @api_client.select_header_content_type(['application/json'])
640
+ if !content_type.nil?
641
+ header_params['Content-Type'] = content_type
642
+ end
612
643
 
613
644
  # form parameters
614
645
  form_params = opts[:form_params] || {}
615
646
 
616
647
  # http body (model)
617
- post_body = opts[:debug_body]
648
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(patch_flows_flow_id_assets_request)
618
649
 
619
650
  # return_type
620
651
  return_type = opts[:debug_return_type] || 'PatchFlowsFlowIdAssets200Response'
@@ -640,23 +671,27 @@ module OneMsgSdk
640
671
  end
641
672
 
642
673
  # Update Flow Metadata
674
+ # Update Flow `name`, `categories`, and/or `endpointUri`. Currently returns HTTP 501 until the Meta Graph Flows rewrite is available.
643
675
  # @param flow_id [String] Flow ID
644
676
  # @param token [String] JWT token or API key for authorization
677
+ # @param patch_flows_flow_id_metadata_request [PatchFlowsFlowIdMetadataRequest]
645
678
  # @param [Hash] opts the optional parameters
646
679
  # @option opts [String] :waba_account_id
647
680
  # @return [Hash<String, Object>]
648
- def patch_flows_flow_id_metadata(flow_id, token, opts = {})
649
- data, _status_code, _headers = patch_flows_flow_id_metadata_with_http_info(flow_id, token, opts)
681
+ def patch_flows_flow_id_metadata(flow_id, token, patch_flows_flow_id_metadata_request, opts = {})
682
+ data, _status_code, _headers = patch_flows_flow_id_metadata_with_http_info(flow_id, token, patch_flows_flow_id_metadata_request, opts)
650
683
  data
651
684
  end
652
685
 
653
686
  # Update Flow Metadata
687
+ # Update Flow &#x60;name&#x60;, &#x60;categories&#x60;, and/or &#x60;endpointUri&#x60;. Currently returns HTTP 501 until the Meta Graph Flows rewrite is available.
654
688
  # @param flow_id [String] Flow ID
655
689
  # @param token [String] JWT token or API key for authorization
690
+ # @param patch_flows_flow_id_metadata_request [PatchFlowsFlowIdMetadataRequest]
656
691
  # @param [Hash] opts the optional parameters
657
692
  # @option opts [String] :waba_account_id
658
693
  # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
659
- def patch_flows_flow_id_metadata_with_http_info(flow_id, token, opts = {})
694
+ def patch_flows_flow_id_metadata_with_http_info(flow_id, token, patch_flows_flow_id_metadata_request, opts = {})
660
695
  if @api_client.config.debugging
661
696
  @api_client.config.logger.debug 'Calling API: FlowsApi.patch_flows_flow_id_metadata ...'
662
697
  end
@@ -668,6 +703,10 @@ module OneMsgSdk
668
703
  if @api_client.config.client_side_validation && token.nil?
669
704
  fail ArgumentError, "Missing the required parameter 'token' when calling FlowsApi.patch_flows_flow_id_metadata"
670
705
  end
706
+ # verify the required parameter 'patch_flows_flow_id_metadata_request' is set
707
+ if @api_client.config.client_side_validation && patch_flows_flow_id_metadata_request.nil?
708
+ fail ArgumentError, "Missing the required parameter 'patch_flows_flow_id_metadata_request' when calling FlowsApi.patch_flows_flow_id_metadata"
709
+ end
671
710
  # resource path
672
711
  local_var_path = '/flows/{flowId}/metadata'.sub('{flowId}', CGI.escape(flow_id.to_s))
673
712
 
@@ -680,12 +719,17 @@ module OneMsgSdk
680
719
  header_params = opts[:header_params] || {}
681
720
  # HTTP header 'Accept' (if needed)
682
721
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
722
+ # HTTP header 'Content-Type'
723
+ content_type = @api_client.select_header_content_type(['application/json'])
724
+ if !content_type.nil?
725
+ header_params['Content-Type'] = content_type
726
+ end
683
727
 
684
728
  # form parameters
685
729
  form_params = opts[:form_params] || {}
686
730
 
687
731
  # http body (model)
688
- post_body = opts[:debug_body]
732
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(patch_flows_flow_id_metadata_request)
689
733
 
690
734
  # return_type
691
735
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'