cerca 0.1.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 +7 -0
- data/.ignore +2 -0
- data/CHANGELOG.md +17 -0
- data/README.md +275 -0
- data/SECURITY.md +27 -0
- data/lib/cerca/client.rb +144 -0
- data/lib/cerca/errors.rb +228 -0
- data/lib/cerca/file_part.rb +58 -0
- data/lib/cerca/internal/agents_cursor_page.rb +92 -0
- data/lib/cerca/internal/approval_requests_cursor_page.rb +92 -0
- data/lib/cerca/internal/connections_cursor_page.rb +92 -0
- data/lib/cerca/internal/entries_cursor_page.rb +92 -0
- data/lib/cerca/internal/events_cursor_page.rb +92 -0
- data/lib/cerca/internal/fleets_cursor_page.rb +92 -0
- data/lib/cerca/internal/grants_cursor_page.rb +92 -0
- data/lib/cerca/internal/results_cursor_page.rb +92 -0
- data/lib/cerca/internal/sources_cursor_page.rb +92 -0
- data/lib/cerca/internal/stream.rb +55 -0
- data/lib/cerca/internal/subscriptions_cursor_page.rb +92 -0
- data/lib/cerca/internal/threads_cursor_page.rb +92 -0
- data/lib/cerca/internal/transport/base_client.rb +570 -0
- data/lib/cerca/internal/transport/pooled_net_requester.rb +210 -0
- data/lib/cerca/internal/type/array_of.rb +168 -0
- data/lib/cerca/internal/type/base_model.rb +530 -0
- data/lib/cerca/internal/type/base_page.rb +55 -0
- data/lib/cerca/internal/type/base_stream.rb +83 -0
- data/lib/cerca/internal/type/boolean.rb +77 -0
- data/lib/cerca/internal/type/converter.rb +327 -0
- data/lib/cerca/internal/type/enum.rb +152 -0
- data/lib/cerca/internal/type/file_input.rb +110 -0
- data/lib/cerca/internal/type/hash_of.rb +188 -0
- data/lib/cerca/internal/type/request_parameters.rb +42 -0
- data/lib/cerca/internal/type/union.rb +258 -0
- data/lib/cerca/internal/type/unknown.rb +81 -0
- data/lib/cerca/internal/util.rb +966 -0
- data/lib/cerca/internal.rb +20 -0
- data/lib/cerca/models/agent.rb +87 -0
- data/lib/cerca/models/agent_create_params.rb +47 -0
- data/lib/cerca/models/agent_delete_params.rb +20 -0
- data/lib/cerca/models/agent_delete_response.rb +16 -0
- data/lib/cerca/models/agent_list_params.rb +61 -0
- data/lib/cerca/models/agent_list_tools_params.rb +20 -0
- data/lib/cerca/models/agent_list_tools_response.rb +29 -0
- data/lib/cerca/models/agent_retrieve_config_params.rb +20 -0
- data/lib/cerca/models/agent_retrieve_params.rb +20 -0
- data/lib/cerca/models/agent_summary.rb +84 -0
- data/lib/cerca/models/agent_update_metadata_params.rb +33 -0
- data/lib/cerca/models/agent_update_params.rb +26 -0
- data/lib/cerca/models/api_key_tool_source_auth.rb +34 -0
- data/lib/cerca/models/approval_grant.rb +57 -0
- data/lib/cerca/models/approval_grant_delete_for_thread_params.rb +32 -0
- data/lib/cerca/models/approval_grant_delete_for_thread_response.rb +16 -0
- data/lib/cerca/models/approval_grant_delete_params.rb +26 -0
- data/lib/cerca/models/approval_grant_delete_response.rb +16 -0
- data/lib/cerca/models/approval_grant_list_for_thread_params.rb +26 -0
- data/lib/cerca/models/approval_grant_list_for_thread_response.rb +8 -0
- data/lib/cerca/models/approval_grant_list_params.rb +41 -0
- data/lib/cerca/models/approval_mode.rb +15 -0
- data/lib/cerca/models/approval_policy.rb +21 -0
- data/lib/cerca/models/approval_request.rb +133 -0
- data/lib/cerca/models/approval_request_list_params.rb +49 -0
- data/lib/cerca/models/approval_request_resolve_params.rb +65 -0
- data/lib/cerca/models/attached_connection.rb +22 -0
- data/lib/cerca/models/auth_context_params.rb +14 -0
- data/lib/cerca/models/auth_context_response.rb +22 -0
- data/lib/cerca/models/auth_fleets_response.rb +27 -0
- data/lib/cerca/models/auth_injection.rb +65 -0
- data/lib/cerca/models/auth_list_fleets_params.rb +34 -0
- data/lib/cerca/models/compiled_context.rb +30 -0
- data/lib/cerca/models/configuration.rb +41 -0
- data/lib/cerca/models/configuration_field_name.rb +17 -0
- data/lib/cerca/models/connection.rb +70 -0
- data/lib/cerca/models/connection_attach_params.rb +32 -0
- data/lib/cerca/models/connection_create_params.rb +50 -0
- data/lib/cerca/models/connection_delete_params.rb +48 -0
- data/lib/cerca/models/connection_delete_response.rb +16 -0
- data/lib/cerca/models/connection_detach_params.rb +26 -0
- data/lib/cerca/models/connection_detach_response.rb +16 -0
- data/lib/cerca/models/connection_list_for_agent_params.rb +20 -0
- data/lib/cerca/models/connection_list_for_agent_response.rb +28 -0
- data/lib/cerca/models/connection_list_params.rb +61 -0
- data/lib/cerca/models/connection_owner.rb +46 -0
- data/lib/cerca/models/content_block.rb +209 -0
- data/lib/cerca/models/context_delete_params.rb +29 -0
- data/lib/cerca/models/context_delete_response.rb +16 -0
- data/lib/cerca/models/context_list_params.rb +49 -0
- data/lib/cerca/models/context_retrieve_params.rb +29 -0
- data/lib/cerca/models/context_search_params.rb +57 -0
- data/lib/cerca/models/context_write_params.rb +44 -0
- data/lib/cerca/models/credential_provider.rb +20 -0
- data/lib/cerca/models/credential_type.rb +15 -0
- data/lib/cerca/models/discovered_tool.rb +119 -0
- data/lib/cerca/models/effective_configuration.rb +86 -0
- data/lib/cerca/models/entry.rb +40 -0
- data/lib/cerca/models/entry_summary.rb +40 -0
- data/lib/cerca/models/error_response.rb +23 -0
- data/lib/cerca/models/event_list_for_agent_params.rb +68 -0
- data/lib/cerca/models/event_list_for_fleet_params.rb +68 -0
- data/lib/cerca/models/event_list_for_thread_params.rb +75 -0
- data/lib/cerca/models/event_stream_for_agent_params.rb +64 -0
- data/lib/cerca/models/event_stream_for_fleet_params.rb +64 -0
- data/lib/cerca/models/event_stream_for_thread_events_params.rb +71 -0
- data/lib/cerca/models/event_stream_for_thread_params.rb +26 -0
- data/lib/cerca/models/exec_result.rb +63 -0
- data/lib/cerca/models/execution_principal.rb +56 -0
- data/lib/cerca/models/fleet.rb +39 -0
- data/lib/cerca/models/http_endpoint.rb +71 -0
- data/lib/cerca/models/http_tool_definition.rb +65 -0
- data/lib/cerca/models/http_tool_execution_policy.rb +47 -0
- data/lib/cerca/models/http_tool_source.rb +98 -0
- data/lib/cerca/models/json_object.rb +8 -0
- data/lib/cerca/models/mcp_tool_execution_policy.rb +47 -0
- data/lib/cerca/models/mcp_tool_source.rb +98 -0
- data/lib/cerca/models/message.rb +44 -0
- data/lib/cerca/models/metadata.rb +8 -0
- data/lib/cerca/models/model_descriptor.rb +64 -0
- data/lib/cerca/models/model_list_params.rb +14 -0
- data/lib/cerca/models/model_list_response.rb +16 -0
- data/lib/cerca/models/no_tool_source_auth.rb +15 -0
- data/lib/cerca/models/oauth_connect_params.rb +49 -0
- data/lib/cerca/models/oauth_connect_response.rb +41 -0
- data/lib/cerca/models/oauth_connection_tool_source_auth.rb +41 -0
- data/lib/cerca/models/oauth_exchange_config.rb +118 -0
- data/lib/cerca/models/oauth_exchange_tool_source_auth.rb +36 -0
- data/lib/cerca/models/read_response.rb +22 -0
- data/lib/cerca/models/response_normalization_hint.rb +30 -0
- data/lib/cerca/models/runtime_webhook_event.rb +1884 -0
- data/lib/cerca/models/sandbox_exec_params.rb +51 -0
- data/lib/cerca/models/sandbox_read_params.rb +38 -0
- data/lib/cerca/models/sandbox_write_params.rb +32 -0
- data/lib/cerca/models/sandbox_write_response.rb +16 -0
- data/lib/cerca/models/schedule.rb +105 -0
- data/lib/cerca/models/schedule_create_params.rb +82 -0
- data/lib/cerca/models/schedule_delete_params.rb +26 -0
- data/lib/cerca/models/schedule_delete_response.rb +16 -0
- data/lib/cerca/models/schedule_list_params.rb +20 -0
- data/lib/cerca/models/schedule_list_response.rb +16 -0
- data/lib/cerca/models/schedule_trigger_params.rb +26 -0
- data/lib/cerca/models/schedule_trigger_response.rb +16 -0
- data/lib/cerca/models/schedule_update_params.rb +96 -0
- data/lib/cerca/models/search_result.rb +52 -0
- data/lib/cerca/models/source_warning.rb +27 -0
- data/lib/cerca/models/status.rb +20 -0
- data/lib/cerca/models/steer_result.rb +47 -0
- data/lib/cerca/models/sub_thread_summary.rb +114 -0
- data/lib/cerca/models/subscription_event.rb +22 -0
- data/lib/cerca/models/thread.rb +202 -0
- data/lib/cerca/models/thread_cancel_params.rb +26 -0
- data/lib/cerca/models/thread_close_params.rb +26 -0
- data/lib/cerca/models/thread_compact_params.rb +26 -0
- data/lib/cerca/models/thread_create_params.rb +63 -0
- data/lib/cerca/models/thread_list_params.rb +57 -0
- data/lib/cerca/models/thread_retrieve_params.rb +66 -0
- data/lib/cerca/models/thread_start_turn_params.rb +55 -0
- data/lib/cerca/models/thread_steer_params.rb +32 -0
- data/lib/cerca/models/thread_stream_event.rb +888 -0
- data/lib/cerca/models/thread_summary.rb +92 -0
- data/lib/cerca/models/token_usage.rb +21 -0
- data/lib/cerca/models/tool.rb +22 -0
- data/lib/cerca/models/tool_approval_mode.rb +15 -0
- data/lib/cerca/models/tool_connection_metadata.rb +8 -0
- data/lib/cerca/models/tool_create_params.rb +157 -0
- data/lib/cerca/models/tool_delete_params.rb +26 -0
- data/lib/cerca/models/tool_descriptor.rb +78 -0
- data/lib/cerca/models/tool_list_params.rb +41 -0
- data/lib/cerca/models/tool_name.rb +50 -0
- data/lib/cerca/models/tool_retrieve_params.rb +26 -0
- data/lib/cerca/models/tool_source.rb +19 -0
- data/lib/cerca/models/tool_source_auth.rb +24 -0
- data/lib/cerca/models/tool_spec.rb +7 -0
- data/lib/cerca/models/tool_update_params.rb +163 -0
- data/lib/cerca/models/turn.rb +94 -0
- data/lib/cerca/models/webhook_create_params.rb +37 -0
- data/lib/cerca/models/webhook_delete_params.rb +26 -0
- data/lib/cerca/models/webhook_event_type.rb +33 -0
- data/lib/cerca/models/webhook_list_params.rb +41 -0
- data/lib/cerca/models/webhook_retrieve_params.rb +26 -0
- data/lib/cerca/models/webhook_rotate_params.rb +26 -0
- data/lib/cerca/models/webhook_subscription.rb +55 -0
- data/lib/cerca/models/webhook_subscription_created.rb +73 -0
- data/lib/cerca/models/webhook_subscription_event_type.rb +33 -0
- data/lib/cerca/models/webhook_test_params.rb +26 -0
- data/lib/cerca/models/webhook_test_response.rb +28 -0
- data/lib/cerca/models/webhook_update_params.rb +52 -0
- data/lib/cerca/models.rb +310 -0
- data/lib/cerca/request_options.rb +77 -0
- data/lib/cerca/resources/agents.rb +197 -0
- data/lib/cerca/resources/approval_grants.rb +106 -0
- data/lib/cerca/resources/approval_requests.rb +72 -0
- data/lib/cerca/resources/auth.rb +61 -0
- data/lib/cerca/resources/connections.rb +167 -0
- data/lib/cerca/resources/context.rb +157 -0
- data/lib/cerca/resources/events.rb +269 -0
- data/lib/cerca/resources/fleets.rb +14 -0
- data/lib/cerca/resources/models.rb +32 -0
- data/lib/cerca/resources/oauth.rb +45 -0
- data/lib/cerca/resources/sandbox.rb +91 -0
- data/lib/cerca/resources/schedules.rb +159 -0
- data/lib/cerca/resources/threads.rb +233 -0
- data/lib/cerca/resources/tools.rb +130 -0
- data/lib/cerca/resources/webhooks.rb +181 -0
- data/lib/cerca/version.rb +5 -0
- data/lib/cerca.rb +231 -0
- data/manifest.yaml +17 -0
- data/rbi/cerca/client.rbi +91 -0
- data/rbi/cerca/errors.rbi +205 -0
- data/rbi/cerca/file_part.rbi +37 -0
- data/rbi/cerca/internal/agents_cursor_page.rbi +25 -0
- data/rbi/cerca/internal/approval_requests_cursor_page.rbi +25 -0
- data/rbi/cerca/internal/connections_cursor_page.rbi +25 -0
- data/rbi/cerca/internal/entries_cursor_page.rbi +25 -0
- data/rbi/cerca/internal/events_cursor_page.rbi +25 -0
- data/rbi/cerca/internal/fleets_cursor_page.rbi +25 -0
- data/rbi/cerca/internal/grants_cursor_page.rbi +25 -0
- data/rbi/cerca/internal/results_cursor_page.rbi +25 -0
- data/rbi/cerca/internal/sources_cursor_page.rbi +25 -0
- data/rbi/cerca/internal/stream.rbi +18 -0
- data/rbi/cerca/internal/subscriptions_cursor_page.rbi +25 -0
- data/rbi/cerca/internal/threads_cursor_page.rbi +25 -0
- data/rbi/cerca/internal/transport/base_client.rbi +313 -0
- data/rbi/cerca/internal/transport/pooled_net_requester.rbi +82 -0
- data/rbi/cerca/internal/type/array_of.rbi +104 -0
- data/rbi/cerca/internal/type/base_model.rbi +299 -0
- data/rbi/cerca/internal/type/base_page.rbi +42 -0
- data/rbi/cerca/internal/type/base_stream.rbi +75 -0
- data/rbi/cerca/internal/type/boolean.rbi +58 -0
- data/rbi/cerca/internal/type/converter.rbi +204 -0
- data/rbi/cerca/internal/type/enum.rbi +82 -0
- data/rbi/cerca/internal/type/file_input.rbi +58 -0
- data/rbi/cerca/internal/type/hash_of.rbi +104 -0
- data/rbi/cerca/internal/type/request_parameters.rbi +29 -0
- data/rbi/cerca/internal/type/union.rbi +126 -0
- data/rbi/cerca/internal/type/unknown.rbi +58 -0
- data/rbi/cerca/internal/util.rbi +506 -0
- data/rbi/cerca/internal.rbi +16 -0
- data/rbi/cerca/models/agent.rbi +102 -0
- data/rbi/cerca/models/agent_create_params.rbi +75 -0
- data/rbi/cerca/models/agent_delete_params.rbi +35 -0
- data/rbi/cerca/models/agent_delete_response.rbi +23 -0
- data/rbi/cerca/models/agent_list_params.rbi +99 -0
- data/rbi/cerca/models/agent_list_tools_params.rbi +35 -0
- data/rbi/cerca/models/agent_list_tools_response.rbi +56 -0
- data/rbi/cerca/models/agent_retrieve_config_params.rbi +35 -0
- data/rbi/cerca/models/agent_retrieve_params.rbi +35 -0
- data/rbi/cerca/models/agent_summary.rbi +91 -0
- data/rbi/cerca/models/agent_update_metadata_params.rbi +51 -0
- data/rbi/cerca/models/agent_update_params.rbi +46 -0
- data/rbi/cerca/models/api_key_tool_source_auth.rbi +66 -0
- data/rbi/cerca/models/approval_grant.rbi +80 -0
- data/rbi/cerca/models/approval_grant_delete_for_thread_params.rbi +51 -0
- data/rbi/cerca/models/approval_grant_delete_for_thread_response.rbi +26 -0
- data/rbi/cerca/models/approval_grant_delete_params.rbi +43 -0
- data/rbi/cerca/models/approval_grant_delete_response.rbi +26 -0
- data/rbi/cerca/models/approval_grant_list_for_thread_params.rbi +46 -0
- data/rbi/cerca/models/approval_grant_list_for_thread_response.rbi +11 -0
- data/rbi/cerca/models/approval_grant_list_params.rbi +65 -0
- data/rbi/cerca/models/approval_mode.rbi +19 -0
- data/rbi/cerca/models/approval_policy.rbi +42 -0
- data/rbi/cerca/models/approval_request.rbi +152 -0
- data/rbi/cerca/models/approval_request_list_params.rbi +76 -0
- data/rbi/cerca/models/approval_request_resolve_params.rbi +137 -0
- data/rbi/cerca/models/attached_connection.rbi +37 -0
- data/rbi/cerca/models/auth_context_params.rbi +27 -0
- data/rbi/cerca/models/auth_context_response.rbi +26 -0
- data/rbi/cerca/models/auth_fleets_response.rbi +43 -0
- data/rbi/cerca/models/auth_injection.rbi +91 -0
- data/rbi/cerca/models/auth_list_fleets_params.rbi +59 -0
- data/rbi/cerca/models/compiled_context.rbi +41 -0
- data/rbi/cerca/models/configuration.rbi +67 -0
- data/rbi/cerca/models/configuration_field_name.rbi +26 -0
- data/rbi/cerca/models/connection.rbi +83 -0
- data/rbi/cerca/models/connection_attach_params.rbi +56 -0
- data/rbi/cerca/models/connection_create_params.rbi +87 -0
- data/rbi/cerca/models/connection_delete_params.rbi +87 -0
- data/rbi/cerca/models/connection_delete_response.rbi +26 -0
- data/rbi/cerca/models/connection_detach_params.rbi +43 -0
- data/rbi/cerca/models/connection_detach_response.rbi +26 -0
- data/rbi/cerca/models/connection_list_for_agent_params.rbi +35 -0
- data/rbi/cerca/models/connection_list_for_agent_response.rbi +46 -0
- data/rbi/cerca/models/connection_list_params.rbi +103 -0
- data/rbi/cerca/models/connection_owner.rbi +68 -0
- data/rbi/cerca/models/content_block.rbi +324 -0
- data/rbi/cerca/models/context_delete_params.rbi +49 -0
- data/rbi/cerca/models/context_delete_response.rbi +23 -0
- data/rbi/cerca/models/context_list_params.rbi +76 -0
- data/rbi/cerca/models/context_retrieve_params.rbi +49 -0
- data/rbi/cerca/models/context_search_params.rbi +84 -0
- data/rbi/cerca/models/context_write_params.rbi +71 -0
- data/rbi/cerca/models/credential_provider.rbi +26 -0
- data/rbi/cerca/models/credential_type.rbi +19 -0
- data/rbi/cerca/models/discovered_tool.rbi +156 -0
- data/rbi/cerca/models/effective_configuration.rbi +122 -0
- data/rbi/cerca/models/entry.rbi +53 -0
- data/rbi/cerca/models/entry_summary.rbi +54 -0
- data/rbi/cerca/models/error_response.rbi +32 -0
- data/rbi/cerca/models/event_list_for_agent_params.rbi +115 -0
- data/rbi/cerca/models/event_list_for_fleet_params.rbi +115 -0
- data/rbi/cerca/models/event_list_for_thread_params.rbi +121 -0
- data/rbi/cerca/models/event_stream_for_agent_params.rbi +115 -0
- data/rbi/cerca/models/event_stream_for_fleet_params.rbi +115 -0
- data/rbi/cerca/models/event_stream_for_thread_events_params.rbi +134 -0
- data/rbi/cerca/models/event_stream_for_thread_params.rbi +43 -0
- data/rbi/cerca/models/exec_result.rbi +85 -0
- data/rbi/cerca/models/execution_principal.rbi +82 -0
- data/rbi/cerca/models/fleet.rbi +50 -0
- data/rbi/cerca/models/http_endpoint.rbi +112 -0
- data/rbi/cerca/models/http_tool_definition.rbi +92 -0
- data/rbi/cerca/models/http_tool_execution_policy.rbi +106 -0
- data/rbi/cerca/models/http_tool_source.rbi +117 -0
- data/rbi/cerca/models/json_object.rbi +11 -0
- data/rbi/cerca/models/mcp_tool_execution_policy.rbi +106 -0
- data/rbi/cerca/models/mcp_tool_source.rbi +117 -0
- data/rbi/cerca/models/message.rbi +68 -0
- data/rbi/cerca/models/metadata.rbi +11 -0
- data/rbi/cerca/models/model_descriptor.rbi +92 -0
- data/rbi/cerca/models/model_list_params.rbi +25 -0
- data/rbi/cerca/models/model_list_response.rbi +27 -0
- data/rbi/cerca/models/no_tool_source_auth.rbi +23 -0
- data/rbi/cerca/models/oauth_connect_params.rbi +85 -0
- data/rbi/cerca/models/oauth_connect_response.rbi +67 -0
- data/rbi/cerca/models/oauth_connection_tool_source_auth.rbi +88 -0
- data/rbi/cerca/models/oauth_exchange_config.rbi +185 -0
- data/rbi/cerca/models/oauth_exchange_tool_source_auth.rbi +85 -0
- data/rbi/cerca/models/read_response.rbi +26 -0
- data/rbi/cerca/models/response_normalization_hint.rbi +57 -0
- data/rbi/cerca/models/runtime_webhook_event.rbi +3178 -0
- data/rbi/cerca/models/sandbox_exec_params.rbi +75 -0
- data/rbi/cerca/models/sandbox_read_params.rbi +65 -0
- data/rbi/cerca/models/sandbox_write_params.rbi +48 -0
- data/rbi/cerca/models/sandbox_write_response.rbi +23 -0
- data/rbi/cerca/models/schedule.rbi +123 -0
- data/rbi/cerca/models/schedule_create_params.rbi +111 -0
- data/rbi/cerca/models/schedule_delete_params.rbi +43 -0
- data/rbi/cerca/models/schedule_delete_response.rbi +23 -0
- data/rbi/cerca/models/schedule_list_params.rbi +35 -0
- data/rbi/cerca/models/schedule_list_response.rbi +27 -0
- data/rbi/cerca/models/schedule_trigger_params.rbi +43 -0
- data/rbi/cerca/models/schedule_trigger_response.rbi +26 -0
- data/rbi/cerca/models/schedule_update_params.rbi +132 -0
- data/rbi/cerca/models/search_result.rbi +72 -0
- data/rbi/cerca/models/source_warning.rbi +36 -0
- data/rbi/cerca/models/status.rbi +24 -0
- data/rbi/cerca/models/steer_result.rbi +69 -0
- data/rbi/cerca/models/sub_thread_summary.rbi +130 -0
- data/rbi/cerca/models/subscription_event.rbi +57 -0
- data/rbi/cerca/models/thread.rbi +218 -0
- data/rbi/cerca/models/thread_cancel_params.rbi +43 -0
- data/rbi/cerca/models/thread_close_params.rbi +43 -0
- data/rbi/cerca/models/thread_compact_params.rbi +43 -0
- data/rbi/cerca/models/thread_create_params.rbi +94 -0
- data/rbi/cerca/models/thread_list_params.rbi +87 -0
- data/rbi/cerca/models/thread_retrieve_params.rbi +130 -0
- data/rbi/cerca/models/thread_start_turn_params.rbi +77 -0
- data/rbi/cerca/models/thread_steer_params.rbi +48 -0
- data/rbi/cerca/models/thread_stream_event.rbi +1507 -0
- data/rbi/cerca/models/thread_summary.rbi +99 -0
- data/rbi/cerca/models/token_usage.rbi +28 -0
- data/rbi/cerca/models/tool.rbi +18 -0
- data/rbi/cerca/models/tool_approval_mode.rbi +19 -0
- data/rbi/cerca/models/tool_connection_metadata.rbi +11 -0
- data/rbi/cerca/models/tool_create_params.rbi +286 -0
- data/rbi/cerca/models/tool_delete_params.rbi +43 -0
- data/rbi/cerca/models/tool_descriptor.rbi +110 -0
- data/rbi/cerca/models/tool_list_params.rbi +63 -0
- data/rbi/cerca/models/tool_name.rbi +70 -0
- data/rbi/cerca/models/tool_retrieve_params.rbi +43 -0
- data/rbi/cerca/models/tool_source.rbi +16 -0
- data/rbi/cerca/models/tool_source_auth.rbi +25 -0
- data/rbi/cerca/models/tool_spec.rbi +7 -0
- data/rbi/cerca/models/tool_update_params.rbi +291 -0
- data/rbi/cerca/models/turn.rbi +116 -0
- data/rbi/cerca/models/webhook_create_params.rbi +68 -0
- data/rbi/cerca/models/webhook_delete_params.rbi +43 -0
- data/rbi/cerca/models/webhook_event_type.rbi +56 -0
- data/rbi/cerca/models/webhook_list_params.rbi +65 -0
- data/rbi/cerca/models/webhook_retrieve_params.rbi +43 -0
- data/rbi/cerca/models/webhook_rotate_params.rbi +43 -0
- data/rbi/cerca/models/webhook_subscription.rbi +73 -0
- data/rbi/cerca/models/webhook_subscription_created.rbi +83 -0
- data/rbi/cerca/models/webhook_subscription_event_type.rbi +115 -0
- data/rbi/cerca/models/webhook_test_params.rbi +43 -0
- data/rbi/cerca/models/webhook_test_response.rbi +43 -0
- data/rbi/cerca/models/webhook_update_params.rbi +88 -0
- data/rbi/cerca/models.rbi +277 -0
- data/rbi/cerca/request_options.rbi +55 -0
- data/rbi/cerca/resources/agents.rbi +125 -0
- data/rbi/cerca/resources/approval_grants.rbi +66 -0
- data/rbi/cerca/resources/approval_requests.rbi +58 -0
- data/rbi/cerca/resources/auth.rbi +39 -0
- data/rbi/cerca/resources/connections.rbi +116 -0
- data/rbi/cerca/resources/context.rbi +114 -0
- data/rbi/cerca/resources/events.rbi +188 -0
- data/rbi/cerca/resources/fleets.rbi +12 -0
- data/rbi/cerca/resources/models.rbi +21 -0
- data/rbi/cerca/resources/oauth.rbi +39 -0
- data/rbi/cerca/resources/sandbox.rbi +60 -0
- data/rbi/cerca/resources/schedules.rbi +110 -0
- data/rbi/cerca/resources/threads.rbi +160 -0
- data/rbi/cerca/resources/tools.rbi +87 -0
- data/rbi/cerca/resources/webhooks.rbi +121 -0
- data/rbi/cerca/version.rbi +5 -0
- data/sig/cerca/client.rbs +54 -0
- data/sig/cerca/errors.rbs +117 -0
- data/sig/cerca/file_part.rbs +21 -0
- data/sig/cerca/internal/agents_cursor_page.rbs +15 -0
- data/sig/cerca/internal/approval_requests_cursor_page.rbs +15 -0
- data/sig/cerca/internal/connections_cursor_page.rbs +15 -0
- data/sig/cerca/internal/entries_cursor_page.rbs +15 -0
- data/sig/cerca/internal/events_cursor_page.rbs +15 -0
- data/sig/cerca/internal/fleets_cursor_page.rbs +15 -0
- data/sig/cerca/internal/grants_cursor_page.rbs +15 -0
- data/sig/cerca/internal/results_cursor_page.rbs +15 -0
- data/sig/cerca/internal/sources_cursor_page.rbs +15 -0
- data/sig/cerca/internal/stream.rbs +9 -0
- data/sig/cerca/internal/subscriptions_cursor_page.rbs +15 -0
- data/sig/cerca/internal/threads_cursor_page.rbs +15 -0
- data/sig/cerca/internal/transport/base_client.rbs +133 -0
- data/sig/cerca/internal/transport/pooled_net_requester.rbs +48 -0
- data/sig/cerca/internal/type/array_of.rbs +48 -0
- data/sig/cerca/internal/type/base_model.rbs +102 -0
- data/sig/cerca/internal/type/base_page.rbs +24 -0
- data/sig/cerca/internal/type/base_stream.rbs +38 -0
- data/sig/cerca/internal/type/boolean.rbs +26 -0
- data/sig/cerca/internal/type/converter.rbs +79 -0
- data/sig/cerca/internal/type/enum.rbs +32 -0
- data/sig/cerca/internal/type/file_input.rbs +25 -0
- data/sig/cerca/internal/type/hash_of.rbs +48 -0
- data/sig/cerca/internal/type/request_parameters.rbs +17 -0
- data/sig/cerca/internal/type/union.rbs +52 -0
- data/sig/cerca/internal/type/unknown.rbs +26 -0
- data/sig/cerca/internal/util.rbs +199 -0
- data/sig/cerca/internal.rbs +9 -0
- data/sig/cerca/models/agent.rbs +69 -0
- data/sig/cerca/models/agent_create_params.rbs +49 -0
- data/sig/cerca/models/agent_delete_params.rbs +23 -0
- data/sig/cerca/models/agent_delete_response.rbs +13 -0
- data/sig/cerca/models/agent_list_params.rbs +62 -0
- data/sig/cerca/models/agent_list_tools_params.rbs +23 -0
- data/sig/cerca/models/agent_list_tools_response.rbs +29 -0
- data/sig/cerca/models/agent_retrieve_config_params.rbs +23 -0
- data/sig/cerca/models/agent_retrieve_params.rbs +23 -0
- data/sig/cerca/models/agent_summary.rbs +65 -0
- data/sig/cerca/models/agent_update_metadata_params.rbs +28 -0
- data/sig/cerca/models/agent_update_params.rbs +28 -0
- data/sig/cerca/models/api_key_tool_source_auth.rbs +30 -0
- data/sig/cerca/models/approval_grant.rbs +56 -0
- data/sig/cerca/models/approval_grant_delete_for_thread_params.rbs +32 -0
- data/sig/cerca/models/approval_grant_delete_for_thread_response.rbs +13 -0
- data/sig/cerca/models/approval_grant_delete_params.rbs +28 -0
- data/sig/cerca/models/approval_grant_delete_response.rbs +13 -0
- data/sig/cerca/models/approval_grant_list_for_thread_params.rbs +28 -0
- data/sig/cerca/models/approval_grant_list_for_thread_response.rbs +7 -0
- data/sig/cerca/models/approval_grant_list_params.rbs +36 -0
- data/sig/cerca/models/approval_mode.rbs +14 -0
- data/sig/cerca/models/approval_policy.rbs +28 -0
- data/sig/cerca/models/approval_request.rbs +108 -0
- data/sig/cerca/models/approval_request_list_params.rbs +42 -0
- data/sig/cerca/models/approval_request_resolve_params.rbs +73 -0
- data/sig/cerca/models/attached_connection.rbs +28 -0
- data/sig/cerca/models/auth_context_params.rbs +14 -0
- data/sig/cerca/models/auth_context_response.rbs +15 -0
- data/sig/cerca/models/auth_fleets_response.rbs +26 -0
- data/sig/cerca/models/auth_injection.rbs +46 -0
- data/sig/cerca/models/auth_list_fleets_params.rbs +32 -0
- data/sig/cerca/models/compiled_context.rbs +30 -0
- data/sig/cerca/models/configuration.rbs +43 -0
- data/sig/cerca/models/configuration_field_name.rbs +17 -0
- data/sig/cerca/models/connection.rbs +55 -0
- data/sig/cerca/models/connection_attach_params.rbs +40 -0
- data/sig/cerca/models/connection_create_params.rbs +43 -0
- data/sig/cerca/models/connection_delete_params.rbs +49 -0
- data/sig/cerca/models/connection_delete_response.rbs +13 -0
- data/sig/cerca/models/connection_detach_params.rbs +28 -0
- data/sig/cerca/models/connection_detach_response.rbs +13 -0
- data/sig/cerca/models/connection_list_for_agent_params.rbs +23 -0
- data/sig/cerca/models/connection_list_for_agent_response.rbs +30 -0
- data/sig/cerca/models/connection_list_params.rbs +58 -0
- data/sig/cerca/models/connection_owner.rbs +35 -0
- data/sig/cerca/models/content_block.rbs +200 -0
- data/sig/cerca/models/context_delete_params.rbs +28 -0
- data/sig/cerca/models/context_delete_response.rbs +13 -0
- data/sig/cerca/models/context_list_params.rbs +42 -0
- data/sig/cerca/models/context_retrieve_params.rbs +28 -0
- data/sig/cerca/models/context_search_params.rbs +52 -0
- data/sig/cerca/models/context_write_params.rbs +50 -0
- data/sig/cerca/models/credential_provider.rbs +20 -0
- data/sig/cerca/models/credential_type.rbs +14 -0
- data/sig/cerca/models/discovered_tool.rbs +109 -0
- data/sig/cerca/models/effective_configuration.rbs +74 -0
- data/sig/cerca/models/entry.rbs +42 -0
- data/sig/cerca/models/entry_summary.rbs +42 -0
- data/sig/cerca/models/error_response.rbs +17 -0
- data/sig/cerca/models/event_list_for_agent_params.rbs +67 -0
- data/sig/cerca/models/event_list_for_fleet_params.rbs +67 -0
- data/sig/cerca/models/event_list_for_thread_params.rbs +72 -0
- data/sig/cerca/models/event_stream_for_agent_params.rbs +67 -0
- data/sig/cerca/models/event_stream_for_fleet_params.rbs +67 -0
- data/sig/cerca/models/event_stream_for_thread_events_params.rbs +72 -0
- data/sig/cerca/models/event_stream_for_thread_params.rbs +28 -0
- data/sig/cerca/models/exec_result.rbs +61 -0
- data/sig/cerca/models/execution_principal.rbs +44 -0
- data/sig/cerca/models/fleet.rbs +40 -0
- data/sig/cerca/models/http_endpoint.rbs +79 -0
- data/sig/cerca/models/http_tool_definition.rbs +62 -0
- data/sig/cerca/models/http_tool_execution_policy.rbs +57 -0
- data/sig/cerca/models/http_tool_source.rbs +83 -0
- data/sig/cerca/models/json_object.rbs +7 -0
- data/sig/cerca/models/mcp_tool_execution_policy.rbs +57 -0
- data/sig/cerca/models/mcp_tool_source.rbs +83 -0
- data/sig/cerca/models/message.rbs +46 -0
- data/sig/cerca/models/metadata.rbs +7 -0
- data/sig/cerca/models/model_descriptor.rbs +63 -0
- data/sig/cerca/models/model_list_params.rbs +14 -0
- data/sig/cerca/models/model_list_response.rbs +13 -0
- data/sig/cerca/models/no_tool_source_auth.rbs +13 -0
- data/sig/cerca/models/oauth_connect_params.rbs +43 -0
- data/sig/cerca/models/oauth_connect_response.rbs +39 -0
- data/sig/cerca/models/oauth_connection_tool_source_auth.rbs +41 -0
- data/sig/cerca/models/oauth_exchange_config.rbs +124 -0
- data/sig/cerca/models/oauth_exchange_tool_source_auth.rbs +30 -0
- data/sig/cerca/models/read_response.rbs +15 -0
- data/sig/cerca/models/response_normalization_hint.rbs +29 -0
- data/sig/cerca/models/runtime_webhook_event.rbs +1803 -0
- data/sig/cerca/models/sandbox_exec_params.rbs +50 -0
- data/sig/cerca/models/sandbox_read_params.rbs +40 -0
- data/sig/cerca/models/sandbox_write_params.rbs +32 -0
- data/sig/cerca/models/sandbox_write_response.rbs +13 -0
- data/sig/cerca/models/schedule.rbs +90 -0
- data/sig/cerca/models/schedule_create_params.rbs +78 -0
- data/sig/cerca/models/schedule_delete_params.rbs +28 -0
- data/sig/cerca/models/schedule_delete_response.rbs +13 -0
- data/sig/cerca/models/schedule_list_params.rbs +23 -0
- data/sig/cerca/models/schedule_list_response.rbs +13 -0
- data/sig/cerca/models/schedule_trigger_params.rbs +28 -0
- data/sig/cerca/models/schedule_trigger_response.rbs +13 -0
- data/sig/cerca/models/schedule_update_params.rbs +94 -0
- data/sig/cerca/models/search_result.rbs +52 -0
- data/sig/cerca/models/source_warning.rbs +23 -0
- data/sig/cerca/models/status.rbs +16 -0
- data/sig/cerca/models/steer_result.rbs +41 -0
- data/sig/cerca/models/sub_thread_summary.rbs +89 -0
- data/sig/cerca/models/subscription_event.rbs +22 -0
- data/sig/cerca/models/thread.rbs +150 -0
- data/sig/cerca/models/thread_cancel_params.rbs +28 -0
- data/sig/cerca/models/thread_close_params.rbs +28 -0
- data/sig/cerca/models/thread_compact_params.rbs +28 -0
- data/sig/cerca/models/thread_create_params.rbs +61 -0
- data/sig/cerca/models/thread_list_params.rbs +54 -0
- data/sig/cerca/models/thread_retrieve_params.rbs +71 -0
- data/sig/cerca/models/thread_start_turn_params.rbs +50 -0
- data/sig/cerca/models/thread_steer_params.rbs +32 -0
- data/sig/cerca/models/thread_stream_event.rbs +855 -0
- data/sig/cerca/models/thread_summary.rbs +70 -0
- data/sig/cerca/models/token_usage.rbs +15 -0
- data/sig/cerca/models/tool.rbs +11 -0
- data/sig/cerca/models/tool_approval_mode.rbs +14 -0
- data/sig/cerca/models/tool_connection_metadata.rbs +7 -0
- data/sig/cerca/models/tool_create_params.rbs +152 -0
- data/sig/cerca/models/tool_delete_params.rbs +28 -0
- data/sig/cerca/models/tool_descriptor.rbs +68 -0
- data/sig/cerca/models/tool_list_params.rbs +36 -0
- data/sig/cerca/models/tool_name.rbs +86 -0
- data/sig/cerca/models/tool_retrieve_params.rbs +28 -0
- data/sig/cerca/models/tool_source.rbs +11 -0
- data/sig/cerca/models/tool_source_auth.rbs +15 -0
- data/sig/cerca/models/tool_spec.rbs +5 -0
- data/sig/cerca/models/tool_update_params.rbs +160 -0
- data/sig/cerca/models/turn.rbs +87 -0
- data/sig/cerca/models/webhook_create_params.rbs +40 -0
- data/sig/cerca/models/webhook_delete_params.rbs +28 -0
- data/sig/cerca/models/webhook_event_type.rbs +52 -0
- data/sig/cerca/models/webhook_list_params.rbs +36 -0
- data/sig/cerca/models/webhook_retrieve_params.rbs +28 -0
- data/sig/cerca/models/webhook_rotate_params.rbs +28 -0
- data/sig/cerca/models/webhook_subscription.rbs +50 -0
- data/sig/cerca/models/webhook_subscription_created.rbs +55 -0
- data/sig/cerca/models/webhook_subscription_event_type.rbs +50 -0
- data/sig/cerca/models/webhook_test_params.rbs +28 -0
- data/sig/cerca/models/webhook_test_response.rbs +22 -0
- data/sig/cerca/models/webhook_update_params.rbs +54 -0
- data/sig/cerca/models.rbs +267 -0
- data/sig/cerca/request_options.rbs +34 -0
- data/sig/cerca/resources/agents.rbs +55 -0
- data/sig/cerca/resources/approval_grants.rbs +33 -0
- data/sig/cerca/resources/approval_requests.rbs +24 -0
- data/sig/cerca/resources/auth.rbs +17 -0
- data/sig/cerca/resources/connections.rbs +48 -0
- data/sig/cerca/resources/context.rbs +45 -0
- data/sig/cerca/resources/events.rbs +69 -0
- data/sig/cerca/resources/fleets.rbs +7 -0
- data/sig/cerca/resources/models.rbs +11 -0
- data/sig/cerca/resources/oauth.rbs +15 -0
- data/sig/cerca/resources/sandbox.rbs +31 -0
- data/sig/cerca/resources/schedules.rbs +52 -0
- data/sig/cerca/resources/threads.rbs +68 -0
- data/sig/cerca/resources/tools.rbs +39 -0
- data/sig/cerca/resources/webhooks.rbs +54 -0
- data/sig/cerca/version.rbs +3 -0
- metadata +666 -0
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Cerca
|
|
4
|
+
module Resources
|
|
5
|
+
class ApprovalGrants
|
|
6
|
+
# Some parameter documentations has been truncated, see
|
|
7
|
+
# {Cerca::Models::ApprovalGrantListParams} for more details.
|
|
8
|
+
#
|
|
9
|
+
# List approval grants
|
|
10
|
+
#
|
|
11
|
+
# @overload list(agent_id, cursor: nil, limit: nil, request_options: {})
|
|
12
|
+
#
|
|
13
|
+
# @param agent_id [String]
|
|
14
|
+
#
|
|
15
|
+
# @param cursor [String] Opaque pagination cursor returned by a previous request.
|
|
16
|
+
#
|
|
17
|
+
# @param limit [String] Maximum number of items to return. Defaults to 20 and preserves parseInt semanti
|
|
18
|
+
#
|
|
19
|
+
# @param request_options [Cerca::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
20
|
+
#
|
|
21
|
+
# @return [Cerca::Internal::GrantsCursorPage<Cerca::Models::ApprovalGrant>]
|
|
22
|
+
#
|
|
23
|
+
# @see Cerca::Models::ApprovalGrantListParams
|
|
24
|
+
def list(agent_id, params = {})
|
|
25
|
+
parsed, options = Cerca::ApprovalGrantListParams.dump_request(params)
|
|
26
|
+
query = Cerca::Internal::Util.encode_query_params(parsed)
|
|
27
|
+
@client.request(
|
|
28
|
+
method: :get,
|
|
29
|
+
path: ["agents/%1$s/approval-grants", agent_id],
|
|
30
|
+
query: query,
|
|
31
|
+
page: Cerca::Internal::GrantsCursorPage,
|
|
32
|
+
model: Cerca::ApprovalGrant,
|
|
33
|
+
options: options
|
|
34
|
+
)
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Delete approval grant
|
|
38
|
+
#
|
|
39
|
+
# @overload delete(agent_id, grant_id, request_options: {})
|
|
40
|
+
#
|
|
41
|
+
# @param agent_id [String]
|
|
42
|
+
# @param grant_id [String]
|
|
43
|
+
# @param request_options [Cerca::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
44
|
+
#
|
|
45
|
+
# @return [Cerca::Models::ApprovalGrantDeleteResponse]
|
|
46
|
+
#
|
|
47
|
+
# @see Cerca::Models::ApprovalGrantDeleteParams
|
|
48
|
+
def delete(agent_id, grant_id, params = {})
|
|
49
|
+
@client.request(
|
|
50
|
+
method: :delete,
|
|
51
|
+
path: ["agents/%1$s/approval-grants/%2$s", agent_id, grant_id],
|
|
52
|
+
model: Cerca::Models::ApprovalGrantDeleteResponse,
|
|
53
|
+
options: params[:request_options]
|
|
54
|
+
)
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Delete approval grant
|
|
58
|
+
#
|
|
59
|
+
# @overload delete_for_thread(agent_id, thread_id, grant_id, request_options: {})
|
|
60
|
+
#
|
|
61
|
+
# @param agent_id [String]
|
|
62
|
+
# @param thread_id [String]
|
|
63
|
+
# @param grant_id [String]
|
|
64
|
+
# @param request_options [Cerca::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
65
|
+
#
|
|
66
|
+
# @return [Cerca::Models::ApprovalGrantDeleteForThreadResponse]
|
|
67
|
+
#
|
|
68
|
+
# @see Cerca::Models::ApprovalGrantDeleteForThreadParams
|
|
69
|
+
def delete_for_thread(agent_id, thread_id, grant_id, params = {})
|
|
70
|
+
@client.request(
|
|
71
|
+
method: :delete,
|
|
72
|
+
path: ["agents/%1$s/threads/%2$s/approval-grants/%3$s", agent_id, thread_id, grant_id],
|
|
73
|
+
model: Cerca::Models::ApprovalGrantDeleteForThreadResponse,
|
|
74
|
+
options: params[:request_options]
|
|
75
|
+
)
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# List approval grants
|
|
79
|
+
#
|
|
80
|
+
# @overload list_for_thread(agent_id, thread_id, request_options: {})
|
|
81
|
+
#
|
|
82
|
+
# @param agent_id [String]
|
|
83
|
+
# @param thread_id [String]
|
|
84
|
+
# @param request_options [Cerca::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
85
|
+
#
|
|
86
|
+
# @return [Array<Cerca::Models::ApprovalGrant>]
|
|
87
|
+
#
|
|
88
|
+
# @see Cerca::Models::ApprovalGrantListForThreadParams
|
|
89
|
+
def list_for_thread(agent_id, thread_id, params = {})
|
|
90
|
+
@client.request(
|
|
91
|
+
method: :get,
|
|
92
|
+
path: ["agents/%1$s/threads/%2$s/approval-grants", agent_id, thread_id],
|
|
93
|
+
model: Cerca::Internal::Type::ArrayOf[Cerca::ApprovalGrant],
|
|
94
|
+
options: params[:request_options]
|
|
95
|
+
)
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# @api private
|
|
99
|
+
#
|
|
100
|
+
# @param client [Cerca::Client]
|
|
101
|
+
def initialize(client:)
|
|
102
|
+
@client = client
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
end
|
|
106
|
+
end
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Cerca
|
|
4
|
+
module Resources
|
|
5
|
+
class ApprovalRequests
|
|
6
|
+
# Some parameter documentations has been truncated, see
|
|
7
|
+
# {Cerca::Models::ApprovalRequestListParams} for more details.
|
|
8
|
+
#
|
|
9
|
+
# List approvals
|
|
10
|
+
#
|
|
11
|
+
# @overload list(agent_id, cursor: nil, limit: nil, thread_id: nil, request_options: {})
|
|
12
|
+
#
|
|
13
|
+
# @param agent_id [String]
|
|
14
|
+
#
|
|
15
|
+
# @param cursor [String] Opaque pagination cursor returned by a previous request.
|
|
16
|
+
#
|
|
17
|
+
# @param limit [String] Maximum number of items to return. Defaults to 20 and preserves parseInt semanti
|
|
18
|
+
#
|
|
19
|
+
# @param thread_id [String] Optional thread id filter.
|
|
20
|
+
#
|
|
21
|
+
# @param request_options [Cerca::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
22
|
+
#
|
|
23
|
+
# @return [Cerca::Internal::ApprovalRequestsCursorPage<Cerca::Models::ApprovalRequest>]
|
|
24
|
+
#
|
|
25
|
+
# @see Cerca::Models::ApprovalRequestListParams
|
|
26
|
+
def list(agent_id, params = {})
|
|
27
|
+
parsed, options = Cerca::ApprovalRequestListParams.dump_request(params)
|
|
28
|
+
query = Cerca::Internal::Util.encode_query_params(parsed)
|
|
29
|
+
@client.request(
|
|
30
|
+
method: :get,
|
|
31
|
+
path: ["agents/%1$s/approvals", agent_id],
|
|
32
|
+
query: query.transform_keys(thread_id: "threadId"),
|
|
33
|
+
page: Cerca::Internal::ApprovalRequestsCursorPage,
|
|
34
|
+
model: Cerca::ApprovalRequest,
|
|
35
|
+
options: options
|
|
36
|
+
)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Create approval
|
|
40
|
+
#
|
|
41
|
+
# @overload resolve(agent_id, thread_id, approval_id, decision:, grant: nil, request_options: {})
|
|
42
|
+
#
|
|
43
|
+
# @param agent_id [String]
|
|
44
|
+
# @param thread_id [String]
|
|
45
|
+
# @param approval_id [String]
|
|
46
|
+
# @param decision [Symbol, Cerca::Models::ApprovalRequestResolveParams::Decision]
|
|
47
|
+
# @param grant [Symbol, Cerca::Models::ApprovalRequestResolveParams::Grant]
|
|
48
|
+
# @param request_options [Cerca::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
49
|
+
#
|
|
50
|
+
# @return [Cerca::Models::ApprovalRequest]
|
|
51
|
+
#
|
|
52
|
+
# @see Cerca::Models::ApprovalRequestResolveParams
|
|
53
|
+
def resolve(agent_id, thread_id, approval_id, params)
|
|
54
|
+
parsed, options = Cerca::ApprovalRequestResolveParams.dump_request(params)
|
|
55
|
+
@client.request(
|
|
56
|
+
method: :post,
|
|
57
|
+
path: ["agents/%1$s/threads/%2$s/approvals/%3$s", agent_id, thread_id, approval_id],
|
|
58
|
+
body: parsed,
|
|
59
|
+
model: Cerca::ApprovalRequest,
|
|
60
|
+
options: options
|
|
61
|
+
)
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# @api private
|
|
65
|
+
#
|
|
66
|
+
# @param client [Cerca::Client]
|
|
67
|
+
def initialize(client:)
|
|
68
|
+
@client = client
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
end
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Cerca
|
|
4
|
+
module Resources
|
|
5
|
+
class Auth
|
|
6
|
+
# Retrieve context
|
|
7
|
+
#
|
|
8
|
+
# @overload context(request_options: {})
|
|
9
|
+
#
|
|
10
|
+
# @param request_options [Cerca::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
11
|
+
#
|
|
12
|
+
# @return [Cerca::Models::AuthContextResponse]
|
|
13
|
+
#
|
|
14
|
+
# @see Cerca::Models::AuthContextParams
|
|
15
|
+
def context(params = {})
|
|
16
|
+
@client.request(
|
|
17
|
+
method: :get,
|
|
18
|
+
path: "auth/context",
|
|
19
|
+
model: Cerca::AuthContextResponse,
|
|
20
|
+
options: params[:request_options]
|
|
21
|
+
)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
# Some parameter documentations has been truncated, see
|
|
25
|
+
# {Cerca::Models::AuthListFleetsParams} for more details.
|
|
26
|
+
#
|
|
27
|
+
# List fleets
|
|
28
|
+
#
|
|
29
|
+
# @overload list_fleets(cursor: nil, limit: nil, request_options: {})
|
|
30
|
+
#
|
|
31
|
+
# @param cursor [String] Opaque pagination cursor returned by a previous request.
|
|
32
|
+
#
|
|
33
|
+
# @param limit [String] Maximum number of items to return. Defaults to 20 and preserves parseInt semanti
|
|
34
|
+
#
|
|
35
|
+
# @param request_options [Cerca::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
36
|
+
#
|
|
37
|
+
# @return [Cerca::Internal::FleetsCursorPage<Cerca::Models::Fleet>]
|
|
38
|
+
#
|
|
39
|
+
# @see Cerca::Models::AuthListFleetsParams
|
|
40
|
+
def list_fleets(params = {})
|
|
41
|
+
parsed, options = Cerca::AuthListFleetsParams.dump_request(params)
|
|
42
|
+
query = Cerca::Internal::Util.encode_query_params(parsed)
|
|
43
|
+
@client.request(
|
|
44
|
+
method: :get,
|
|
45
|
+
path: "auth/fleets",
|
|
46
|
+
query: query,
|
|
47
|
+
page: Cerca::Internal::FleetsCursorPage,
|
|
48
|
+
model: Cerca::Fleet,
|
|
49
|
+
options: options
|
|
50
|
+
)
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# @api private
|
|
54
|
+
#
|
|
55
|
+
# @param client [Cerca::Client]
|
|
56
|
+
def initialize(client:)
|
|
57
|
+
@client = client
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Cerca
|
|
4
|
+
module Resources
|
|
5
|
+
class Connections
|
|
6
|
+
# Some parameter documentations has been truncated, see
|
|
7
|
+
# {Cerca::Models::ConnectionCreateParams} for more details.
|
|
8
|
+
#
|
|
9
|
+
# Create API key
|
|
10
|
+
#
|
|
11
|
+
# @overload create(api_key:, owner:, provider:, account_label: nil, request_options: {})
|
|
12
|
+
#
|
|
13
|
+
# @param api_key [String] API key secret. It is stored securely and is not returned.
|
|
14
|
+
#
|
|
15
|
+
# @param owner [Cerca::Models::ConnectionOwner::OrganizationConnectionOwner, Cerca::Models::ConnectionOwner::FleetConnectionOwner] Public owner for a reusable connection. Organization owners use the authenticate
|
|
16
|
+
#
|
|
17
|
+
# @param provider [String] Credential provider to store an API key for.
|
|
18
|
+
#
|
|
19
|
+
# @param account_label [String] Optional human-readable account label.
|
|
20
|
+
#
|
|
21
|
+
# @param request_options [Cerca::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
22
|
+
#
|
|
23
|
+
# @return [Cerca::Models::Connection]
|
|
24
|
+
#
|
|
25
|
+
# @see Cerca::Models::ConnectionCreateParams
|
|
26
|
+
def create(params)
|
|
27
|
+
parsed, options = Cerca::ConnectionCreateParams.dump_request(params)
|
|
28
|
+
@client.request(
|
|
29
|
+
method: :post,
|
|
30
|
+
path: "connections/api-keys",
|
|
31
|
+
body: parsed,
|
|
32
|
+
model: Cerca::Connection,
|
|
33
|
+
options: options
|
|
34
|
+
)
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Some parameter documentations has been truncated, see
|
|
38
|
+
# {Cerca::Models::ConnectionListParams} for more details.
|
|
39
|
+
#
|
|
40
|
+
# List connections
|
|
41
|
+
#
|
|
42
|
+
# @overload list(owner_type:, cursor: nil, fleet_id: nil, limit: nil, request_options: {})
|
|
43
|
+
#
|
|
44
|
+
# @param owner_type [Symbol, Cerca::Models::ConnectionListParams::OwnerType] Public connection owner type.
|
|
45
|
+
#
|
|
46
|
+
# @param cursor [String] Opaque pagination cursor returned by a previous request.
|
|
47
|
+
#
|
|
48
|
+
# @param fleet_id [String] Required when ownerType is fleet.
|
|
49
|
+
#
|
|
50
|
+
# @param limit [String] Maximum number of items to return. Defaults to 20 and preserves parseInt semanti
|
|
51
|
+
#
|
|
52
|
+
# @param request_options [Cerca::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
53
|
+
#
|
|
54
|
+
# @return [Cerca::Internal::ConnectionsCursorPage<Cerca::Models::Connection>]
|
|
55
|
+
#
|
|
56
|
+
# @see Cerca::Models::ConnectionListParams
|
|
57
|
+
def list(params)
|
|
58
|
+
parsed, options = Cerca::ConnectionListParams.dump_request(params)
|
|
59
|
+
query = Cerca::Internal::Util.encode_query_params(parsed)
|
|
60
|
+
@client.request(
|
|
61
|
+
method: :get,
|
|
62
|
+
path: "connections",
|
|
63
|
+
query: query.transform_keys(owner_type: "ownerType", fleet_id: "fleetId"),
|
|
64
|
+
page: Cerca::Internal::ConnectionsCursorPage,
|
|
65
|
+
model: Cerca::Connection,
|
|
66
|
+
options: options
|
|
67
|
+
)
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Delete connection
|
|
71
|
+
#
|
|
72
|
+
# @overload delete(connection_id, owner_type:, fleet_id: nil, request_options: {})
|
|
73
|
+
#
|
|
74
|
+
# @param connection_id [String]
|
|
75
|
+
#
|
|
76
|
+
# @param owner_type [Symbol, Cerca::Models::ConnectionDeleteParams::OwnerType] Public connection owner type.
|
|
77
|
+
#
|
|
78
|
+
# @param fleet_id [String] Required when ownerType is fleet.
|
|
79
|
+
#
|
|
80
|
+
# @param request_options [Cerca::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
81
|
+
#
|
|
82
|
+
# @return [Cerca::Models::ConnectionDeleteResponse]
|
|
83
|
+
#
|
|
84
|
+
# @see Cerca::Models::ConnectionDeleteParams
|
|
85
|
+
def delete(connection_id, params)
|
|
86
|
+
parsed, options = Cerca::ConnectionDeleteParams.dump_request(params)
|
|
87
|
+
query = Cerca::Internal::Util.encode_query_params(parsed)
|
|
88
|
+
@client.request(
|
|
89
|
+
method: :delete,
|
|
90
|
+
path: ["connections/%1$s", connection_id],
|
|
91
|
+
query: query.transform_keys(owner_type: "ownerType", fleet_id: "fleetId"),
|
|
92
|
+
model: Cerca::Models::ConnectionDeleteResponse,
|
|
93
|
+
options: options
|
|
94
|
+
)
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Attach connection
|
|
98
|
+
#
|
|
99
|
+
# @overload attach(agent_id, connection_id:, metadata: nil, request_options: {})
|
|
100
|
+
#
|
|
101
|
+
# @param agent_id [String]
|
|
102
|
+
# @param connection_id [String]
|
|
103
|
+
# @param metadata [Hash{Symbol=>String}]
|
|
104
|
+
# @param request_options [Cerca::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
105
|
+
#
|
|
106
|
+
# @return [Cerca::Models::AttachedConnection]
|
|
107
|
+
#
|
|
108
|
+
# @see Cerca::Models::ConnectionAttachParams
|
|
109
|
+
def attach(agent_id, params)
|
|
110
|
+
parsed, options = Cerca::ConnectionAttachParams.dump_request(params)
|
|
111
|
+
@client.request(
|
|
112
|
+
method: :post,
|
|
113
|
+
path: ["agents/%1$s/connections", agent_id],
|
|
114
|
+
body: parsed,
|
|
115
|
+
model: Cerca::AttachedConnection,
|
|
116
|
+
options: options
|
|
117
|
+
)
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Detach connection
|
|
121
|
+
#
|
|
122
|
+
# @overload detach(agent_id, connection_id, request_options: {})
|
|
123
|
+
#
|
|
124
|
+
# @param agent_id [String]
|
|
125
|
+
# @param connection_id [String]
|
|
126
|
+
# @param request_options [Cerca::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
127
|
+
#
|
|
128
|
+
# @return [Cerca::Models::ConnectionDetachResponse]
|
|
129
|
+
#
|
|
130
|
+
# @see Cerca::Models::ConnectionDetachParams
|
|
131
|
+
def detach(agent_id, connection_id, params = {})
|
|
132
|
+
@client.request(
|
|
133
|
+
method: :delete,
|
|
134
|
+
path: ["agents/%1$s/connections/%2$s", agent_id, connection_id],
|
|
135
|
+
model: Cerca::Models::ConnectionDetachResponse,
|
|
136
|
+
options: params[:request_options]
|
|
137
|
+
)
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# List connections
|
|
141
|
+
#
|
|
142
|
+
# @overload list_for_agent(agent_id, request_options: {})
|
|
143
|
+
#
|
|
144
|
+
# @param agent_id [String]
|
|
145
|
+
# @param request_options [Cerca::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
146
|
+
#
|
|
147
|
+
# @return [Cerca::Models::ConnectionListForAgentResponse]
|
|
148
|
+
#
|
|
149
|
+
# @see Cerca::Models::ConnectionListForAgentParams
|
|
150
|
+
def list_for_agent(agent_id, params = {})
|
|
151
|
+
@client.request(
|
|
152
|
+
method: :get,
|
|
153
|
+
path: ["agents/%1$s/connections", agent_id],
|
|
154
|
+
model: Cerca::Models::ConnectionListForAgentResponse,
|
|
155
|
+
options: params[:request_options]
|
|
156
|
+
)
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
# @api private
|
|
160
|
+
#
|
|
161
|
+
# @param client [Cerca::Client]
|
|
162
|
+
def initialize(client:)
|
|
163
|
+
@client = client
|
|
164
|
+
end
|
|
165
|
+
end
|
|
166
|
+
end
|
|
167
|
+
end
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Cerca
|
|
4
|
+
module Resources
|
|
5
|
+
class Context
|
|
6
|
+
# Retrieve context entry
|
|
7
|
+
#
|
|
8
|
+
# @overload retrieve(agent_id, key:, request_options: {})
|
|
9
|
+
#
|
|
10
|
+
# @param agent_id [String]
|
|
11
|
+
#
|
|
12
|
+
# @param key [String] Context entry key.
|
|
13
|
+
#
|
|
14
|
+
# @param request_options [Cerca::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
15
|
+
#
|
|
16
|
+
# @return [Cerca::Models::Entry]
|
|
17
|
+
#
|
|
18
|
+
# @see Cerca::Models::ContextRetrieveParams
|
|
19
|
+
def retrieve(agent_id, params)
|
|
20
|
+
parsed, options = Cerca::ContextRetrieveParams.dump_request(params)
|
|
21
|
+
query = Cerca::Internal::Util.encode_query_params(parsed)
|
|
22
|
+
@client.request(
|
|
23
|
+
method: :get,
|
|
24
|
+
path: ["agents/%1$s/context/entry", agent_id],
|
|
25
|
+
query: query,
|
|
26
|
+
model: Cerca::Entry,
|
|
27
|
+
options: options
|
|
28
|
+
)
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Some parameter documentations has been truncated, see
|
|
32
|
+
# {Cerca::Models::ContextListParams} for more details.
|
|
33
|
+
#
|
|
34
|
+
# List context entries
|
|
35
|
+
#
|
|
36
|
+
# @overload list(agent_id, cursor: nil, limit: nil, prefix: nil, request_options: {})
|
|
37
|
+
#
|
|
38
|
+
# @param agent_id [String]
|
|
39
|
+
#
|
|
40
|
+
# @param cursor [String] Opaque pagination cursor returned by a previous request.
|
|
41
|
+
#
|
|
42
|
+
# @param limit [String] Maximum number of items to return. Defaults to 20 and preserves parseInt semanti
|
|
43
|
+
#
|
|
44
|
+
# @param prefix [String] Optional key prefix filter.
|
|
45
|
+
#
|
|
46
|
+
# @param request_options [Cerca::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
47
|
+
#
|
|
48
|
+
# @return [Cerca::Internal::EntriesCursorPage<Cerca::Models::EntrySummary>]
|
|
49
|
+
#
|
|
50
|
+
# @see Cerca::Models::ContextListParams
|
|
51
|
+
def list(agent_id, params = {})
|
|
52
|
+
parsed, options = Cerca::ContextListParams.dump_request(params)
|
|
53
|
+
query = Cerca::Internal::Util.encode_query_params(parsed)
|
|
54
|
+
@client.request(
|
|
55
|
+
method: :get,
|
|
56
|
+
path: ["agents/%1$s/context", agent_id],
|
|
57
|
+
query: query,
|
|
58
|
+
page: Cerca::Internal::EntriesCursorPage,
|
|
59
|
+
model: Cerca::EntrySummary,
|
|
60
|
+
options: options
|
|
61
|
+
)
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Delete context entry
|
|
65
|
+
#
|
|
66
|
+
# @overload delete(agent_id, key:, request_options: {})
|
|
67
|
+
#
|
|
68
|
+
# @param agent_id [String]
|
|
69
|
+
#
|
|
70
|
+
# @param key [String] Context entry key.
|
|
71
|
+
#
|
|
72
|
+
# @param request_options [Cerca::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
73
|
+
#
|
|
74
|
+
# @return [Cerca::Models::ContextDeleteResponse]
|
|
75
|
+
#
|
|
76
|
+
# @see Cerca::Models::ContextDeleteParams
|
|
77
|
+
def delete(agent_id, params)
|
|
78
|
+
parsed, options = Cerca::ContextDeleteParams.dump_request(params)
|
|
79
|
+
query = Cerca::Internal::Util.encode_query_params(parsed)
|
|
80
|
+
@client.request(
|
|
81
|
+
method: :delete,
|
|
82
|
+
path: ["agents/%1$s/context/entry", agent_id],
|
|
83
|
+
query: query,
|
|
84
|
+
model: Cerca::Models::ContextDeleteResponse,
|
|
85
|
+
options: options
|
|
86
|
+
)
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Some parameter documentations has been truncated, see
|
|
90
|
+
# {Cerca::Models::ContextSearchParams} for more details.
|
|
91
|
+
#
|
|
92
|
+
# Search context
|
|
93
|
+
#
|
|
94
|
+
# @overload search(agent_id, q:, cursor: nil, limit: nil, prefix: nil, request_options: {})
|
|
95
|
+
#
|
|
96
|
+
# @param agent_id [String]
|
|
97
|
+
#
|
|
98
|
+
# @param q [String] Search query.
|
|
99
|
+
#
|
|
100
|
+
# @param cursor [String] Opaque pagination cursor returned by a previous request.
|
|
101
|
+
#
|
|
102
|
+
# @param limit [String] Maximum number of items to return. Defaults to 20 and preserves parseInt semanti
|
|
103
|
+
#
|
|
104
|
+
# @param prefix [String] Optional key prefix filter.
|
|
105
|
+
#
|
|
106
|
+
# @param request_options [Cerca::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
107
|
+
#
|
|
108
|
+
# @return [Cerca::Internal::ResultsCursorPage<Cerca::Models::SearchResult>]
|
|
109
|
+
#
|
|
110
|
+
# @see Cerca::Models::ContextSearchParams
|
|
111
|
+
def search(agent_id, params)
|
|
112
|
+
parsed, options = Cerca::ContextSearchParams.dump_request(params)
|
|
113
|
+
query = Cerca::Internal::Util.encode_query_params(parsed)
|
|
114
|
+
@client.request(
|
|
115
|
+
method: :get,
|
|
116
|
+
path: ["agents/%1$s/context/search", agent_id],
|
|
117
|
+
query: query,
|
|
118
|
+
page: Cerca::Internal::ResultsCursorPage,
|
|
119
|
+
model: Cerca::SearchResult,
|
|
120
|
+
options: options
|
|
121
|
+
)
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Update context entry
|
|
125
|
+
#
|
|
126
|
+
# @overload write(agent_id, content:, key:, expected_version: nil, mime_type: nil, request_options: {})
|
|
127
|
+
#
|
|
128
|
+
# @param agent_id [String]
|
|
129
|
+
# @param content [String]
|
|
130
|
+
# @param key [String]
|
|
131
|
+
# @param expected_version [Float]
|
|
132
|
+
# @param mime_type [String]
|
|
133
|
+
# @param request_options [Cerca::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
134
|
+
#
|
|
135
|
+
# @return [Cerca::Models::Entry]
|
|
136
|
+
#
|
|
137
|
+
# @see Cerca::Models::ContextWriteParams
|
|
138
|
+
def write(agent_id, params)
|
|
139
|
+
parsed, options = Cerca::ContextWriteParams.dump_request(params)
|
|
140
|
+
@client.request(
|
|
141
|
+
method: :put,
|
|
142
|
+
path: ["agents/%1$s/context/entry", agent_id],
|
|
143
|
+
body: parsed,
|
|
144
|
+
model: Cerca::Entry,
|
|
145
|
+
options: options
|
|
146
|
+
)
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# @api private
|
|
150
|
+
#
|
|
151
|
+
# @param client [Cerca::Client]
|
|
152
|
+
def initialize(client:)
|
|
153
|
+
@client = client
|
|
154
|
+
end
|
|
155
|
+
end
|
|
156
|
+
end
|
|
157
|
+
end
|