zavudev 0.19.0 → 0.21.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 (431) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +42 -0
  3. data/README.md +1 -1
  4. data/lib/zavudev/client.rb +20 -0
  5. data/lib/zavudev/models/agent_create_params.rb +278 -0
  6. data/lib/zavudev/models/agent_create_response.rb +17 -0
  7. data/lib/zavudev/models/{contact_dismiss_merge_suggestion_params.rb → agent_delete_params.rb} +6 -6
  8. data/lib/zavudev/models/agent_list_params.rb +26 -0
  9. data/lib/zavudev/models/agent_list_voices_params.rb +22 -0
  10. data/lib/zavudev/models/agent_list_voices_response.rb +57 -0
  11. data/lib/zavudev/models/agent_retrieve_params.rb +20 -0
  12. data/lib/zavudev/models/agent_retrieve_response.rb +17 -0
  13. data/lib/zavudev/models/agent_template_list_params.rb +14 -0
  14. data/lib/zavudev/models/agent_template_list_response.rb +77 -0
  15. data/lib/zavudev/models/agent_template_retrieve_params.rb +20 -0
  16. data/lib/zavudev/models/agent_template_retrieve_response.rb +144 -0
  17. data/lib/zavudev/models/agent_test_params.rb +91 -0
  18. data/lib/zavudev/models/agent_test_response.rb +117 -0
  19. data/lib/zavudev/models/agent_update_params.rb +295 -0
  20. data/lib/zavudev/models/agent_update_response.rb +17 -0
  21. data/lib/zavudev/models/agents/sender_connect_params.rb +31 -0
  22. data/lib/zavudev/models/agents/sender_connect_response.rb +19 -0
  23. data/lib/zavudev/models/agents/sender_disconnect_params.rb +28 -0
  24. data/lib/zavudev/models/call_create_params.rb +72 -0
  25. data/lib/zavudev/models/call_create_response.rb +262 -0
  26. data/lib/zavudev/models/call_hangup_params.rb +20 -0
  27. data/lib/zavudev/models/call_hangup_response.rb +262 -0
  28. data/lib/zavudev/models/call_list_params.rb +95 -0
  29. data/lib/zavudev/models/call_list_response.rb +251 -0
  30. data/lib/zavudev/models/call_retrieve_params.rb +20 -0
  31. data/lib/zavudev/models/call_retrieve_response.rb +262 -0
  32. data/lib/zavudev/models/contact.rb +1 -9
  33. data/lib/zavudev/models/contact_list_params.rb +42 -3
  34. data/lib/zavudev/models/contact_update_params.rb +14 -1
  35. data/lib/zavudev/models/conversation_list_messages_params.rb +36 -0
  36. data/lib/zavudev/models/conversation_list_params.rb +85 -0
  37. data/lib/zavudev/models/conversation_list_response.rb +226 -0
  38. data/lib/zavudev/models/conversation_mark_as_read_params.rb +20 -0
  39. data/lib/zavudev/models/conversation_mark_as_read_response.rb +245 -0
  40. data/lib/zavudev/models/conversation_retrieve_params.rb +20 -0
  41. data/lib/zavudev/models/conversation_retrieve_response.rb +244 -0
  42. data/lib/zavudev/models/email_domain_create_params.rb +22 -0
  43. data/lib/zavudev/models/email_domain_create_response.rb +134 -0
  44. data/lib/zavudev/models/email_domain_delete_params.rb +20 -0
  45. data/lib/zavudev/models/email_domain_list_params.rb +14 -0
  46. data/lib/zavudev/models/email_domain_list_response.rb +132 -0
  47. data/lib/zavudev/models/email_domain_retrieve_params.rb +20 -0
  48. data/lib/zavudev/models/email_domain_retrieve_response.rb +134 -0
  49. data/lib/zavudev/models/email_domain_verify_params.rb +20 -0
  50. data/lib/zavudev/models/email_domain_verify_response.rb +134 -0
  51. data/lib/zavudev/models/function_create_params.rb +36 -4
  52. data/lib/zavudev/models/function_create_response.rb +4 -2
  53. data/lib/zavudev/models/function_deploy_params.rb +31 -3
  54. data/lib/zavudev/models/function_deploy_response.rb +20 -3
  55. data/lib/zavudev/models/function_get_deployment_response.rb +20 -3
  56. data/lib/zavudev/models/function_list_deployments_params.rb +26 -0
  57. data/lib/zavudev/models/function_list_deployments_response.rb +95 -0
  58. data/lib/zavudev/models/function_list_event_types_params.rb +14 -0
  59. data/lib/zavudev/models/function_list_event_types_response.rb +16 -0
  60. data/lib/zavudev/models/function_retrieve_response.rb +4 -2
  61. data/lib/zavudev/models/function_rollback_deployment_params.rb +29 -0
  62. data/lib/zavudev/models/function_rollback_deployment_response.rb +137 -0
  63. data/lib/zavudev/models/function_update_params.rb +41 -3
  64. data/lib/zavudev/models/function_update_response.rb +4 -2
  65. data/lib/zavudev/models/functions/git_link_deploy_now_params.rb +22 -0
  66. data/lib/zavudev/models/functions/git_link_deploy_now_response.rb +18 -0
  67. data/lib/zavudev/models/functions/git_link_link_params.rb +59 -0
  68. data/lib/zavudev/models/functions/git_link_link_response.rb +222 -0
  69. data/lib/zavudev/models/functions/git_link_retrieve_params.rb +22 -0
  70. data/lib/zavudev/models/functions/git_link_retrieve_response.rb +222 -0
  71. data/lib/zavudev/models/functions/git_link_unlink_params.rb +22 -0
  72. data/lib/zavudev/models/functions/git_link_update_params.rb +40 -0
  73. data/lib/zavudev/models/functions/git_link_update_response.rb +222 -0
  74. data/lib/zavudev/models/functions/trigger_create_params.rb +51 -0
  75. data/lib/zavudev/models/functions/trigger_create_response.rb +120 -0
  76. data/lib/zavudev/models/functions/trigger_delete_params.rb +22 -0
  77. data/lib/zavudev/models/functions/trigger_list_params.rb +22 -0
  78. data/lib/zavudev/models/functions/trigger_list_response.rb +105 -0
  79. data/lib/zavudev/models/functions/trigger_update_params.rb +28 -0
  80. data/lib/zavudev/models/functions/trigger_update_response.rb +24 -0
  81. data/lib/zavudev/models/introspect_validate_email_params.rb +30 -0
  82. data/lib/zavudev/models/introspect_validate_email_response.rb +145 -0
  83. data/lib/zavudev/models/invitation.rb +101 -8
  84. data/lib/zavudev/models/invitation_create_params.rb +34 -8
  85. data/lib/zavudev/models/invitation_list_params.rb +14 -0
  86. data/lib/zavudev/models/message.rb +38 -1
  87. data/lib/zavudev/models/message_content.rb +148 -1
  88. data/lib/zavudev/models/message_list_attachments_params.rb +20 -0
  89. data/lib/zavudev/models/message_list_attachments_response.rb +90 -0
  90. data/lib/zavudev/models/message_type.rb +16 -0
  91. data/lib/zavudev/models/phone_number_pricing.rb +7 -2
  92. data/lib/zavudev/models/phone_number_search_available_params.rb +13 -1
  93. data/lib/zavudev/models/phone_number_type.rb +4 -0
  94. data/lib/zavudev/models/sender.rb +12 -1
  95. data/lib/zavudev/models/sender_create_params.rb +72 -4
  96. data/lib/zavudev/models/sender_update_params.rb +65 -1
  97. data/lib/zavudev/models/sender_webhook.rb +47 -1
  98. data/lib/zavudev/models/senders/agent/agent_tool.rb +19 -1
  99. data/lib/zavudev/models/senders/agent/knowledge_bases/document_retrieve_document_params.rb +38 -0
  100. data/lib/zavudev/models/senders/agent/knowledge_bases/document_retrieve_document_response.rb +22 -0
  101. data/lib/zavudev/models/senders/agent/knowledge_bases/document_update_document_params.rb +50 -0
  102. data/lib/zavudev/models/senders/agent/knowledge_bases/document_update_document_response.rb +22 -0
  103. data/lib/zavudev/models/senders/agent/tool_create_params.rb +7 -2
  104. data/lib/zavudev/models/senders/agent/tool_list_test_runs_params.rb +36 -0
  105. data/lib/zavudev/models/senders/agent/tool_list_test_runs_response.rb +101 -0
  106. data/lib/zavudev/models/senders/agent/tool_test_response.rb +90 -5
  107. data/lib/zavudev/models/senders/agent/tools/webhook_rotate_secret_params.rb +32 -0
  108. data/lib/zavudev/models/senders/agent.rb +198 -1
  109. data/lib/zavudev/models/senders/agent_create_params.rb +188 -1
  110. data/lib/zavudev/models/senders/agent_execution.rb +26 -1
  111. data/lib/zavudev/models/senders/agent_update_params.rb +188 -1
  112. data/lib/zavudev/models/senders/telegram_connect_params.rb +31 -0
  113. data/lib/zavudev/models/senders/telegram_connect_response.rb +41 -0
  114. data/lib/zavudev/models/senders/telegram_disconnect_params.rb +22 -0
  115. data/lib/zavudev/models/template.rb +1 -0
  116. data/lib/zavudev/models/template_create_params.rb +19 -9
  117. data/lib/zavudev/models/template_sync_params.rb +26 -0
  118. data/lib/zavudev/models/template_sync_response.rb +63 -0
  119. data/lib/zavudev/models/url_escalate_params.rb +29 -0
  120. data/lib/zavudev/models/url_escalate_response.rb +22 -0
  121. data/lib/zavudev/models/webhook_event.rb +37 -2
  122. data/lib/zavudev/models.rb +60 -2
  123. data/lib/zavudev/resources/agent_templates.rb +56 -0
  124. data/lib/zavudev/resources/agents/senders.rb +70 -0
  125. data/lib/zavudev/resources/agents.rb +253 -0
  126. data/lib/zavudev/resources/broadcasts.rb +30 -4
  127. data/lib/zavudev/resources/calls.rb +147 -0
  128. data/lib/zavudev/resources/contacts.rb +19 -23
  129. data/lib/zavudev/resources/conversations.rb +124 -0
  130. data/lib/zavudev/resources/email_domains.rb +113 -0
  131. data/lib/zavudev/resources/functions/git_link.rb +151 -0
  132. data/lib/zavudev/resources/functions/triggers.rb +116 -0
  133. data/lib/zavudev/resources/functions.rb +117 -10
  134. data/lib/zavudev/resources/introspect.rb +33 -0
  135. data/lib/zavudev/resources/invitations.rb +19 -6
  136. data/lib/zavudev/resources/messages.rb +67 -4
  137. data/lib/zavudev/resources/number_10dlc/brands.rb +10 -1
  138. data/lib/zavudev/resources/number_10dlc/campaigns.rb +8 -2
  139. data/lib/zavudev/resources/phone_numbers.rb +12 -3
  140. data/lib/zavudev/resources/senders/agent/executions.rb +5 -0
  141. data/lib/zavudev/resources/senders/agent/knowledge_bases/documents.rb +71 -0
  142. data/lib/zavudev/resources/senders/agent/tools/webhook.rb +47 -0
  143. data/lib/zavudev/resources/senders/agent/tools.rb +51 -2
  144. data/lib/zavudev/resources/senders/agent.rb +18 -2
  145. data/lib/zavudev/resources/senders/telegram.rb +61 -0
  146. data/lib/zavudev/resources/senders.rb +19 -3
  147. data/lib/zavudev/resources/templates.rb +45 -0
  148. data/lib/zavudev/resources/urls.rb +25 -0
  149. data/lib/zavudev/version.rb +1 -1
  150. data/lib/zavudev.rb +93 -1
  151. data/rbi/zavudev/client.rbi +15 -0
  152. data/rbi/zavudev/models/agent_create_params.rbi +417 -0
  153. data/rbi/zavudev/models/agent_create_response.rbi +37 -0
  154. data/rbi/zavudev/models/agent_delete_params.rbi +35 -0
  155. data/rbi/zavudev/models/agent_list_params.rbi +49 -0
  156. data/rbi/zavudev/models/agent_list_voices_params.rbi +43 -0
  157. data/rbi/zavudev/models/agent_list_voices_response.rbi +95 -0
  158. data/rbi/zavudev/models/agent_retrieve_params.rbi +35 -0
  159. data/rbi/zavudev/models/agent_retrieve_response.rbi +37 -0
  160. data/rbi/zavudev/models/agent_template_list_params.rbi +27 -0
  161. data/rbi/zavudev/models/agent_template_list_response.rbi +153 -0
  162. data/rbi/zavudev/models/agent_template_retrieve_params.rbi +38 -0
  163. data/rbi/zavudev/models/agent_template_retrieve_response.rbi +266 -0
  164. data/rbi/zavudev/models/agent_test_params.rbi +161 -0
  165. data/rbi/zavudev/models/agent_test_response.rbi +176 -0
  166. data/rbi/zavudev/models/agent_update_params.rbi +441 -0
  167. data/rbi/zavudev/models/agent_update_response.rbi +37 -0
  168. data/rbi/zavudev/models/agents/sender_connect_params.rbi +54 -0
  169. data/rbi/zavudev/models/agents/sender_connect_response.rbi +39 -0
  170. data/rbi/zavudev/models/agents/sender_disconnect_params.rbi +48 -0
  171. data/rbi/zavudev/models/call_create_params.rbi +112 -0
  172. data/rbi/zavudev/models/call_create_response.rbi +466 -0
  173. data/rbi/zavudev/models/call_hangup_params.rbi +35 -0
  174. data/rbi/zavudev/models/call_hangup_response.rbi +466 -0
  175. data/rbi/zavudev/models/call_list_params.rbi +159 -0
  176. data/rbi/zavudev/models/call_list_response.rbi +405 -0
  177. data/rbi/zavudev/models/call_retrieve_params.rbi +35 -0
  178. data/rbi/zavudev/models/call_retrieve_response.rbi +472 -0
  179. data/rbi/zavudev/models/contact.rbi +0 -11
  180. data/rbi/zavudev/models/contact_list_params.rbi +56 -0
  181. data/rbi/zavudev/models/contact_update_params.rbi +12 -0
  182. data/rbi/zavudev/models/conversation_list_messages_params.rbi +64 -0
  183. data/rbi/zavudev/models/conversation_list_params.rbi +167 -0
  184. data/rbi/zavudev/models/conversation_list_response.rbi +367 -0
  185. data/rbi/zavudev/models/conversation_mark_as_read_params.rbi +38 -0
  186. data/rbi/zavudev/models/conversation_mark_as_read_response.rbi +436 -0
  187. data/rbi/zavudev/models/conversation_retrieve_params.rbi +35 -0
  188. data/rbi/zavudev/models/conversation_retrieve_response.rbi +436 -0
  189. data/rbi/zavudev/models/email_domain_create_params.rbi +40 -0
  190. data/rbi/zavudev/models/email_domain_create_response.rbi +259 -0
  191. data/rbi/zavudev/models/email_domain_delete_params.rbi +35 -0
  192. data/rbi/zavudev/models/email_domain_list_params.rbi +27 -0
  193. data/rbi/zavudev/models/email_domain_list_response.rbi +253 -0
  194. data/rbi/zavudev/models/email_domain_retrieve_params.rbi +35 -0
  195. data/rbi/zavudev/models/email_domain_retrieve_response.rbi +259 -0
  196. data/rbi/zavudev/models/email_domain_verify_params.rbi +35 -0
  197. data/rbi/zavudev/models/email_domain_verify_response.rbi +259 -0
  198. data/rbi/zavudev/models/function_create_params.rbi +50 -2
  199. data/rbi/zavudev/models/function_create_response.rbi +6 -2
  200. data/rbi/zavudev/models/function_deploy_params.rbi +42 -2
  201. data/rbi/zavudev/models/function_deploy_response.rbi +20 -0
  202. data/rbi/zavudev/models/function_get_deployment_response.rbi +20 -0
  203. data/rbi/zavudev/models/function_list_deployments_params.rbi +49 -0
  204. data/rbi/zavudev/models/function_list_deployments_response.rbi +211 -0
  205. data/rbi/zavudev/models/function_list_event_types_params.rbi +30 -0
  206. data/rbi/zavudev/models/function_list_event_types_response.rbi +26 -0
  207. data/rbi/zavudev/models/function_retrieve_response.rbi +6 -2
  208. data/rbi/zavudev/models/function_rollback_deployment_params.rbi +52 -0
  209. data/rbi/zavudev/models/function_rollback_deployment_response.rbi +240 -0
  210. data/rbi/zavudev/models/function_update_params.rbi +57 -2
  211. data/rbi/zavudev/models/function_update_response.rbi +6 -2
  212. data/rbi/zavudev/models/functions/git_link_deploy_now_params.rbi +40 -0
  213. data/rbi/zavudev/models/functions/git_link_deploy_now_response.rbi +28 -0
  214. data/rbi/zavudev/models/functions/git_link_link_params.rbi +87 -0
  215. data/rbi/zavudev/models/functions/git_link_link_response.rbi +360 -0
  216. data/rbi/zavudev/models/functions/git_link_retrieve_params.rbi +40 -0
  217. data/rbi/zavudev/models/functions/git_link_retrieve_response.rbi +364 -0
  218. data/rbi/zavudev/models/functions/git_link_unlink_params.rbi +40 -0
  219. data/rbi/zavudev/models/functions/git_link_update_params.rbi +70 -0
  220. data/rbi/zavudev/models/functions/git_link_update_response.rbi +362 -0
  221. data/rbi/zavudev/models/functions/trigger_create_params.rbi +75 -0
  222. data/rbi/zavudev/models/functions/trigger_create_response.rbi +168 -0
  223. data/rbi/zavudev/models/functions/trigger_delete_params.rbi +40 -0
  224. data/rbi/zavudev/models/functions/trigger_list_params.rbi +40 -0
  225. data/rbi/zavudev/models/functions/trigger_list_response.rbi +152 -0
  226. data/rbi/zavudev/models/functions/trigger_update_params.rbi +48 -0
  227. data/rbi/zavudev/models/functions/trigger_update_response.rbi +33 -0
  228. data/rbi/zavudev/models/introspect_validate_email_params.rbi +60 -0
  229. data/rbi/zavudev/models/introspect_validate_email_response.rbi +328 -0
  230. data/rbi/zavudev/models/invitation.rbi +162 -8
  231. data/rbi/zavudev/models/invitation_create_params.rbi +54 -10
  232. data/rbi/zavudev/models/invitation_list_params.rbi +17 -0
  233. data/rbi/zavudev/models/message.rbi +57 -0
  234. data/rbi/zavudev/models/message_content.rbi +260 -0
  235. data/rbi/zavudev/models/{contact_dismiss_merge_suggestion_params.rbi → message_list_attachments_params.rbi} +6 -6
  236. data/rbi/zavudev/models/message_list_attachments_response.rbi +136 -0
  237. data/rbi/zavudev/models/message_type.rbi +18 -0
  238. data/rbi/zavudev/models/phone_number_pricing.rbi +6 -2
  239. data/rbi/zavudev/models/phone_number_search_available_params.rbi +13 -0
  240. data/rbi/zavudev/models/phone_number_type.rbi +4 -0
  241. data/rbi/zavudev/models/sender.rbi +17 -0
  242. data/rbi/zavudev/models/sender_create_params.rbi +136 -4
  243. data/rbi/zavudev/models/sender_update_params.rbi +124 -0
  244. data/rbi/zavudev/models/sender_webhook.rbi +69 -0
  245. data/rbi/zavudev/models/senders/agent/agent_tool.rbi +26 -3
  246. data/rbi/zavudev/models/senders/agent/knowledge_bases/document_retrieve_document_params.rbi +57 -0
  247. data/rbi/zavudev/models/senders/agent/knowledge_bases/document_retrieve_document_response.rbi +47 -0
  248. data/rbi/zavudev/models/senders/agent/knowledge_bases/document_update_document_params.rbi +80 -0
  249. data/rbi/zavudev/models/senders/agent/knowledge_bases/document_update_document_response.rbi +47 -0
  250. data/rbi/zavudev/models/senders/agent/tool_create_params.rbi +6 -2
  251. data/rbi/zavudev/models/senders/agent/tool_list_test_runs_params.rbi +58 -0
  252. data/rbi/zavudev/models/senders/agent/tool_list_test_runs_response.rbi +152 -0
  253. data/rbi/zavudev/models/senders/agent/tool_test_response.rbi +130 -5
  254. data/rbi/zavudev/models/senders/agent/tools/webhook_rotate_secret_params.rbi +52 -0
  255. data/rbi/zavudev/models/senders/agent.rbi +320 -3
  256. data/rbi/zavudev/models/senders/agent_create_params.rbi +304 -0
  257. data/rbi/zavudev/models/senders/agent_execution.rbi +31 -3
  258. data/rbi/zavudev/models/senders/agent_update_params.rbi +304 -0
  259. data/rbi/zavudev/models/senders/telegram_connect_params.rbi +54 -0
  260. data/rbi/zavudev/models/senders/telegram_connect_response.rbi +93 -0
  261. data/rbi/zavudev/models/senders/telegram_disconnect_params.rbi +40 -0
  262. data/rbi/zavudev/models/template.rbi +5 -0
  263. data/rbi/zavudev/models/template_create_params.rbi +27 -6
  264. data/rbi/zavudev/models/template_sync_params.rbi +45 -0
  265. data/rbi/zavudev/models/template_sync_response.rbi +86 -0
  266. data/rbi/zavudev/models/url_escalate_params.rbi +49 -0
  267. data/rbi/zavudev/models/url_escalate_response.rbi +36 -0
  268. data/rbi/zavudev/models/webhook_event.rbi +41 -2
  269. data/rbi/zavudev/models.rbi +62 -3
  270. data/rbi/zavudev/resources/agent_templates.rbi +36 -0
  271. data/rbi/zavudev/resources/agents/senders.rbi +50 -0
  272. data/rbi/zavudev/resources/agents.rbi +204 -0
  273. data/rbi/zavudev/resources/broadcasts.rbi +30 -4
  274. data/rbi/zavudev/resources/calls.rbi +132 -0
  275. data/rbi/zavudev/resources/contacts.rbi +34 -11
  276. data/rbi/zavudev/resources/conversations.rbi +98 -0
  277. data/rbi/zavudev/resources/email_domains.rbi +67 -0
  278. data/rbi/zavudev/resources/functions/git_link.rbi +116 -0
  279. data/rbi/zavudev/resources/functions/triggers.rbi +81 -0
  280. data/rbi/zavudev/resources/functions.rbi +117 -6
  281. data/rbi/zavudev/resources/introspect.rbi +26 -0
  282. data/rbi/zavudev/resources/invitations.rbi +37 -8
  283. data/rbi/zavudev/resources/messages.rbi +57 -3
  284. data/rbi/zavudev/resources/number_10dlc/brands.rbi +10 -1
  285. data/rbi/zavudev/resources/number_10dlc/campaigns.rbi +8 -2
  286. data/rbi/zavudev/resources/phone_numbers.rbi +10 -2
  287. data/rbi/zavudev/resources/senders/agent/executions.rbi +5 -0
  288. data/rbi/zavudev/resources/senders/agent/knowledge_bases/documents.rbi +48 -0
  289. data/rbi/zavudev/resources/senders/agent/tools/webhook.rbi +31 -0
  290. data/rbi/zavudev/resources/senders/agent/tools.rbi +38 -2
  291. data/rbi/zavudev/resources/senders/agent.rbi +16 -0
  292. data/rbi/zavudev/resources/senders/telegram.rbi +42 -0
  293. data/rbi/zavudev/resources/senders.rbi +59 -2
  294. data/rbi/zavudev/resources/templates.rbi +35 -0
  295. data/rbi/zavudev/resources/urls.rbi +17 -0
  296. data/sig/zavudev/client.rbs +10 -0
  297. data/sig/zavudev/models/agent_create_params.rbs +234 -0
  298. data/sig/zavudev/models/agent_create_response.rbs +13 -0
  299. data/sig/zavudev/models/agent_delete_params.rbs +23 -0
  300. data/sig/zavudev/models/agent_list_params.rbs +32 -0
  301. data/sig/zavudev/models/agent_list_voices_params.rbs +25 -0
  302. data/sig/zavudev/models/agent_list_voices_response.rbs +46 -0
  303. data/sig/zavudev/models/agent_retrieve_params.rbs +23 -0
  304. data/sig/zavudev/models/agent_retrieve_response.rbs +13 -0
  305. data/sig/zavudev/models/agent_template_list_params.rbs +15 -0
  306. data/sig/zavudev/models/agent_template_list_response.rbs +73 -0
  307. data/sig/zavudev/models/agent_template_retrieve_params.rbs +23 -0
  308. data/sig/zavudev/models/agent_template_retrieve_response.rbs +112 -0
  309. data/sig/zavudev/models/agent_test_params.rbs +87 -0
  310. data/sig/zavudev/models/agent_test_response.rbs +78 -0
  311. data/sig/zavudev/models/agent_update_params.rbs +259 -0
  312. data/sig/zavudev/models/agent_update_response.rbs +13 -0
  313. data/sig/zavudev/models/agents/sender_connect_params.rbs +30 -0
  314. data/sig/zavudev/models/agents/sender_connect_response.rbs +15 -0
  315. data/sig/zavudev/models/agents/sender_disconnect_params.rbs +30 -0
  316. data/sig/zavudev/models/call_create_params.rbs +61 -0
  317. data/sig/zavudev/models/call_create_response.rbs +194 -0
  318. data/sig/zavudev/models/call_hangup_params.rbs +23 -0
  319. data/sig/zavudev/models/call_hangup_response.rbs +194 -0
  320. data/sig/zavudev/models/call_list_params.rbs +89 -0
  321. data/sig/zavudev/models/call_list_response.rbs +183 -0
  322. data/sig/zavudev/models/call_retrieve_params.rbs +23 -0
  323. data/sig/zavudev/models/call_retrieve_response.rbs +196 -0
  324. data/sig/zavudev/models/contact.rbs +0 -7
  325. data/sig/zavudev/models/contact_list_params.rbs +19 -1
  326. data/sig/zavudev/models/contact_update_params.rbs +5 -0
  327. data/sig/zavudev/models/conversation_list_messages_params.rbs +36 -0
  328. data/sig/zavudev/models/conversation_list_params.rbs +83 -0
  329. data/sig/zavudev/models/conversation_list_response.rbs +184 -0
  330. data/sig/zavudev/models/conversation_mark_as_read_params.rbs +23 -0
  331. data/sig/zavudev/models/conversation_mark_as_read_response.rbs +201 -0
  332. data/sig/zavudev/models/conversation_retrieve_params.rbs +23 -0
  333. data/sig/zavudev/models/conversation_retrieve_response.rbs +201 -0
  334. data/sig/zavudev/models/email_domain_create_params.rbs +23 -0
  335. data/sig/zavudev/models/email_domain_create_response.rbs +116 -0
  336. data/sig/zavudev/models/email_domain_delete_params.rbs +23 -0
  337. data/sig/zavudev/models/email_domain_list_params.rbs +15 -0
  338. data/sig/zavudev/models/email_domain_list_response.rbs +116 -0
  339. data/sig/zavudev/models/email_domain_retrieve_params.rbs +23 -0
  340. data/sig/zavudev/models/email_domain_retrieve_response.rbs +116 -0
  341. data/sig/zavudev/models/email_domain_verify_params.rbs +23 -0
  342. data/sig/zavudev/models/email_domain_verify_response.rbs +116 -0
  343. data/sig/zavudev/models/function_create_params.rbs +14 -0
  344. data/sig/zavudev/models/function_deploy_params.rbs +14 -0
  345. data/sig/zavudev/models/function_deploy_response.rbs +5 -0
  346. data/sig/zavudev/models/function_get_deployment_response.rbs +5 -0
  347. data/sig/zavudev/models/function_list_deployments_params.rbs +30 -0
  348. data/sig/zavudev/models/function_list_deployments_response.rbs +107 -0
  349. data/sig/zavudev/models/function_list_event_types_params.rbs +15 -0
  350. data/sig/zavudev/models/function_list_event_types_response.rbs +13 -0
  351. data/sig/zavudev/models/function_rollback_deployment_params.rbs +28 -0
  352. data/sig/zavudev/models/function_rollback_deployment_response.rbs +117 -0
  353. data/sig/zavudev/models/function_update_params.rbs +21 -0
  354. data/sig/zavudev/models/functions/git_link_deploy_now_params.rbs +25 -0
  355. data/sig/zavudev/models/functions/git_link_deploy_now_response.rbs +15 -0
  356. data/sig/zavudev/models/functions/git_link_link_params.rbs +59 -0
  357. data/sig/zavudev/models/functions/git_link_link_response.rbs +159 -0
  358. data/sig/zavudev/models/functions/git_link_retrieve_params.rbs +25 -0
  359. data/sig/zavudev/models/functions/git_link_retrieve_response.rbs +159 -0
  360. data/sig/zavudev/models/functions/git_link_unlink_params.rbs +25 -0
  361. data/sig/zavudev/models/functions/git_link_update_params.rbs +47 -0
  362. data/sig/zavudev/models/functions/git_link_update_response.rbs +159 -0
  363. data/sig/zavudev/models/functions/trigger_create_params.rbs +45 -0
  364. data/sig/zavudev/models/functions/trigger_create_response.rbs +94 -0
  365. data/sig/zavudev/models/functions/trigger_delete_params.rbs +25 -0
  366. data/sig/zavudev/models/functions/trigger_list_params.rbs +25 -0
  367. data/sig/zavudev/models/functions/trigger_list_response.rbs +84 -0
  368. data/sig/zavudev/models/functions/trigger_update_params.rbs +30 -0
  369. data/sig/zavudev/models/functions/trigger_update_response.rbs +17 -0
  370. data/sig/zavudev/models/introspect_validate_email_params.rbs +32 -0
  371. data/sig/zavudev/models/introspect_validate_email_response.rbs +135 -0
  372. data/sig/zavudev/models/invitation.rbs +58 -2
  373. data/sig/zavudev/models/invitation_create_params.rbs +2 -1
  374. data/sig/zavudev/models/invitation_list_params.rbs +3 -1
  375. data/sig/zavudev/models/message.rbs +16 -0
  376. data/sig/zavudev/models/message_content.rbs +117 -0
  377. data/sig/zavudev/models/{contact_dismiss_merge_suggestion_params.rbs → message_list_attachments_params.rbs} +6 -6
  378. data/sig/zavudev/models/message_list_attachments_response.rbs +70 -0
  379. data/sig/zavudev/models/message_type.rbs +4 -0
  380. data/sig/zavudev/models/phone_number_search_available_params.rbs +7 -0
  381. data/sig/zavudev/models/phone_number_type.rbs +2 -1
  382. data/sig/zavudev/models/sender.rbs +7 -0
  383. data/sig/zavudev/models/sender_create_params.rbs +35 -0
  384. data/sig/zavudev/models/sender_update_params.rbs +35 -0
  385. data/sig/zavudev/models/sender_webhook.rbs +17 -0
  386. data/sig/zavudev/models/senders/agent/agent_tool.rbs +10 -3
  387. data/sig/zavudev/models/senders/agent/knowledge_bases/document_retrieve_document_params.rbs +38 -0
  388. data/sig/zavudev/models/senders/agent/knowledge_bases/document_retrieve_document_response.rbs +22 -0
  389. data/sig/zavudev/models/senders/agent/knowledge_bases/document_update_document_params.rbs +56 -0
  390. data/sig/zavudev/models/senders/agent/knowledge_bases/document_update_document_response.rbs +22 -0
  391. data/sig/zavudev/models/senders/agent/tool_list_test_runs_params.rbs +38 -0
  392. data/sig/zavudev/models/senders/agent/tool_list_test_runs_response.rbs +83 -0
  393. data/sig/zavudev/models/senders/agent/tool_test_response.rbs +68 -4
  394. data/sig/zavudev/models/senders/agent/tools/webhook_rotate_secret_params.rbs +34 -0
  395. data/sig/zavudev/models/senders/agent.rbs +161 -3
  396. data/sig/zavudev/models/senders/agent_create_params.rbs +152 -1
  397. data/sig/zavudev/models/senders/agent_execution.rbs +13 -3
  398. data/sig/zavudev/models/senders/agent_update_params.rbs +152 -1
  399. data/sig/zavudev/models/senders/telegram_connect_params.rbs +30 -0
  400. data/sig/zavudev/models/senders/telegram_connect_response.rbs +49 -0
  401. data/sig/zavudev/models/senders/telegram_disconnect_params.rbs +25 -0
  402. data/sig/zavudev/models/template.rbs +2 -1
  403. data/sig/zavudev/models/template_create_params.rbs +9 -6
  404. data/sig/zavudev/models/template_sync_params.rbs +25 -0
  405. data/sig/zavudev/models/template_sync_response.rbs +45 -0
  406. data/sig/zavudev/models/url_escalate_params.rbs +28 -0
  407. data/sig/zavudev/models/url_escalate_response.rbs +15 -0
  408. data/sig/zavudev/models/webhook_event.rbs +10 -0
  409. data/sig/zavudev/models.rbs +60 -2
  410. data/sig/zavudev/resources/agent_templates.rbs +16 -0
  411. data/sig/zavudev/resources/agents/senders.rbs +21 -0
  412. data/sig/zavudev/resources/agents.rbs +72 -0
  413. data/sig/zavudev/resources/calls.rbs +35 -0
  414. data/sig/zavudev/resources/contacts.rbs +3 -5
  415. data/sig/zavudev/resources/conversations.rbs +33 -0
  416. data/sig/zavudev/resources/email_domains.rbs +31 -0
  417. data/sig/zavudev/resources/functions/git_link.rbs +42 -0
  418. data/sig/zavudev/resources/functions/triggers.rbs +33 -0
  419. data/sig/zavudev/resources/functions.rbs +27 -0
  420. data/sig/zavudev/resources/introspect.rbs +6 -0
  421. data/sig/zavudev/resources/messages.rbs +5 -0
  422. data/sig/zavudev/resources/phone_numbers.rbs +1 -0
  423. data/sig/zavudev/resources/senders/agent/knowledge_bases/documents.rbs +16 -0
  424. data/sig/zavudev/resources/senders/agent/tools/webhook.rbs +19 -0
  425. data/sig/zavudev/resources/senders/agent/tools.rbs +9 -0
  426. data/sig/zavudev/resources/senders/agent.rbs +2 -0
  427. data/sig/zavudev/resources/senders/telegram.rbs +20 -0
  428. data/sig/zavudev/resources/senders.rbs +8 -0
  429. data/sig/zavudev/resources/templates.rbs +5 -0
  430. data/sig/zavudev/resources/urls.rbs +6 -0
  431. metadata +281 -5
@@ -20,6 +20,11 @@ module Zavudev
20
20
  attr_accessor :expires_at
21
21
 
22
22
  # Current status of the partner invitation.
23
+ #
24
+ # `failed` means the client started the connection and it did not finish (they
25
+ # cancelled Meta's dialog, denied a permission, or abandoned the tab). A failed
26
+ # invitation is still usable: the same link can be retried, and it moves back to
27
+ # `in_progress` when the client tries again.
23
28
  sig { returns(Zavudev::Invitation::Status::TaggedSymbol) }
24
29
  attr_accessor :status
25
30
 
@@ -42,8 +47,23 @@ module Zavudev
42
47
  sig { returns(T.nilable(Time)) }
43
48
  attr_accessor :completed_at
44
49
 
45
- # How the client connects WhatsApp: `whatsapp_waba` (official Cloud API via
46
- # embedded signup).
50
+ # The account the client linked, populated once the invitation is `completed`.
51
+ # Null before that. Use it to show the partner what was connected without fetching
52
+ # the sender.
53
+ sig { returns(T.nilable(Zavudev::Invitation::ConnectedAccount)) }
54
+ attr_reader :connected_account
55
+
56
+ sig do
57
+ params(
58
+ connected_account:
59
+ T.nilable(Zavudev::Invitation::ConnectedAccount::OrHash)
60
+ ).void
61
+ end
62
+ attr_writer :connected_account
63
+
64
+ # Which Meta channel the client connects: `whatsapp_waba` (official WhatsApp Cloud
65
+ # API via embedded signup) or `messenger` (a Facebook Page's Messenger inbox,
66
+ # including Marketplace chats).
47
67
  sig do
48
68
  returns(T.nilable(Zavudev::Invitation::ConnectionType::TaggedSymbol))
49
69
  end
@@ -56,7 +76,19 @@ module Zavudev
56
76
  end
57
77
  attr_writer :connection_type
58
78
 
59
- # ID of a pre-assigned Zavu phone number for WhatsApp registration.
79
+ sig { returns(T.nilable(Time)) }
80
+ attr_accessor :failed_at
81
+
82
+ # Stable code for why the last attempt failed, present when `status` is `failed`.
83
+ # Values include `fb_cancelled` (client closed Meta's dialog), `fb_not_authorized`
84
+ # (permission denied), `signup_abandoned` (started but never finished),
85
+ # `meta_no_pages` (the client administers no Facebook Page), and `internal_error`.
86
+ # Treat unknown codes as a generic failure.
87
+ sig { returns(T.nilable(String)) }
88
+ attr_accessor :failure_reason
89
+
90
+ # ID of a pre-assigned Zavu phone number for WhatsApp registration. Always null
91
+ # for `messenger` invitations.
60
92
  sig { returns(T.nilable(String)) }
61
93
  attr_accessor :phone_number_id
62
94
 
@@ -83,7 +115,11 @@ module Zavudev
83
115
  client_name: T.nilable(String),
84
116
  client_phone: T.nilable(String),
85
117
  completed_at: T.nilable(Time),
118
+ connected_account:
119
+ T.nilable(Zavudev::Invitation::ConnectedAccount::OrHash),
86
120
  connection_type: Zavudev::Invitation::ConnectionType::OrSymbol,
121
+ failed_at: T.nilable(Time),
122
+ failure_reason: T.nilable(String),
87
123
  phone_number_id: T.nilable(String),
88
124
  sender_id: T.nilable(String),
89
125
  started_at: T.nilable(Time),
@@ -97,6 +133,11 @@ module Zavudev
97
133
  created_at:,
98
134
  expires_at:,
99
135
  # Current status of the partner invitation.
136
+ #
137
+ # `failed` means the client started the connection and it did not finish (they
138
+ # cancelled Meta's dialog, denied a permission, or abandoned the tab). A failed
139
+ # invitation is still usable: the same link can be retried, and it moves back to
140
+ # `in_progress` when the client tries again.
100
141
  status:,
101
142
  updated_at:,
102
143
  # Full URL to share with the client.
@@ -105,10 +146,23 @@ module Zavudev
105
146
  client_name: nil,
106
147
  client_phone: nil,
107
148
  completed_at: nil,
108
- # How the client connects WhatsApp: `whatsapp_waba` (official Cloud API via
109
- # embedded signup).
149
+ # The account the client linked, populated once the invitation is `completed`.
150
+ # Null before that. Use it to show the partner what was connected without fetching
151
+ # the sender.
152
+ connected_account: nil,
153
+ # Which Meta channel the client connects: `whatsapp_waba` (official WhatsApp Cloud
154
+ # API via embedded signup) or `messenger` (a Facebook Page's Messenger inbox,
155
+ # including Marketplace chats).
110
156
  connection_type: nil,
111
- # ID of a pre-assigned Zavu phone number for WhatsApp registration.
157
+ failed_at: nil,
158
+ # Stable code for why the last attempt failed, present when `status` is `failed`.
159
+ # Values include `fb_cancelled` (client closed Meta's dialog), `fb_not_authorized`
160
+ # (permission denied), `signup_abandoned` (started but never finished),
161
+ # `meta_no_pages` (the client administers no Facebook Page), and `internal_error`.
162
+ # Treat unknown codes as a generic failure.
163
+ failure_reason: nil,
164
+ # ID of a pre-assigned Zavu phone number for WhatsApp registration. Always null
165
+ # for `messenger` invitations.
112
166
  phone_number_id: nil,
113
167
  # ID of the sender created when invitation is completed.
114
168
  sender_id: nil,
@@ -131,7 +185,10 @@ module Zavudev
131
185
  client_name: T.nilable(String),
132
186
  client_phone: T.nilable(String),
133
187
  completed_at: T.nilable(Time),
188
+ connected_account: T.nilable(Zavudev::Invitation::ConnectedAccount),
134
189
  connection_type: Zavudev::Invitation::ConnectionType::TaggedSymbol,
190
+ failed_at: T.nilable(Time),
191
+ failure_reason: T.nilable(String),
135
192
  phone_number_id: T.nilable(String),
136
193
  sender_id: T.nilable(String),
137
194
  started_at: T.nilable(Time),
@@ -143,6 +200,11 @@ module Zavudev
143
200
  end
144
201
 
145
202
  # Current status of the partner invitation.
203
+ #
204
+ # `failed` means the client started the connection and it did not finish (they
205
+ # cancelled Meta's dialog, denied a permission, or abandoned the tab). A failed
206
+ # invitation is still usable: the same link can be retried, and it moves back to
207
+ # `in_progress` when the client tries again.
146
208
  module Status
147
209
  extend Zavudev::Internal::Type::Enum
148
210
 
@@ -156,6 +218,7 @@ module Zavudev
156
218
  COMPLETED = T.let(:completed, Zavudev::Invitation::Status::TaggedSymbol)
157
219
  EXPIRED = T.let(:expired, Zavudev::Invitation::Status::TaggedSymbol)
158
220
  CANCELLED = T.let(:cancelled, Zavudev::Invitation::Status::TaggedSymbol)
221
+ FAILED = T.let(:failed, Zavudev::Invitation::Status::TaggedSymbol)
159
222
 
160
223
  sig do
161
224
  override.returns(T::Array[Zavudev::Invitation::Status::TaggedSymbol])
@@ -164,8 +227,97 @@ module Zavudev
164
227
  end
165
228
  end
166
229
 
167
- # How the client connects WhatsApp: `whatsapp_waba` (official Cloud API via
168
- # embedded signup).
230
+ class ConnectedAccount < Zavudev::Internal::Type::BaseModel
231
+ OrHash =
232
+ T.type_alias do
233
+ T.any(
234
+ Zavudev::Invitation::ConnectedAccount,
235
+ Zavudev::Internal::AnyHash
236
+ )
237
+ end
238
+
239
+ # Provider-side identifier: the WhatsApp phone number ID, or the Facebook Page ID.
240
+ sig { returns(String) }
241
+ attr_accessor :id
242
+
243
+ sig do
244
+ returns(Zavudev::Invitation::ConnectedAccount::Channel::TaggedSymbol)
245
+ end
246
+ attr_accessor :channel
247
+
248
+ # Display name of the connected account: the WhatsApp verified name, or the
249
+ # Facebook Page name.
250
+ sig { returns(T.nilable(String)) }
251
+ attr_accessor :name
252
+
253
+ # The account the client linked, populated once the invitation is `completed`.
254
+ # Null before that. Use it to show the partner what was connected without fetching
255
+ # the sender.
256
+ sig do
257
+ params(
258
+ id: String,
259
+ channel: Zavudev::Invitation::ConnectedAccount::Channel::OrSymbol,
260
+ name: T.nilable(String)
261
+ ).returns(T.attached_class)
262
+ end
263
+ def self.new(
264
+ # Provider-side identifier: the WhatsApp phone number ID, or the Facebook Page ID.
265
+ id:,
266
+ channel:,
267
+ # Display name of the connected account: the WhatsApp verified name, or the
268
+ # Facebook Page name.
269
+ name: nil
270
+ )
271
+ end
272
+
273
+ sig do
274
+ override.returns(
275
+ {
276
+ id: String,
277
+ channel:
278
+ Zavudev::Invitation::ConnectedAccount::Channel::TaggedSymbol,
279
+ name: T.nilable(String)
280
+ }
281
+ )
282
+ end
283
+ def to_hash
284
+ end
285
+
286
+ module Channel
287
+ extend Zavudev::Internal::Type::Enum
288
+
289
+ TaggedSymbol =
290
+ T.type_alias do
291
+ T.all(Symbol, Zavudev::Invitation::ConnectedAccount::Channel)
292
+ end
293
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
294
+
295
+ WHATSAPP =
296
+ T.let(
297
+ :whatsapp,
298
+ Zavudev::Invitation::ConnectedAccount::Channel::TaggedSymbol
299
+ )
300
+ MESSENGER =
301
+ T.let(
302
+ :messenger,
303
+ Zavudev::Invitation::ConnectedAccount::Channel::TaggedSymbol
304
+ )
305
+
306
+ sig do
307
+ override.returns(
308
+ T::Array[
309
+ Zavudev::Invitation::ConnectedAccount::Channel::TaggedSymbol
310
+ ]
311
+ )
312
+ end
313
+ def self.values
314
+ end
315
+ end
316
+ end
317
+
318
+ # Which Meta channel the client connects: `whatsapp_waba` (official WhatsApp Cloud
319
+ # API via embedded signup) or `messenger` (a Facebook Page's Messenger inbox,
320
+ # including Marketplace chats).
169
321
  module ConnectionType
170
322
  extend Zavudev::Internal::Type::Enum
171
323
 
@@ -178,6 +330,8 @@ module Zavudev
178
330
  :whatsapp_waba,
179
331
  Zavudev::Invitation::ConnectionType::TaggedSymbol
180
332
  )
333
+ MESSENGER =
334
+ T.let(:messenger, Zavudev::Invitation::ConnectionType::TaggedSymbol)
181
335
 
182
336
  sig do
183
337
  override.returns(
@@ -11,7 +11,8 @@ module Zavudev
11
11
  T.any(Zavudev::InvitationCreateParams, Zavudev::Internal::AnyHash)
12
12
  end
13
13
 
14
- # ISO country codes for allowed phone numbers.
14
+ # ISO country codes for allowed phone numbers. Only valid when `connectionType` is
15
+ # `whatsapp_waba` — sending it with `messenger` returns 400.
15
16
  sig { returns(T.nilable(T::Array[String])) }
16
17
  attr_reader :allowed_phone_countries
17
18
 
@@ -39,8 +40,19 @@ module Zavudev
39
40
  sig { params(client_phone: String).void }
40
41
  attr_writer :client_phone
41
42
 
42
- # How the client connects WhatsApp. `whatsapp_waba` (default) runs Meta's embedded
43
- # signup to link an official WhatsApp Business Account.
43
+ # Which Meta channel the client connects, and how.
44
+ #
45
+ # - `whatsapp_waba` (default): Meta's embedded signup links an official WhatsApp
46
+ # Business Account. Accepts `phoneNumberId` and `allowedPhoneCountries`.
47
+ # - `messenger`: the client authorizes with Facebook and picks a Facebook Page
48
+ # they administer. The Page's Messenger inbox — including Marketplace chats — is
49
+ # routed to Zavu. They must be an admin of at least one Page. A Page can only be
50
+ # connected to one Zavu project at a time: if the client picks a Page that
51
+ # another project already connected, the newer connection wins and the older one
52
+ # is disconnected.
53
+ #
54
+ # One invitation connects one channel. To onboard a client on several channels,
55
+ # create one invitation per channel; each completes into its own sender.
44
56
  sig do
45
57
  returns(
46
58
  T.nilable(Zavudev::InvitationCreateParams::ConnectionType::OrSymbol)
@@ -64,7 +76,9 @@ module Zavudev
64
76
  attr_writer :expires_in_days
65
77
 
66
78
  # ID of a Zavu phone number to pre-assign for WhatsApp registration. If provided,
67
- # the client will use this number instead of their own.
79
+ # the client will use this number instead of their own. Only valid when
80
+ # `connectionType` is `whatsapp_waba` — sending it with `messenger` returns 400,
81
+ # since a Facebook Page has no phone number.
68
82
  sig { returns(T.nilable(String)) }
69
83
  attr_reader :phone_number_id
70
84
 
@@ -85,7 +99,8 @@ module Zavudev
85
99
  ).returns(T.attached_class)
86
100
  end
87
101
  def self.new(
88
- # ISO country codes for allowed phone numbers.
102
+ # ISO country codes for allowed phone numbers. Only valid when `connectionType` is
103
+ # `whatsapp_waba` — sending it with `messenger` returns 400.
89
104
  allowed_phone_countries: nil,
90
105
  # Email of the client being invited.
91
106
  client_email: nil,
@@ -93,13 +108,26 @@ module Zavudev
93
108
  client_name: nil,
94
109
  # Phone number of the client in E.164 format.
95
110
  client_phone: nil,
96
- # How the client connects WhatsApp. `whatsapp_waba` (default) runs Meta's embedded
97
- # signup to link an official WhatsApp Business Account.
111
+ # Which Meta channel the client connects, and how.
112
+ #
113
+ # - `whatsapp_waba` (default): Meta's embedded signup links an official WhatsApp
114
+ # Business Account. Accepts `phoneNumberId` and `allowedPhoneCountries`.
115
+ # - `messenger`: the client authorizes with Facebook and picks a Facebook Page
116
+ # they administer. The Page's Messenger inbox — including Marketplace chats — is
117
+ # routed to Zavu. They must be an admin of at least one Page. A Page can only be
118
+ # connected to one Zavu project at a time: if the client picks a Page that
119
+ # another project already connected, the newer connection wins and the older one
120
+ # is disconnected.
121
+ #
122
+ # One invitation connects one channel. To onboard a client on several channels,
123
+ # create one invitation per channel; each completes into its own sender.
98
124
  connection_type: nil,
99
125
  # Number of days until the invitation expires.
100
126
  expires_in_days: nil,
101
127
  # ID of a Zavu phone number to pre-assign for WhatsApp registration. If provided,
102
- # the client will use this number instead of their own.
128
+ # the client will use this number instead of their own. Only valid when
129
+ # `connectionType` is `whatsapp_waba` — sending it with `messenger` returns 400,
130
+ # since a Facebook Page has no phone number.
103
131
  phone_number_id: nil,
104
132
  request_options: {}
105
133
  )
@@ -123,8 +151,19 @@ module Zavudev
123
151
  def to_hash
124
152
  end
125
153
 
126
- # How the client connects WhatsApp. `whatsapp_waba` (default) runs Meta's embedded
127
- # signup to link an official WhatsApp Business Account.
154
+ # Which Meta channel the client connects, and how.
155
+ #
156
+ # - `whatsapp_waba` (default): Meta's embedded signup links an official WhatsApp
157
+ # Business Account. Accepts `phoneNumberId` and `allowedPhoneCountries`.
158
+ # - `messenger`: the client authorizes with Facebook and picks a Facebook Page
159
+ # they administer. The Page's Messenger inbox — including Marketplace chats — is
160
+ # routed to Zavu. They must be an admin of at least one Page. A Page can only be
161
+ # connected to one Zavu project at a time: if the client picks a Page that
162
+ # another project already connected, the newer connection wins and the older one
163
+ # is disconnected.
164
+ #
165
+ # One invitation connects one channel. To onboard a client on several channels,
166
+ # create one invitation per channel; each completes into its own sender.
128
167
  module ConnectionType
129
168
  extend Zavudev::Internal::Type::Enum
130
169
 
@@ -139,6 +178,11 @@ module Zavudev
139
178
  :whatsapp_waba,
140
179
  Zavudev::InvitationCreateParams::ConnectionType::TaggedSymbol
141
180
  )
181
+ MESSENGER =
182
+ T.let(
183
+ :messenger,
184
+ Zavudev::InvitationCreateParams::ConnectionType::TaggedSymbol
185
+ )
142
186
 
143
187
  sig do
144
188
  override.returns(
@@ -24,6 +24,11 @@ module Zavudev
24
24
  attr_writer :limit
25
25
 
26
26
  # Current status of the partner invitation.
27
+ #
28
+ # `failed` means the client started the connection and it did not finish (they
29
+ # cancelled Meta's dialog, denied a permission, or abandoned the tab). A failed
30
+ # invitation is still usable: the same link can be retried, and it moves back to
31
+ # `in_progress` when the client tries again.
27
32
  sig do
28
33
  returns(T.nilable(Zavudev::InvitationListParams::Status::OrSymbol))
29
34
  end
@@ -46,6 +51,11 @@ module Zavudev
46
51
  cursor: nil,
47
52
  limit: nil,
48
53
  # Current status of the partner invitation.
54
+ #
55
+ # `failed` means the client started the connection and it did not finish (they
56
+ # cancelled Meta's dialog, denied a permission, or abandoned the tab). A failed
57
+ # invitation is still usable: the same link can be retried, and it moves back to
58
+ # `in_progress` when the client tries again.
49
59
  status: nil,
50
60
  request_options: {}
51
61
  )
@@ -65,6 +75,11 @@ module Zavudev
65
75
  end
66
76
 
67
77
  # Current status of the partner invitation.
78
+ #
79
+ # `failed` means the client started the connection and it did not finish (they
80
+ # cancelled Meta's dialog, denied a permission, or abandoned the tab). A failed
81
+ # invitation is still usable: the same link can be retried, and it moves back to
82
+ # `in_progress` when the client tries again.
68
83
  module Status
69
84
  extend Zavudev::Internal::Type::Enum
70
85
 
@@ -85,6 +100,8 @@ module Zavudev
85
100
  T.let(:expired, Zavudev::InvitationListParams::Status::TaggedSymbol)
86
101
  CANCELLED =
87
102
  T.let(:cancelled, Zavudev::InvitationListParams::Status::TaggedSymbol)
103
+ FAILED =
104
+ T.let(:failed, Zavudev::InvitationListParams::Status::TaggedSymbol)
88
105
 
89
106
  sig do
90
107
  override.returns(
@@ -16,8 +16,27 @@ module Zavudev
16
16
  sig { returns(Time) }
17
17
  attr_accessor :created_at
18
18
 
19
+ # Who sent the message. Needed to render a thread: `status` cannot tell the two
20
+ # apart, because an inbound message is also stored as `delivered`.
21
+ sig { returns(Zavudev::Message::Direction::TaggedSymbol) }
22
+ attr_accessor :direction
23
+
19
24
  # Type of message. Non-text types are supported by WhatsApp and Telegram (varies
20
25
  # by type).
26
+ #
27
+ # `location_request` asks the recipient to share their location and is
28
+ # WhatsApp-only. It takes no `content` object — the prompt goes in `text` (max
29
+ # 1024 characters) and the button label is fixed by WhatsApp. The recipient's
30
+ # answer arrives as an inbound `location` message whose `content.replyToMessageId`
31
+ # is the ID of the request.
32
+ #
33
+ # `request_contact_info` asks the recipient to share their phone number and is
34
+ # WhatsApp-only. Like `location_request` it takes no `content` object — the prompt
35
+ # goes in `text` (max 1024 characters) and WhatsApp renders a fixed **Share
36
+ # Contact Info** button. The answer arrives as an inbound `contact` message. Use
37
+ # it to recover the phone number of a contact who adopted a WhatsApp username and
38
+ # is only known by their business-scoped user ID (BSUID); when they share it, Zavu
39
+ # automatically links the phone number to that contact.
21
40
  sig { returns(Zavudev::MessageType::TaggedSymbol) }
22
41
  attr_accessor :message_type
23
42
 
@@ -106,6 +125,7 @@ module Zavudev
106
125
  id: String,
107
126
  channel: Zavudev::Channel::OrSymbol,
108
127
  created_at: Time,
128
+ direction: Zavudev::Message::Direction::OrSymbol,
109
129
  message_type: Zavudev::MessageType::OrSymbol,
110
130
  status: Zavudev::MessageStatus::OrSymbol,
111
131
  to: String,
@@ -129,8 +149,25 @@ module Zavudev
129
149
  # Delivery channel. Use 'auto' for intelligent routing.
130
150
  channel:,
131
151
  created_at:,
152
+ # Who sent the message. Needed to render a thread: `status` cannot tell the two
153
+ # apart, because an inbound message is also stored as `delivered`.
154
+ direction:,
132
155
  # Type of message. Non-text types are supported by WhatsApp and Telegram (varies
133
156
  # by type).
157
+ #
158
+ # `location_request` asks the recipient to share their location and is
159
+ # WhatsApp-only. It takes no `content` object — the prompt goes in `text` (max
160
+ # 1024 characters) and the button label is fixed by WhatsApp. The recipient's
161
+ # answer arrives as an inbound `location` message whose `content.replyToMessageId`
162
+ # is the ID of the request.
163
+ #
164
+ # `request_contact_info` asks the recipient to share their phone number and is
165
+ # WhatsApp-only. Like `location_request` it takes no `content` object — the prompt
166
+ # goes in `text` (max 1024 characters) and WhatsApp renders a fixed **Share
167
+ # Contact Info** button. The answer arrives as an inbound `contact` message. Use
168
+ # it to recover the phone number of a contact who adopted a WhatsApp username and
169
+ # is only known by their business-scoped user ID (BSUID); when they share it, Zavu
170
+ # automatically links the phone number to that contact.
134
171
  message_type:,
135
172
  status:,
136
173
  to:,
@@ -167,6 +204,7 @@ module Zavudev
167
204
  id: String,
168
205
  channel: Zavudev::Channel::TaggedSymbol,
169
206
  created_at: Time,
207
+ direction: Zavudev::Message::Direction::TaggedSymbol,
170
208
  message_type: Zavudev::MessageType::TaggedSymbol,
171
209
  status: Zavudev::MessageStatus::TaggedSymbol,
172
210
  to: String,
@@ -188,6 +226,25 @@ module Zavudev
188
226
  end
189
227
  def to_hash
190
228
  end
229
+
230
+ # Who sent the message. Needed to render a thread: `status` cannot tell the two
231
+ # apart, because an inbound message is also stored as `delivered`.
232
+ module Direction
233
+ extend Zavudev::Internal::Type::Enum
234
+
235
+ TaggedSymbol =
236
+ T.type_alias { T.all(Symbol, Zavudev::Message::Direction) }
237
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
238
+
239
+ INBOUND = T.let(:inbound, Zavudev::Message::Direction::TaggedSymbol)
240
+ OUTBOUND = T.let(:outbound, Zavudev::Message::Direction::TaggedSymbol)
241
+
242
+ sig do
243
+ override.returns(T::Array[Zavudev::Message::Direction::TaggedSymbol])
244
+ end
245
+ def self.values
246
+ end
247
+ end
191
248
  end
192
249
  end
193
250
  end