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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +42 -0
- data/README.md +1 -1
- data/lib/zavudev/client.rb +20 -0
- data/lib/zavudev/models/agent_create_params.rb +278 -0
- data/lib/zavudev/models/agent_create_response.rb +17 -0
- data/lib/zavudev/models/{contact_dismiss_merge_suggestion_params.rb → agent_delete_params.rb} +6 -6
- data/lib/zavudev/models/agent_list_params.rb +26 -0
- data/lib/zavudev/models/agent_list_voices_params.rb +22 -0
- data/lib/zavudev/models/agent_list_voices_response.rb +57 -0
- data/lib/zavudev/models/agent_retrieve_params.rb +20 -0
- data/lib/zavudev/models/agent_retrieve_response.rb +17 -0
- data/lib/zavudev/models/agent_template_list_params.rb +14 -0
- data/lib/zavudev/models/agent_template_list_response.rb +77 -0
- data/lib/zavudev/models/agent_template_retrieve_params.rb +20 -0
- data/lib/zavudev/models/agent_template_retrieve_response.rb +144 -0
- data/lib/zavudev/models/agent_test_params.rb +91 -0
- data/lib/zavudev/models/agent_test_response.rb +117 -0
- data/lib/zavudev/models/agent_update_params.rb +295 -0
- data/lib/zavudev/models/agent_update_response.rb +17 -0
- data/lib/zavudev/models/agents/sender_connect_params.rb +31 -0
- data/lib/zavudev/models/agents/sender_connect_response.rb +19 -0
- data/lib/zavudev/models/agents/sender_disconnect_params.rb +28 -0
- data/lib/zavudev/models/call_create_params.rb +72 -0
- data/lib/zavudev/models/call_create_response.rb +262 -0
- data/lib/zavudev/models/call_hangup_params.rb +20 -0
- data/lib/zavudev/models/call_hangup_response.rb +262 -0
- data/lib/zavudev/models/call_list_params.rb +95 -0
- data/lib/zavudev/models/call_list_response.rb +251 -0
- data/lib/zavudev/models/call_retrieve_params.rb +20 -0
- data/lib/zavudev/models/call_retrieve_response.rb +262 -0
- data/lib/zavudev/models/contact.rb +1 -9
- data/lib/zavudev/models/contact_list_params.rb +42 -3
- data/lib/zavudev/models/contact_update_params.rb +14 -1
- data/lib/zavudev/models/conversation_list_messages_params.rb +36 -0
- data/lib/zavudev/models/conversation_list_params.rb +85 -0
- data/lib/zavudev/models/conversation_list_response.rb +226 -0
- data/lib/zavudev/models/conversation_mark_as_read_params.rb +20 -0
- data/lib/zavudev/models/conversation_mark_as_read_response.rb +245 -0
- data/lib/zavudev/models/conversation_retrieve_params.rb +20 -0
- data/lib/zavudev/models/conversation_retrieve_response.rb +244 -0
- data/lib/zavudev/models/email_domain_create_params.rb +22 -0
- data/lib/zavudev/models/email_domain_create_response.rb +134 -0
- data/lib/zavudev/models/email_domain_delete_params.rb +20 -0
- data/lib/zavudev/models/email_domain_list_params.rb +14 -0
- data/lib/zavudev/models/email_domain_list_response.rb +132 -0
- data/lib/zavudev/models/email_domain_retrieve_params.rb +20 -0
- data/lib/zavudev/models/email_domain_retrieve_response.rb +134 -0
- data/lib/zavudev/models/email_domain_verify_params.rb +20 -0
- data/lib/zavudev/models/email_domain_verify_response.rb +134 -0
- data/lib/zavudev/models/function_create_params.rb +36 -4
- data/lib/zavudev/models/function_create_response.rb +4 -2
- data/lib/zavudev/models/function_deploy_params.rb +31 -3
- data/lib/zavudev/models/function_deploy_response.rb +20 -3
- data/lib/zavudev/models/function_get_deployment_response.rb +20 -3
- data/lib/zavudev/models/function_list_deployments_params.rb +26 -0
- data/lib/zavudev/models/function_list_deployments_response.rb +95 -0
- data/lib/zavudev/models/function_list_event_types_params.rb +14 -0
- data/lib/zavudev/models/function_list_event_types_response.rb +16 -0
- data/lib/zavudev/models/function_retrieve_response.rb +4 -2
- data/lib/zavudev/models/function_rollback_deployment_params.rb +29 -0
- data/lib/zavudev/models/function_rollback_deployment_response.rb +137 -0
- data/lib/zavudev/models/function_update_params.rb +41 -3
- data/lib/zavudev/models/function_update_response.rb +4 -2
- data/lib/zavudev/models/functions/git_link_deploy_now_params.rb +22 -0
- data/lib/zavudev/models/functions/git_link_deploy_now_response.rb +18 -0
- data/lib/zavudev/models/functions/git_link_link_params.rb +59 -0
- data/lib/zavudev/models/functions/git_link_link_response.rb +222 -0
- data/lib/zavudev/models/functions/git_link_retrieve_params.rb +22 -0
- data/lib/zavudev/models/functions/git_link_retrieve_response.rb +222 -0
- data/lib/zavudev/models/functions/git_link_unlink_params.rb +22 -0
- data/lib/zavudev/models/functions/git_link_update_params.rb +40 -0
- data/lib/zavudev/models/functions/git_link_update_response.rb +222 -0
- data/lib/zavudev/models/functions/trigger_create_params.rb +51 -0
- data/lib/zavudev/models/functions/trigger_create_response.rb +120 -0
- data/lib/zavudev/models/functions/trigger_delete_params.rb +22 -0
- data/lib/zavudev/models/functions/trigger_list_params.rb +22 -0
- data/lib/zavudev/models/functions/trigger_list_response.rb +105 -0
- data/lib/zavudev/models/functions/trigger_update_params.rb +28 -0
- data/lib/zavudev/models/functions/trigger_update_response.rb +24 -0
- data/lib/zavudev/models/introspect_validate_email_params.rb +30 -0
- data/lib/zavudev/models/introspect_validate_email_response.rb +145 -0
- data/lib/zavudev/models/invitation.rb +101 -8
- data/lib/zavudev/models/invitation_create_params.rb +34 -8
- data/lib/zavudev/models/invitation_list_params.rb +14 -0
- data/lib/zavudev/models/message.rb +38 -1
- data/lib/zavudev/models/message_content.rb +148 -1
- data/lib/zavudev/models/message_list_attachments_params.rb +20 -0
- data/lib/zavudev/models/message_list_attachments_response.rb +90 -0
- data/lib/zavudev/models/message_type.rb +16 -0
- data/lib/zavudev/models/phone_number_pricing.rb +7 -2
- data/lib/zavudev/models/phone_number_search_available_params.rb +13 -1
- data/lib/zavudev/models/phone_number_type.rb +4 -0
- data/lib/zavudev/models/sender.rb +12 -1
- data/lib/zavudev/models/sender_create_params.rb +72 -4
- data/lib/zavudev/models/sender_update_params.rb +65 -1
- data/lib/zavudev/models/sender_webhook.rb +47 -1
- data/lib/zavudev/models/senders/agent/agent_tool.rb +19 -1
- data/lib/zavudev/models/senders/agent/knowledge_bases/document_retrieve_document_params.rb +38 -0
- data/lib/zavudev/models/senders/agent/knowledge_bases/document_retrieve_document_response.rb +22 -0
- data/lib/zavudev/models/senders/agent/knowledge_bases/document_update_document_params.rb +50 -0
- data/lib/zavudev/models/senders/agent/knowledge_bases/document_update_document_response.rb +22 -0
- data/lib/zavudev/models/senders/agent/tool_create_params.rb +7 -2
- data/lib/zavudev/models/senders/agent/tool_list_test_runs_params.rb +36 -0
- data/lib/zavudev/models/senders/agent/tool_list_test_runs_response.rb +101 -0
- data/lib/zavudev/models/senders/agent/tool_test_response.rb +90 -5
- data/lib/zavudev/models/senders/agent/tools/webhook_rotate_secret_params.rb +32 -0
- data/lib/zavudev/models/senders/agent.rb +198 -1
- data/lib/zavudev/models/senders/agent_create_params.rb +188 -1
- data/lib/zavudev/models/senders/agent_execution.rb +26 -1
- data/lib/zavudev/models/senders/agent_update_params.rb +188 -1
- data/lib/zavudev/models/senders/telegram_connect_params.rb +31 -0
- data/lib/zavudev/models/senders/telegram_connect_response.rb +41 -0
- data/lib/zavudev/models/senders/telegram_disconnect_params.rb +22 -0
- data/lib/zavudev/models/template.rb +1 -0
- data/lib/zavudev/models/template_create_params.rb +19 -9
- data/lib/zavudev/models/template_sync_params.rb +26 -0
- data/lib/zavudev/models/template_sync_response.rb +63 -0
- data/lib/zavudev/models/url_escalate_params.rb +29 -0
- data/lib/zavudev/models/url_escalate_response.rb +22 -0
- data/lib/zavudev/models/webhook_event.rb +37 -2
- data/lib/zavudev/models.rb +60 -2
- data/lib/zavudev/resources/agent_templates.rb +56 -0
- data/lib/zavudev/resources/agents/senders.rb +70 -0
- data/lib/zavudev/resources/agents.rb +253 -0
- data/lib/zavudev/resources/broadcasts.rb +30 -4
- data/lib/zavudev/resources/calls.rb +147 -0
- data/lib/zavudev/resources/contacts.rb +19 -23
- data/lib/zavudev/resources/conversations.rb +124 -0
- data/lib/zavudev/resources/email_domains.rb +113 -0
- data/lib/zavudev/resources/functions/git_link.rb +151 -0
- data/lib/zavudev/resources/functions/triggers.rb +116 -0
- data/lib/zavudev/resources/functions.rb +117 -10
- data/lib/zavudev/resources/introspect.rb +33 -0
- data/lib/zavudev/resources/invitations.rb +19 -6
- data/lib/zavudev/resources/messages.rb +67 -4
- data/lib/zavudev/resources/number_10dlc/brands.rb +10 -1
- data/lib/zavudev/resources/number_10dlc/campaigns.rb +8 -2
- data/lib/zavudev/resources/phone_numbers.rb +12 -3
- data/lib/zavudev/resources/senders/agent/executions.rb +5 -0
- data/lib/zavudev/resources/senders/agent/knowledge_bases/documents.rb +71 -0
- data/lib/zavudev/resources/senders/agent/tools/webhook.rb +47 -0
- data/lib/zavudev/resources/senders/agent/tools.rb +51 -2
- data/lib/zavudev/resources/senders/agent.rb +18 -2
- data/lib/zavudev/resources/senders/telegram.rb +61 -0
- data/lib/zavudev/resources/senders.rb +19 -3
- data/lib/zavudev/resources/templates.rb +45 -0
- data/lib/zavudev/resources/urls.rb +25 -0
- data/lib/zavudev/version.rb +1 -1
- data/lib/zavudev.rb +93 -1
- data/rbi/zavudev/client.rbi +15 -0
- data/rbi/zavudev/models/agent_create_params.rbi +417 -0
- data/rbi/zavudev/models/agent_create_response.rbi +37 -0
- data/rbi/zavudev/models/agent_delete_params.rbi +35 -0
- data/rbi/zavudev/models/agent_list_params.rbi +49 -0
- data/rbi/zavudev/models/agent_list_voices_params.rbi +43 -0
- data/rbi/zavudev/models/agent_list_voices_response.rbi +95 -0
- data/rbi/zavudev/models/agent_retrieve_params.rbi +35 -0
- data/rbi/zavudev/models/agent_retrieve_response.rbi +37 -0
- data/rbi/zavudev/models/agent_template_list_params.rbi +27 -0
- data/rbi/zavudev/models/agent_template_list_response.rbi +153 -0
- data/rbi/zavudev/models/agent_template_retrieve_params.rbi +38 -0
- data/rbi/zavudev/models/agent_template_retrieve_response.rbi +266 -0
- data/rbi/zavudev/models/agent_test_params.rbi +161 -0
- data/rbi/zavudev/models/agent_test_response.rbi +176 -0
- data/rbi/zavudev/models/agent_update_params.rbi +441 -0
- data/rbi/zavudev/models/agent_update_response.rbi +37 -0
- data/rbi/zavudev/models/agents/sender_connect_params.rbi +54 -0
- data/rbi/zavudev/models/agents/sender_connect_response.rbi +39 -0
- data/rbi/zavudev/models/agents/sender_disconnect_params.rbi +48 -0
- data/rbi/zavudev/models/call_create_params.rbi +112 -0
- data/rbi/zavudev/models/call_create_response.rbi +466 -0
- data/rbi/zavudev/models/call_hangup_params.rbi +35 -0
- data/rbi/zavudev/models/call_hangup_response.rbi +466 -0
- data/rbi/zavudev/models/call_list_params.rbi +159 -0
- data/rbi/zavudev/models/call_list_response.rbi +405 -0
- data/rbi/zavudev/models/call_retrieve_params.rbi +35 -0
- data/rbi/zavudev/models/call_retrieve_response.rbi +472 -0
- data/rbi/zavudev/models/contact.rbi +0 -11
- data/rbi/zavudev/models/contact_list_params.rbi +56 -0
- data/rbi/zavudev/models/contact_update_params.rbi +12 -0
- data/rbi/zavudev/models/conversation_list_messages_params.rbi +64 -0
- data/rbi/zavudev/models/conversation_list_params.rbi +167 -0
- data/rbi/zavudev/models/conversation_list_response.rbi +367 -0
- data/rbi/zavudev/models/conversation_mark_as_read_params.rbi +38 -0
- data/rbi/zavudev/models/conversation_mark_as_read_response.rbi +436 -0
- data/rbi/zavudev/models/conversation_retrieve_params.rbi +35 -0
- data/rbi/zavudev/models/conversation_retrieve_response.rbi +436 -0
- data/rbi/zavudev/models/email_domain_create_params.rbi +40 -0
- data/rbi/zavudev/models/email_domain_create_response.rbi +259 -0
- data/rbi/zavudev/models/email_domain_delete_params.rbi +35 -0
- data/rbi/zavudev/models/email_domain_list_params.rbi +27 -0
- data/rbi/zavudev/models/email_domain_list_response.rbi +253 -0
- data/rbi/zavudev/models/email_domain_retrieve_params.rbi +35 -0
- data/rbi/zavudev/models/email_domain_retrieve_response.rbi +259 -0
- data/rbi/zavudev/models/email_domain_verify_params.rbi +35 -0
- data/rbi/zavudev/models/email_domain_verify_response.rbi +259 -0
- data/rbi/zavudev/models/function_create_params.rbi +50 -2
- data/rbi/zavudev/models/function_create_response.rbi +6 -2
- data/rbi/zavudev/models/function_deploy_params.rbi +42 -2
- data/rbi/zavudev/models/function_deploy_response.rbi +20 -0
- data/rbi/zavudev/models/function_get_deployment_response.rbi +20 -0
- data/rbi/zavudev/models/function_list_deployments_params.rbi +49 -0
- data/rbi/zavudev/models/function_list_deployments_response.rbi +211 -0
- data/rbi/zavudev/models/function_list_event_types_params.rbi +30 -0
- data/rbi/zavudev/models/function_list_event_types_response.rbi +26 -0
- data/rbi/zavudev/models/function_retrieve_response.rbi +6 -2
- data/rbi/zavudev/models/function_rollback_deployment_params.rbi +52 -0
- data/rbi/zavudev/models/function_rollback_deployment_response.rbi +240 -0
- data/rbi/zavudev/models/function_update_params.rbi +57 -2
- data/rbi/zavudev/models/function_update_response.rbi +6 -2
- data/rbi/zavudev/models/functions/git_link_deploy_now_params.rbi +40 -0
- data/rbi/zavudev/models/functions/git_link_deploy_now_response.rbi +28 -0
- data/rbi/zavudev/models/functions/git_link_link_params.rbi +87 -0
- data/rbi/zavudev/models/functions/git_link_link_response.rbi +360 -0
- data/rbi/zavudev/models/functions/git_link_retrieve_params.rbi +40 -0
- data/rbi/zavudev/models/functions/git_link_retrieve_response.rbi +364 -0
- data/rbi/zavudev/models/functions/git_link_unlink_params.rbi +40 -0
- data/rbi/zavudev/models/functions/git_link_update_params.rbi +70 -0
- data/rbi/zavudev/models/functions/git_link_update_response.rbi +362 -0
- data/rbi/zavudev/models/functions/trigger_create_params.rbi +75 -0
- data/rbi/zavudev/models/functions/trigger_create_response.rbi +168 -0
- data/rbi/zavudev/models/functions/trigger_delete_params.rbi +40 -0
- data/rbi/zavudev/models/functions/trigger_list_params.rbi +40 -0
- data/rbi/zavudev/models/functions/trigger_list_response.rbi +152 -0
- data/rbi/zavudev/models/functions/trigger_update_params.rbi +48 -0
- data/rbi/zavudev/models/functions/trigger_update_response.rbi +33 -0
- data/rbi/zavudev/models/introspect_validate_email_params.rbi +60 -0
- data/rbi/zavudev/models/introspect_validate_email_response.rbi +328 -0
- data/rbi/zavudev/models/invitation.rbi +162 -8
- data/rbi/zavudev/models/invitation_create_params.rbi +54 -10
- data/rbi/zavudev/models/invitation_list_params.rbi +17 -0
- data/rbi/zavudev/models/message.rbi +57 -0
- data/rbi/zavudev/models/message_content.rbi +260 -0
- data/rbi/zavudev/models/{contact_dismiss_merge_suggestion_params.rbi → message_list_attachments_params.rbi} +6 -6
- data/rbi/zavudev/models/message_list_attachments_response.rbi +136 -0
- data/rbi/zavudev/models/message_type.rbi +18 -0
- data/rbi/zavudev/models/phone_number_pricing.rbi +6 -2
- data/rbi/zavudev/models/phone_number_search_available_params.rbi +13 -0
- data/rbi/zavudev/models/phone_number_type.rbi +4 -0
- data/rbi/zavudev/models/sender.rbi +17 -0
- data/rbi/zavudev/models/sender_create_params.rbi +136 -4
- data/rbi/zavudev/models/sender_update_params.rbi +124 -0
- data/rbi/zavudev/models/sender_webhook.rbi +69 -0
- data/rbi/zavudev/models/senders/agent/agent_tool.rbi +26 -3
- data/rbi/zavudev/models/senders/agent/knowledge_bases/document_retrieve_document_params.rbi +57 -0
- data/rbi/zavudev/models/senders/agent/knowledge_bases/document_retrieve_document_response.rbi +47 -0
- data/rbi/zavudev/models/senders/agent/knowledge_bases/document_update_document_params.rbi +80 -0
- data/rbi/zavudev/models/senders/agent/knowledge_bases/document_update_document_response.rbi +47 -0
- data/rbi/zavudev/models/senders/agent/tool_create_params.rbi +6 -2
- data/rbi/zavudev/models/senders/agent/tool_list_test_runs_params.rbi +58 -0
- data/rbi/zavudev/models/senders/agent/tool_list_test_runs_response.rbi +152 -0
- data/rbi/zavudev/models/senders/agent/tool_test_response.rbi +130 -5
- data/rbi/zavudev/models/senders/agent/tools/webhook_rotate_secret_params.rbi +52 -0
- data/rbi/zavudev/models/senders/agent.rbi +320 -3
- data/rbi/zavudev/models/senders/agent_create_params.rbi +304 -0
- data/rbi/zavudev/models/senders/agent_execution.rbi +31 -3
- data/rbi/zavudev/models/senders/agent_update_params.rbi +304 -0
- data/rbi/zavudev/models/senders/telegram_connect_params.rbi +54 -0
- data/rbi/zavudev/models/senders/telegram_connect_response.rbi +93 -0
- data/rbi/zavudev/models/senders/telegram_disconnect_params.rbi +40 -0
- data/rbi/zavudev/models/template.rbi +5 -0
- data/rbi/zavudev/models/template_create_params.rbi +27 -6
- data/rbi/zavudev/models/template_sync_params.rbi +45 -0
- data/rbi/zavudev/models/template_sync_response.rbi +86 -0
- data/rbi/zavudev/models/url_escalate_params.rbi +49 -0
- data/rbi/zavudev/models/url_escalate_response.rbi +36 -0
- data/rbi/zavudev/models/webhook_event.rbi +41 -2
- data/rbi/zavudev/models.rbi +62 -3
- data/rbi/zavudev/resources/agent_templates.rbi +36 -0
- data/rbi/zavudev/resources/agents/senders.rbi +50 -0
- data/rbi/zavudev/resources/agents.rbi +204 -0
- data/rbi/zavudev/resources/broadcasts.rbi +30 -4
- data/rbi/zavudev/resources/calls.rbi +132 -0
- data/rbi/zavudev/resources/contacts.rbi +34 -11
- data/rbi/zavudev/resources/conversations.rbi +98 -0
- data/rbi/zavudev/resources/email_domains.rbi +67 -0
- data/rbi/zavudev/resources/functions/git_link.rbi +116 -0
- data/rbi/zavudev/resources/functions/triggers.rbi +81 -0
- data/rbi/zavudev/resources/functions.rbi +117 -6
- data/rbi/zavudev/resources/introspect.rbi +26 -0
- data/rbi/zavudev/resources/invitations.rbi +37 -8
- data/rbi/zavudev/resources/messages.rbi +57 -3
- data/rbi/zavudev/resources/number_10dlc/brands.rbi +10 -1
- data/rbi/zavudev/resources/number_10dlc/campaigns.rbi +8 -2
- data/rbi/zavudev/resources/phone_numbers.rbi +10 -2
- data/rbi/zavudev/resources/senders/agent/executions.rbi +5 -0
- data/rbi/zavudev/resources/senders/agent/knowledge_bases/documents.rbi +48 -0
- data/rbi/zavudev/resources/senders/agent/tools/webhook.rbi +31 -0
- data/rbi/zavudev/resources/senders/agent/tools.rbi +38 -2
- data/rbi/zavudev/resources/senders/agent.rbi +16 -0
- data/rbi/zavudev/resources/senders/telegram.rbi +42 -0
- data/rbi/zavudev/resources/senders.rbi +59 -2
- data/rbi/zavudev/resources/templates.rbi +35 -0
- data/rbi/zavudev/resources/urls.rbi +17 -0
- data/sig/zavudev/client.rbs +10 -0
- data/sig/zavudev/models/agent_create_params.rbs +234 -0
- data/sig/zavudev/models/agent_create_response.rbs +13 -0
- data/sig/zavudev/models/agent_delete_params.rbs +23 -0
- data/sig/zavudev/models/agent_list_params.rbs +32 -0
- data/sig/zavudev/models/agent_list_voices_params.rbs +25 -0
- data/sig/zavudev/models/agent_list_voices_response.rbs +46 -0
- data/sig/zavudev/models/agent_retrieve_params.rbs +23 -0
- data/sig/zavudev/models/agent_retrieve_response.rbs +13 -0
- data/sig/zavudev/models/agent_template_list_params.rbs +15 -0
- data/sig/zavudev/models/agent_template_list_response.rbs +73 -0
- data/sig/zavudev/models/agent_template_retrieve_params.rbs +23 -0
- data/sig/zavudev/models/agent_template_retrieve_response.rbs +112 -0
- data/sig/zavudev/models/agent_test_params.rbs +87 -0
- data/sig/zavudev/models/agent_test_response.rbs +78 -0
- data/sig/zavudev/models/agent_update_params.rbs +259 -0
- data/sig/zavudev/models/agent_update_response.rbs +13 -0
- data/sig/zavudev/models/agents/sender_connect_params.rbs +30 -0
- data/sig/zavudev/models/agents/sender_connect_response.rbs +15 -0
- data/sig/zavudev/models/agents/sender_disconnect_params.rbs +30 -0
- data/sig/zavudev/models/call_create_params.rbs +61 -0
- data/sig/zavudev/models/call_create_response.rbs +194 -0
- data/sig/zavudev/models/call_hangup_params.rbs +23 -0
- data/sig/zavudev/models/call_hangup_response.rbs +194 -0
- data/sig/zavudev/models/call_list_params.rbs +89 -0
- data/sig/zavudev/models/call_list_response.rbs +183 -0
- data/sig/zavudev/models/call_retrieve_params.rbs +23 -0
- data/sig/zavudev/models/call_retrieve_response.rbs +196 -0
- data/sig/zavudev/models/contact.rbs +0 -7
- data/sig/zavudev/models/contact_list_params.rbs +19 -1
- data/sig/zavudev/models/contact_update_params.rbs +5 -0
- data/sig/zavudev/models/conversation_list_messages_params.rbs +36 -0
- data/sig/zavudev/models/conversation_list_params.rbs +83 -0
- data/sig/zavudev/models/conversation_list_response.rbs +184 -0
- data/sig/zavudev/models/conversation_mark_as_read_params.rbs +23 -0
- data/sig/zavudev/models/conversation_mark_as_read_response.rbs +201 -0
- data/sig/zavudev/models/conversation_retrieve_params.rbs +23 -0
- data/sig/zavudev/models/conversation_retrieve_response.rbs +201 -0
- data/sig/zavudev/models/email_domain_create_params.rbs +23 -0
- data/sig/zavudev/models/email_domain_create_response.rbs +116 -0
- data/sig/zavudev/models/email_domain_delete_params.rbs +23 -0
- data/sig/zavudev/models/email_domain_list_params.rbs +15 -0
- data/sig/zavudev/models/email_domain_list_response.rbs +116 -0
- data/sig/zavudev/models/email_domain_retrieve_params.rbs +23 -0
- data/sig/zavudev/models/email_domain_retrieve_response.rbs +116 -0
- data/sig/zavudev/models/email_domain_verify_params.rbs +23 -0
- data/sig/zavudev/models/email_domain_verify_response.rbs +116 -0
- data/sig/zavudev/models/function_create_params.rbs +14 -0
- data/sig/zavudev/models/function_deploy_params.rbs +14 -0
- data/sig/zavudev/models/function_deploy_response.rbs +5 -0
- data/sig/zavudev/models/function_get_deployment_response.rbs +5 -0
- data/sig/zavudev/models/function_list_deployments_params.rbs +30 -0
- data/sig/zavudev/models/function_list_deployments_response.rbs +107 -0
- data/sig/zavudev/models/function_list_event_types_params.rbs +15 -0
- data/sig/zavudev/models/function_list_event_types_response.rbs +13 -0
- data/sig/zavudev/models/function_rollback_deployment_params.rbs +28 -0
- data/sig/zavudev/models/function_rollback_deployment_response.rbs +117 -0
- data/sig/zavudev/models/function_update_params.rbs +21 -0
- data/sig/zavudev/models/functions/git_link_deploy_now_params.rbs +25 -0
- data/sig/zavudev/models/functions/git_link_deploy_now_response.rbs +15 -0
- data/sig/zavudev/models/functions/git_link_link_params.rbs +59 -0
- data/sig/zavudev/models/functions/git_link_link_response.rbs +159 -0
- data/sig/zavudev/models/functions/git_link_retrieve_params.rbs +25 -0
- data/sig/zavudev/models/functions/git_link_retrieve_response.rbs +159 -0
- data/sig/zavudev/models/functions/git_link_unlink_params.rbs +25 -0
- data/sig/zavudev/models/functions/git_link_update_params.rbs +47 -0
- data/sig/zavudev/models/functions/git_link_update_response.rbs +159 -0
- data/sig/zavudev/models/functions/trigger_create_params.rbs +45 -0
- data/sig/zavudev/models/functions/trigger_create_response.rbs +94 -0
- data/sig/zavudev/models/functions/trigger_delete_params.rbs +25 -0
- data/sig/zavudev/models/functions/trigger_list_params.rbs +25 -0
- data/sig/zavudev/models/functions/trigger_list_response.rbs +84 -0
- data/sig/zavudev/models/functions/trigger_update_params.rbs +30 -0
- data/sig/zavudev/models/functions/trigger_update_response.rbs +17 -0
- data/sig/zavudev/models/introspect_validate_email_params.rbs +32 -0
- data/sig/zavudev/models/introspect_validate_email_response.rbs +135 -0
- data/sig/zavudev/models/invitation.rbs +58 -2
- data/sig/zavudev/models/invitation_create_params.rbs +2 -1
- data/sig/zavudev/models/invitation_list_params.rbs +3 -1
- data/sig/zavudev/models/message.rbs +16 -0
- data/sig/zavudev/models/message_content.rbs +117 -0
- data/sig/zavudev/models/{contact_dismiss_merge_suggestion_params.rbs → message_list_attachments_params.rbs} +6 -6
- data/sig/zavudev/models/message_list_attachments_response.rbs +70 -0
- data/sig/zavudev/models/message_type.rbs +4 -0
- data/sig/zavudev/models/phone_number_search_available_params.rbs +7 -0
- data/sig/zavudev/models/phone_number_type.rbs +2 -1
- data/sig/zavudev/models/sender.rbs +7 -0
- data/sig/zavudev/models/sender_create_params.rbs +35 -0
- data/sig/zavudev/models/sender_update_params.rbs +35 -0
- data/sig/zavudev/models/sender_webhook.rbs +17 -0
- data/sig/zavudev/models/senders/agent/agent_tool.rbs +10 -3
- data/sig/zavudev/models/senders/agent/knowledge_bases/document_retrieve_document_params.rbs +38 -0
- data/sig/zavudev/models/senders/agent/knowledge_bases/document_retrieve_document_response.rbs +22 -0
- data/sig/zavudev/models/senders/agent/knowledge_bases/document_update_document_params.rbs +56 -0
- data/sig/zavudev/models/senders/agent/knowledge_bases/document_update_document_response.rbs +22 -0
- data/sig/zavudev/models/senders/agent/tool_list_test_runs_params.rbs +38 -0
- data/sig/zavudev/models/senders/agent/tool_list_test_runs_response.rbs +83 -0
- data/sig/zavudev/models/senders/agent/tool_test_response.rbs +68 -4
- data/sig/zavudev/models/senders/agent/tools/webhook_rotate_secret_params.rbs +34 -0
- data/sig/zavudev/models/senders/agent.rbs +161 -3
- data/sig/zavudev/models/senders/agent_create_params.rbs +152 -1
- data/sig/zavudev/models/senders/agent_execution.rbs +13 -3
- data/sig/zavudev/models/senders/agent_update_params.rbs +152 -1
- data/sig/zavudev/models/senders/telegram_connect_params.rbs +30 -0
- data/sig/zavudev/models/senders/telegram_connect_response.rbs +49 -0
- data/sig/zavudev/models/senders/telegram_disconnect_params.rbs +25 -0
- data/sig/zavudev/models/template.rbs +2 -1
- data/sig/zavudev/models/template_create_params.rbs +9 -6
- data/sig/zavudev/models/template_sync_params.rbs +25 -0
- data/sig/zavudev/models/template_sync_response.rbs +45 -0
- data/sig/zavudev/models/url_escalate_params.rbs +28 -0
- data/sig/zavudev/models/url_escalate_response.rbs +15 -0
- data/sig/zavudev/models/webhook_event.rbs +10 -0
- data/sig/zavudev/models.rbs +60 -2
- data/sig/zavudev/resources/agent_templates.rbs +16 -0
- data/sig/zavudev/resources/agents/senders.rbs +21 -0
- data/sig/zavudev/resources/agents.rbs +72 -0
- data/sig/zavudev/resources/calls.rbs +35 -0
- data/sig/zavudev/resources/contacts.rbs +3 -5
- data/sig/zavudev/resources/conversations.rbs +33 -0
- data/sig/zavudev/resources/email_domains.rbs +31 -0
- data/sig/zavudev/resources/functions/git_link.rbs +42 -0
- data/sig/zavudev/resources/functions/triggers.rbs +33 -0
- data/sig/zavudev/resources/functions.rbs +27 -0
- data/sig/zavudev/resources/introspect.rbs +6 -0
- data/sig/zavudev/resources/messages.rbs +5 -0
- data/sig/zavudev/resources/phone_numbers.rbs +1 -0
- data/sig/zavudev/resources/senders/agent/knowledge_bases/documents.rbs +16 -0
- data/sig/zavudev/resources/senders/agent/tools/webhook.rbs +19 -0
- data/sig/zavudev/resources/senders/agent/tools.rbs +9 -0
- data/sig/zavudev/resources/senders/agent.rbs +2 -0
- data/sig/zavudev/resources/senders/telegram.rbs +20 -0
- data/sig/zavudev/resources/senders.rbs +8 -0
- data/sig/zavudev/resources/templates.rbs +5 -0
- data/sig/zavudev/resources/urls.rbs +6 -0
- 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
|
-
#
|
|
46
|
-
#
|
|
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
|
-
|
|
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
|
-
#
|
|
109
|
-
#
|
|
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
|
-
|
|
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
|
-
|
|
168
|
-
|
|
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
|
-
#
|
|
43
|
-
#
|
|
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
|
-
#
|
|
97
|
-
#
|
|
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
|
-
#
|
|
127
|
-
#
|
|
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
|